001-iconv-disabling-option.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. --- a/cmake/FindIconv.cmake
  2. +++ b/cmake/FindIconv.cmake
  3. @@ -34,9 +34,9 @@ string(REGEX REPLACE "(.*)/include/?" "\
  4. FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c HINTS "${ICONV_INCLUDE_BASE_DIR}/lib" PATHS /opt/local/lib)
  5. -IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
  6. +IF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
  7. SET(ICONV_FOUND TRUE)
  8. -ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
  9. +ENDIF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
  10. set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
  11. set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
  12. --- a/configure
  13. +++ b/configure
  14. @@ -31,6 +31,7 @@ Usage: ./configure [options]
  15. --enable-backup enable backup support
  16. --enable-win32 enable mingw crosscomilation
  17. --enable-protection enable compile time protections
  18. +--disable-iconv disable iconv support
  19. --with-python=<path> path to Python interpreter
  20. --without-gnapplet disable installation of gnapplet
  21. --without-completion disable installation of bash completion script
  22. @@ -57,6 +58,7 @@ CMAKE_PROTECTION=
  23. CMAKE_PYTHON=
  24. CMAKE_GNAP=
  25. CMAKE_COMPLETE=
  26. +CMAKE_ICONV=
  27. # process command line
  28. while [ "$#" -gt 0 ] ; do
  29. @@ -94,6 +96,12 @@ while [ "$#" -gt 0 ] ; do
  30. --disable-protection)
  31. CMAKE_PROTECTION="-DENABLE_PROTECTION=OFF"
  32. ;;
  33. + --enable-iconv)
  34. + CMAKE_ICONV="-DDISABLE_ICONV=OFF"
  35. + ;;
  36. + --disable-iconv)
  37. + CMAKE_ICONV="-DDISABLE_ICONV=ON"
  38. + ;;
  39. --enable-debug)
  40. CMAKE_DEBUG="-DCMAKE_BUILD_TYPE=Debug"
  41. ;;
  42. @@ -142,4 +150,4 @@ fi
  43. cd "$BUILD_DIR"
  44. # invoke cmake to do configuration
  45. -cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE
  46. +cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV