Package: swig2.0
Version: 2.0.8-1
Severity: normal

Dear Maintainer,

Please see

https://sourceforge.net/tracker/?func=detail&atid=101645&aid=3597554&group_id=1645

Here I attach patch for 2.0.8-1 debian package, which corresponds to the patch
sent to upstream developers.



-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.3.0-trunk-amd64 (SMP w/6 CPU cores)
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages swig2.0 depends on:
ii  libc6       2.13-37
ii  libgcc1     1:4.7.2-4
ii  libpcre3    1:8.31-1
ii  libstdc++6  4.7.2-4
ii  zlib1g      1:1.2.7.dfsg-13

swig2.0 recommends no packages.

Versions of packages swig2.0 suggests:
pn  swig2.0-doc       <none>
pn  swig2.0-examples  <none>

-- no debconf information
diff -Nru swig2.0-2.0.8/debian/changelog swig2.0-2.0.8/debian/changelog
--- swig2.0-2.0.8/debian/changelog      2012-10-31 12:12:40.000000000 +0100
+++ swig2.0-2.0.8/debian/changelog      2012-12-19 20:32:31.000000000 +0100
@@ -1,3 +1,10 @@
+swig2.0 (2.0.8-1.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Fixed problems with same python module names in several packages
+
+ -- Paweł Tomulik <ptomu...@barakus.mikrus.pw.edu.pl>  Wed, 19 Dec 2012 
20:30:17 +0100
+
 swig2.0 (2.0.8-1) unstable; urgency=low
 
   * New upstream release.
diff -Nru 
swig2.0-2.0.8/debian/patches/fix-python-same-modules-in-different-packages.patch
 
swig2.0-2.0.8/debian/patches/fix-python-same-modules-in-different-packages.patch
--- 
swig2.0-2.0.8/debian/patches/fix-python-same-modules-in-different-packages.patch
    1970-01-01 01:00:00.000000000 +0100
+++ 
swig2.0-2.0.8/debian/patches/fix-python-same-modules-in-different-packages.patch
    2012-12-19 20:57:54.000000000 +0100
@@ -0,0 +1,32 @@
+Index: swig2.0-2.0.8/Source/Modules/python.cxx
+===================================================================
+--- swig2.0-2.0.8.orig/Source/Modules/python.cxx       2012-07-22 
00:52:30.000000000 +0200
++++ swig2.0-2.0.8/Source/Modules/python.cxx    2012-12-19 20:57:47.159580749 
+0100
+@@ -3164,15 +3164,18 @@
+       if (mod) {
+       String *importname = NewString("");
+       String *modname = Getattr(mod, "name");
+-      if (Strcmp(modname, mainmodule) != 0) {
+-        // check if the module has a package option
+-        Node *options = Getattr(mod, "options");
+-        String *pkg = options ? Getattr(options, "package") : 0;
+-        if (pkg && (!package || Strcmp(pkg, package) != 0)) {
+-          Printf(importname, "%s.", pkg);
+-        }
+-        Printf(importname, "%s.", modname);
+-      }
++  Node *options = Getattr(mod, "options");
++  String *pkg = options ? Getattr(options, "package") : 0;
++  if(pkg && (!package || Strcmp(pkg, package) != 0)) {
++    // Have (package="xxx") different from ours.
++    Printf(importname, "%s.%s.", pkg, modname);
++  } else {
++    // Have no (package=...) or have (package=ours).
++    if(Strcmp(modname, mainmodule) != 0) {
++      // but modules differ ...
++      Printf(importname, "%s.", modname);
++    }
++  }
+       Append(importname, Getattr(n, "sym:name"));
+       Setattr(n, "python:proxy", importname);
+       }
diff -Nru swig2.0-2.0.8/debian/patches/series 
swig2.0-2.0.8/debian/patches/series
--- swig2.0-2.0.8/debian/patches/series 2012-10-31 12:08:05.000000000 +0100
+++ swig2.0-2.0.8/debian/patches/series 2012-12-19 20:35:43.000000000 +0100
@@ -0,0 +1 @@
+fix-python-same-modules-in-different-packages.patch

Reply via email to