From 27f3b8da5da091243683e63a1506438577184d0e Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 3 Apr 2008 05:18:43 +0000 Subject: python: upgraded to 2.5.2 (merged from OE) git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4163 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- .../python/python-2.5.2/crosscompile.patch | 110 +++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 meta-extras/packages/python/python-2.5.2/crosscompile.patch (limited to 'meta-extras/packages/python/python-2.5.2/crosscompile.patch') diff --git a/meta-extras/packages/python/python-2.5.2/crosscompile.patch b/meta-extras/packages/python/python-2.5.2/crosscompile.patch new file mode 100644 index 0000000000..f1b1c6f3e0 --- /dev/null +++ b/meta-extras/packages/python/python-2.5.2/crosscompile.patch @@ -0,0 +1,110 @@ +# +# Patch (C) by Michael 'Mickey' Lauer +# +Index: Python-2.5.2/Makefile.pre.in +=================================================================== +--- Python-2.5.2.orig/Makefile.pre.in ++++ Python-2.5.2/Makefile.pre.in +@@ -173,6 +173,7 @@ UNICODE_OBJS= @UNICODE_OBJS@ + + PYTHON= python$(EXE) + BUILDPYTHON= python$(BUILDEXE) ++HOSTPYTHON= $(BUILDPYTHON) + + # === Definitions added by makesetup === + +@@ -199,7 +200,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar + ########################################################################## + # Parser + PGEN= Parser/pgen$(EXE) +- ++HOSTPGEN= $(PGEN)$(EXE) + POBJS= \ + Parser/acceler.o \ + Parser/grammar1.o \ +@@ -348,8 +349,8 @@ platform: $(BUILDPYTHON) + # Build the shared modules + sharedmods: $(BUILDPYTHON) + case $$MAKEFLAGS in \ +- *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ +- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ ++ *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ ++ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ + esac + + # Build static library +@@ -474,7 +475,7 @@ Modules/python.o: $(srcdir)/Modules/pyth + + $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) + -@ mkdir Include +- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) ++ -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + + $(PGEN): $(PGENOBJS) + $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) +@@ -782,19 +783,19 @@ libinstall: $(BUILDPYTHON) $(srcdir)/Lib + done + $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt + PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ ++ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) + PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ ++ $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ ++ $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ ++ $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + +@@ -894,7 +895,7 @@ libainstall: all + # Install the dynamically loadable modules + # This goes into $(exec_prefix) + sharedinstall: +- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \ ++ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ + --install-platlib=$(DESTSHARED) \ +Index: Python-2.5.2/setup.py +=================================================================== +--- Python-2.5.2.orig/setup.py ++++ Python-2.5.2/setup.py +@@ -211,6 +211,7 @@ class PyBuildExt(build_ext): + except ImportError, why: + self.announce('*** WARNING: renaming "%s" since importing it' + ' failed: %s' % (ext.name, why), level=3) ++ return + assert not self.inplace + basename, tail = os.path.splitext(ext_filename) + newname = basename + "_failed" + tail +@@ -244,8 +245,8 @@ class PyBuildExt(build_ext): + + def detect_modules(self): + # Ensure that /usr/local is always used +- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') +- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') ++ # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') ++ # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') + + # Add paths specified in the environment variables LDFLAGS and + # CPPFLAGS for header and library files. +@@ -342,6 +343,9 @@ class PyBuildExt(build_ext): + + # XXX Omitted modules: gl, pure, dl, SGI-specific modules + ++ lib_dirs = [ os.getenv( "STAGING_LIBDIR" ) ] ++ inc_dirs = [ os.getenv( "STAGING_INCDIR" ) ] ++ + # + # The following modules are all pretty straightforward, and compile + # on pretty much any POSIXish platform. -- cgit v1.2.3-54-g00ecf