From c4bcf321c6a6731d7b79519fd072e6afba5926e5 Mon Sep 17 00:00:00 2001 From: Øyvind Ingebrigtsen Øvergaard Date: Tue, 12 Feb 2013 21:05:58 +0100 Subject: weechat: fix iconv detection Change the way cmake determines whether libiconv is available, since the existing check is broken and makes cmake think that libiconv isn't available. Signed-off-by: Misty De Meo --- Library/Formula/weechat.rb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'Library/Formula') diff --git a/Library/Formula/weechat.rb b/Library/Formula/weechat.rb index ff5e66806..ec12192a5 100644 --- a/Library/Formula/weechat.rb +++ b/Library/Formula/weechat.rb @@ -20,6 +20,13 @@ class Weechat < Formula option 'python', 'Build the python module (requires framework Python)' option 'aspell', 'Build the aspell module that checks your spelling' + def patches + # Fixes bug #38321: The charset plugin doesn't build on OS X + # https://savannah.nongnu.org/bugs/index.php?38321 + # Patch incorporated upstream; should be included in the next release + DATA + end + def install # Remove all arch flags from the PERL_*FLAGS as we specify them ourselves. # This messes up because the system perl is a fat binary with 32, 64 and PPC @@ -68,3 +75,25 @@ class Weechat < Formula EOS end end + +__END__ +diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake +index c077ba0..6622ea3 100644 +--- a/cmake/FindIconv.cmake ++++ b/cmake/FindIconv.cmake +@@ -49,10 +49,11 @@ FIND_LIBRARY(ICONV_LIBRARY + IF(ICONV_INCLUDE_PATH) + IF(ICONV_LIBRARY) + STRING(REGEX REPLACE "/[^/]*$" "" ICONV_LIB_PATH "${ICONV_LIBRARY}") +- CHECK_LIBRARY_EXISTS(iconv libiconv_open ${ICONV_LIB_PATH} ICONV_FOUND) +- IF(NOT ICONV_FOUND) +- CHECK_LIBRARY_EXISTS(iconv iconv_open ${ICONV_LIB_PATH} ICONV_FOUND) +- ENDIF(NOT ICONV_FOUND) ++ 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) -- cgit v1.2.3