From nobody Sat Jul 13 20:42:01 2024 X-Original-To: dev-commits-ports-main@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 4WM0kd3rm6z5R5my; Sat, 13 Jul 2024 20:42:01 +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 4WM0kd25cJz47KP; Sat, 13 Jul 2024 20:42:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720903321; 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=WYlmeVxqcmR4lhLDCLGYtO+HdXrftHH4FVIrIxw8qyM=; b=ecFksLf2U8wQeDhKCZu5H5Xhr56nWNjodYO3ZnOx8e3yZJ3do0uisX/WL7zROwvc2ex2qy 8abCOA5k48uiycih/P/+3+Pg+BnHCbtY7S7jI2GwUbyYy2uZY9Kb2b8o7gKatrcOIVqQH+ R2EkTRyulrdaQ19jzX095sRElSn14vyQW7p7HzWgWXiVYdDJ85yyfuOwz5qXgfC30UJE+1 75wQENAkpPwbWWVMrD9p+u2MSAcGzvgMSGV1Y3jACWHPezI2snxye/v/3+udrkXJomLG5T ehqf2dEbnsWN3Ag8Oo3HMF3ewTOuDDHvrDv5WB/7zn/FIGnn/tkmoauuAI3V8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720903321; a=rsa-sha256; cv=none; b=UYg+7f0NvvjF4yoL9n8aHOM2zYMr4FoDQPuR3RMIe2ThE22Ib+ZkRooBOj3N8adpUKfsz0 fKb5f9hkquP4HtMZ6IZwsmlBu4XnVGj7Le3rzwE+HCaBGXL0vJ4rd2c3Dt29AnjVnphay/ Br0VmgUCHrml9yrsTPAcluWtM8um1ihren/+l7h25BSce+ctVs6xogCBUZcyN9P+iHWtOO W1PPYuWqaSdZtVcJF72Ib8Z2itE7tienZBy8HZVSZXv9DOWYpkXpKJNIyAYOwJZgCACaS8 f5kx1ngd+dC7YJtEIZ2VAF/WdeIWN160ELOSEWobKAWi66p8+mnqQCqEleWd4A== 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=1720903321; 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=WYlmeVxqcmR4lhLDCLGYtO+HdXrftHH4FVIrIxw8qyM=; b=vgculQ/1yHAk0pSR1iS/9YDVkrtoRKu7hWOcT4Td9bAY8vbtBVWCRKGT9GQqjbM+g+jAnU /1PGC3wb2Qi8cjR/Lt5hLzEJIL5VErBtTBqorAQMk8c9E9CNzhPa58n12VEQoNQrGPjZd+ QCFK11lQoxFTMxZKzpkPqokrMnDzH8xN2B0kpb//RiQIMH/Ndo74DtkJNtePSSFXHtEuG3 RqaOeHpTVRHZs9gBlROfU5b4sx6Tk/nXZQ9kTvDQwhHaHzmaiasNakUaUOAMobXU2xuipo ZG/d+/rNH5kto31OG4s29+29RO3NV9/xiZt2CNDKaojHSE/OrZJn65ZUpFlTtw== 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 4WM0kd1FQFzh0D; Sat, 13 Jul 2024 20:42:01 +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 46DKg1dZ095429; Sat, 13 Jul 2024 20:42:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46DKg1U9095426; Sat, 13 Jul 2024 20:42:01 GMT (envelope-from git) Date: Sat, 13 Jul 2024 20:42:01 GMT Message-Id: <202407132042.46DKg1U9095426@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 2db969b4413e - main - dns/py-ldns: Fix build with swig 4.2.0+ List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2db969b4413e91ca9c4ff0a323184fd618e80dec Auto-Submitted: auto-generated The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=2db969b4413e91ca9c4ff0a323184fd618e80dec commit 2db969b4413e91ca9c4ff0a323184fd618e80dec Author: Po-Chuan Hsieh AuthorDate: 2024-07-13 20:18:58 +0000 Commit: Po-Chuan Hsieh CommitDate: 2024-07-13 20:18:58 +0000 dns/py-ldns: Fix build with swig 4.2.0+ PR: 279489 Obtained from: https://github.com/NLnetLabs/ldns/pull/231 --- 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. */