3 changed files with 171 additions and 1 deletions
@ -0,0 +1,162 @@ |
|||||||
|
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
||||||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||||
|
# |
||||||
|
# Filename: package/.../python/hostpython.patch.cross |
||||||
|
# Copyright (C) 2010 The OpenSDE Project |
||||||
|
# |
||||||
|
# More information can be found in the files COPYING and README. |
||||||
|
# |
||||||
|
# This patch file is dual-licensed. It is available under the license the |
||||||
|
# patched project is licensed under, as long as it is an OpenSource license |
||||||
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms |
||||||
|
# of the GNU General Public License as published by the Free Software |
||||||
|
# Foundation; either version 2 of the License, or (at your option) any later |
||||||
|
# version. |
||||||
|
# --- SDE-COPYRIGHT-NOTE-END --- |
||||||
|
|
||||||
|
--- ./Makefile.pre.in.orig 2010-04-26 11:41:35.000000000 -0400 |
||||||
|
+++ ./Makefile.pre.in 2010-04-26 14:29:39.000000000 -0400 |
||||||
|
@@ -175,6 +175,7 @@ |
||||||
|
|
||||||
|
PYTHON= python$(EXE) |
||||||
|
BUILDPYTHON= python$(BUILDEXE) |
||||||
|
+HOSTPYTHON= ./$(BUILDPYTHON) |
||||||
|
|
||||||
|
# The task to run while instrument when building the profile-opt target |
||||||
|
PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck |
||||||
|
@@ -205,6 +206,7 @@ |
||||||
|
########################################################################## |
||||||
|
# Parser |
||||||
|
PGEN= Parser/pgen$(EXE) |
||||||
|
+HOSTPGEN= $(PGEN) |
||||||
|
|
||||||
|
POBJS= \ |
||||||
|
Parser/acceler.o \ |
||||||
|
@@ -370,7 +372,7 @@ |
||||||
|
$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov" |
||||||
|
|
||||||
|
run_profile_task: |
||||||
|
- ./$(BUILDPYTHON) $(PROFILE_TASK) |
||||||
|
+ $(HOSTPYTHON) $(PROFILE_TASK) |
||||||
|
|
||||||
|
build_all_use_profile: |
||||||
|
$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use" |
||||||
|
@@ -388,14 +390,14 @@ |
||||||
|
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) |
||||||
|
|
||||||
|
platform: $(BUILDPYTHON) |
||||||
|
- $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform |
||||||
|
+ $(RUNSHARED) $(HOSTPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform |
||||||
|
|
||||||
|
|
||||||
|
# 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 |
||||||
|
@@ -517,7 +519,7 @@ |
||||||
|
|
||||||
|
$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) |
||||||
|
-@$(INSTALL) -d Include |
||||||
|
- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) |
||||||
|
+ -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) |
||||||
|
|
||||||
|
$(PGEN): $(PGENOBJS) |
||||||
|
$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) |
||||||
|
@@ -676,7 +678,7 @@ |
||||||
|
|
||||||
|
TESTOPTS= -l $(EXTRATESTOPTS) |
||||||
|
TESTPROG= $(srcdir)/Lib/test/regrtest.py |
||||||
|
-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -E -tt |
||||||
|
+TESTPYTHON= $(RUNSHARED) $(HOSTPYTHON) -E -tt |
||||||
|
test: all platform |
||||||
|
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f |
||||||
|
-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) |
||||||
|
@@ -699,7 +701,7 @@ |
||||||
|
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f |
||||||
|
-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall |
||||||
|
$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall |
||||||
|
- $(RUNSHARED) /usr/libexec/oah/translate ./$(BUILDPYTHON) -E -tt $(TESTPROG) $(TESTOPTS) -uall |
||||||
|
+ $(RUNSHARED) /usr/libexec/oah/translate $(HOSTPYTHON) -E -tt $(TESTPROG) $(TESTOPTS) -uall |
||||||
|
|
||||||
|
|
||||||
|
# Like testall, but with a single pass only |
||||||
|
@@ -887,23 +889,23 @@ |
||||||
|
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) \ |
||||||
|
-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) \ |
||||||
|
-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 \ |
||||||
|
-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 \ |
||||||
|
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages |
||||||
|
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
||||||
|
- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" |
||||||
|
+ $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" |
||||||
|
|
||||||
|
# Create the PLATDIR source directory, if one wasn't distributed.. |
||||||
|
$(srcdir)/Lib/$(PLATDIR): |
||||||
|
@@ -1001,7 +1003,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) \ |
||||||
|
@@ -1039,7 +1041,7 @@ |
||||||
|
fi; \ |
||||||
|
done |
||||||
|
$(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers |
||||||
|
- sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist |
||||||
|
+ sed 's/%VERSION%/'"`$(RUNSHARED) $(HOSTPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist |
||||||
|
$(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current |
||||||
|
$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK) |
||||||
|
$(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers |
||||||
|
@@ -1082,7 +1084,7 @@ |
||||||
|
# This installs a few of the useful scripts in Tools/scripts |
||||||
|
scriptsinstall: |
||||||
|
SRCDIR=$(srcdir) $(RUNSHARED) \ |
||||||
|
- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \ |
||||||
|
+ $(HOSTPYTHON) $(srcdir)/Tools/scripts/setup.py install \ |
||||||
|
--prefix=$(prefix) \ |
||||||
|
--install-scripts=$(BINDIR) \ |
||||||
|
--root=/$(DESTDIR) |
||||||
|
@@ -1104,7 +1106,7 @@ |
||||||
|
|
||||||
|
# Run reindent on the library |
||||||
|
reindent: |
||||||
|
- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib |
||||||
|
+ $(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib |
||||||
|
|
||||||
|
# Rerun configure with the same options as it was run last time, |
||||||
|
# provided the config.status script exists |
||||||
|
@@ -1201,7 +1203,7 @@ |
||||||
|
|
||||||
|
# Perform some verification checks on any modified files. |
||||||
|
patchcheck: |
||||||
|
- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py |
||||||
|
+ $(RUNSHARED) $(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py |
||||||
|
|
||||||
|
# Dependencies |
||||||
|
|
Loading…
Reference in new issue