From f037628cf0e21bcdeeb492e78895d0d126213cfb Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 20 Feb 2016 11:38:15 +0000 Subject: [PATCH] weechat: add recipe for version 1.4 --- net-irc/weechat/patches/weechat-1.4.patchset | 39 ++++++++++ net-irc/weechat/weechat-1.4.recipe | 80 ++++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 net-irc/weechat/patches/weechat-1.4.patchset create mode 100644 net-irc/weechat/weechat-1.4.recipe diff --git a/net-irc/weechat/patches/weechat-1.4.patchset b/net-irc/weechat/patches/weechat-1.4.patchset new file mode 100644 index 000000000..3a0bd6fe7 --- /dev/null +++ b/net-irc/weechat/patches/weechat-1.4.patchset @@ -0,0 +1,39 @@ +From fd03745a74c99ea33d52c239f7f22785872cc7dd Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Sat, 20 Feb 2016 11:34:21 +0000 +Subject: Haiku patch + + +diff --git a/src/gui/curses/CMakeLists.txt b/src/gui/curses/CMakeLists.txt +index 81af7bd..4a62430 100644 +--- a/src/gui/curses/CMakeLists.txt ++++ b/src/gui/curses/CMakeLists.txt +@@ -59,7 +59,13 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") + list(APPEND EXTRA_LIBS "socket" "nsl") + endif() + +-list(APPEND EXTRA_LIBS "pthread") ++if(${CMAKE_SYSTEM_NAME} STREQUAL "Haiku") ++ list(APPEND EXTRA_LIBS "network") ++endif() ++ ++if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Haiku") ++ list(APPEND EXTRA_LIBS "pthread") ++endif() + + if(ICONV_LIBRARY) + list(APPEND EXTRA_LIBS ${ICONV_LIBRARY}) +@@ -69,7 +75,9 @@ if(LIBINTL_LIBRARY) + list(APPEND EXTRA_LIBS ${LIBINTL_LIBRARY}) + endif() + +-list(APPEND EXTRA_LIBS "m") ++if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Haiku") ++ list(APPEND EXTRA_LIBS "m") ++endif() + + list(APPEND EXTRA_LIBS ${CURL_LIBRARIES}) + +-- +2.2.2 + diff --git a/net-irc/weechat/weechat-1.4.recipe b/net-irc/weechat/weechat-1.4.recipe new file mode 100644 index 000000000..d356bb638 --- /dev/null +++ b/net-irc/weechat/weechat-1.4.recipe @@ -0,0 +1,80 @@ +SUMMARY="Portable and multi-interface IRC client" +DESCRIPTION="WeeChat (Wee Enhanced Environment for Chat) is a free chat \ +client, fast and light, designed for many operating systems. +It is highly customizable and extensible with scripts. +" +HOMEPAGE="http://weechat.org" +COPYRIGHT="2003-2016 Sébastien Helleu" +LICENSE=" + GNU GPL v3 + " +REVISION="1" +SOURCE_URI="https://weechat.org/files/src/weechat-$portVersion.tar.bz2" +CHECKSUM_SHA256="e06d9949ccececdd9692c95c41304c2f7fe9ec47b5eedd0d0a8529f6a3c1ddd4" +PATCHES="weechat-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + weechat${secondaryArchSuffix} = $portVersion + cmd:weechat + cmd:weechat_curses + " +REQUIRES=" + haiku${secondaryArchSuffix} + lib:libcurl$secondaryArchSuffix + lib:libgcrypt$secondaryArchSuffix + lib:libgnutls$secondaryArchSuffix + lib:libncurses$secondaryArchSuffix + lib:libz$secondaryArchSuffix + # for libgcrypt + lib:libgpg_error$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libcurl$secondaryArchSuffix + devel:libgcrypt$secondaryArchSuffix + devel:libgnutls$secondaryArchSuffix + devel:libncurses$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:g++${secondaryArchSuffix} + cmd:make + cmd:pkg_config${secondaryArchSuffix} + " +PROVIDES_devel=" + weechat${secondaryArchSuffix}_devel = $portVersion compat >= 1 + " +REQUIRES_devel=" + weechat$secondaryArchSuffix == $portVersion base + " + +BUILD() +{ + mkdir -p build + cd build + cmake -DCMAKE_INSTALL_PREFIX=$prefix \ + -DWEECHAT_HOME=~/config/settings/weechat \ + .. + make $jobArgs +} + +INSTALL() +{ + cd build + + make install + + mkdir -p $(dirname $includeDir) + mv $prefix/include $includeDir + + fixPkgconfig + + # devel package + packageEntries devel \ + $developDir +}