ldns: link against legacy openssl-1.1

This commit is contained in:
Yaksh Bariya 2022-02-19 15:16:52 +05:30 committed by YAKSH BARIYA
parent dbd47c5f82
commit 118161fc7d
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,22 @@
--- ./acx_nlnetlabs.m4.orig 2022-02-17 16:25:59.657638853 +0530
+++ ./acx_nlnetlabs.m4 2022-02-17 16:44:08.107638438 +0530
@@ -650,7 +650,7 @@
fi
for dir in $withval; do
ssldir="$dir"
- if test -f "$dir/include/openssl/ssl.h"; then
+ if test -f "$dir/include/openssl-1.1/openssl/ssl.h"; then
found_ssl="yes"
AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.])
dnl assume /usr/include is already in the include-path.
@@ -668,8 +668,8 @@
HAVE_SSL=yes
dnl assume /usr is already in the lib and dynlib paths.
if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
- LDFLAGS="$LDFLAGS -L$ssldir/lib"
- LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
+ LDFLAGS="$LDFLAGS -L$ssldir/lib/openssl-1.1"
+ LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib/openssl-1.1"
ACX_RUNTIME_PATH_ADD([$ssldir/lib])
fi

View File

@ -5,7 +5,8 @@ TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.8.1
TERMUX_PKG_SRCURL=https://www.nlnetlabs.nl/downloads/ldns/ldns-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=958229abce4d3aaa19a75c0d127666564b17216902186e952ca4aef47c6d7fa3
TERMUX_PKG_DEPENDS="openssl"
TERMUX_PKG_REVISION=1
TERMUX_PKG_DEPENDS="openssl-1.1"
TERMUX_PKG_BREAKS="ldns-dev"
TERMUX_PKG_REPLACES="ldns-dev"
TERMUX_PKG_BUILD_IN_SRC=true
@ -16,8 +17,19 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--with-drill
"
termux_step_pre_configure() {
CFLAGS="-I$TERMUX_PREFIX/include/openssl-1.1 $CFLAGS"
CPPFLAGS="-I$TERMUX_PREFIX/include/openssl-1.1 $CPPFLAGS"
CXXFLAGS="-I$TERMUX_PREFIX/include/openssl-1.1 $CXXFLAGS"
LDFLAGS="-L$TERMUX_PREFIX/lib/openssl-1.1 -Wl,-rpath=$TERMUX_PREFIX/lib/openssl-1.1 $LDFLAGS"
autoreconf -fi
}
termux_step_post_make_install() {
# The ldns build doesn't install its pkg-config:
mkdir -p $TERMUX_PREFIX/lib/pkgconfig
cp packaging/libldns.pc $TERMUX_PREFIX/lib/pkgconfig/libldns.pc
}