diff options
| author | Michael Lauer <mickey@vanille-media.de> | 2005-09-28 14:08:04 +0000 |
|---|---|---|
| committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-09-28 14:08:04 +0000 |
| commit | b3796280545127a63960c9638168f6e1c9a76c26 (patch) | |
| tree | ee88c1731c743172415518defa472c52ec2c95cc /packages/python/python-2.4.2/crosscompile.patch | |
| parent | d7f9614d9602eeefab3bba015184ec0f7572ba03 (diff) | |
| parent | 3ce6158c5a4e3c1c9b6ab90430b4ddc185e981f8 (diff) | |
merge of 2ee92374446758a6e4eb30e6b81483816ae44575
and ac0f7cef89d03ac964eee9b5bee66880b7943389
Diffstat (limited to 'packages/python/python-2.4.2/crosscompile.patch')
| -rw-r--r-- | packages/python/python-2.4.2/crosscompile.patch | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/packages/python/python-2.4.2/crosscompile.patch b/packages/python/python-2.4.2/crosscompile.patch new file mode 100644 index 0000000000..f917bb2567 --- /dev/null +++ b/packages/python/python-2.4.2/crosscompile.patch @@ -0,0 +1,108 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- Python-2.4c1/Makefile.pre.in~crosscompile ++++ Python-2.4c1/Makefile.pre.in +@@ -162,6 +162,7 @@ + + PYTHON= python$(EXE) + BUILDPYTHON= python$(BUILDEXE) ++HOSTPYTHON= $(BUILDPYTHON) + + # === Definitions added by makesetup === + +@@ -188,7 +189,7 @@ + ########################################################################## + # Parser + PGEN= Parser/pgen$(EXE) +- ++HOSTPGEN= $(PGEN)$(EXE) + POBJS= \ + Parser/acceler.o \ + Parser/grammar1.o \ +@@ -320,8 +321,8 @@ + # 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 + + # buildno should really depend on something like LIBRARY_SRC +@@ -442,7 +443,7 @@ + + + $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) +- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) ++ -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + + $(PGEN): $(PGENOBJS) + $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) +@@ -718,19 +719,19 @@ + 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 '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 '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 + +@@ -825,7 +826,7 @@ + # 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) \ +--- Python-2.4c1/setup.py~crosscompile ++++ Python-2.4c1/setup.py +@@ -206,6 +206,7 @@ + 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 +@@ -239,8 +240,8 @@ + + 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 to popular package managers on OS X/darwin + if sys.platform == "darwin": +@@ -293,6 +294,9 @@ + + # 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. |
