Package: python-4suite
Version: 1.0.2-7.2
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd

Hi,

currently[1] python-4suite does not build on hurd-i386.
The problem is the wrong build information in
4Suite-XML-1.0.2/Ft/Lib/DistExt/BuildExt.py which gets used on hurd
(which has sys.platform = 'gnu0').
The attached patch makes it use the correct build information, doing a string
comparison to 'gnu0' instead of a startswith() to avoid matching other
unrelated platforms.

[1] 
https://buildd.debian.org/status/fetch.php?pkg=python-4suite&arch=hurd-i386&ver=1.0.2-7.2&stamp=1304200634

Thanks,
-- 
Pino
#! /bin/sh -e
## 47-hurd.dpatch by Pino Toscano <toscano.p...@tiscali.it>
## DP: GNU/Hurd support.

if [ $# -lt 1 ]; then
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
    -patch) patch -p0 ${patch_opts} < $0;;
    -unpatch) patch -R -p0 ${patch_opts} < $0;;
    *)
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
        exit 1;;
esac

exit 0

@DPATCH@
--- 4Suite-XML-1.0.2/Ft/Lib/DistExt/BuildExt.py
+++ 4Suite-XML-1.0.2/Ft/Lib/DistExt/BuildExt.py
@@ -58,7 +58,7 @@
         # If built as shared, remove the library dir if the shared library
         # is not installed there (which Python does not do by default).
         # This fixes the errors building on openSUSE 10.2 w/Python 2.5.
-        if ((sys.platform.startswith('linux') or sys.platform.startswith('gnukfreebsd')) and
+        if ((sys.platform.startswith('linux') or sys.platform.startswith('gnukfreebsd') or sys.platform == 'gnu0') and
             sysconfig.get_config_var('Py_ENABLE_SHARED')):
             libpl, ldlibrary = sysconfig.get_config_vars('LIBPL', 'LDLIBRARY')
             if libpl in self.library_dirs:
@@ -84,6 +84,7 @@
 
         elif (sys.platform.startswith('linux')
               or sys.platform.startswith('gnukfreebsd')
+              or sys.platform == 'gnu0'
               or sys.platform.startswith('freebsd')
               or sys.platform.startswith('openbsd')
               or sys.platform.startswith('netbsd')):

Reply via email to