Add profanity, libstrophe and libotr (#431)
authorOliver Schmidhauser <oliver.schmidhauser@gmail.com>
Mon, 5 Sep 2016 22:29:07 +0000 (00:29 +0200)
committerFredrik Fornwall <fredrik@fornwall.net>
Mon, 5 Sep 2016 22:29:07 +0000 (00:29 +0200)
* add libstrophe package
* add libotr package
* add profanity package

packages/libotr/build.sh [new file with mode: 0644]
packages/libotr/configure.patch [new file with mode: 0644]
packages/libstrophe/build.sh [new file with mode: 0644]
packages/libstrophe/configure.ac.patch [new file with mode: 0644]
packages/profanity/build.sh [new file with mode: 0644]
packages/profanity/ui-inputwin.c.patch [new file with mode: 0644]

diff --git a/packages/libotr/build.sh b/packages/libotr/build.sh
new file mode 100644 (file)
index 0000000..c64b13d
--- /dev/null
@@ -0,0 +1,7 @@
+TERMUX_PKG_HOMEPAGE=https://otr.cypherpunks.ca
+TERMUX_PKG_DESCRIPTION="Off-the-Record (OTR) Messaging allows you to have private conversations over instant messaging by providing: Encryption, Authentication, Deniability, Perfect forward secrecy"
+TERMUX_PKG_VERSION=4.1.1
+TERMUX_PKG_MAINTAINER="Oliver Schmidhauser @Neo-Oli"
+TERMUX_PKG_SRCURL=https://otr.cypherpunks.ca/libotr-${TERMUX_PKG_VERSION}.tar.gz
+TERMUX_PKG_DEPENDS="libgcrypt"
+TERMUX_PKG_BUILD_IN_SRC=yes
diff --git a/packages/libotr/configure.patch b/packages/libotr/configure.patch
new file mode 100644 (file)
index 0000000..0e336e5
--- /dev/null
@@ -0,0 +1,18 @@
+diff --git a/configure b/configure
+index e5b064c..cd3fa35 100755
+--- a/configure
++++ b/configure
+@@ -11647,13 +11647,8 @@ case $host_os in
+ esac
+ # Build tests for now only for Linux.
+- if test x$HOST_OS = xlinux; then
+-  BUILD_TESTS_TRUE=
+-  BUILD_TESTS_FALSE='#'
+-else
+   BUILD_TESTS_TRUE='#'
+   BUILD_TESTS_FALSE=
+-fi
diff --git a/packages/libstrophe/build.sh b/packages/libstrophe/build.sh
new file mode 100644 (file)
index 0000000..7e92de5
--- /dev/null
@@ -0,0 +1,15 @@
+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_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
+# Would also work with libxml2
+TERMUX_PKG_DEPENDS="openssl,libexpat"
+TERMUX_PKG_BUILD_IN_SRC=yes
+
+termux_step_pre_configure() {
+./bootstrap.sh
+}
diff --git a/packages/libstrophe/configure.ac.patch b/packages/libstrophe/configure.ac.patch
new file mode 100644 (file)
index 0000000..701d384
--- /dev/null
@@ -0,0 +1,20 @@
+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"],
++              [*termux*],              [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}"
diff --git a/packages/profanity/build.sh b/packages/profanity/build.sh
new file mode 100644 (file)
index 0000000..ca3e0e2
--- /dev/null
@@ -0,0 +1,11 @@
+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_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_BUILD_IN_SRC=yes
+
+termux_step_pre_configure() {
+./bootstrap.sh
+}
diff --git a/packages/profanity/ui-inputwin.c.patch b/packages/profanity/ui-inputwin.c.patch
new file mode 100644 (file)
index 0000000..432102b
--- /dev/null
@@ -0,0 +1,12 @@
+diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c
+index 9b4eddf..cf8c0b1 100644
+--- a/src/ui/inputwin.c
++++ b/src/ui/inputwin.c
+@@ -39,6 +39,7 @@
+ #include <string.h>
+ #include <wchar.h>
+ #include <sys/time.h>
++#include <sys/select.h>
+ #include <errno.h>
+ #include <readline/readline.h>