dnsutils: Fix build
authorFredrik Fornwall <fredrik@fornwall.net>
Fri, 18 Sep 2015 13:28:25 +0000 (09:28 -0400)
committerFredrik Fornwall <fredrik@fornwall.net>
Fri, 18 Sep 2015 13:28:25 +0000 (09:28 -0400)
packages/dnsutils/bin-delv-delv.c.patch [new file with mode: 0644]
packages/dnsutils/build.sh

diff --git a/packages/dnsutils/bin-delv-delv.c.patch b/packages/dnsutils/bin-delv-delv.c.patch
new file mode 100644 (file)
index 0000000..301bfe3
--- /dev/null
@@ -0,0 +1,12 @@
+diff -u -r ../bind-9.10.3/bin/delv/delv.c ./bin/delv/delv.c
+--- ../bind-9.10.3/bin/delv/delv.c     2015-09-08 22:23:40.000000000 -0400
++++ ./bin/delv/delv.c  2015-09-18 09:20:21.037363830 -0400
+@@ -869,7 +869,7 @@
+       if (result != ISC_R_SUCCESS)
+               fatal("Couldn't parse port number");
+-      result = irs_resconf_load(mctx, "/etc/resolv.conf", &resconf);
++      result = irs_resconf_load(mctx, RESOLV_CONF, &resconf);
+       if (result != ISC_R_SUCCESS && result != ISC_R_FILENOTFOUND) {
+               delv_log(ISC_LOG_ERROR, "irs_resconf_load: %s",
+                         isc_result_totext(result));
index 1a08a62..3e6704b 100644 (file)
@@ -1,26 +1,22 @@
 TERMUX_PKG_HOMEPAGE=https://www.isc.org/downloads/bind/
 TERMUX_PKG_DESCRIPTION="Clients provided with BIND"
 TERMUX_PKG_VERSION=9.10.3
+TERMUX_PKG_BUILD_REVISION=1
 TERMUX_PKG_SRCURL="https://www.isc.org/downloads/file/bind-9-10-3/?version=tar-gz"
 TERMUX_PKG_FOLDERNAME="bind-${TERMUX_PKG_VERSION}"
-#TERMUX_PKG_DEPENDS="pcre, openssl, libuuid"
-#
-TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --with-gssapi=no --with-randomdev=/dev/random -with-ecdsa=yes --with-gost=yes --with-libxml2=no"
-#TERMUX_MAKE_PROCESSES=1
+TERMUX_PKG_DEPENDS="openssl"
+TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --with-gssapi=no --with-randomdev=/dev/random -with-ecdsa=no --with-gost=no --with-libxml2=no"
 
-export BUILD_AR=$AR
-export BUILD_CC=$CC
-export BUILD_CFLAGS="$CFLAGS"
-export BUILD_CPPFLAGS="$CPPFLAGS"
-export BUILD_LDFLAGS="$LDFLAGS"
-export BUILD_RANLIB=$RANLIB
+export BUILD_AR=ar
+export BUILD_CC=gcc
+export BUILD_CFLAGS=
+export BUILD_CPPFLAGS=
+export BUILD_LDFLAGS=
+export BUILD_RANLIB=
 
-export AR=ar
-export CC=gcc
-export CFLAGS=
-export CPPFLAGS=
-export LDFLAGS=
-export RANLIB=ranlib
+_RESOLV_CONF=$TERMUX_PREFIX/etc/resolv.conf
+CFLAGS+=" $CPPFLAGS -DRESOLV_CONF=\\\"$_RESOLV_CONF\\\""
+LDFLAGS+=" -llog"
 
 termux_step_make () {
        make -C lib/dns &&
@@ -33,4 +29,6 @@ termux_step_make () {
 
 termux_step_make_install () {
        make -C bin/dig install
+
+       printf "nameserver 8.8.8.8\nnameserver 8.8.4.4" > $_RESOLV_CONF
 }