Clean up iconv-related patches.
The port is still linking to libiconv.so from ports on all FreeBSD releases, but that will be dealt with separately. For now: - Remove patch-cmake_FindIconv.cmake. Since the iconv port is always present (sometimes due to an indirect dependency), the hacks in the patch are not necessary and the ports files are always found (this will change later and libc will be preferred on >= 10.1). - Make patch-CMakeLists.txt smaller. It is fine to let the port check for sys/iconv.h, and the try_run() statement can be fixed on 9.3 by making sure the test program is built with iconv's paths and libraries. Test-built on 9.3-i386, 10.1-amd64 and HEAD-amd64.
This commit is contained in:
parent
f071e23211
commit
9aabd9f1ae
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=395552
2 changed files with 8 additions and 64 deletions
|
@ -1,55 +1,13 @@
|
|||
--- ./CMakeLists.txt.orig 2009-08-27 08:46:40.000000000 +1100
|
||||
+++ ./CMakeLists.txt 2009-09-16 10:21:34.000000000 +1100
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
INCLUDE( CheckIncludeFile )
|
||||
|
||||
-CHECK_INCLUDE_FILE( sys/iconv.h HAVE_SYS_ICONV_H )
|
||||
+#CHECK_INCLUDE_FILE( sys/iconv.h HAVE_SYS_ICONV_H )
|
||||
|
||||
# Add "COMPILE_DEFINITIONS definitions" to TRY_RUN only if we have compile definitions
|
||||
|
||||
@@ -59,19 +59,22 @@
|
||||
--- CMakeLists.txt
|
||||
+++ CMakeLists.txt
|
||||
@@ -59,7 +59,9 @@
|
||||
SET( ICONV_COMPILE_DEFINITIONS ${ICONV_COMPILE_DEFINITIONS} "-DHAVE_SYS_ICONV_H" )
|
||||
ENDIF( HAVE_SYS_ICONV_H )
|
||||
|
||||
-TRY_RUN( MODERN_ICONV_RUN MODERN_ICONV_COMPILE ${wvWare_BINARY_DIR}/CMakeTmp ${wvWare_SOURCE_DIR}/cmake/TestModernIconv.c COMPILE_DEFINITIONS ${ICONV_COMPILE_DEFINITIONS} )
|
||||
+#TRY_RUN( MODERN_ICONV_RUN MODERN_ICONV_COMPILE ${wvWare_BINARY_DIR}/CMakeTmp ${wvWare_SOURCE_DIR}/cmake/TestModernIconv.c COMPILE_DEFINITIONS ${ICONV_COMPILE_DEFINITIONS} )
|
||||
+TRY_RUN( MODERN_ICONV_RUN MODERN_ICONV_COMPILE ${wvWare_BINARY_DIR}/CMakeTmp ${wvWare_SOURCE_DIR}/cmake/TestModernIconv.c
|
||||
+ COMPILE_DEFINITIONS ${ICONV_COMPILE_DEFINITIONS}
|
||||
+ CMAKE_FLAGS -DINCLUDE_DIRECTORIES=${ICONV_INCLUDE_DIR} -DLINK_LIBRARIES=${ICONV_LIBRARIES} )
|
||||
|
||||
-IF( MODERN_ICONV_RUN GREATER 0 OR NOT MODERN_ICONV_COMPILE )
|
||||
- MESSAGE( STATUS "wv2 depends on a modern iconv installation, supporting UNICODELITTLE and" )
|
||||
- MESSAGE( STATUS "UNICODEBIG. The detected iconv version doesn't support these conversions." )
|
||||
- MESSAGE( STATUS "" )
|
||||
- MESSAGE( STATUS "Please get a new libiconv from http://www.gnu.org/software/libiconv/" )
|
||||
- MESSAGE( STATUS "You might want to install the library to some alternative directory, in" )
|
||||
- MESSAGE( STATUS "order not to overwrite your current installation. Please use the options" )
|
||||
- MESSAGE( STATUS "-DICONV_INCLUDE_DIR=DIR and -DICONV_LIBRARIES=DIR to specify the location." )
|
||||
- MESSAGE( STATUS "" )
|
||||
- MESSAGE( FATAL_ERROR "* * * No iconv support - unable to continue. * * *" )
|
||||
-ENDIF( MODERN_ICONV_RUN GREATER 0 OR NOT MODERN_ICONV_COMPILE )
|
||||
+SET( MODERN_ICONV_RUN 1)
|
||||
+SET( MODERN_ICONV_COMPILE 1 )
|
||||
+
|
||||
+#IF( MODERN_ICONV_RUN GREATER 0 OR NOT MODERN_ICONV_COMPILE )
|
||||
+# MESSAGE( STATUS "wv2 depends on a modern iconv installation, supporting UNICODELITTLE and" )
|
||||
+# MESSAGE( STATUS "UNICODEBIG. The detected iconv version doesn't support these conversions." )
|
||||
+# MESSAGE( STATUS "" )
|
||||
+# MESSAGE( STATUS "Please get a new libiconv from http://www.gnu.org/software/libiconv/" )
|
||||
+# MESSAGE( STATUS "You might want to install the library to some alternative directory, in" )
|
||||
+# MESSAGE( STATUS "order not to overwrite your current installation. Please use the options" )
|
||||
+# MESSAGE( STATUS "-DICONV_INCLUDE_DIR=DIR and -DICONV_LIBRARIES=DIR to specify the location." )
|
||||
+# MESSAGE( STATUS "" )
|
||||
+# MESSAGE( FATAL_ERROR "* * * No iconv support - unable to continue. * * *" )
|
||||
+#ENDIF( MODERN_ICONV_RUN GREATER 0 OR NOT MODERN_ICONV_COMPILE )
|
||||
|
||||
#
|
||||
# Various checks
|
||||
@@ -157,6 +160,8 @@
|
||||
SET( _WV2_CFLAGS ${_WV2_CFLAGS} ${GLIB2_INCLUDE_DIR} )
|
||||
ENDIF( GLIB2_FOUND )
|
||||
|
||||
+SET( _WV2_CFLAGS "${_WV2_CFLAGS} -I${CMAKE_INSTALL_PREFIX}/include/wv2" )
|
||||
+
|
||||
#
|
||||
# Clean and prepare
|
||||
#
|
||||
IF( MODERN_ICONV_RUN GREATER 0 OR NOT MODERN_ICONV_COMPILE )
|
||||
MESSAGE( STATUS "wv2 depends on a modern iconv installation, supporting UNICODELITTLE and" )
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
--- ./cmake/FindIconv.cmake.orig 2009-08-27 08:46:40.000000000 +1100
|
||||
+++ ./cmake/FindIconv.cmake 2009-09-16 09:41:24.000000000 +1100
|
||||
@@ -13,9 +13,9 @@
|
||||
SET(ICONV_FIND_QUIETLY TRUE)
|
||||
ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||
|
||||
-FIND_PATH(ICONV_INCLUDE_DIR iconv.h)
|
||||
+FIND_PATH(ICONV_INCLUDE_DIR iconv.h PATHS /usr/local/include /usr/include )
|
||||
|
||||
-FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c)
|
||||
+FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c PATHS /usr/local/lib /usr/lib )
|
||||
|
||||
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||
SET(ICONV_FOUND TRUE)
|
Loading…
Reference in a new issue