diff options
Diffstat (limited to 'irc')
-rw-r--r-- | irc/weechat-devel/Makefile | 3 | ||||
-rw-r--r-- | irc/weechat-devel/files/patch-cmake-FindIconv.cmake | 65 | ||||
-rw-r--r-- | irc/weechat/Makefile | 3 | ||||
-rw-r--r-- | irc/weechat/files/patch-cmake-FindIconv.cmake | 65 |
4 files changed, 20 insertions, 116 deletions
diff --git a/irc/weechat-devel/Makefile b/irc/weechat-devel/Makefile index 7d42b407ea47..fb35a7134a1a 100644 --- a/irc/weechat-devel/Makefile +++ b/irc/weechat-devel/Makefile @@ -22,7 +22,8 @@ CONFLICTS= weechat-0.3* USE_LDCONFIG= yes USES= cmake iconv ncurses -CMAKE_ARGS+= -DENABLE_GUILE=no +CMAKE_ARGS+= -DENABLE_GUILE=no \ + -DICONV_INCLUDE_PATH=${ICONV_INCLUDE_PATH} CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib GITDESC= v0.4.3-14-gc324610 diff --git a/irc/weechat-devel/files/patch-cmake-FindIconv.cmake b/irc/weechat-devel/files/patch-cmake-FindIconv.cmake index a40e3d92ff8a..eef7422b85cc 100644 --- a/irc/weechat-devel/files/patch-cmake-FindIconv.cmake +++ b/irc/weechat-devel/files/patch-cmake-FindIconv.cmake @@ -1,63 +1,14 @@ ---- cmake/FindIconv.cmake.orig 2014-02-13 15:09:35 UTC +--- cmake/FindIconv.cmake +++ cmake/FindIconv.cmake -@@ -33,39 +33,24 @@ IF(ICONV_FOUND) - set(ICONV_FIND_QUIETLY TRUE) - ENDIF(ICONV_FOUND) - --INCLUDE(CheckLibraryExists) - INCLUDE(CheckFunctionExists) - --FIND_PATH(ICONV_INCLUDE_PATH -- NAMES iconv.h -- PATHS /usr/include /usr/local/include /usr/pkg/include --) -- --FIND_LIBRARY(ICONV_LIBRARY -- NAMES iconv -- PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib --) -+FIND_PATH(ICONV_INCLUDE_PATH iconv.h) +@@ -48,9 +48,8 @@ find_library(ICONV_LIBRARY IF(ICONV_INCLUDE_PATH) -- IF(ICONV_LIBRARY) + IF(ICONV_LIBRARY) - STRING(REGEX REPLACE "/[^/]*$" "" ICONV_LIB_PATH "${ICONV_LIBRARY}") - CHECK_LIBRARY_EXISTS(iconv libiconv_open ${ICONV_LIB_PATH} LIBICONV_OPEN_FOUND) - CHECK_LIBRARY_EXISTS(iconv iconv_open ${ICONV_LIB_PATH} ICONV_OPEN_FOUND) -- IF(LIBICONV_OPEN_FOUND OR ICONV_OPEN_FOUND) -- SET(ICONV_FOUND TRUE) -- ENDIF(LIBICONV_OPEN_FOUND OR ICONV_OPEN_FOUND) -- ELSE(ICONV_LIBRARY) -- CHECK_FUNCTION_EXISTS(iconv_open ICONV_FOUND) -- ENDIF(ICONV_LIBRARY) -+ CHECK_FUNCTION_EXISTS(iconv ICONV_FOUND) -+ IF(NOT ICONV_FOUND) -+ FIND_LIBRARY(ICONV_LIBRARY NAMES iconv libiconv libiconv-2) -+ IF(ICONV_LIBRARY) -+ SET(ICONV_FOUND TRUE) -+ ENDIF(ICONV_LIBRARY) -+ ENDIF(NOT ICONV_FOUND) - ENDIF(ICONV_INCLUDE_PATH) - - include(CheckCSourceCompiles) - --IF(ICONV_LIBRARY) -- SET(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY}) -- SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_PATH}) --ENDIF(ICONV_LIBRARY) -- -+SET(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY}) -+SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_PATH}) - SET(CMAKE_REQUIRED_FLAGS -Werror) - check_c_source_compiles(" - #include <iconv.h> -@@ -79,6 +64,10 @@ check_c_source_compiles(" - return 0; - } - " ICONV_2ARG_IS_CONST) -+SET(CMAKE_REQUIRED_LIBRARIES) -+SET(CMAKE_REQUIRED_INCLUDES) -+SET(CMAKE_REQUIRED_FLAGS) -+ - MARK_AS_ADVANCED( - ICONV_INCLUDE_PATH - ICONV_LIBRARY ++ CHECK_LIBRARY_EXISTS("${ICONV_LIBRARY}" libiconv_open "" LIBICONV_OPEN_FOUND) ++ CHECK_LIBRARY_EXISTS("${ICONV_LIBRARY}" iconv_open "" ICONV_OPEN_FOUND) + IF(LIBICONV_OPEN_FOUND OR ICONV_OPEN_FOUND) + SET(ICONV_FOUND TRUE) + ENDIF() diff --git a/irc/weechat/Makefile b/irc/weechat/Makefile index 4074e1983e6f..077a51ebf9ca 100644 --- a/irc/weechat/Makefile +++ b/irc/weechat/Makefile @@ -19,7 +19,8 @@ CONFLICTS= weechat-devel-[0-9]* USE_LDCONFIG= yes USES= cmake iconv ncurses -CMAKE_ARGS+= -DENABLE_GUILE=no +CMAKE_ARGS+= -DENABLE_GUILE=no \ + -DICONV_INCLUDE_PATH=${ICONV_INCLUDE_PATH} CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib LIB_DEPENDS+= libcurl.so:${PORTSDIR}/ftp/curl \ diff --git a/irc/weechat/files/patch-cmake-FindIconv.cmake b/irc/weechat/files/patch-cmake-FindIconv.cmake index ae48f766b322..d2f1e366d2a8 100644 --- a/irc/weechat/files/patch-cmake-FindIconv.cmake +++ b/irc/weechat/files/patch-cmake-FindIconv.cmake @@ -1,63 +1,14 @@ ---- cmake/FindIconv.cmake.orig 2015-01-25 07:40:23 UTC +--- cmake/FindIconv.cmake +++ cmake/FindIconv.cmake -@@ -33,39 +33,24 @@ if(ICONV_FOUND) - set(ICONV_FIND_QUIETLY TRUE) - endif() - --include(CheckLibraryExists) - include(CheckFunctionExists) - --find_path(ICONV_INCLUDE_PATH -- NAMES iconv.h -- PATHS /usr/include /usr/local/include /usr/pkg/include --) -- --find_library(ICONV_LIBRARY -- NAMES iconv -- PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib --) -+find_path(ICONV_INCLUDE_PATH iconv.h) +@@ -48,9 +48,8 @@ find_library(ICONV_LIBRARY if(ICONV_INCLUDE_PATH) -- if(ICONV_LIBRARY) + if(ICONV_LIBRARY) - string(REGEX REPLACE "/[^/]*$" "" ICONV_LIB_PATH "${ICONV_LIBRARY}") - check_library_exists(iconv libiconv_open ${ICONV_LIB_PATH} LIBICONV_OPEN_FOUND) - check_library_exists(iconv iconv_open ${ICONV_LIB_PATH} ICONV_OPEN_FOUND) -- if(LIBICONV_OPEN_FOUND OR ICONV_OPEN_FOUND) -- set(ICONV_FOUND TRUE) -- endif() -- else() -- check_function_exists(iconv_open ICONV_FOUND) -- endif() -+ check_function_exists(iconv ICONV_FOUND) -+ if(NOT ICONV_FOUND) -+ find_library(ICONV_LIBRARY NAMES iconv libiconv libiconv-2) -+ if(ICONV_LIBRARY) -+ set(ICONV_FOUND TRUE) -+ endif(ICONV_LIBRARY) -+ endif(NOT ICONV_FOUND) - endif() - - include(CheckCSourceCompiles) - --if(ICONV_LIBRARY) -- set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY}) -- set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_PATH}) --endif() -- -+set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY}) -+set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_PATH}) - set(CMAKE_REQUIRED_FLAGS -Werror) - check_c_source_compiles(" - #include <iconv.h> -@@ -80,6 +65,10 @@ check_c_source_compiles(" - } - " ICONV_2ARG_IS_CONST) - -+set(CMAKE_REQUIRED_LIBRARIES) -+set(CMAKE_REQUIRED_INCLUDES) -+set(CMAKE_REQUIRED_FLAGS) -+ - mark_as_advanced( - ICONV_INCLUDE_PATH - ICONV_LIBRARY ++ check_library_exists("${ICONV_LIBRARY}" libiconv_open "" LIBICONV_OPEN_FOUND) ++ check_library_exists("${ICONV_LIBRARY}" iconv_open "" ICONV_OPEN_FOUND) + if(LIBICONV_OPEN_FOUND OR ICONV_OPEN_FOUND) + set(ICONV_FOUND TRUE) + endif() |