From e971d9a497ed09a7ba856df7845cc3850324c992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Mon, 6 Jul 2015 08:33:26 +0200 Subject: [PATCH] Update to 3.0.6 (#1240107) Dropped Patch2 and Patch3, changes applied in upstream tarball --- .gitignore | 1 + sources | 2 +- swig-2.0.10-Fix-x390-build.patch | 12 --- swig-3.0.5_fix-python-modern-buildin.patch | 109 --------------------- swig.spec | 17 ++-- 5 files changed, 8 insertions(+), 133 deletions(-) delete mode 100644 swig-2.0.10-Fix-x390-build.patch delete mode 100644 swig-3.0.5_fix-python-modern-buildin.patch diff --git a/.gitignore b/.gitignore index ad129f9..d0f836c 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ swig-2.0.0.tar.gz /swig-3.0.1.tar.gz /swig-3.0.2.tar.gz /swig-3.0.5.tar.gz +/swig-3.0.6.tar.gz diff --git a/sources b/sources index 5589d40..819831a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dcb9638324461b9baba8e044fe59031d swig-3.0.5.tar.gz +df43ae271642bcfa61c1e59f970f9963 swig-3.0.6.tar.gz diff --git a/swig-2.0.10-Fix-x390-build.patch b/swig-2.0.10-Fix-x390-build.patch deleted file mode 100644 index 194c4f6..0000000 --- a/swig-2.0.10-Fix-x390-build.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up swig-2.0.10/configure.ac.orig swig-2.0.10/configure.ac ---- swig-2.0.10/configure.ac.orig 2013-06-05 14:04:47.707542473 +0200 -+++ swig-2.0.10/configure.ac 2013-06-05 14:07:20.338761781 +0200 -@@ -274,6 +274,8 @@ then - then CCSHARED="-fpic" - else CCSHARED="+z" - fi;; -+ s390x*-*-*) CCSHARED="-fpic" ;; -+ s390*-*-*) CCSHARED="-fPIC" ;; - *-*-linux*) CCSHARED="-fpic";; - *-*-freebsd* | *-*-openbsd*) CCSHARED="-fpic";; - *-*-netbsd*) CCSHARED="-fPIC";; diff --git a/swig-3.0.5_fix-python-modern-buildin.patch b/swig-3.0.5_fix-python-modern-buildin.patch deleted file mode 100644 index a95c0a3..0000000 --- a/swig-3.0.5_fix-python-modern-buildin.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 416277b3a56646c2934ca9ee542a3f36d4f9a436 Mon Sep 17 00:00:00 2001 -From: William S Fulton -Date: Fri, 24 Apr 2015 21:08:17 +0100 -Subject: [PATCH] Python code generated with '-builtin -modernargs' segfaults - for any method taking zero arguments. - -Also fixes: "SystemError: error return without exception set" during error checking -when using just -builtin and the incorrect number of arguments is passed to a class -method expecting zero arguments. - -Closes #256 -Closes #382 ---- - CHANGES.current | 8 ++++ - .../test-suite/python/template_classes_runme.py | 44 ++++++++++++++++++++++ - Examples/test-suite/template_classes.i | 3 ++ - Source/Modules/python.cxx | 14 +++---- - 4 files changed, 61 insertions(+), 8 deletions(-) - create mode 100644 Examples/test-suite/python/template_classes_runme.py - -diff --git a/Examples/test-suite/python/template_classes_runme.py b/Examples/test-suite/python/template_classes_runme.py -new file mode 100644 -index 0000000..9c04fee ---- /dev/null -+++ b/Examples/test-suite/python/template_classes_runme.py -@@ -0,0 +1,44 @@ -+from template_classes import * -+ -+# This test is just testing incorrect number of arguments/parameters checking -+ -+point = PointInt() -+ -+rectangle = RectangleInt() -+rectangle.setPoint(point) -+rectangle.getPoint() -+RectangleInt.static_noargs() -+RectangleInt.static_onearg(1) -+ -+fail = True -+try: -+ rectangle.setPoint() -+except TypeError, e: -+ fail = False -+if fail: -+ raise RuntimeError("argument count check failed") -+ -+ -+fail = True -+try: -+ rectangle.getPoint(0) -+except TypeError, e: -+ fail = False -+if fail: -+ raise RuntimeError("argument count check failed") -+ -+fail = True -+try: -+ RectangleInt.static_noargs(0) -+except TypeError, e: -+ fail = False -+if fail: -+ raise RuntimeError("argument count check failed") -+ -+fail = True -+try: -+ RectangleInt.static_onearg() -+except TypeError, e: -+ fail = False -+if fail: -+ raise RuntimeError("argument count check failed") -diff --git a/Examples/test-suite/template_classes.i b/Examples/test-suite/template_classes.i -index ebe13bd..d357e41 100644 ---- a/Examples/test-suite/template_classes.i -+++ b/Examples/test-suite/template_classes.i -@@ -18,6 +18,9 @@ class RectangleTest { - public: - Point& getPoint() {return point;} - void setPoint(Point& value) {point = value;} -+ -+ static int static_noargs() { return 0; } -+ static int static_onearg(int i) { return i; } - private: - Point point; - -diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx -index c85e3b9..a6a81b5 100644 ---- a/Source/Modules/python.cxx -+++ b/Source/Modules/python.cxx -@@ -2713,14 +2713,12 @@ class PYTHON:public Language { - Printv(f->locals, " char * kwnames[] = ", kwargs, ";\n", NIL); - } - -- if (use_parse || allow_kwargs || !modernargs) { -- if (builtin && in_class && tuple_arguments == 0) { -- Printf(parse_args, " if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_fail;\n"); -- } else { -- Printf(parse_args, ":%s\"", iname); -- Printv(parse_args, arglist, ")) SWIG_fail;\n", NIL); -- funpack = 0; -- } -+ if (builtin && in_class && tuple_arguments == 0) { -+ Printf(parse_args, " if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, \"%s takes no arguments\");\n", iname); -+ } else if (use_parse || allow_kwargs || !modernargs) { -+ Printf(parse_args, ":%s\"", iname); -+ Printv(parse_args, arglist, ")) SWIG_fail;\n", NIL); -+ funpack = 0; - } else { - Clear(parse_args); - if (funpack) { diff --git a/swig.spec b/swig.spec index d3dc987..6d9a0d7 100644 --- a/swig.spec +++ b/swig.spec @@ -38,21 +38,14 @@ Summary: Connects C/C++/Objective C to some high-level programming languages Name: swig -Version: 3.0.5 -Release: 8%{?dist} +Version: 3.0.6 +Release: 1%{?dist} License: GPLv3+ and BSD URL: http://swig.sourceforge.net/ Source0: http://downloads.sourceforge.net/project/swig/swig/swig-%{version}/swig-%{version}.tar.gz # Define the part of man page sections Source1: description.h2m Patch1: swig207-setools.patch -# Fix the failure on arch x390 during testing. -# This patch can be removed in v3.0.6. Accepted by upstream. -# https://github.com/swig/swig/pull/334 -Patch2: swig-2.0.10-Fix-x390-build.patch -# Fix segfaults of Python-wrappers when generating code with -# `-buildin -modern -modernargs`. Patch is upstreamed, see patch-url. -Patch3: https://github.com/swig/swig/commit/416277b3a56646c2934ca9ee542a3f36d4f9a436.patch#/swig-3.0.5_fix-python-modern-buildin.patch BuildRequires: perl, python2-devel, pcre-devel BuildRequires: autoconf, automake, gawk, dos2unix @@ -107,8 +100,6 @@ This package contains documentation for SWIG and useful examples %setup -q -n swig-%{version} %patch1 -p1 -b .setools -%patch2 -p1 -b .x390 -%patch3 -p1 -b .python for all in CHANGES README; do iconv -f ISO88591 -t UTF8 < $all > $all.new @@ -206,6 +197,10 @@ ln -fs ../../bin/ccache-swig %{buildroot}%{_libdir}/ccache/swig %doc Doc Examples LICENSE LICENSE-GPL LICENSE-UNIVERSITIES COPYRIGHT %changelog +* Mon Jul 06 2015 Björn Esser - 3.0.6-1 +- Update to 3.0.6 (#1240107) +- Dropped Patch2 and Patch3, changes applied in upstream tarball + * Fri Jun 19 2015 Fedora Release Engineering - 3.0.5-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild