Compiling with USE=berkdb links with libdb; add sys-libs/db to DEPEND in that case. Apply patch to dlz configure script to use compiler default library paths rather than hardcoded paths which may point to 32-bit libraries. Apply patch to autotool macro for finding OpenSSL libraries to use pkg-config where possible rather than hardcoded paths which may point to 32-bit libraries. Fix autotool macro to search for correct library name. Remove specified OpenSSL root path from configure command-line, as it inhibits one of the configure patches. diff --git a/net-dns/bind/bind-9.14.4.ebuild b/net-dns/bind/bind-9.14.4.ebuild index 0000000..0000000 100644 --- a/net-dns/bind/bind-9.14.4.ebuild +++ b/net-dns/bind/bind-9.14.4.ebuild @@ -58,6 +58,7 @@ DEPEND=" !libressl? ( dev-libs/openssl:0[-bindist] ) libressl? ( dev-libs/libressl ) ) + berkdb? ( sys-libs/db ) mysql? ( dev-db/mysql-connector-c:0= ) odbc? ( >=dev-db/unixODBC-2.2.6 ) ldap? ( net-nds/openldap ) @@ -95,6 +96,19 @@ pkg_setup() { src_prepare() { default + # Apply patches for SYMLINK_LIB=no multilib systems. + if [[ "$SYMLINK_LIB" == 'no' ]] ; then + # The file this patch works on is unchanged between 9.12.3 and + # 9.14.4, save for putting brackets around a variable in a line not + # touched by this patch. + eapply "${FILESDIR}/${PN}-9.12.3-symlink-lib-no-lib64-multilib.patch" + # 9.14.4 introduced some new hardcoded paths in an autotools macro + # searching for OpenSSL libraries. Fix and copy a test using + # pkg-config to find the library, which bypasses forcing an + # incorrect hard-coded path. + eapply "${FILESDIR}/${PN}-9.14.4-symlink-lib-no-lib64-openssl.patch" + fi + # Adjusting PATHs in manpages for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do sed -i \ @@ -152,7 +166,7 @@ src_configure() { $(use_with postgres dlz-postgres) $(use_with lmdb) $(use_with python) - $(use_with ssl openssl "${EPREFIX}"/usr) + $(use_with ssl openssl) $(use_with xml libxml2) $(use_with zlib) )