ldns: fix hardcoded paths to 'resolv.conf' and 'hosts'
authorLeonid Plyushch <leonid.plyushch@gmail.com>
Tue, 12 Sep 2017 09:48:02 +0000 (12:48 +0300)
committerFredrik Fornwall <fredrik@fornwall.net>
Tue, 12 Sep 2017 12:26:26 +0000 (14:26 +0200)
packages/ldns/build.sh
packages/ldns/fix-hardcoded-paths.patch [new file with mode: 0644]

index ef1db35..fad2798 100755 (executable)
@@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.nlnetlabs.nl/projects/ldns/
 TERMUX_PKG_DESCRIPTION="Library for simplifying DNS programming and supporting recent and experimental RFCs"
 TERMUX_PKG_DEPENDS="openssl"
 TERMUX_PKG_VERSION=1.7.0
-TERMUX_PKG_REVISION=2
+TERMUX_PKG_REVISION=3
 TERMUX_PKG_SRCURL=https://www.nlnetlabs.nl/downloads/ldns/ldns-${TERMUX_PKG_VERSION}.tar.gz
 TERMUX_PKG_SHA256=c19f5b1b4fb374cfe34f4845ea11b1e0551ddc67803bd6ddd5d2a20f0997a6cc
 # --disable-dane-verify needed until openssl 1.1.0:
diff --git a/packages/ldns/fix-hardcoded-paths.patch b/packages/ldns/fix-hardcoded-paths.patch
new file mode 100644 (file)
index 0000000..c87cfdd
--- /dev/null
@@ -0,0 +1,15 @@
+diff -uNr ldns-1.7.0/ldns/resolver.h ldns-1.7.0.mod/ldns/resolver.h
+--- ldns-1.7.0/ldns/resolver.h 2016-12-20 12:48:22.000000000 +0200
++++ ldns-1.7.0.mod/ldns/resolver.h     2017-09-12 12:05:37.802990331 +0300
+@@ -33,9 +33,9 @@
+ #endif
+ /** Default location of the resolv.conf file */
+-#define LDNS_RESOLV_CONF      "/etc/resolv.conf"
++#define LDNS_RESOLV_CONF      "@TERMUX_PREFIX@/etc/resolv.conf"
+ /** Default location of the hosts file */
+-#define LDNS_RESOLV_HOSTS     "/etc/hosts"
++#define LDNS_RESOLV_HOSTS     "@TERMUX_PREFIX@/etc/hosts"
+ #define LDNS_RESOLV_KEYWORD     -1
+ #define LDNS_RESOLV_DEFDOMAIN 0