--- /dev/null
+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
--- /dev/null
+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
+
+
+
--- /dev/null
+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
+}
--- /dev/null
+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}"
--- /dev/null
+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
+}
--- /dev/null
+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>