!5 fix build error with swig4

Merge pull request !5 from eaglegai/master
This commit is contained in:
openeuler-ci-bot 2020-08-03 19:43:23 +08:00 committed by Gitee
commit a1fb144e2c
2 changed files with 21 additions and 1 deletions

View File

@ -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;

View File

@ -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 <gaihuiying1@huawei.com> - 1.7.0-26
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix build fail with swig new version
* Sat Mar 22 2020 openEuler Buildyeam <buildteam@openeuler.org> - 1.7.0-25
- fix build bug,add flag with_python2 and with_python3