From 1ecd18e662e0872a18234a59adafb8f3ed9a6bfd Mon Sep 17 00:00:00 2001 From: maintenance team Date: Tue, 24 Apr 2007 08:20:24 +0000 Subject: [PATCH] *** empty log message *** --- ...1-lib64.patch => python_patch_lib64.patch} | 257 +++++++++--------- 1 file changed, 135 insertions(+), 122 deletions(-) rename config_files/patches/{Python-2.4.1-lib64.patch => python_patch_lib64.patch} (69%) diff --git a/config_files/patches/Python-2.4.1-lib64.patch b/config_files/patches/python_patch_lib64.patch similarity index 69% rename from config_files/patches/Python-2.4.1-lib64.patch rename to config_files/patches/python_patch_lib64.patch index e7ff034..1e99600 100755 --- a/config_files/patches/Python-2.4.1-lib64.patch +++ b/config_files/patches/python_patch_lib64.patch @@ -1,5 +1,51 @@ ---- Python-2.4.1/Include/pythonrun.h.lib64 2005-08-25 14:19:42.000000000 +0200 -+++ Python-2.4.1/Include/pythonrun.h 2005-08-25 14:19:39.000000000 +0200 +diff -Naur --exclude=CVS Python-2.4.4/configure.in Python-2.4.4-patched/configure.in +--- Python-2.4.4/configure.in 2006-10-17 20:03:36.000000000 +0400 ++++ Python-2.4.4-patched/configure.in 2007-04-23 19:31:52.000000000 +0400 +@@ -494,6 +494,41 @@ + ;; + esac + ++AC_SUBST(ARCH) ++AC_MSG_CHECKING(ARCH) ++ARCH=`uname -m` ++case $ARCH in ++i?86) ARCH=i386;; ++esac ++AC_MSG_RESULT($ARCH) ++ ++AC_SUBST(LIB) ++AC_MSG_CHECKING(LIB) ++case $ac_sys_system in ++Linux*) ++ # Test if the compiler is 64bit ++ echo 'int i;' > conftest.$ac_ext ++ python_cv_cc_64bit_output=no ++ if AC_TRY_EVAL(ac_compile); then ++ case `/usr/bin/file conftest.$ac_objext` in ++ *"ELF 64"*) ++ python_cv_cc_64bit_output=yes ++ ;; ++ esac ++ fi ++ rm -rf conftest* ++ ;; ++esac ++ ++case $ARCH:$python_cv_cc_64bit_output in ++powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) ++ LIB="lib64" ++ ;; ++*:*) ++ LIB="lib" ++ ;; ++esac ++AC_MSG_RESULT($LIB) + + AC_SUBST(LIBRARY) + AC_MSG_CHECKING(LIBRARY) +diff -Naur --exclude=CVS Python-2.4.4/Include/pythonrun.h Python-2.4.4-patched/Include/pythonrun.h +--- Python-2.4.4/Include/pythonrun.h 2004-10-07 07:58:07.000000000 +0400 ++++ Python-2.4.4-patched/Include/pythonrun.h 2007-04-23 19:10:18.000000000 +0400 @@ -93,6 +93,8 @@ /* In their own files */ PyAPI_FUNC(const char *) Py_GetVersion(void); @@ -9,8 +55,9 @@ PyAPI_FUNC(const char *) Py_GetCopyright(void); PyAPI_FUNC(const char *) Py_GetCompiler(void); PyAPI_FUNC(const char *) Py_GetBuildInfo(void); ---- Python-2.4.1/Lib/distutils/command/install.py.lib64 2005-08-25 14:20:10.000000000 +0200 -+++ Python-2.4.1/Lib/distutils/command/install.py 2005-08-25 14:20:09.000000000 +0200 +diff -Naur --exclude=CVS Python-2.4.4/Lib/distutils/command/install.py Python-2.4.4-patched/Lib/distutils/command/install.py +--- Python-2.4.4/Lib/distutils/command/install.py 2005-01-20 22:15:39.000000000 +0300 ++++ Python-2.4.4-patched/Lib/distutils/command/install.py 2007-04-23 19:12:27.000000000 +0400 @@ -19,6 +19,8 @@ from distutils.errors import DistutilsOptionError from glob import glob @@ -40,8 +87,21 @@ 'headers': '$base/include/python/$dist_name', 'scripts': '$base/bin', 'data' : '$base', ---- Python-2.4.1/Lib/distutils/tests/test_install.py.lib64 2005-08-25 14:20:13.000000000 +0200 -+++ Python-2.4.1/Lib/distutils/tests/test_install.py 2005-08-25 14:20:13.000000000 +0200 +diff -Naur --exclude=CVS Python-2.4.4/Lib/distutils/sysconfig.py Python-2.4.4-patched/Lib/distutils/sysconfig.py +--- Python-2.4.4/Lib/distutils/sysconfig.py 2006-10-08 21:41:25.000000000 +0400 ++++ Python-2.4.4-patched/Lib/distutils/sysconfig.py 2007-04-23 19:21:19.000000000 +0400 +@@ -100,7 +100,7 @@ + + if os.name == "posix": + libpython = os.path.join(prefix, +- "lib", "python" + get_python_version()) ++ sys.lib, "python" + get_python_version()) + if standard_lib: + return libpython + else: +diff -Naur --exclude=CVS Python-2.4.4/Lib/distutils/tests/test_install.py Python-2.4.4-patched/Lib/distutils/tests/test_install.py +--- Python-2.4.4/Lib/distutils/tests/test_install.py 2004-06-26 03:02:59.000000000 +0400 ++++ Python-2.4.4-patched/Lib/distutils/tests/test_install.py 2007-04-23 19:20:24.000000000 +0400 @@ -1,6 +1,7 @@ """Tests for distutils.command.install.""" @@ -59,19 +119,9 @@ check_path(cmd.install_lib, libdir) check_path(cmd.install_platlib, libdir) check_path(cmd.install_purelib, libdir) ---- Python-2.4.1/Lib/distutils/sysconfig.py.lib64 2005-08-25 14:20:13.000000000 +0200 -+++ Python-2.4.1/Lib/distutils/sysconfig.py 2005-08-25 14:20:12.000000000 +0200 -@@ -100,7 +100,7 @@ - - if os.name == "posix": - libpython = os.path.join(prefix, -- "lib", "python" + get_python_version()) -+ sys.lib, "python" + get_python_version()) - if standard_lib: - return libpython - else: ---- Python-2.4.1/Lib/site.py.lib64 2005-08-25 14:21:50.000000000 +0200 -+++ Python-2.4.1/Lib/site.py 2005-08-25 14:55:33.000000000 +0200 +diff -Naur --exclude=CVS Python-2.4.4/Lib/site.py Python-2.4.4-patched/Lib/site.py +--- Python-2.4.4/Lib/site.py 2004-07-20 06:28:28.000000000 +0400 ++++ Python-2.4.4-patched/Lib/site.py 2007-04-23 19:23:19.000000000 +0400 @@ -179,12 +179,18 @@ sitedirs = [os.path.join(prefix, "Lib", "site-packages")] elif os.sep == '/': @@ -94,8 +144,44 @@ if sys.platform == 'darwin': # for framework builds *only* we add the standard Apple # locations. Currently only per-user, but /Library and ---- Python-2.4.1/Modules/getpath.c.lib64 2005-08-25 14:23:20.000000000 +0200 -+++ Python-2.4.1/Modules/getpath.c 2005-08-25 14:23:06.000000000 +0200 +diff -Naur --exclude=CVS Python-2.4.4/Makefile.pre.in Python-2.4.4-patched/Makefile.pre.in +--- Python-2.4.4/Makefile.pre.in 2006-10-08 21:41:25.000000000 +0400 ++++ Python-2.4.4-patched/Makefile.pre.in 2007-04-23 19:34:43.000000000 +0400 +@@ -70,6 +70,8 @@ + + # Machine-dependent subdirectories + MACHDEP= @MACHDEP@ ++LIB= @LIB@ ++ARCH= @ARCH@ + + # Install prefix for architecture-independent files + prefix= @prefix@ +@@ -79,11 +81,11 @@ + + # Expanded directories + BINDIR= $(exec_prefix)/bin +-LIBDIR= $(exec_prefix)/lib ++LIBDIR= $(exec_prefix)/$(LIB) + MANDIR= @mandir@ + INCLUDEDIR= @includedir@ + CONFINCLUDEDIR= $(exec_prefix)/include +-SCRIPTDIR= $(prefix)/lib ++SCRIPTDIR= $(prefix)/$(LIB) + + # Detailed destination directories + BINLIBDEST= $(LIBDIR)/python$(VERSION) +@@ -471,7 +473,7 @@ + Python/compile.o Python/symtable.o: $(GRAMMAR_H) + + Python/getplatform.o: $(srcdir)/Python/getplatform.c +- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c ++ $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c + + Python/importdl.o: $(srcdir)/Python/importdl.c + $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c +diff -Naur --exclude=CVS Python-2.4.4/Modules/getpath.c Python-2.4.4-patched/Modules/getpath.c +--- Python-2.4.4/Modules/getpath.c 2006-02-20 20:37:39.000000000 +0300 ++++ Python-2.4.4-patched/Modules/getpath.c 2007-04-23 19:25:34.000000000 +0400 @@ -111,9 +111,17 @@ #define EXEC_PREFIX PREFIX #endif @@ -125,8 +211,9 @@ static void reduce(char *dir) ---- Python-2.4.1/Python/getplatform.c.lib64 2005-08-25 14:23:53.000000000 +0200 -+++ Python-2.4.1/Python/getplatform.c 2005-08-25 14:23:47.000000000 +0200 +diff -Naur --exclude=CVS Python-2.4.4/Python/getplatform.c Python-2.4.4-patched/Python/getplatform.c +--- Python-2.4.4/Python/getplatform.c 2000-09-02 03:29:29.000000000 +0400 ++++ Python-2.4.4-patched/Python/getplatform.c 2007-04-23 19:27:19.000000000 +0400 @@ -10,3 +10,23 @@ { return PLATFORM; @@ -151,102 +238,24 @@ +{ + return LIB; +} ---- Python-2.4.1/Python/sysmodule.c.lib64 2005-08-25 14:23:53.000000000 +0200 -+++ Python-2.4.1/Python/sysmodule.c 2005-08-25 14:23:52.000000000 +0200 -@@ -1022,6 +1022,12 @@ - PyDict_SetItemString(sysdict, "platform", - v = PyString_FromString(Py_GetPlatform())); - Py_XDECREF(v); -+ PyDict_SetItemString(sysdict, "arch", -+ v = PyString_FromString(Py_GetArch())); -+ Py_XDECREF(v); -+ PyDict_SetItemString(sysdict, "lib", -+ v = PyString_FromString(Py_GetLib())); -+ Py_XDECREF(v); - PyDict_SetItemString(sysdict, "executable", - v = PyString_FromString(Py_GetProgramFullPath())); - Py_XDECREF(v); ---- Python-2.4.1/configure.in.lib64 2005-08-25 14:24:33.000000000 +0200 -+++ Python-2.4.1/configure.in 2005-08-25 14:19:07.000000000 +0200 -@@ -423,6 +423,41 @@ - ;; - esac - -+AC_SUBST(ARCH) -+AC_MSG_CHECKING(ARCH) -+ARCH=`uname -m` -+case $ARCH in -+i?86) ARCH=i386;; -+esac -+AC_MSG_RESULT($ARCH) -+ -+AC_SUBST(LIB) -+AC_MSG_CHECKING(LIB) -+case $ac_sys_system in -+Linux*) -+ # Test if the compiler is 64bit -+ echo 'int i;' > conftest.$ac_ext -+ python_cv_cc_64bit_output=no -+ if AC_TRY_EVAL(ac_compile); then -+ case `/usr/bin/file conftest.$ac_objext` in -+ *"ELF 64"*) -+ python_cv_cc_64bit_output=yes -+ ;; -+ esac -+ fi -+ rm -rf conftest* -+ ;; -+esac -+ -+case $ARCH:$python_cv_cc_64bit_output in -+powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) -+ LIB="lib64" -+ ;; -+*:*) -+ LIB="lib" -+ ;; -+esac -+AC_MSG_RESULT($LIB) - - AC_SUBST(LIBRARY) - AC_MSG_CHECKING(LIBRARY) ---- Python-2.4.1/Makefile.pre.in.lib64 2005-08-25 14:24:35.000000000 +0200 -+++ Python-2.4.1/Makefile.pre.in 2005-08-25 14:19:06.000000000 +0200 -@@ -70,6 +70,8 @@ - - # Machine-dependent subdirectories - MACHDEP= @MACHDEP@ -+LIB= @LIB@ -+ARCH= @ARCH@ - - # Install prefix for architecture-independent files - prefix= @prefix@ -@@ -79,11 +81,11 @@ - - # Expanded directories - BINDIR= $(exec_prefix)/bin --LIBDIR= $(exec_prefix)/lib -+LIBDIR= $(exec_prefix)/$(LIB) - MANDIR= @mandir@ - INCLUDEDIR= @includedir@ - CONFINCLUDEDIR= $(exec_prefix)/include --SCRIPTDIR= $(prefix)/lib -+SCRIPTDIR= $(prefix)/$(LIB) - - # Detailed destination directories - BINLIBDEST= $(LIBDIR)/python$(VERSION) -@@ -458,7 +460,7 @@ - Python/compile.o Python/symtable.o: $(GRAMMAR_H) - - Python/getplatform.o: $(srcdir)/Python/getplatform.c -- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c -+ $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c - - Python/importdl.o: $(srcdir)/Python/importdl.c - $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c ---- Python-2.4.1/setup.py.lib64 2005-08-25 14:24:35.000000000 +0200 -+++ Python-2.4.1/setup.py 2005-08-25 14:19:07.000000000 +0200 -@@ -259,12 +259,12 @@ +diff -Naur --exclude=CVS Python-2.4.4/Python/sysmodule.c Python-2.4.4-patched/Python/sysmodule.c +--- Python-2.4.4/Python/sysmodule.c 2006-10-05 22:08:58.000000000 +0400 ++++ Python-2.4.4-patched/Python/sysmodule.c 2007-04-23 19:29:43.000000000 +0400 +@@ -1035,6 +1035,10 @@ + PyString_FromString(Py_GetCopyright())); + SET_SYS_FROM_STRING("platform", + PyString_FromString(Py_GetPlatform())); ++ SET_SYS_FROM_STRING("arch", ++ PyString_FromString(Py_GetArch())); ++ SET_SYS_FROM_STRING("lib", ++ PyString_FromString(Py_GetLib())); + SET_SYS_FROM_STRING("executable", + PyString_FromString(Py_GetProgramFullPath())); + SET_SYS_FROM_STRING("prefix", +diff -Naur --exclude=CVS Python-2.4.4/setup.py Python-2.4.4-patched/setup.py +--- Python-2.4.4/setup.py 2006-10-08 21:41:25.000000000 +0400 ++++ Python-2.4.4-patched/setup.py 2007-04-23 19:38:02.000000000 +0400 +@@ -263,12 +263,12 @@ except NameError: have_unicode = 0 @@ -261,7 +270,7 @@ ] inc_dirs = self.compiler.include_dirs + ['/usr/include'] exts = [] -@@ -426,11 +426,11 @@ +@@ -450,7 +450,7 @@ elif self.compiler.find_library_file(lib_dirs, 'curses'): readline_libs.append('curses') elif self.compiler.find_library_file(lib_dirs + @@ -269,13 +278,17 @@ + ['/usr/'+libname+'/termcap'], 'termcap'): readline_libs.append('termcap') + +@@ -465,7 +465,7 @@ + readline_extra_link_args = () + exts.append( Extension('readline', ['readline.c'], - library_dirs=['/usr/lib/termcap'], + library_dirs=['/usr/'+libname+'/termcap'], + extra_link_args=readline_extra_link_args, libraries=readline_libs) ) if platform not in ['mac']: - # crypt module. -@@ -1017,8 +1017,8 @@ +@@ -1069,8 +1069,8 @@ added_lib_dirs.append('/usr/openwin/lib') elif os.path.exists('/usr/X11R6/include'): include_dirs.append('/usr/X11R6/include') -- 2.39.2