Package: python2.5 Severity: important Version: 2.5-3 Tags: patch
Hi, the current version fails to build on GNU/kFreeBSD, the same problem also affect hurd. It needs small tweak to Lib/distutils/command/build_ext.py. Please find attached patch with that. It would also be nice if you can ask upstream to include similar change. Thanks in advance Petr
diff -u python2.5-2.5/debian/rules python2.5-2.5/debian/rules --- python2.5-2.5/debian/rules +++ python2.5-2.5/debian/rules @@ -863,6 +863,7 @@ tkinter-import \ link-opt \ distutils-exec-prefix \ + distutils-gnu \ ifeq ($(with_fpectl),yes) debian_patches += \ only in patch2: unchanged: --- python2.5-2.5.orig/debian/patches/distutils-gnu.dpatch +++ python2.5-2.5/debian/patches/distutils-gnu.dpatch @@ -0,0 +1,36 @@ +#! /bin/sh -e + +# DP: Fix building on kfreebsd and may be also on hurd. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]" + exit 1 +esac +exit 0 + +--- Lib/distutils/command/build_ext.py~ 2006-11-04 11:51:47.000000000 +0100 ++++ Lib/distutils/command/build_ext.py 2006-11-04 11:51:47.000000000 +0100 +@@ -186,7 +186,7 @@ + # for extensions under Cygwin and AtheOS Python's library directory must be + # appended to library_dirs + if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos' or \ +- (sys.platform.startswith('linux') and ++ ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')) and + sysconfig.get_config_var('Py_ENABLE_SHARED')): + if sys.executable.startswith(os.path.join(sys.exec_prefix, 'bin')): + # building third party extensions