From fa418a9b4fd6c1417657339aa80b86465a877c1c Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Tue, 21 May 2019 14:25:35 +0200 Subject: [PATCH] Fixed build for SWIG 4.0.0 (#1707367) --- libsolv-0.7.4-fix-for-swig-4.patch | 29 +++++++++++++++++++++++++++++ libsolv.spec | 7 ++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 libsolv-0.7.4-fix-for-swig-4.patch diff --git a/libsolv-0.7.4-fix-for-swig-4.patch b/libsolv-0.7.4-fix-for-swig-4.patch new file mode 100644 index 0000000..0e01c56 --- /dev/null +++ b/libsolv-0.7.4-fix-for-swig-4.patch @@ -0,0 +1,29 @@ +From 78e2076be0969bddf599f805985ae7bd39298c62 Mon Sep 17 00:00:00 2001 +From: Michael Schroeder +Date: Tue, 14 May 2019 11:48:28 +0200 +Subject: [PATCH] Make peace with swig-4.0.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Patch by Jitka Plesníková, thanks! +--- + bindings/solv.i | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/bindings/solv.i b/bindings/solv.i +index 0289adb5..107192ff 100644 +--- a/bindings/solv.i ++++ b/bindings/solv.i +@@ -629,8 +629,10 @@ SWIG_AsValDepId(void *obj, int *val) { + %typemap(out) disown_helper { + #if defined(SWIGRUBY) + SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Pool, SWIG_POINTER_DISOWN | 0 ); +-#elif defined(SWIGPYTHON) ++#elif defined(SWIGPYTHON) && SWIG_VERSION < 0x040000 + SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Pool, SWIG_POINTER_DISOWN | 0 ); ++#elif defined(SWIGPYTHON) ++ SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Pool, SWIG_POINTER_DISOWN | 0 ); + #elif defined(SWIGPERL) + SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Pool, SWIG_POINTER_DISOWN | 0 ); + #elif defined(SWIGTCL) diff --git a/libsolv.spec b/libsolv.spec index bc102d3..4fd00ec 100644 --- a/libsolv.spec +++ b/libsolv.spec @@ -42,7 +42,7 @@ Name: lib%{libname} Version: 0.7.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Package dependency solver License: BSD @@ -53,6 +53,8 @@ Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz # https://github.com/openSUSE/libsolv/pull/313 # https://bugzilla.redhat.com/show_bug.cgi?id=1695069 Patch0001: 0001-solver-Free-favorq-when-running-solver_solve.patch +# https://github.com/openSUSE/libsolv/issues/325 +Patch0002: libsolv-0.7.4-fix-for-swig-4.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -302,6 +304,9 @@ Python 3 version. %endif %changelog +* Tue May 21 2019 Jitka Plesnikova - 0.7.4-3 +- Fixed build for SWIG 4.0.0 (#1707367) + * Tue Apr 02 14:45:22 CEST 2019 Igor Gnatenko - 0.7.4-2 - Backport patch to fix solver_solve() running multiple times with SOLVER_FAVOR