From: "Marc Schiffbauer" <mschiff@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/ldns/, net-libs/ldns/files/
Date: Mon, 07 Apr 2025 06:33:17 +0000 (UTC) [thread overview]
Message-ID: <1744007552.801bb5bc8139934c9a84dc208b90c3ab53601a56.mschiff@gentoo> (raw)
commit: 801bb5bc8139934c9a84dc208b90c3ab53601a56
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 7 06:27:00 2025 +0000
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Mon Apr 7 06:32:32 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=801bb5bc
net-libs/ldns: add patch for swig 4.3.0 compat
Closes: https://bugs.gentoo.org/953293
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
net-libs/ldns/files/ldns-1.8.4-swig-4.3.0.patch | 127 ++++++++++++++++++++++++
net-libs/ldns/ldns-1.8.4-r1.ebuild | 90 +++++++++++++++++
2 files changed, 217 insertions(+)
diff --git a/net-libs/ldns/files/ldns-1.8.4-swig-4.3.0.patch b/net-libs/ldns/files/ldns-1.8.4-swig-4.3.0.patch
new file mode 100644
index 000000000000..a6ec69016637
--- /dev/null
+++ b/net-libs/ldns/files/ldns-1.8.4-swig-4.3.0.patch
@@ -0,0 +1,127 @@
+From 49b2e4a938d263bb8c532e64f33690551e43ca0c Mon Sep 17 00:00:00 2001
+From: Po-Chuan Hsieh <sunpoet@sunpoet.net>
+Date: Mon, 28 Oct 2024 21:42:27 +0800
+Subject: [PATCH] Fix build with SWIG 4.3.0
+
+Replace SWIG_Python_AppendOutput with SWIG_AppendOutput.
+
+from CHANGES:
+ New declaration of SWIG_Python_AppendOutput is now:
+
+ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void);
+
+ The 3rd parameter is new and the new $isvoid special variable
+ should be passed to it, indicating whether or not the wrapped
+ function returns void. If SWIG_Python_AppendOutput is currently being
+ used and a completely backwards compatible (but technically incorrect)
+ solution is required, then pass 1 for the is_void parameter.
+
+ Also consider replacing with:
+
+ SWIG_AppendOutput(PyObject* result, PyObject* obj);
+
+ which calls SWIG_Python_AppendOutput with same parameters but adding $isvoid
+ for final parameter.
+
+Reference: https://github.com/swig/swig/blob/master/CHANGES#L382-L397
+---
+ contrib/python/ldns_buffer.i | 2 +-
+ contrib/python/ldns_key.i | 2 +-
+ contrib/python/ldns_packet.i | 2 +-
+ contrib/python/ldns_rdf.i | 2 +-
+ contrib/python/ldns_resolver.i | 2 +-
+ contrib/python/ldns_rr.i | 2 +-
+ contrib/python/ldns_zone.i | 2 +-
+ 7 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/contrib/python/ldns_buffer.i b/contrib/python/ldns_buffer.i
+index 5c2d583b..0a3e3895 100644
+--- a/contrib/python/ldns_buffer.i
++++ b/contrib/python/ldns_buffer.i
+@@ -45,7 +45,7 @@
+ /* Result generation, appends (ldns_buffer *) after the result. */
+ %typemap(argout, noblock=1) (ldns_buffer **)
+ {
+- $result = SWIG_Python_AppendOutput($result,
++ $result = SWIG_AppendOutput($result,
+ SWIG_NewPointerObj(SWIG_as_voidptr($1_buf),
+ SWIGTYPE_p_ldns_struct_buffer, SWIG_POINTER_OWN | 0));
+ }
+diff --git a/contrib/python/ldns_key.i b/contrib/python/ldns_key.i
+index dc67e67b..6a3c2db4 100644
+--- a/contrib/python/ldns_key.i
++++ b/contrib/python/ldns_key.i
+@@ -38,7 +38,7 @@
+ /* result generation */
+ %typemap(argout,noblock=1) (ldns_key **)
+ {
+- $result = SWIG_Python_AppendOutput($result, SWIG_NewPointerObj(SWIG_as_voidptr($1_key), SWIGTYPE_p_ldns_struct_key, SWIG_POINTER_OWN | 0 ));
++ $result = SWIG_AppendOutput($result, SWIG_NewPointerObj(SWIG_as_voidptr($1_key), SWIGTYPE_p_ldns_struct_key, SWIG_POINTER_OWN | 0 ));
+ }
+
+ %typemap(argout) ldns_rdf *r "Py_INCREF($input);"
+diff --git a/contrib/python/ldns_packet.i b/contrib/python/ldns_packet.i
+index c2d7a3b6..8309808d 100644
+--- a/contrib/python/ldns_packet.i
++++ b/contrib/python/ldns_packet.i
+@@ -45,7 +45,7 @@
+ /* Result generation, appends (ldns_pkt *) after the result. */
+ %typemap(argout,noblock=1) (ldns_pkt **)
+ {
+- $result = SWIG_Python_AppendOutput($result,
++ $result = SWIG_AppendOutput($result,
+ SWIG_NewPointerObj(SWIG_as_voidptr($1_pkt),
+ SWIGTYPE_p_ldns_struct_pkt, SWIG_POINTER_OWN | 0 ));
+ }
+diff --git a/contrib/python/ldns_rdf.i b/contrib/python/ldns_rdf.i
+index 39f9af18..ed1f0d00 100644
+--- a/contrib/python/ldns_rdf.i
++++ b/contrib/python/ldns_rdf.i
+@@ -45,7 +45,7 @@
+ /* Result generation, appends (ldns_rdf *) after the result. */
+ %typemap(argout, noblock=1) (ldns_rdf **)
+ {
+- $result = SWIG_Python_AppendOutput($result,
++ $result = SWIG_AppendOutput($result,
+ SWIG_NewPointerObj(SWIG_as_voidptr($1_rdf),
+ SWIGTYPE_p_ldns_struct_rdf, SWIG_POINTER_OWN | 0));
+ }
+diff --git a/contrib/python/ldns_resolver.i b/contrib/python/ldns_resolver.i
+index 8468cce3..8d0abc6e 100644
+--- a/contrib/python/ldns_resolver.i
++++ b/contrib/python/ldns_resolver.i
+@@ -45,7 +45,7 @@
+ /* Result generation, appends (ldns_resolver *) after the result. */
+ %typemap(argout,noblock=1) (ldns_resolver **r)
+ {
+- $result = SWIG_Python_AppendOutput($result,
++ $result = SWIG_AppendOutput($result,
+ SWIG_NewPointerObj(SWIG_as_voidptr($1_res),
+ SWIGTYPE_p_ldns_struct_resolver, SWIG_POINTER_OWN | 0 ));
+ }
+diff --git a/contrib/python/ldns_rr.i b/contrib/python/ldns_rr.i
+index 2e0a0714..c53955cf 100644
+--- a/contrib/python/ldns_rr.i
++++ b/contrib/python/ldns_rr.i
+@@ -45,7 +45,7 @@
+ /* Result generation, appends (ldns_rr *) after the result. */
+ %typemap(argout, noblock=1) (ldns_rr **)
+ {
+- $result = SWIG_Python_AppendOutput($result,
++ $result = SWIG_AppendOutput($result,
+ SWIG_NewPointerObj(SWIG_as_voidptr($1_rr),
+ SWIGTYPE_p_ldns_struct_rr, SWIG_POINTER_OWN | 0 ));
+ }
+diff --git a/contrib/python/ldns_zone.i b/contrib/python/ldns_zone.i
+index bbb8d8f2..3459478a 100644
+--- a/contrib/python/ldns_zone.i
++++ b/contrib/python/ldns_zone.i
+@@ -39,7 +39,7 @@
+ /* result generation */
+ %typemap(argout,noblock=1) (ldns_zone **)
+ {
+- $result = SWIG_Python_AppendOutput($result, SWIG_NewPointerObj(SWIG_as_voidptr($1_zone), SWIGTYPE_p_ldns_struct_zone, SWIG_POINTER_OWN | 0 ));
++ $result = SWIG_AppendOutput($result, SWIG_NewPointerObj(SWIG_as_voidptr($1_zone), SWIGTYPE_p_ldns_struct_zone, SWIG_POINTER_OWN | 0 ));
+ }
+
+ %nodefaultctor ldns_struct_zone; //no default constructor & destructor
diff --git a/net-libs/ldns/ldns-1.8.4-r1.ebuild b/net-libs/ldns/ldns-1.8.4-r1.ebuild
new file mode 100644
index 000000000000..45ccd818a83c
--- /dev/null
+++ b/net-libs/ldns/ldns-1.8.4-r1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+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/about/"
+SRC_URI="https://www.nlnetlabs.nl/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~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} )"
+RESTRICT="test" # missing test directory
+
+BDEPEND="
+ python? (
+ ${PYTHON_DEPS}
+ dev-lang/swig
+ $(python_gen_cond_dep 'dev-python/setuptools[${PYTHON_USEDEP}]')
+ )
+ doc? ( app-text/doxygen )
+"
+DEPEND="
+ python? ( ${PYTHON_DEPS} )
+ >=dev-libs/openssl-1.1.1l-r1:0=[${MULTILIB_USEDEP},static-libs?]
+ examples? ( net-libs/libpcap )
+"
+RDEPEND="
+ ${DEPEND}
+"
+
+# False positive, always fails, bug #898658
+QA_CONFIG_IMPL_DECL_SKIP+=(
+ ioctlsocket
+)
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/ldns-config
+)
+
+PATCHES=(
+ "${FILESDIR}/ldns-1.8.1-pkgconfig.patch"
+ "${FILESDIR}/ldns-1.8.4-swig-4.3.0.patch"
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ 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-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
+}
next reply other threads:[~2025-04-07 6:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 6:33 Marc Schiffbauer [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-02-06 5:18 [gentoo-commits] repo/gentoo:master commit in: net-libs/ldns/, net-libs/ldns/files/ Sam James
2023-01-26 7:55 Sam James
2021-12-24 10:57 Marc Schiffbauer
2019-09-29 13:50 Marc Schiffbauer
2017-11-23 16:49 Marc Schiffbauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1744007552.801bb5bc8139934c9a84dc208b90c3ab53601a56.mschiff@gentoo \
--to=mschiff@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox