From 9ebe4fc6fb5496fc6a92fb5dae629838d479d4ce Mon Sep 17 00:00:00 2001 From: eaglegai Date: Mon, 3 Aug 2020 14:27:08 +0800 Subject: [PATCH] fix build fail with swig new version --- ldns-1.7.0-Update-for-SWIG-4.patch | 12 ++++++++++++ ldns.spec | 10 +++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 ldns-1.7.0-Update-for-SWIG-4.patch diff --git a/ldns-1.7.0-Update-for-SWIG-4.patch b/ldns-1.7.0-Update-for-SWIG-4.patch new file mode 100644 index 0000000..b6caaa6 --- /dev/null +++ b/ldns-1.7.0-Update-for-SWIG-4.patch @@ -0,0 +1,12 @@ +diff -up ldns-1.7.0/ldns-1.7.0/contrib/python/ldns_key.i.swig4 ldns-1.7.0/ldns-1.7.0/contrib/python/ldns_key.i +--- ldns-1.7.0/contrib/python/ldns_key.i.swig4 2016-12-20 11:48:22.000000000 +0100 ++++ ldns-1.7.0/contrib/python/ldns_key.i 2019-03-15 12:21:22.608314831 +0100 +@@ -41,7 +41,7 @@ + $result = SWIG_Python_AppendOutput($result, SWIG_NewPointerObj(SWIG_as_voidptr($1_key), SWIGTYPE_p_ldns_struct_key, SWIG_POINTER_OWN | 0 )); + } + +-%exception ldns_key_set_pubkey_owner(ldns_key *k, ldns_rdf *r) %{ $action Py_INCREF(obj1); %} ++%typemap(argout) ldns_rdf *r "Py_INCREF($input);" + + %nodefaultctor ldns_struct_key; //no default constructor & destructor + %nodefaultdtor ldns_struct_key; diff --git a/ldns.spec b/ldns.spec index 558b2f1..ff2e4dc 100644 --- a/ldns.spec +++ b/ldns.spec @@ -30,7 +30,7 @@ Name: ldns Version: 1.7.0 -Release: 25 +Release: 26 Summary: Low-level DNS(SEC) library with API License: BSD @@ -39,6 +39,7 @@ Source0: https://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.ta Patch1: %{name}-1.7.0-parse-limit.patch Patch2: %{name}-1.7.0-realloc.patch +Patch3: %{name}-1.7.0-Update-for-SWIG-4.patch %if 0%{snapshot} BuildRequires: libtool autoconf automake @@ -132,6 +133,7 @@ pushd %{pkgname} %patch1 -p1 -b .limit %patch2 -p1 -b .realloc +%patch3 -p1 %if 0%{snapshot} rm config.guess config.sub ltmain.sh @@ -324,6 +326,12 @@ rm -rf doc/man %endif %changelog +* Mon Aug 03 2020 gaihuiying - 1.7.0-26 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix build fail with swig new version + * Sat Mar 22 2020 openEuler Buildyeam - 1.7.0-25 - fix build bug,add flag with_python2 and with_python3