summaryrefslogtreecommitdiff
path: root/extra/swig
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-07-13 00:01:54 +0000
committerroot <root@rshg054.dnsready.net>2012-07-13 00:01:54 +0000
commit2a74527ad522ac7c1d467688eee81a7a3f895031 (patch)
tree5ce8592b2ac3b6e90fc73039d5ce30aa2a8891dc /extra/swig
parent00d32b0938eebfa45f0543cae655abf5233eb99c (diff)
Fri Jul 13 00:01:54 UTC 2012
Diffstat (limited to 'extra/swig')
-rw-r--r--extra/swig/PKGBUILD19
-rw-r--r--extra/swig/pyint_fromsize_t.diff18
-rw-r--r--extra/swig/upstream_r13128.diff73
3 files changed, 106 insertions, 4 deletions
diff --git a/extra/swig/PKGBUILD b/extra/swig/PKGBUILD
index d1658694a..e7f999488 100644
--- a/extra/swig/PKGBUILD
+++ b/extra/swig/PKGBUILD
@@ -1,20 +1,31 @@
-# $Id: PKGBUILD 161852 2012-06-15 16:11:26Z stephane $
+# $Id: PKGBUILD 163234 2012-07-11 16:22:59Z stephane $
# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
pkgname=swig
pkgver=2.0.7
-pkgrel=1
+pkgrel=2
pkgdesc="Generate scripting interfaces to C/C++ code"
arch=('i686' 'x86_64')
url="http://www.swig.org/"
license=('custom')
depends=('zlib' 'pcre')
-source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz)
-sha1sums=('307020fb6437092e32c9c1bd9af8bccb1645b529')
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
+ pyint_fromsize_t.diff
+ upstream_r13128.diff)
+sha1sums=('307020fb6437092e32c9c1bd9af8bccb1645b529'
+ '59ee179b57920d255c58afe45632b896e40b5b7d'
+ '8f0c5ae6a46c22606cc88c649bfd0a31f061a963')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # FS#30624
+ patch -Np1 -i ../pyint_fromsize_t.diff
+
+ # Fix call to Swig_name_decl
+ patch -Np1 -i ../upstream_r13128.diff
+
./configure --prefix=/usr
make
}
diff --git a/extra/swig/pyint_fromsize_t.diff b/extra/swig/pyint_fromsize_t.diff
new file mode 100644
index 000000000..1c7727ae2
--- /dev/null
+++ b/extra/swig/pyint_fromsize_t.diff
@@ -0,0 +1,18 @@
+Description: Py3k: Map PyInt_FromSize_t to PyLong_FromSize_t
+ The latest SWIG version introduced a usage of PyInt_FromSize_t, but
+ does not define a compatibility macro for Python 3k as for the other
+ PyInt_... functions. This patch adds that macro.
+
+Author: Torsten Landschoff <torsten@debian.org>
+
+
+--- swig2.0-2.0.7.orig/Lib/python/pyhead.swg
++++ swig2.0-2.0.7/Lib/python/pyhead.swg
+@@ -5,6 +5,7 @@
+ #define PyInt_Check(x) PyLong_Check(x)
+ #define PyInt_AsLong(x) PyLong_AsLong(x)
+ #define PyInt_FromLong(x) PyLong_FromLong(x)
++#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
+ #define PyString_Check(name) PyBytes_Check(name)
+ #define PyString_FromString(x) PyUnicode_FromString(x)
+ #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
diff --git a/extra/swig/upstream_r13128.diff b/extra/swig/upstream_r13128.diff
new file mode 100644
index 000000000..d7d74d7e5
--- /dev/null
+++ b/extra/swig/upstream_r13128.diff
@@ -0,0 +1,73 @@
+From: Klaus Kämpf <kkaempf@suse.de>
+Subject: Fix call to Swig_name_decl (upstream ID 3530078)
+
+Origin: upstream, http://swig.svn.sourceforge.net/viewvc/swig?view=revision&revision=13128
+Bug: http://sourceforge.net/tracker/?func=detail&aid=3530078&group_id=1645&atid=101645
+Bug-Debian: http://bugs.debian.org/675196
+---
+ Examples/test-suite/errors/expected.log | 26 +++++++++++++-------------
+ Source/Modules/lang.cxx | 4 ++--
+ 2 files changed, 15 insertions(+), 15 deletions(-)
+
+--- a/Source/Modules/lang.cxx
++++ b/Source/Modules/lang.cxx
+@@ -2623,7 +2623,7 @@ int Language::constructorDeclaration(Nod
+ Delete(expected_name_resolved);
+ }
+ if (illegal_name) {
+- Swig_warning(WARN_LANG_RETURN_TYPE, input_file, line_number, "Function %s must have a return type. Ignored.\n", Swig_name_decl(name));
++ Swig_warning(WARN_LANG_RETURN_TYPE, input_file, line_number, "Function %s must have a return type. Ignored.\n", Swig_name_decl(n));
+ Swig_restore(n);
+ return SWIG_NOWRAP;
+ }
+@@ -2760,7 +2760,7 @@ int Language::destructorDeclaration(Node
+ }
+
+ if (illegal_name) {
+- Swig_warning(WARN_LANG_ILLEGAL_DESTRUCTOR, input_file, line_number, "Illegal destructor name %s. Ignored.\n", Swig_name_decl(name));
++ Swig_warning(WARN_LANG_ILLEGAL_DESTRUCTOR, input_file, line_number, "Illegal destructor name %s. Ignored.\n", Swig_name_decl(n));
+ Swig_restore(n);
+ Delete(expected_name);
+ return SWIG_NOWRAP;
+--- a/Examples/test-suite/errors/expected.log
++++ b/Examples/test-suite/errors/expected.log
+@@ -227,17 +227,17 @@ cpp_extend_destructors.i:87: Warning 302
+ cpp_extend_destructors.i:85: Warning 302: previous definition of '~JStruct'.
+ cpp_extend_destructors.i:100: Warning 302: Identifier '~LStruct' redefined (ignored),
+ cpp_extend_destructors.i:98: Warning 302: previous definition of '~LStruct'.
+-cpp_extend_destructors.i:24: Warning 521: Illegal destructor name ~NOT_CStruct. Ignored.
+-cpp_extend_destructors.i:30: Warning 521: Illegal destructor name ~NOT_DStruct. Ignored.
+-cpp_extend_destructors.i:44: Warning 521: Illegal destructor name ~NOT_EStruct. Ignored.
+-cpp_extend_destructors.i:50: Warning 521: Illegal destructor name ~NOT_FStruct. Ignored.
+-cpp_extend_destructors.i:65: Warning 521: Illegal destructor name ~NOT_GStruct. Ignored.
+-cpp_extend_destructors.i:72: Warning 521: Illegal destructor name ~NOT_HStruct. Ignored.
+-cpp_extend_destructors.i:81: Warning 521: Illegal destructor name ~NOT_IStruct. Ignored.
+-cpp_extend_destructors.i:86: Warning 521: Illegal destructor name ~NOT_JStruct. Ignored.
+-cpp_extend_destructors.i:92: Warning 521: Illegal destructor name ~NOT_KStruct. Ignored.
+-cpp_extend_destructors.i:99: Warning 521: Illegal destructor name ~NOT_LStruct< int >. Ignored.
+-cpp_extend_destructors.i:99: Warning 521: Illegal destructor name ~NOT_LStruct< short >. Ignored.
++cpp_extend_destructors.i:24: Warning 521: Illegal destructor name CStruct::~NOT_CStruct(). Ignored.
++cpp_extend_destructors.i:30: Warning 521: Illegal destructor name DStruct::~NOT_DStruct(). Ignored.
++cpp_extend_destructors.i:44: Warning 521: Illegal destructor name EStruct::~NOT_EStruct(). Ignored.
++cpp_extend_destructors.i:50: Warning 521: Illegal destructor name FStruct::~NOT_FStruct(). Ignored.
++cpp_extend_destructors.i:65: Warning 521: Illegal destructor name GStruct::~NOT_GStruct(). Ignored.
++cpp_extend_destructors.i:72: Warning 521: Illegal destructor name HStruct::~NOT_HStruct(). Ignored.
++cpp_extend_destructors.i:81: Warning 521: Illegal destructor name IStruct::~NOT_IStruct(). Ignored.
++cpp_extend_destructors.i:86: Warning 521: Illegal destructor name JStruct::~NOT_JStruct(). Ignored.
++cpp_extend_destructors.i:92: Warning 521: Illegal destructor name KStruct::~NOT_KStruct(). Ignored.
++cpp_extend_destructors.i:99: Warning 521: Illegal destructor name LStruct< int >::~NOT_LStruct(). Ignored.
++cpp_extend_destructors.i:99: Warning 521: Illegal destructor name LStruct< short >::~NOT_LStruct(). Ignored.
+
+ :::::::::::::::::::::::::::::::: cpp_extend_redefine.i :::::::::::::::::::::::::::::::::::
+ cpp_extend_redefine.i:9: Warning 302: Identifier 'bar' redefined by %extend (ignored),
+@@ -312,8 +312,8 @@ cpp_nested.i:12: Warning 325: Nested cla
+ cpp_no_access.i:3: Warning 319: No access specifier given for base class 'foo' (ignored).
+
+ :::::::::::::::::::::::::::::::: cpp_no_return_type.i :::::::::::::::::::::::::::::::::::
+-cpp_no_return_type.i:6: Warning 504: Function R must have a return type. Ignored.
+-cpp_no_return_type.i:10: Warning 504: Function UU must have a return type. Ignored.
++cpp_no_return_type.i:6: Warning 504: Function S::R() must have a return type. Ignored.
++cpp_no_return_type.i:10: Warning 504: Function U::UU() must have a return type. Ignored.
+
+ :::::::::::::::::::::::::::::::: cpp_nobase.i :::::::::::::::::::::::::::::::::::
+ cpp_nobase.i:3: Warning 401: Nothing known about base class 'Bar'. Ignored.