aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbea <orbea@riseup.net>2022-07-07 16:05:41 -0700
committerQuentin Retornaz <gentoo@retornaz.com>2022-07-11 00:51:02 +0200
commite3fce3694156e8fd4a82d973fd35706ed66ae3cc (patch)
treec24addcd71f9384baaacdcabe754cb05cfc403d7
parentmail-filter/imapfilter: Remove old versions (diff)
downloadlibressl-e3fce3694156e8fd4a82d973fd35706ed66ae3cc.tar.gz
libressl-e3fce3694156e8fd4a82d973fd35706ed66ae3cc.tar.bz2
libressl-e3fce3694156e8fd4a82d973fd35706ed66ae3cc.zip
net-libs/ldns: Add package
Patch from OpenBSD. Signed-off-by: orbea <orbea@riseup.net> Signed-off-by: Quentin Retornaz <gentoo@retornaz.com>
-rw-r--r--net-libs/ldns/Manifest3
-rw-r--r--net-libs/ldns/files/ldns-1.7.1-Makefile.patch11
-rw-r--r--net-libs/ldns/files/ldns-1.7.1-libressl.patch84
-rw-r--r--net-libs/ldns/files/ldns-1.8.1-pkgconfig.patch10
-rw-r--r--net-libs/ldns/ldns-1.7.1-r5.ebuild122
-rw-r--r--net-libs/ldns/ldns-1.7.1-r6.ebuild112
-rw-r--r--net-libs/ldns/ldns-1.8.0-r1.ebuild132
-rw-r--r--net-libs/ldns/ldns-1.8.0-r4.ebuild123
-rw-r--r--net-libs/ldns/ldns-1.8.1.ebuild93
-rw-r--r--net-libs/ldns/metadata.xml24
10 files changed, 714 insertions, 0 deletions
diff --git a/net-libs/ldns/Manifest b/net-libs/ldns/Manifest
new file mode 100644
index 0000000..fae7322
--- /dev/null
+++ b/net-libs/ldns/Manifest
@@ -0,0 +1,3 @@
+DIST ldns-1.7.1.tar.gz 1244394 BLAKE2B 8f2d9c6e34c4f13924ce1531a5757c4a619fc31ebc5a0a3d4aaf43fcfc8b53e8f371984b1c60ab74f735a05a9ca0710fc29a40fffeaef66eb54395eb3a727a0d SHA512 e8f72a4ff4aa544acac5e7be9a8ba38c6b8d388bb26f9a0ed04c1a921622f8582cc8539beafc76a29187a55c94069b7c1875e77522e1a7e7bb3e297dd1e4c2b7
+DIST ldns-1.8.0.tar.gz 1283220 BLAKE2B f916a8c76d788ac7c52aea8bfe675ad4c614a0c6fb011b61f5a27d4a5dc1a2adb33b5c6992b4813b3758c9b7cceab1c77f8c1d66baaa4de993f23888bce69df1 SHA512 54b306160bb7fd76d181f4be0a13134017f6f98ae96e0c954409f31f262e9dbe611c4b76fb6dff47bb6155c652ed8d026b52a50dfcf611e54d9c204b314c4fd6
+DIST ldns-1.8.1.tar.gz 1284971 BLAKE2B ae01ef32571fe3996ddd41f911815239abb704ea1dee479fa612bfd701ca369222ab709923f014662248988cb4452a75bc5debad47d2b0386dc59169b353e6a3 SHA512 600f8e221716742caf439a425008827aef1814fc1d9e751f8f492d0235ff45ca48df90abba17979bac9f4485947bb9fe8102924d9cebe6cb56d5b788e1c4bd14
diff --git a/net-libs/ldns/files/ldns-1.7.1-Makefile.patch b/net-libs/ldns/files/ldns-1.7.1-Makefile.patch
new file mode 100644
index 0000000..d654bbd
--- /dev/null
+++ b/net-libs/ldns/files/ldns-1.7.1-Makefile.patch
@@ -0,0 +1,11 @@
+--- Makefile.in.orig 2019-09-29 15:17:24.728446345 +0200
++++ Makefile.in 2019-09-29 15:18:09.544008785 +0200
+@@ -301,7 +301,7 @@
+ $(COMP_LIB) -I./include/ldns $(LIBSSL_CPPFLAGS) $(PYTHON_CPPFLAGS) $(PYTHON_X_CFLAGS) -c $(pywrapdir)/ldns_wrapper.c -o $@
+
+ _ldns.la: ldns_wrapper.lo libldns.la
+- $(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(PYTHON_CFLAGS) $(LDFLAGS) $(PYTHON_LDFLAGS) -module -version-info $(version_info) -no-undefined -o $@ ldns_wrapper.lo -rpath $(python_site) -L. -L.libs -lldns $(LIBS)
++ $(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(PYTHON_CFLAGS) -module -version-info $(version_info) -no-undefined -o $@ ldns_wrapper.lo -rpath $(python_site) -L. -L.libs -lldns $(LDFLAGS) $(PYTHON_LDFLAGS) $(LIBS)
+
+ $(p5_dns_ldns_dir)/Makefile: $(p5_dns_ldns_dir)/Makefile.PL
+ BUILDDIR=`pwd`; cd $(p5_dns_ldns_dir); LD_LIBRARY_PATH="$$BUILDDIR/.libs:$$LD_LIBRARY_PATH" DYLD_LIBRARY_PATH="$$BUILDDIR/.libs:$$DYLD_LIBRARY_PATH" $(PERL) Makefile.PL LIBS="-L$$BUILDDIR/.libs -lldns" INC="-I$$BUILDDIR"
diff --git a/net-libs/ldns/files/ldns-1.7.1-libressl.patch b/net-libs/ldns/files/ldns-1.7.1-libressl.patch
new file mode 100644
index 0000000..916380b
--- /dev/null
+++ b/net-libs/ldns/files/ldns-1.7.1-libressl.patch
@@ -0,0 +1,84 @@
+From OpenBSD.
+
+Fix build with opaque DSA/RSA in LibreSSL 3.5.
+https://github.com/NLnetLabs/ldns/pull/151
+
+Index: dnssec.c
+--- a/dnssec.c.orig
++++ b/dnssec.c
+@@ -380,7 +380,7 @@ ldns_key_buf2dsa_raw(const unsigned char* key, size_t
+ BN_free(Y);
+ return NULL;
+ }
+-#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(HAVE_LIBRESSL)
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ #ifndef S_SPLINT_S
+ dsa->p = P;
+ dsa->q = Q;
+@@ -466,7 +466,7 @@ ldns_key_buf2rsa_raw(const unsigned char* key, size_t
+ BN_free(modulus);
+ return NULL;
+ }
+-#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(HAVE_LIBRESSL)
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ #ifndef S_SPLINT_S
+ rsa->n = modulus;
+
+Fix build with opaque DSA/RSA in LibreSSL 3.5.
+https://github.com/NLnetLabs/ldns/pull/151
+
+Index: host2str.c
+--- a/host2str.c.orig
++++ b/host2str.c
+@@ -2207,7 +2207,7 @@ ldns_key2buffer_str(ldns_buffer *output, const ldns_ke
+ const BIGNUM *n=NULL, *e=NULL, *d=NULL,
+ *p=NULL, *q=NULL, *dmp1=NULL,
+ *dmq1=NULL, *iqmp=NULL;
+-#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(HAVE_LIBRESSL)
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ n = rsa->n;
+ e = rsa->e;
+ d = rsa->d;
+@@ -2259,7 +2259,7 @@ ldns_key2buffer_str(ldns_buffer *output, const ldns_ke
+ if(1) {
+ const BIGNUM *p=NULL, *q=NULL, *g=NULL,
+ *priv_key=NULL, *pub_key=NULL;
+-#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(HAVE_LIBRESSL)
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ #ifndef S_SPLINT_S
+ p = dsa->p;
+ q = dsa->q;
+
+Fix build with opaque DSA/RSA in LibreSSL 3.5.
+https://github.com/NLnetLabs/ldns/pull/151
+
+Index: keys.c
+--- a/keys.c.orig
++++ b/keys.c
+@@ -860,7 +860,7 @@ ldns_key_new_frm_fp_rsa_l(FILE *f, int *line_nr)
+ }
+ #endif /* splint */
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(HAVE_LIBRESSL)
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ # ifndef S_SPLINT_S
+ rsa->n = n;
+ rsa->e = e;
+@@ -980,7 +980,7 @@ ldns_key_new_frm_fp_dsa_l(FILE *f, ATTR_UNUSED(int *li
+ }
+ #endif /* splint */
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(HAVE_LIBRESSL)
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ # ifndef S_SPLINT_S
+ dsa->p = p;
+ dsa->q = q;
+@@ -1657,7 +1657,7 @@ ldns_key_rsa2bin(unsigned char *data, RSA *k, uint16_t
+ if (!k) {
+ return false;
+ }
+-#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(HAVE_LIBRESSL)
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ n = k->n;
+ e = k->e;
+ #else
diff --git a/net-libs/ldns/files/ldns-1.8.1-pkgconfig.patch b/net-libs/ldns/files/ldns-1.8.1-pkgconfig.patch
new file mode 100644
index 0000000..7731ff6
--- /dev/null
+++ b/net-libs/ldns/files/ldns-1.8.1-pkgconfig.patch
@@ -0,0 +1,10 @@
+--- a/packaging/libldns.pc.in
++++ b/packaging/libldns.pc.in
+@@ -8,6 +8,6 @@
+ URL: http://www.nlnetlabs.nl/projects/ldns
+ Version: @PACKAGE_VERSION@
+ Requires:
++Requires.private: libcrypto libssl
+ Libs: -L${libdir} -lldns
+-Libs.private: @LDFLAGS@
+ Cflags: -I${includedir}
diff --git a/net-libs/ldns/ldns-1.7.1-r5.ebuild b/net-libs/ldns/ldns-1.7.1-r5.ebuild
new file mode 100644
index 0000000..82c4552
--- /dev/null
+++ b/net-libs/ldns/ldns-1.7.1-r5.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+inherit multilib-minimal python-single-r1
+
+DESCRIPTION="A library with the aim to simplify DNS programming in C"
+HOMEPAGE="https://www.nlnetlabs.nl/projects/ldns/"
+SRC_URI="https://www.nlnetlabs.nl/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/3"
+KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="+dane doc +ecdsa ed25519 ed448 gost python static-libs vim-syntax"
+
+# configure will die if ecdsa is enabled and ssl is not
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+RDEPEND="
+ python? ( ${PYTHON_DEPS} )
+ ecdsa? (
+ >=dev-libs/openssl-1.0.1e:0=[-bindist(-),${MULTILIB_USEDEP}]
+ )
+ ed25519? (
+ >=dev-libs/openssl-1.1.0:0=[-bindist(-),${MULTILIB_USEDEP}]
+ )
+ ed448? (
+ >=dev-libs/openssl-1.1.1:0=[-bindist(-),${MULTILIB_USEDEP}]
+ )
+ >=dev-libs/openssl-1.0.1e:0=[${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ python? ( dev-lang/swig )
+ doc? ( app-doc/doxygen )
+"
+
+RESTRICT="test" # 1.6.9 has no test directory
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/ldns-config
+)
+
+PATCHES=(
+ "${FILESDIR}"/${P}-libressl.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ # >=openssl-1.1.0 required for dane-ta
+ if has_version "<dev-libs/openssl-1.1.0"; then
+ local dane_ta_usage="--disable-dane-ta-usage"
+ else
+ local dane_ta_usage=""
+ fi
+
+ # "OpenSSL does not support offline DANE verification (Needed for the
+ # DANE-TA usage type). Please upgrade OpenSSL to version >= 1.1.0 or rerun
+ # with --disable-dane-verify or --disable-dane-ta-usage"
+
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable gost) \
+ $(use_enable ecdsa) \
+ $(use_enable ed25519) \
+ $(use_enable ed448) \
+ $(use_enable dane) \
+ $(multilib_native_use_with python pyldns) \
+ $(multilib_native_use_with python pyldnsx) \
+ --with-ssl="${EPREFIX}"/usr \
+ --enable-sha2 \
+ --without-drill \
+ --without-examples \
+ ${dane_ta_usage} \
+ --disable-dane-ta-usage \
+ --disable-rpath
+}
+
+src_prepare() {
+ default
+ eapply -p0 "${FILESDIR}/${P}-Makefile.patch"
+ # remove non-existing dependency for target packaging/libldns.pc
+ sed -i 's,packaging/libldns.pc.in,,' "${S}"/Makefile.in || die 'could not patch Makefile.in'
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi && use doc ; then
+ emake doxygen
+ fi
+}
+
+multilib_src_install() {
+ default
+
+ if multilib_is_native_abi && use doc ; then
+ dodoc -r doc/html
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README*
+
+ find "${D}" -name '*.la' -delete || die
+ use python && python_optimize
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/ftdetect
+ doins libdns.vim
+ fi
+
+ einfo
+ elog "Install net-dns/ldns-utils if you want drill and examples"
+ einfo
+}
diff --git a/net-libs/ldns/ldns-1.7.1-r6.ebuild b/net-libs/ldns/ldns-1.7.1-r6.ebuild
new file mode 100644
index 0000000..c586bc5
--- /dev/null
+++ b/net-libs/ldns/ldns-1.7.1-r6.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+inherit multilib-minimal python-single-r1
+
+DESCRIPTION="A library with the aim to simplify DNS programming in C"
+HOMEPAGE="https://www.nlnetlabs.nl/projects/ldns/"
+SRC_URI="https://www.nlnetlabs.nl/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="+dane doc +ecdsa ed25519 ed448 gost python static-libs vim-syntax"
+
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+RDEPEND="
+ python? ( ${PYTHON_DEPS} )
+ >=dev-libs/openssl-1.1.1l-r1:0=[${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ python? ( dev-lang/swig )
+ doc? ( app-doc/doxygen )
+"
+
+RESTRICT="test" # 1.6.9 has no test directory
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/ldns-config
+)
+
+PATCHES=(
+ "${FILESDIR}"/${P}-libressl.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ # >=openssl-1.1.0 required for dane-ta
+ if has_version "<dev-libs/openssl-1.1.0"; then
+ local dane_ta_usage="--disable-dane-ta-usage"
+ else
+ local dane_ta_usage=""
+ fi
+
+ # "OpenSSL does not support offline DANE verification (Needed for the
+ # DANE-TA usage type). Please upgrade OpenSSL to version >= 1.1.0 or rerun
+ # with --disable-dane-verify or --disable-dane-ta-usage"
+
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable gost) \
+ $(use_enable ecdsa) \
+ $(use_enable ed25519) \
+ $(use_enable ed448) \
+ $(use_enable dane) \
+ $(multilib_native_use_with python pyldns) \
+ $(multilib_native_use_with python pyldnsx) \
+ --with-ssl="${EPREFIX}"/usr \
+ --enable-sha2 \
+ --without-drill \
+ --without-examples \
+ ${dane_ta_usage} \
+ --disable-dane-ta-usage \
+ --disable-rpath
+}
+
+src_prepare() {
+ default
+ eapply -p0 "${FILESDIR}/${P}-Makefile.patch"
+ # remove non-existing dependency for target packaging/libldns.pc
+ sed -i 's,packaging/libldns.pc.in,,' "${S}"/Makefile.in || die 'could not patch Makefile.in'
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi && use doc ; then
+ emake doxygen
+ fi
+}
+
+multilib_src_install() {
+ default
+
+ if multilib_is_native_abi && use doc ; then
+ dodoc -r doc/html
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README*
+
+ find "${D}" -name '*.la' -delete || die
+ use python && python_optimize
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/ftdetect
+ doins libdns.vim
+ fi
+
+ einfo
+ elog "Install net-dns/ldns-utils if you want drill and examples"
+ einfo
+}
diff --git a/net-libs/ldns/ldns-1.8.0-r1.ebuild b/net-libs/ldns/ldns-1.8.0-r1.ebuild
new file mode 100644
index 0000000..1d7a575
--- /dev/null
+++ b/net-libs/ldns/ldns-1.8.0-r1.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+inherit python-single-r1 autotools multilib-minimal
+
+DESCRIPTION="A library with the aim to simplify DNS programming in C"
+HOMEPAGE="https://www.nlnetlabs.nl/projects/ldns/"
+SRC_URI="https://www.nlnetlabs.nl/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/3"
+KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="+dane doc +ecdsa ed25519 ed448 gost python static-libs vim-syntax"
+
+# configure will die if ecdsa is enabled and ssl is not
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+RDEPEND="
+ python? ( ${PYTHON_DEPS} )
+ ecdsa? (
+ >=dev-libs/openssl-1.0.1e:0=[-bindist(-),${MULTILIB_USEDEP}]
+ )
+ ed25519? (
+ >=dev-libs/openssl-1.1.0:0=[-bindist(-),${MULTILIB_USEDEP}]
+ )
+ ed448? (
+ >=dev-libs/openssl-1.1.1:0=[-bindist(-),${MULTILIB_USEDEP}]
+ )
+ >=dev-libs/openssl-1.0.1e:0=[${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ python? ( dev-lang/swig )
+ doc? ( app-doc/doxygen )
+"
+
+RESTRICT="test" # 1.6.9 has no test directory
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/ldns-config
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.7.1-libressl.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ # >=openssl-1.1.0 required for dane-ta
+ if has_version "<dev-libs/openssl-1.1.0"; then
+ local dane_ta_usage="--disable-dane-ta-usage"
+ else
+ local dane_ta_usage=""
+ fi
+
+ # "OpenSSL does not support offline DANE verification (Needed for the
+ # DANE-TA usage type). Please upgrade OpenSSL to version >= 1.1.0 or rerun
+ # with --disable-dane-verify or --disable-dane-ta-usage"
+
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable gost) \
+ $(use_enable ecdsa) \
+ $(use_enable ed25519) \
+ $(use_enable ed448) \
+ $(use_enable dane) \
+ $(multilib_native_use_with python pyldns) \
+ $(multilib_native_use_with python pyldnsx) \
+ --with-ssl="${EPREFIX}"/usr \
+ --enable-sha2 \
+ --without-drill \
+ --without-examples \
+ ${dane_ta_usage} \
+ --disable-dane-ta-usage \
+ --disable-rpath
+}
+
+src_prepare() {
+ default
+ # remove non-existing dependency for target packaging/libldns.pc
+ sed -i 's,$(srcdir)/packaging/libldns.pc.in,,' "${S}"/Makefile.in || die 'could not patch Makefile.in'
+
+ # remove $(srcdir) from path for multilib build
+ sed -i 's,$(srcdir)/packaging/libldns.pc,packaging/libldns.pc,' "${S}"/Makefile.in || die 'could not patch Makefile.in'
+
+ # remove Libs.private, see bug #695672
+ sed -i '/^Libs.private:/d' "${S}"/packaging/libldns.pc.in || die 'could not patch libldns.pc.in'
+
+ # backport https://github.com/NLnetLabs/ldns/commit/bc9d017f6fd8b6b5d2ff6e4489a2931d0aab8184
+ sed -i 's/AC_SUBST(VERSION_INFO.*/AC_SUBST(VERSION_INFO, [5:0:2])/' "${S}"/configure.ac || die 'could not patch configure.ac'
+
+ eautoreconf
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi && use doc ; then
+ emake doxygen
+ fi
+}
+
+multilib_src_install() {
+ default
+
+ if multilib_is_native_abi && use doc ; then
+ dodoc -r doc/html
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README*
+
+ find "${D}" -name '*.la' -delete || die
+ use python && python_optimize
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/ftdetect
+ doins libdns.vim
+ fi
+
+ einfo
+ elog "Install net-dns/ldns-utils if you want drill and examples"
+ einfo
+}
diff --git a/net-libs/ldns/ldns-1.8.0-r4.ebuild b/net-libs/ldns/ldns-1.8.0-r4.ebuild
new file mode 100644
index 0000000..d087f39
--- /dev/null
+++ b/net-libs/ldns/ldns-1.8.0-r4.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+inherit python-single-r1 autotools multilib-minimal
+
+DESCRIPTION="A library with the aim to simplify DNS programming in C"
+HOMEPAGE="https://www.nlnetlabs.nl/projects/ldns/"
+SRC_URI="https://www.nlnetlabs.nl/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/3"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="+dane doc +ecdsa ed25519 ed448 examples gost python static-libs vim-syntax"
+
+# configure will die if ecdsa is enabled and ssl is not
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+COMMON_DEPEND="
+ python? ( ${PYTHON_DEPS} )
+ >=dev-libs/openssl-1.0.1e:0=[${MULTILIB_USEDEP}]
+ examples? ( net-libs/libpcap )
+"
+DEPEND="${COMMON_DEPEND}
+ python? ( dev-lang/swig )
+ doc? ( app-doc/doxygen )
+"
+RDEPEND="${COMMON_DEPEND}
+ !<net-dns/ldns-utils-1.8.0-r2
+"
+
+RESTRICT="test" # 1.6.9 has no test directory
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/ldns-config
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.7.1-libressl.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ # >=openssl-1.1.0 required for dane-ta
+ if has_version "<dev-libs/openssl-1.1.0"; then
+ local dane_ta_usage="--disable-dane-ta-usage"
+ else
+ local dane_ta_usage=""
+ fi
+
+ # "OpenSSL does not support offline DANE verification (Needed for the
+ # DANE-TA usage type). Please upgrade OpenSSL to version >= 1.1.0 or rerun
+ # with --disable-dane-verify or --disable-dane-ta-usage"
+
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable gost) \
+ $(use_enable ecdsa) \
+ $(use_enable ed25519) \
+ $(use_enable ed448) \
+ $(use_enable dane) \
+ $(multilib_native_use_with python pyldns) \
+ $(multilib_native_use_with python pyldnsx) \
+ --with-ssl="${EPREFIX}"/usr \
+ --enable-sha2 \
+ $(multilib_native_with drill) \
+ $(multilib_native_use_with examples) \
+ ${dane_ta_usage} \
+ --disable-dane-ta-usage \
+ --disable-rpath
+}
+
+src_prepare() {
+ default
+ # remove non-existing dependency for target packaging/libldns.pc
+ sed -i 's,$(srcdir)/packaging/libldns.pc.in,,' "${S}"/Makefile.in || die 'could not patch Makefile.in'
+
+ # remove $(srcdir) from path for multilib build
+ sed -i 's,$(srcdir)/packaging/libldns.pc,packaging/libldns.pc,' "${S}"/Makefile.in || die 'could not patch Makefile.in'
+
+ # remove Libs.private, see bug #695672
+ sed -i '/^Libs.private:/d' "${S}"/packaging/libldns.pc.in || die 'could not patch libldns.pc.in'
+
+ # backport https://github.com/NLnetLabs/ldns/commit/bc9d017f6fd8b6b5d2ff6e4489a2931d0aab8184
+ sed -i 's/AC_SUBST(VERSION_INFO.*/AC_SUBST(VERSION_INFO, [5:0:2])/' "${S}"/configure.ac || die 'could not patch configure.ac'
+
+ eautoreconf
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi && use doc ; then
+ emake doxygen
+ fi
+}
+
+multilib_src_install() {
+ default
+
+ if multilib_is_native_abi && use doc ; then
+ dodoc -r doc/html
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README*
+
+ find "${D}" -name '*.la' -delete || die
+ use python && python_optimize
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/ftdetect
+ doins libdns.vim
+ fi
+}
diff --git a/net-libs/ldns/ldns-1.8.1.ebuild b/net-libs/ldns/ldns-1.8.1.ebuild
new file mode 100644
index 0000000..da06869
--- /dev/null
+++ b/net-libs/ldns/ldns-1.8.1.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{8,9,10} )
+inherit python-single-r1 multilib-minimal
+
+DESCRIPTION="A library with the aim to simplify DNS programming in C"
+HOMEPAGE="https://www.nlnetlabs.nl/projects/ldns/"
+SRC_URI="https://www.nlnetlabs.nl/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="doc examples python static-libs"
+
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+BDEPEND="
+ python? ( dev-lang/swig )
+ doc? ( app-doc/doxygen )
+"
+DEPEND="
+ python? ( ${PYTHON_DEPS} )
+ >=dev-libs/openssl-1.1.1l-r1:0=[${MULTILIB_USEDEP},static-libs?]
+ examples? ( net-libs/libpcap )
+"
+RDEPEND="${DEPEND}
+ !<net-dns/ldns-utils-1.8.0-r2
+"
+
+RESTRICT="test" # missing test directory
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/ldns-config
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}/ldns-1.7.1-libressl.patch"
+ "${FILESDIR}/ldns-1.8.1-pkgconfig.patch"
+ )
+ default
+}
+
+multilib_src_configure() {
+ # "OpenSSL does not support offline DANE verification (Needed for the
+ # DANE-TA usage type). Please upgrade OpenSSL to version >= 1.1.0 or rerun
+ # with --disable-dane-verify or --disable-dane-ta-usage"
+
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with python pyldns) \
+ $(multilib_native_use_with python pyldnsx) \
+ --with-ssl="${EPREFIX}"/usr \
+ $(multilib_native_with drill) \
+ $(multilib_native_use_with examples) \
+ --disable-dane-ta-usage \
+ --disable-rpath
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi && use doc ; then
+ emake doxygen
+ fi
+}
+
+multilib_src_install() {
+ default
+
+ if multilib_is_native_abi && use doc ; then
+ dodoc -r doc/html
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README*
+
+ find "${D}" -name '*.la' -delete || die
+ use python && python_optimize
+
+ insinto /usr/share/vim/vimfiles/ftdetect
+ doins libdns.vim
+}
diff --git a/net-libs/ldns/metadata.xml b/net-libs/ldns/metadata.xml
new file mode 100644
index 0000000..bea05fd
--- /dev/null
+++ b/net-libs/ldns/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mschiff@gentoo.org</email>
+ <name>Marc Schiffbauer</name>
+ </maintainer>
+ <longdescription lang="en">
+ ldns is a library with the aim to simplify DNS programming in C. All
+ lowlevel DNS/DNSSEC operations are supported. We also define a higher
+ level API which allows a programmer to (for instance) create or sign
+ packets.
+ </longdescription>
+ <use>
+ <flag name="dane">Enable DNS-based Authentication of Named Entities (DANE) support</flag>
+ <flag name="ecdsa">Enable ECDSA support</flag>
+ <flag name="ed25519">Enable ED25519 support</flag>
+ <flag name="ed448">Enable ED448 support</flag>
+ <flag name="gost">Enable GOST support</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">NLnetLabs/ldns</remote-id>
+ </upstream>
+</pkgmetadata>