2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-17 18:41:05 +00:00
|
|
|
|
|
|
|
class Weechat <Formula
|
|
|
|
@url='http://www.weechat.org/files/src/weechat-0.3.0.tar.bz2'
|
|
|
|
@homepage='http://www.weechat.org'
|
|
|
|
@md5='c31cfc229e964ff9257cc9c7f9e6c9bc'
|
|
|
|
|
2009-09-21 18:00:13 +00:00
|
|
|
depends_on 'cmake'
|
2009-09-18 13:38:43 +00:00
|
|
|
depends_on 'gnutls'
|
2009-09-17 18:41:05 +00:00
|
|
|
|
2009-10-06 12:01:51 +00:00
|
|
|
def patches
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
2009-09-17 18:41:05 +00:00
|
|
|
def install
|
2009-09-18 13:38:43 +00:00
|
|
|
#FIXME: Compiling perl module doesn't work
|
2009-10-02 18:56:20 +00:00
|
|
|
#NOTE: -DPREFIX has to be specified because weechat devs enjoy being non-standard
|
|
|
|
system "cmake", "-DPREFIX=#{prefix}",
|
|
|
|
"-DDISABLE_PERL=ON",
|
|
|
|
std_cmake_parameters, "."
|
2009-09-17 18:41:05 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2009-10-06 12:01:51 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake
|
|
|
|
index a7b2d24..371d630 100644
|
|
|
|
--- a/cmake/FindIconv.cmake
|
|
|
|
+++ b/cmake/FindIconv.cmake
|
|
|
|
@@ -43,10 +43,7 @@ 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 iconv_open ${ICONV_LIB_PATH} ICONV_FOUND)
|
|
|
|
ELSE(ICONV_LIBRARY)
|
|
|
|
CHECK_FUNCTION_EXISTS(iconv_open ICONV_FOUND)
|
|
|
|
ENDIF(ICONV_LIBRARY)
|
|
|
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
|
|
index 50d2f01..f812c74 100644
|
|
|
|
--- a/src/CMakeLists.txt
|
|
|
|
+++ b/src/CMakeLists.txt
|
|
|
|
@@ -92,6 +92,7 @@ ENDIF(NOT DISABLE_GNUTLS)
|
|
|
|
FIND_PACKAGE(Iconv)
|
|
|
|
IF(ICONV_FOUND)
|
|
|
|
ADD_DEFINITIONS( -DHAVE_ICONV )
|
|
|
|
+ LIST(APPEND EXTRA_LIBS iconv)
|
|
|
|
ENDIF(ICONV_FOUND)
|
|
|
|
|
|
|
|
FIND_LIBRARY(DL_LIBRARY
|
|
|
|
|