From c86fe80720aac6c4ef330fd110e956543da88fde Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Mon, 26 Apr 2010 22:00:31 +0000 Subject: [PATCH] Regenerated the python-2.6.5 patch and added utf-8 as the default filesystem encoding. --- dev-lang/python/patches/python-2.6.5.patch | 278 +++++++++++---------- 1 file changed, 145 insertions(+), 133 deletions(-) diff --git a/dev-lang/python/patches/python-2.6.5.patch b/dev-lang/python/patches/python-2.6.5.patch index 66348d541..168bdfed0 100644 --- a/dev-lang/python/patches/python-2.6.5.patch +++ b/dev-lang/python/patches/python-2.6.5.patch @@ -1,6 +1,105 @@ -diff -urN Python-2.6.5/Lib/plat-haiku1/IN.py Python-2.6.5-haiku/Lib/plat-haiku1/IN.py ---- Python-2.6.5/Lib/plat-haiku1/IN.py 1970-01-01 00:00:00.000000000 +0000 -+++ Python-2.6.5-haiku/Lib/plat-haiku1/IN.py 2010-03-11 16:54:31.758644736 +0000 +diff -up Python-2.6.5/configure.in.orig Python-2.6.5/configure.in +--- Python-2.6.5/configure.in.orig 2010-03-09 14:47:28.011272192 -0700 ++++ Python-2.6.5/configure.in 2010-04-26 15:46:56.072613888 -0600 +@@ -747,7 +747,7 @@ if test $enable_shared = "yes"; then + RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} + INSTSONAME="$LDLIBRARY".$SOVERSION + ;; +- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*) ++ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|Haiku*) + LDLIBRARY='libpython$(VERSION).so' + BLDLIBRARY='-L. -lpython$(VERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} +@@ -825,7 +825,7 @@ AC_PROG_INSTALL + AC_SUBST(LN) + if test -z "$LN" ; then + case $ac_sys_system in +- BeOS*) LN="ln -s";; ++ BeOS*|Haiku*) LN="ln -s";; + CYGWIN*) LN="ln -s";; + atheos*) LN="ln -s";; + *) LN=ln;; +@@ -1813,7 +1813,7 @@ then + fi + fi + ;; +- Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';; ++ Linux*|GNU*|QNX*|Haiku*) LDSHARED='$(CC) -shared';; + BSD/OS*/4*) LDSHARED="gcc -shared";; + FreeBSD*) + if [[ "`$CC -dM -E - #include -diff -urN Python-2.6.5/Modules/spwdmodule.c Python-2.6.5-haiku/Modules/spwdmodule.c ---- Python-2.6.5/Modules/spwdmodule.c 2008-06-09 04:58:54.003932160 +0000 -+++ Python-2.6.5-haiku/Modules/spwdmodule.c 2010-03-11 16:54:31.794820608 +0000 -@@ -79,7 +79,9 @@ +diff -up Python-2.6.5/Modules/spwdmodule.c.orig Python-2.6.5/Modules/spwdmodule.c +--- Python-2.6.5/Modules/spwdmodule.c.orig 2008-06-08 22:58:54.041418752 -0600 ++++ Python-2.6.5/Modules/spwdmodule.c 2010-04-26 15:46:55.977534976 -0600 +@@ -79,7 +79,9 @@ static PyObject *mkspent(struct spwd *p) SETS(setIndex++, p->sp_namp); SETS(setIndex++, p->sp_pwdp); @@ -399,10 +498,10 @@ diff -urN Python-2.6.5/Modules/spwdmodule.c Python-2.6.5-haiku/Modules/spwdmodul SETI(setIndex++, p->sp_min); SETI(setIndex++, p->sp_max); SETI(setIndex++, p->sp_warn); -diff -urN Python-2.6.5/Modules/timemodule.c Python-2.6.5-haiku/Modules/timemodule.c ---- Python-2.6.5/Modules/timemodule.c 2008-07-05 19:19:50.055836672 +0000 -+++ Python-2.6.5-haiku/Modules/timemodule.c 2010-03-11 16:54:31.796655616 +0000 -@@ -968,11 +968,11 @@ +diff -up Python-2.6.5/Modules/timemodule.c.orig Python-2.6.5/Modules/timemodule.c +--- Python-2.6.5/Modules/timemodule.c.orig 2008-07-05 13:19:50.026214400 -0600 ++++ Python-2.6.5/Modules/timemodule.c 2010-04-26 15:46:56.001048576 -0600 +@@ -968,11 +968,11 @@ floatsleep(double secs) return -1; } Py_END_ALLOW_THREADS @@ -416,25 +515,37 @@ diff -urN Python-2.6.5/Modules/timemodule.c Python-2.6.5-haiku/Modules/timemodul } Py_BEGIN_ALLOW_THREADS -diff -urN Python-2.6.5/Parser/asdl_c.py Python-2.6.5-haiku/Parser/asdl_c.py ---- Python-2.6.5/Parser/asdl_c.py 2009-12-13 00:59:01.033030144 +0000 -+++ Python-2.6.5-haiku/Parser/asdl_c.py 2010-03-11 16:54:31.798228480 +0000 +diff -up Python-2.6.5/Parser/asdl_c.py.orig Python-2.6.5/Parser/asdl_c.py +--- Python-2.6.5/Parser/asdl_c.py.orig 2009-12-12 17:59:01.002621440 -0700 ++++ Python-2.6.5/Parser/asdl_c.py 2010-04-26 15:46:56.004456448 -0600 @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /bin/env python """Generate C code from an ASDL description.""" # TO DO -diff -urN Python-2.6.5/Tools/scripts/h2py.py Python-2.6.5-haiku/Tools/scripts/h2py.py ---- Python-2.6.5/Tools/scripts/h2py.py 2004-08-09 17:27:55.039059456 +0000 -+++ Python-2.6.5-haiku/Tools/scripts/h2py.py 2010-03-11 16:54:31.805830656 +0000 +diff -up Python-2.6.5/Python/bltinmodule.c.orig Python-2.6.5/Python/bltinmodule.c +--- Python-2.6.5/Python/bltinmodule.c.orig 2010-04-26 15:47:08.138936320 -0600 ++++ Python-2.6.5/Python/bltinmodule.c 2010-04-26 15:47:23.016777216 -0600 +@@ -18,7 +18,7 @@ + */ + #if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T) + const char *Py_FileSystemDefaultEncoding = "mbcs"; +-#elif defined(__APPLE__) ++#elif defined(__APPLE__) || defined(__HAIKU__) + const char *Py_FileSystemDefaultEncoding = "utf-8"; + #else + const char *Py_FileSystemDefaultEncoding = NULL; /* use default */ +diff -up Python-2.6.5/Tools/scripts/h2py.py.orig Python-2.6.5/Tools/scripts/h2py.py +--- Python-2.6.5/Tools/scripts/h2py.py.orig 2004-08-09 11:27:55.006815744 -0600 ++++ Python-2.6.5/Tools/scripts/h2py.py 2010-04-26 15:46:56.047710208 -0600 @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /bin/env python # Read #define's and translate to Python code. # Handle #include statements. -@@ -50,7 +50,7 @@ +@@ -50,7 +50,7 @@ except KeyError: searchdirs=os.environ['INCLUDE'].split(';') except KeyError: try: @@ -443,102 +554,3 @@ diff -urN Python-2.6.5/Tools/scripts/h2py.py Python-2.6.5-haiku/Tools/scripts/h2 searchdirs=os.environ['BEINCLUDES'].split(';') elif sys.platform.startswith("atheos"): searchdirs=os.environ['C_INCLUDE_PATH'].split(':') -diff -urN Python-2.6.5/configure.in Python-2.6.5-haiku/configure.in ---- Python-2.6.5/configure.in 2010-03-09 21:47:28.038273024 +0000 -+++ Python-2.6.5-haiku/configure.in 2010-03-11 16:54:31.812908544 +0000 -@@ -747,7 +747,7 @@ - RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} - INSTSONAME="$LDLIBRARY".$SOVERSION - ;; -- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*) -+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|Haiku*) - LDLIBRARY='libpython$(VERSION).so' - BLDLIBRARY='-L. -lpython$(VERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} -@@ -825,7 +825,7 @@ - AC_SUBST(LN) - if test -z "$LN" ; then - case $ac_sys_system in -- BeOS*) LN="ln -s";; -+ BeOS*|Haiku*) LN="ln -s";; - CYGWIN*) LN="ln -s";; - atheos*) LN="ln -s";; - *) LN=ln;; -@@ -1813,7 +1813,7 @@ - fi - fi - ;; -- Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';; -+ Linux*|GNU*|QNX*|Haiku*) LDSHARED='$(CC) -shared';; - BSD/OS*/4*) LDSHARED="gcc -shared";; - FreeBSD*) - if [[ "`$CC -dM -E -