From 288a643f71cb5aa16f8ae049ed9985352c63eff0 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Tue, 21 Jun 2016 16:35:24 -0400 Subject: [PATCH] Add mtr as disabled package --- disabled-packages/mtr/build.sh | 18 +++++++++ disabled-packages/mtr/configure.ac.patch | 49 ++++++++++++++++++++++++ disabled-packages/mtr/net.h.patch | 11 ++++++ 3 files changed, 78 insertions(+) create mode 100644 disabled-packages/mtr/build.sh create mode 100644 disabled-packages/mtr/configure.ac.patch create mode 100644 disabled-packages/mtr/net.h.patch diff --git a/disabled-packages/mtr/build.sh b/disabled-packages/mtr/build.sh new file mode 100644 index 000000000..0d7aa52de --- /dev/null +++ b/disabled-packages/mtr/build.sh @@ -0,0 +1,18 @@ +# Status: Needs hcreate()/hsearch()/hdestroy() in search.h, +# which is not included in the NDK. + +TERMUX_PKG_HOMEPAGE=https://github.com/traviscross/mtr +TERMUX_PKG_DESCRIPTION="Network diagnostic tool" +_DATE=20160609 +# Note that the newdns branch is used. +_COMMIT=66de3ecbab28b054b868a73fbb57f30549d770ac +TERMUX_PKG_VERSION=0.86.${_DATE} +TERMUX_PKG_SRCURL=https://github.com/traviscross/mtr/archive/${_COMMIT}.zip +TERMUX_PKG_FOLDERNAME=mtr-$_COMMIT +TERMUX_PKG_DEPENDS="ncurses" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--without-gtk" + +termux_step_pre_configure() { + cd $TERMUX_PKG_SRCDIR + ./bootstrap.sh +} diff --git a/disabled-packages/mtr/configure.ac.patch b/disabled-packages/mtr/configure.ac.patch new file mode 100644 index 000000000..7ce98486c --- /dev/null +++ b/disabled-packages/mtr/configure.ac.patch @@ -0,0 +1,49 @@ +res_mkquery is not needed by the newdns branch? + +diff -u -r ../mtr-66de3ecbab28b054b868a73fbb57f30549d770ac/configure.ac ./configure.ac +--- ../mtr-66de3ecbab28b054b868a73fbb57f30549d770ac/configure.ac 2016-05-03 05:01:11.000000000 -0400 ++++ ./configure.ac 2016-06-21 10:07:34.430019831 -0400 +@@ -86,43 +86,6 @@ + # AC_CHECK_LIB(resolv, res_mkquery, , + # AC_CHECK_LIB(resolv, __res_mkquery, , AC_MSG_ERROR(No resolver library found))))) + +-# See if a library is needed for res_mkquery and if so put it in RESOLV_LIBS +-RESOLV_LIBS= +-AC_SUBST(RESOLV_LIBS) +-AC_DEFUN([LIBRESOLVTEST_SRC], [ +-AC_LANG_PROGRAM([[ +-#include +-#include +-]], [[ +-int (*res_mkquery_func)(int,...) = (int (*)(int,...))res_mkquery; +-(void)(*res_mkquery_func)(0); +-]])]) +-AC_MSG_CHECKING([whether library required for res_mkquery]) +-RESOLV_LIB_NONE= +-AC_LINK_IFELSE([LIBRESOLVTEST_SRC], +- [AC_MSG_RESULT([no]) +- RESOLV_LIB_NONE=yes], +- [AC_MSG_RESULT([yes])]) +-if test "x$RESOLV_LIB_NONE" = "x"; then +- AC_MSG_CHECKING([for res_mkquery in -lbind]) +- STASH_LIBS="$LIBS" +- LIBS="$STASH_LIBS -lbind" +- AC_LINK_IFELSE([LIBRESOLVTEST_SRC], +- [AC_MSG_RESULT([yes]) +- RESOLV_LIBS=-lbind], +- [AC_MSG_RESULT([no])]) +- if test "x$RESOLV_LIBS" = "x"; then +- AC_MSG_CHECKING([for res_mkquery in -lresolv]) +- LIBS="$STASH_LIBS -lresolv" +- AC_LINK_IFELSE([LIBRESOLVTEST_SRC], +- [AC_MSG_RESULT([yes]) +- RESOLV_LIBS=-lresolv], +- [AC_MSG_RESULT([no]) +- AC_MSG_ERROR(No resolver library found)]) +- fi +- LIBS="$STASH_LIBS" +-fi +- + AC_CHECK_FUNC(herror, , AC_DEFINE(NO_HERROR, 1, [Define if you don't have the herror() function available.])) + AC_CHECK_FUNC(strerror, , AC_DEFINE(NO_STRERROR, 1, [Define if you don't have the strerror() function available.])) + diff --git a/disabled-packages/mtr/net.h.patch b/disabled-packages/mtr/net.h.patch new file mode 100644 index 000000000..ac7034160 --- /dev/null +++ b/disabled-packages/mtr/net.h.patch @@ -0,0 +1,11 @@ +diff -u -r ../mtr-66de3ecbab28b054b868a73fbb57f30549d770ac/net.h ./net.h +--- ../mtr-66de3ecbab28b054b868a73fbb57f30549d770ac/net.h 2016-05-03 05:01:11.000000000 -0400 ++++ ./net.h 2016-06-21 10:03:22.706030491 -0400 +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #ifdef ENABLE_IPV6 + #include + #include