Hello community,

here is the log from the commit of package swig for openSUSE:Factory checked in 
at 2012-04-12 09:52:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/swig (Old)
 and      /work/SRC/openSUSE:Factory/.swig.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "swig", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/swig/swig.changes        2012-03-07 
13:45:51.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.swig.new/swig.changes   2012-04-12 
09:52:50.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Apr  9 19:29:34 UTC 2012 - [email protected]
+
+- Added a patch (r12814.patch) to fix regression leading to uncompilable code
+  when using typedef and function pointer references (taken from Debian).
+
+-------------------------------------------------------------------

New:
----
  r12814.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ swig.spec ++++++
--- /var/tmp/diff_new_pack.XezvVT/_old  2012-04-12 09:52:52.000000000 +0200
+++ /var/tmp/diff_new_pack.XezvVT/_new  2012-04-12 09:52:52.000000000 +0200
@@ -16,8 +16,29 @@
 #
 
 
-
 Name:           swig
+Version:        2.0.4
+Release:        0
+Summary:        Simplified Wrapper and Interface Generator
+License:        GPL-3.0+ and BSD-3-Clause
+Group:          Development/Languages/C and C++
+Url:            http://www.swig.org/
+Source:         %{name}-%{version}.tar.bz2
+Source1:        %{name}.rpmlintrc
+# PATCH-FIX-UPSTREAM swig-2.0.4-support-python32.patch [email protected] -- 
Support Python 3.2
+Patch1:         swig-2.0.4-support-python32.patch
+# swig-2.0.4-ptrdiff_t.patch [email protected] -- import_stl fails under Python
+Patch2:         swig-2.0.4-ptrdiff_t.patch
+# PATCH-FIX-UPSTREAM swig-2.0.4-disable-broken-tests.patch [email protected] -- 
Disable broken tests
+Patch3:         swig-2.0.4-disable-broken-tests.patch
+# swig-2.0.4-disable-broken-tests_rhel4.patch [email protected] -- disable 
tests failing on RHEL4
+Patch4:         swig-2.0.4-disable-broken-tests_rhel4.patch
+# PATCH-FIX-UPSTREAM swig-2.0.4-guile2.patch [email protected] -- generate 
guile 2 friendly code
+Patch5:         swig-2.0.4-guile2.patch
+# PATCH-FIX-OPENSUSE swig-2.0.4-fix-overflow-error-64bitint.patch 
[email protected] -- Fix overflow errors with 64-bit IVs
+Patch6:         swig-2.0.4-fix-overflow-error-64bitint.patch
+# PATCH-FIX-UPSTREAM r12814.patch [email protected] -- Fix regression 
leading to uncompilable code when using typedef and function pointer references 
(taken from Debian)
+Patch7:         r12814.patch
 BuildRequires:  boost-devel
 BuildRequires:  gcc-c++
 BuildRequires:  pcre-devel
@@ -49,25 +70,6 @@
 BuildRequires:  ruby-devel
 %endif
 %endif
-Version:        2.0.4
-Release:        0
-Summary:        Simplified Wrapper and Interface Generator
-License:        GPL-3.0+ and BSD-3-Clause
-Group:          Development/Languages/C and C++
-Url:            http://www.swig.org
-Source:         %{name}-%{version}.tar.bz2
-Source1:        %{name}.rpmlintrc
-# PATCH-FIX-UPSTREAM swig-2.0.4-support-python32.patch [email protected] -- 
Support Python 3.2
-Patch1:         swig-2.0.4-support-python32.patch
-# swig-2.0.4-ptrdiff_t.patch [email protected] -- import_stl fails under Python
-Patch2:         swig-2.0.4-ptrdiff_t.patch
-# PATCH-FIX-UPSTREAM swig-2.0.4-disable-broken-tests.patch [email protected] -- 
Disable broken tests
-Patch3:         swig-2.0.4-disable-broken-tests.patch
-# swig-2.0.4-disable-broken-tests_rhel4.patch [email protected] -- disable 
tests failing on RHEL4
-Patch4:         swig-2.0.4-disable-broken-tests_rhel4.patch
-# PATCH-FIX-UPSTREAM swig-2.0.4-guile2.patch [email protected] -- generate 
guile 2 friendly code
-Patch5:         swig-2.0.4-guile2.patch
-Patch6:         swig-2.0.4-fix-overflow-error-64bitint.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -133,6 +135,7 @@
 %patch5 -p1
 %endif
 %patch6 -p1
+%patch7 -p1
 
 %build
 %configure --disable-ccache
@@ -161,7 +164,7 @@
 install -d %{buildroot}%{_libdir}/swig
 cp -a Examples %{buildroot}%{_libdir}/swig/examples
 
-# rm files that are not needed for runnig or rebuilding the examples
+# rm files that are not needed for running or rebuilding the examples
 find %{buildroot}%{_libdir}/swig \
        -name '*.dsp' -o -name '*.vcproj' -o -name '*.sln' -o \
        -name '*.o' -o -name '*_wrap.c' | xargs rm
@@ -173,12 +176,9 @@
 ln -s %{_libdir}/swig/examples %{buildroot}%{docpath}/Examples
 
 %if 0%{?suse_version} > 1010
-%fdupes $RPM_BUILD_ROOT
+%fdupes %{buildroot}
 %endif
 
-%clean
-rm -rf %{buildroot}
-
 %files
 %defattr(644,root,root,755)
 %dir %{docpath}

++++++ r12814.patch ++++++
--- a/CHANGES.current
+++ b/CHANGES.current
@@ -2,6 +2,14 @@ This file contains the changes for the c
 See the CHANGES file for changes in older releases.
 See the RELEASENOTES file for a summary of changes in each release.
 
+2011-09-19: wsfulton
+            Fix regression introduced in swig-2.0.1 reported by Teemu Ikonone 
leading to uncompilable code
+            when using typedef and function pointer references, for example: 
+
+              typedef int FN(const int &a, int b);
+              void *typedef_call1(FN *& precallback, FN * postcallback);
+
+
 Version 2.0.4 (in progress)
 ===========================
 2011-05-19: wsfulton
--- a/Source/Swig/stype.c
+++ b/Source/Swig/stype.c
@@ -823,7 +823,8 @@ String *SwigType_rcaststr(const SwigType
        Insert(result, 0, "(");
        Append(result, ")");
       }
-      isreference = 1;
+      if (!isfunction)
+       isreference = 1;
     } else if (SwigType_isarray(element)) {
       DOH *size;
       if (firstarray && !isreference) {
@@ -869,10 +870,8 @@ String *SwigType_rcaststr(const SwigType
     cast = NewStringf("(%s)", result);
   }
   if (name) {
-    if (!isfunction) {
-      if (isreference) {
-       Append(cast, "*");
-      }
+    if (isreference) {
+      Append(cast, "*");
     }
     Append(cast, name);
   }
--- a/Examples/test-suite/funcptr_cpp.i
+++ b/Examples/test-suite/funcptr_cpp.i
@@ -20,3 +20,14 @@ int call3(int & (*d)(const int &, int),
 %constant int (*ADD_BY_VALUE)(const int &, int) = addByValue;
 %constant int * (*ADD_BY_POINTER)(const int &, int) = addByPointer;
 %constant int & (*ADD_BY_REFERENCE)(const int &, int) = addByReference;
+
+
+%inline %{
+typedef int AddByValueTypedef(const int &a, int b);
+typedef int * AddByPointerTypedef(const int &a, int b);
+typedef int & AddByReferenceTypedef(const int &a, int b);
+void *typedef_call1(AddByValueTypedef *& precallback, AddByValueTypedef * 
postcallback) { return 0; }
+void *typedef_call2(AddByPointerTypedef *& precallback, AddByPointerTypedef * 
postcallback) { return 0; }
+void *typedef_call3(AddByReferenceTypedef *& precallback, 
AddByReferenceTypedef * postcallback) { return 0; }
+%}
+
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to