diff options
Diffstat (limited to 'meta-extras/packages/python/python-2.4.4/crosscompile.patch')
-rw-r--r-- | meta-extras/packages/python/python-2.4.4/crosscompile.patch | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/meta-extras/packages/python/python-2.4.4/crosscompile.patch b/meta-extras/packages/python/python-2.4.4/crosscompile.patch new file mode 100644 index 0000000000..f917bb2567 --- /dev/null +++ b/meta-extras/packages/python/python-2.4.4/crosscompile.patch | |||
@@ -0,0 +1,108 @@ | |||
1 | |||
2 | # | ||
3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
4 | # | ||
5 | |||
6 | --- Python-2.4c1/Makefile.pre.in~crosscompile | ||
7 | +++ Python-2.4c1/Makefile.pre.in | ||
8 | @@ -162,6 +162,7 @@ | ||
9 | |||
10 | PYTHON= python$(EXE) | ||
11 | BUILDPYTHON= python$(BUILDEXE) | ||
12 | +HOSTPYTHON= $(BUILDPYTHON) | ||
13 | |||
14 | # === Definitions added by makesetup === | ||
15 | |||
16 | @@ -188,7 +189,7 @@ | ||
17 | ########################################################################## | ||
18 | # Parser | ||
19 | PGEN= Parser/pgen$(EXE) | ||
20 | - | ||
21 | +HOSTPGEN= $(PGEN)$(EXE) | ||
22 | POBJS= \ | ||
23 | Parser/acceler.o \ | ||
24 | Parser/grammar1.o \ | ||
25 | @@ -320,8 +321,8 @@ | ||
26 | # Build the shared modules | ||
27 | sharedmods: $(BUILDPYTHON) | ||
28 | case $$MAKEFLAGS in \ | ||
29 | - *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ | ||
30 | - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ | ||
31 | + *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ | ||
32 | + *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ | ||
33 | esac | ||
34 | |||
35 | # buildno should really depend on something like LIBRARY_SRC | ||
36 | @@ -442,7 +443,7 @@ | ||
37 | |||
38 | |||
39 | $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) | ||
40 | - -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) | ||
41 | + -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) | ||
42 | |||
43 | $(PGEN): $(PGENOBJS) | ||
44 | $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) | ||
45 | @@ -718,19 +719,19 @@ | ||
46 | done | ||
47 | $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt | ||
48 | PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
49 | - ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
50 | + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
51 | -d $(LIBDEST) -f \ | ||
52 | -x 'badsyntax|site-packages' $(DESTDIR)$(LIBDEST) | ||
53 | PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
54 | - ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
55 | + $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
56 | -d $(LIBDEST) -f \ | ||
57 | -x 'badsyntax|site-packages' $(DESTDIR)$(LIBDEST) | ||
58 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
59 | - ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
60 | + $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
61 | -d $(LIBDEST)/site-packages -f \ | ||
62 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages | ||
63 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
64 | - ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
65 | + $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
66 | -d $(LIBDEST)/site-packages -f \ | ||
67 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages | ||
68 | |||
69 | @@ -825,7 +826,7 @@ | ||
70 | # Install the dynamically loadable modules | ||
71 | # This goes into $(exec_prefix) | ||
72 | sharedinstall: | ||
73 | - $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \ | ||
74 | + $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \ | ||
75 | --prefix=$(prefix) \ | ||
76 | --install-scripts=$(BINDIR) \ | ||
77 | --install-platlib=$(DESTSHARED) \ | ||
78 | --- Python-2.4c1/setup.py~crosscompile | ||
79 | +++ Python-2.4c1/setup.py | ||
80 | @@ -206,6 +206,7 @@ | ||
81 | except ImportError, why: | ||
82 | self.announce('*** WARNING: renaming "%s" since importing it' | ||
83 | ' failed: %s' % (ext.name, why), level=3) | ||
84 | + return | ||
85 | assert not self.inplace | ||
86 | basename, tail = os.path.splitext(ext_filename) | ||
87 | newname = basename + "_failed" + tail | ||
88 | @@ -239,8 +240,8 @@ | ||
89 | |||
90 | def detect_modules(self): | ||
91 | # Ensure that /usr/local is always used | ||
92 | - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | ||
93 | - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | ||
94 | + # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | ||
95 | + # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | ||
96 | |||
97 | # Add paths to popular package managers on OS X/darwin | ||
98 | if sys.platform == "darwin": | ||
99 | @@ -293,6 +294,9 @@ | ||
100 | |||
101 | # XXX Omitted modules: gl, pure, dl, SGI-specific modules | ||
102 | |||
103 | + lib_dirs = [ os.getenv( "STAGING_LIBDIR" ) ] | ||
104 | + inc_dirs = [ os.getenv( "STAGING_INCDIR" ) ] | ||
105 | + | ||
106 | # | ||
107 | # The following modules are all pretty straightforward, and compile | ||
108 | # on pretty much any POSIXish platform. | ||