chiark / gitweb /
Update Profanity and Libstrophe to their latest versions (#461)
authorOliver Schmidhauser <oliver.schmidhauser@gmail.com>
Fri, 16 Sep 2016 23:44:12 +0000 (01:44 +0200)
committerFredrik Fornwall <fredrik@fornwall.net>
Fri, 16 Sep 2016 23:44:12 +0000 (01:44 +0200)
* Update libstrophe to version 0.9.1.
* Update profanity to version 0.5.0.
* Enable python plugin support for profanity.

packages/libstrophe/build.sh
packages/libstrophe/configure.ac.patch [deleted file]
packages/profanity/build.sh
packages/profanity/cmd_funcs.c.patch [new file with mode: 0644]

index 7e92de58441ec5e8f936439df2262c6f47ca05a3..7ac59d5906298ad7d661493b67b66d7182421e94 100644 (file)
@@ -1,11 +1,9 @@
 TERMUX_PKG_HOMEPAGE=http://strophe.im/libstrophe/
 TERMUX_PKG_DESCRIPTION="libstrophe is a minimal XMPP library written in C"
-TERMUX_PKG_VERSION=0.8.20160905
+TERMUX_PKG_VERSION=0.9.1
 TERMUX_PKG_MAINTAINER="Oliver Schmidhauser @Neo-Oli"
-# Using latest commit because since 0.8.8 it has been somewhat optimized for compilation on Android
-_COMMIT=936ddb0d150ba3705e7190be274761331ef4fdca
-TERMUX_PKG_SRCURL=https://github.com/strophe/libstrophe/archive/${_COMMIT}.tar.gz
-TERMUX_PKG_FOLDERNAME=libstrophe-$_COMMIT
+TERMUX_PKG_SRCURL=https://github.com/strophe/libstrophe/archive/${TERMUX_PKG_VERSION}.tar.gz
+TERMUX_PKG_FOLDERNAME=libstrophe-$TERMUX_PKG_VERSION
 # Would also work with libxml2
 TERMUX_PKG_DEPENDS="openssl,libexpat"
 TERMUX_PKG_BUILD_IN_SRC=yes
diff --git a/packages/libstrophe/configure.ac.patch b/packages/libstrophe/configure.ac.patch
deleted file mode 100644 (file)
index db34f5c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index 99c16ca..048b7d0 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -14,6 +14,7 @@ AS_CASE([$host_os],
-     [netbsd*],     [PLATFORM="bsd"],
-     [*nto*|*qnx*], [PLATFORM="qnx"],
-     [*solaris*],   [PLATFORM="solaris"],
-+    [*android*],   [PLATFORM="android"],
-                    [PLATFORM="nix"])
- AC_ARG_WITH([libxml2],
-@@ -90,6 +91,7 @@ AS_CASE([$PLATFORM],
-     [bsd],     [RESOLV_LIBS=""],
-     [qnx],     [RESOLV_LIBS="-lsocket"],
-     [solaris], [RESOLV_LIBS="-lresolv -lsocket -lnsl"],
-+    [android], [RESOLV_LIBS=""],
-                [RESOLV_LIBS="-lresolv"])
- LIBS_TMP="${LIBS}"
index ca3e0e2f5a20b77a5c8a860623b05864e778323a..d2decc16191f3bfc6c0df8ae273933c59e7cb5d5 100644 (file)
@@ -1,11 +1,20 @@
 TERMUX_PKG_HOMEPAGE=http://profanity.im
 TERMUX_PKG_DESCRIPTION="Profanity is a console based XMPP client written in C using ncurses and libstrophe, inspired by Irssi"
-TERMUX_PKG_VERSION=0.4.7
+TERMUX_PKG_VERSION=0.5.0
 TERMUX_PKG_MAINTAINER="Oliver Schmidhauser @Neo-Oli"
 TERMUX_PKG_SRCURL=http://profanity.im/profanity-${TERMUX_PKG_VERSION}.tar.gz
-TERMUX_PKG_DEPENDS="ncurses,glib,libstrophe,libcurl,readline,libuuid,libotr,gpgme"
+TERMUX_PKG_DEPENDS="ncurses,glib,libstrophe,libcurl,readline,libuuid,libotr,gpgme,python"
+TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --disable-python-plugins"
 TERMUX_PKG_BUILD_IN_SRC=yes
 
 termux_step_pre_configure() {
-./bootstrap.sh
+  CPPFLAGS+=" -I$TERMUX_PREFIX/include/python3.5m"
+  LDFLAGS+=" -lpython3.5m"
+}
+
+termux_step_post_configure() {
+  # Enable python support manually, as trying to go using --enable-python-plugins
+  # causes configure trying to execut python:
+  echo '#define HAVE_PYTHON 1' >> $TERMUX_PKG_SRCDIR/src/config.h
+  perl -p -i -e 's|#am__objects_2|am__objects_2|' $TERMUX_PKG_SRCDIR/Makefile
 }
diff --git a/packages/profanity/cmd_funcs.c.patch b/packages/profanity/cmd_funcs.c.patch
new file mode 100644 (file)
index 0000000..42e190b
--- /dev/null
@@ -0,0 +1,27 @@
+diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
+index f4b597c..b88092d 100644
+--- a/src/command/cmd_funcs.c
++++ b/src/command/cmd_funcs.c
+@@ -46,7 +46,9 @@
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#ifndef __ANDROID__
+ #include <langinfo.h>
++#endif
+ #include <ctype.h>
+ #include "profanity.h"
+@@ -4746,7 +4748,11 @@ cmd_privileges(ProfWin *window, const char *const command, gchar **args)
+ gboolean
+ cmd_charset(ProfWin *window, const char *const command, gchar **args)
+ {
+-    char *codeset = nl_langinfo(CODESET);
++              #if defined(__ANDROID__)
++        char *codeset = "UTF-8";
++              #else
++        char *codeset = nl_langinfo(CODESET);
++              #endif
+     char *lang = getenv("LANG");
+     cons_show("Charset information:");