From nobody Mon Jul 22 18:52:09 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WSTsj6rW1z5Py1V; Mon, 22 Jul 2024 18:52:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WSTsj3DMhz4P3h; Mon, 22 Jul 2024 18:52:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721674329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+JFpdSQ8sWDWQ2lpOWY6hUaFOmfUVt80vl07nBpJLgQ=; b=iJm3jPQNFsSnBEW8R60qwepdjs0PnJW9agrvXdf7ZCBYDTfzuv9unv+eCYeQW3wERs5Orx S2kSACe7IHEduofyup/tJ7aejOX0EPSJ4ZQ6cSkd4c5ADWpD2oCt5x966fTHk5YMwZuYH/ AAEJw4K+Bbn9BQiab0DFP4DdAm3SgqcEVKWQCGRWtbDK7DMLZVgfdnDmVZDh+65nBxMWmt uq/wa3I+09BIzCgKN5ALm6q9zonxT1IC3Qid5fckEpY3TkL2YOSW1Bmc4RhuVvvFXVK6uM vuRUE9kN3UuimyuUO7/NYxyG2sDbjtqCwd5s+CkObcH1JvWyCFzea9QhgHxx3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721674329; a=rsa-sha256; cv=none; b=PTxj0ebH2PZVQj5BCaGT0X3Rd1TT90JfuhjMdTetT3BUl1OZU0SqvlbD0VOi0lplfZ1lTe QxsmMXYLK+QULuvQotdUYOudJ6gP/1LIwWrCdVjDS1kg6bBXYGL4nPg3xXqyoU8mV1aZH2 wka/xteGIwOVxTy+hADc+l78Teknkz+jWKfayb9/AqwU2Jnt5C6WxYkWG6JSWYLJdlgVCz 4VvnWtC8nKEkOdDjCV5mAftI/OPGJJQqZ+oI9F4WGqoQwgb7Dgpi6oR1wE539vjZ1aYZj2 8E5tvBlI3TSZfxdxCnunqRiKRAZt0WCQeY+YF4/IgvwqTyRR2HuuSzEmAU5jqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721674329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+JFpdSQ8sWDWQ2lpOWY6hUaFOmfUVt80vl07nBpJLgQ=; b=VHQQVQckCfSC5FrBhy34kH+bIa3fXDMt2k1e2Ky7kb0uwb4DuW358BRJS40aLT2iUxTPdc gOEoKaT/YpNqbFieiV2CA4wurJLy0W9mtJ25NxwsjoX5bX1sn0GGrpPPyTl539yVzHfElM MBWEVRwCzzx222Ljib9WZWp5aaGG/cDXajcLyqSmoWGRX5t29y+yImlmfJme+kFyOM9yQG aYPWc0/iDjckGACrQglsxuLqx39CFoJynIl89VBD0Fc2WQDJM3VBAaMn8LOeOMVeTGO8aF xUv0YrHW7Ku6nO2xA410LVIZbAecjfqLHS2OmJ+5FYKQajxtOFistgoviOo+EQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WSTsj2qxpzwZh; Mon, 22 Jul 2024 18:52:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46MIq9kV039099; Mon, 22 Jul 2024 18:52:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46MIq9GF039096; Mon, 22 Jul 2024 18:52:09 GMT (envelope-from git) Date: Mon, 22 Jul 2024 18:52:09 GMT Message-Id: <202407221852.46MIq9GF039096@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Vladimir Druzenko Subject: git: e22d86094345 - 2024Q3 - dns/py-ldns: Fix build with swig 4.2.0+ List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vvd X-Git-Repository: ports X-Git-Refname: refs/heads/2024Q3 X-Git-Reftype: branch X-Git-Commit: e22d860943454d8716bb018ca323020a09fdd756 Auto-Submitted: auto-generated The branch 2024Q3 has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=e22d860943454d8716bb018ca323020a09fdd756 commit e22d860943454d8716bb018ca323020a09fdd756 Author: Po-Chuan Hsieh AuthorDate: 2024-07-13 20:18:58 +0000 Commit: Vladimir Druzenko CommitDate: 2024-07-22 18:49:15 +0000 dns/py-ldns: Fix build with swig 4.2.0+ PR: 279489 Obtained from: https://github.com/NLnetLabs/ldns/pull/231 (cherry picked from commit 2db969b4413e91ca9c4ff0a323184fd618e80dec) --- dns/ldns/files/patch-swig | 64 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/dns/ldns/files/patch-swig b/dns/ldns/files/patch-swig new file mode 100644 index 000000000000..4d5ae635fbc4 --- /dev/null +++ b/dns/ldns/files/patch-swig @@ -0,0 +1,64 @@ +Obtained from: https://github.com/NLnetLabs/ldns/pull/231 + +--- contrib/python/ldns_rdf.i.orig 2022-08-15 10:38:22 UTC ++++ contrib/python/ldns_rdf.i +@@ -50,6 +50,7 @@ + SWIGTYPE_p_ldns_struct_rdf, SWIG_POINTER_OWN | 0)); + } + ++#if SWIG_VERSION < 0x040200 + /* + * Automatic conversion of const (ldns_rdf *) parameter from string. + * Argument default value. +@@ -95,6 +96,51 @@ + SWIG_Python_str_DelForPy3($1_str); /* Is a empty macro for Python < 3. */ + } + } ++ ++#else ++/* ++ * Automatic conversion of const (ldns_rdf *) parameter from string. ++ * Argument default value. ++ */ ++%typemap(arginit, noblock=1) const ldns_rdf * ++{ ++ PyObject *$1_bytes = NULL; ++} ++ ++/* ++ * Automatic conversion of const (ldns_rdf *) parameter from string. ++ * Preparation of arguments. ++ */ ++%typemap(in, noblock=1) const ldns_rdf * (void* argp, $1_ltype tmp = 0, int res) ++{ ++ if (Python_str_Check($input)) { ++ const char *$1_str = SWIG_PyUnicode_AsUTF8AndSize($input, NULL, &$1_bytes); ++ if ($1_str == NULL) { ++ %argument_fail(SWIG_TypeError, "char *", $symname, $argnum); ++ } ++ tmp = ldns_dname_new_frm_str($1_str); ++ if (tmp == NULL) { ++ %argument_fail(SWIG_TypeError, "char *", $symname, $argnum); ++ } ++ $1 = ($1_ltype) tmp; ++ } else { ++ res = SWIG_ConvertPtr($input, &argp, SWIGTYPE_p_ldns_struct_rdf, 0 | 0); ++ if (!SWIG_IsOK(res)) { ++ %argument_fail(res, "ldns_rdf const *", $symname, $argnum); ++ } ++ $1 = ($1_ltype) argp; ++ } ++} ++ ++/* ++ * Automatic conversion of const (ldns_rdf *) parameter from string. ++ * Freeing of allocated memory (it's a no op unless compiling for some older versions of the Python stable ABI). ++ */ ++%typemap(freearg, noblock=1) const ldns_rdf * ++{ ++ Py_XDECREF($1_bytes); ++} ++#endif + + %nodefaultctor ldns_struct_rdf; /* No default constructor. */ + %nodefaultdtor ldns_struct_rdf; /* No default destructor. */