From 3c11c91f69f968289c7e8f0fac9dadd98af6250c Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sun, 9 Oct 2016 16:20:38 -0400 Subject: [PATCH] weechat: Update from 1.5 to 1.6 --- packages/weechat/build.sh | 14 +++---- packages/weechat/cmake-FindPython.cmake.patch | 30 ++++++-------- packages/weechat/declare-res-init.patch | 39 +++++++++++++++++++ 3 files changed, 58 insertions(+), 25 deletions(-) create mode 100644 packages/weechat/declare-res-init.patch diff --git a/packages/weechat/build.sh b/packages/weechat/build.sh index 397c41e23..6916ce1ce 100755 --- a/packages/weechat/build.sh +++ b/packages/weechat/build.sh @@ -1,16 +1,17 @@ TERMUX_PKG_HOMEPAGE=http://weechat.org/ TERMUX_PKG_DESCRIPTION="Fast, light and extensible IRC chat client" -TERMUX_PKG_VERSION=1.5 +TERMUX_PKG_VERSION=1.6 TERMUX_PKG_SRCURL=http://www.weechat.org/files/src/weechat-${TERMUX_PKG_VERSION}.tar.bz2 +TERMUX_PKG_SHA256=73eca5212fadb7056f5f72d9dfc96453dea0342c963d1f1ca36c84def5653c34 TERMUX_PKG_DEPENDS="ncurses, libgcrypt, libcurl, libgnutls, libandroid-support" # weechat-curses is a symlink to weechat, so remove it: TERMUX_PKG_RM_AFTER_INSTALL="bin/weechat-curses share/icons" termux_step_configure () { cd $TERMUX_PKG_BUILDDIR - cmake -G "Unix Makefiles" .. \ + cmake -G "Unix Makefiles" $TERMUX_PKG_SRCDIR \ -DCMAKE_AR=`which ${TERMUX_HOST_PLATFORM}-ar` \ - -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_CROSSCOMPILING=True \ -DCMAKE_C_FLAGS="$CFLAGS $CPPFLAGS" \ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ @@ -19,10 +20,10 @@ termux_step_configure () { -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ -DCMAKE_INSTALL_PREFIX=$TERMUX_PREFIX \ -DCMAKE_LINKER=`which ${TERMUX_HOST_PLATFORM}-ld` \ - -DCMAKE_MAKE_PROGRAM=`which make` \ + -DCMAKE_MAKE_PROGRAM=`which make` \ -DCMAKE_RANLIB=`which ${TERMUX_HOST_PLATFORM}-ranlib` \ -DCMAKE_SYSTEM_NAME=Linux \ - -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG \ -DZLIB_LIBRARY:FILEPATH="$TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/libz.so" \ -DZLIB_INCLUDE_DIR:PATH="$TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/include" \ -DCA_FILE="$TERMUX_PREFIX/etc/tls/cert.pem" \ @@ -30,6 +31,5 @@ termux_step_configure () { -DENABLE_MAN=ON \ -DENABLE_PYTHON3=ON \ -DENABLE_PERL=ON \ - -DENABLE_TCL=OFF \ - $TERMUX_PKG_SRCDIR + -DENABLE_TCL=OFF } diff --git a/packages/weechat/cmake-FindPython.cmake.patch b/packages/weechat/cmake-FindPython.cmake.patch index a2e5158a3..a29a8ae81 100644 --- a/packages/weechat/cmake-FindPython.cmake.patch +++ b/packages/weechat/cmake-FindPython.cmake.patch @@ -1,13 +1,12 @@ -diff -u -r ../weechat-1.5/cmake/FindPython.cmake ./cmake/FindPython.cmake ---- ../weechat-1.5/cmake/FindPython.cmake 2016-05-01 06:50:12.000000000 -0400 -+++ ./cmake/FindPython.cmake 2016-05-03 04:00:56.742055189 -0400 -@@ -33,65 +33,11 @@ - set(PYTHON_FIND_QUIETLY TRUE) +diff -u -r ../weechat-1.6/cmake/FindPython.cmake ./cmake/FindPython.cmake +--- ../weechat-1.6/cmake/FindPython.cmake 2016-10-02 03:35:04.000000000 -0400 ++++ ./cmake/FindPython.cmake 2016-10-09 14:56:31.261168669 -0400 +@@ -34,64 +34,11 @@ endif() --if(ENABLE_PYTHON3) + if(ENABLE_PYTHON3) - find_program(PYTHON_EXECUTABLE -- NAMES python3.4 python3.3 python3.2 python3.1 python3.0 python3 python2.7 python2.6 python2.5 python +- NAMES python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python3 python2.7 python2.6 python2.5 python - PATHS /usr/bin /usr/local/bin /usr/pkg/bin - ) -else() @@ -39,7 +38,7 @@ diff -u -r ../weechat-1.5/cmake/FindPython.cmake ./cmake/FindPython.cmake - ) - if(ENABLE_PYTHON3) - find_library(PYTHON_LIBRARY -- NAMES python3.4 python3.3 python3.2 python3.1 python3.0 python3 python2.7 python2.6 python2.5 python +- NAMES python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python3 python2.7 python2.6 python2.5 python - HINTS ${PYTHON_POSSIBLE_LIB_PATH} - ) - else() @@ -64,16 +63,11 @@ diff -u -r ../weechat-1.5/cmake/FindPython.cmake ./cmake/FindPython.cmake - set(PYTHON_FOUND TRUE) - endif() - endif() -+set(PYTHON_EXECUTABLE "@TERMUX_PREFIX@/bin/python") -+set(PYTHON_INCLUDE_PATH "@TERMUX_PREFIX@/include/python3.5m") -+set(PYTHON_LIBRARY "@TERMUX_PREFIX@/lib") -+set(PYTHON_LFLAGS "-Xlinker -export-dynamic -lpython3.5m") -+set(PYTHON_FOUND TRUE) ++ set(PYTHON_EXECUTABLE "@TERMUX_PREFIX@/bin/python") ++ set(PYTHON_INCLUDE_PATH "@TERMUX_PREFIX@/include/python3.5m") ++ set(PYTHON_LIBRARY "@TERMUX_PREFIX@/lib") ++ set(PYTHON_LFLAGS "-Xlinker -export-dynamic -lpython3.5m") ++ set(PYTHON_FOUND TRUE) mark_as_advanced( PYTHON_EXECUTABLE -@@ -100,4 +46,3 @@ - PYTHON_LFLAGS - ) - --endif() diff --git a/packages/weechat/declare-res-init.patch b/packages/weechat/declare-res-init.patch new file mode 100644 index 000000000..52bd992fb --- /dev/null +++ b/packages/weechat/declare-res-init.patch @@ -0,0 +1,39 @@ +diff -u -r ../weechat-1.6/src/core/wee-network.c ./src/core/wee-network.c +--- ../weechat-1.6/src/core/wee-network.c 2016-10-02 03:35:04.000000000 -0400 ++++ ./src/core/wee-network.c 2016-10-09 14:54:05.867352606 -0400 +@@ -65,6 +65,9 @@ + #include "wee-string.h" + #include "../plugins/plugin.h" + ++#ifdef __ANDROID__ ++int res_init(); ++#endif + + int network_init_gnutls_ok = 0; + +diff -u -r ../weechat-1.6/src/plugins/irc/irc-server.c ./src/plugins/irc/irc-server.c +--- ../weechat-1.6/src/plugins/irc/irc-server.c 2016-10-02 03:35:04.000000000 -0400 ++++ ./src/plugins/irc/irc-server.c 2016-10-09 14:52:31.256766303 -0400 +@@ -66,6 +66,9 @@ + #include "irc-redirect.h" + #include "irc-sasl.h" + ++#ifdef __ANDROID__ ++int res_init(); ++#endif + + struct t_irc_server *irc_servers = NULL; + struct t_irc_server *last_irc_server = NULL; +diff -u -r ../weechat-1.6/src/plugins/xfer/xfer.c ./src/plugins/xfer/xfer.c +--- ../weechat-1.6/src/plugins/xfer/xfer.c 2016-10-02 03:35:04.000000000 -0400 ++++ ./src/plugins/xfer/xfer.c 2016-10-09 14:52:31.256766303 -0400 +@@ -46,6 +46,9 @@ + #include "xfer-network.h" + #include "xfer-upgrade.h" + ++#ifdef __ANDROID__ ++int res_init(); ++#endif + + WEECHAT_PLUGIN_NAME(XFER_PLUGIN_NAME); + WEECHAT_PLUGIN_DESCRIPTION(N_("DCC file transfer and direct chat"));