diff options
author | Marcin Juszkiewicz <hrw@openedhand.com> | 2007-11-15 13:55:06 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openedhand.com> | 2007-11-15 13:55:06 +0000 |
commit | 3cfbc3b20b524748ec7253d6dfdc0c5eb17836cc (patch) | |
tree | d6731c1df8707972687bac18db0336599cfffe66 /meta-extras/packages/python/python-2.5.1/crosscompile.patch | |
parent | eaafa55d861b0a31e62895845730e778a0253ec9 (diff) | |
download | poky-3cfbc3b20b524748ec7253d6dfdc0c5eb17836cc.tar.gz |
python: update to 2.5.1 from OE (without tcl/tk deps)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3176 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta-extras/packages/python/python-2.5.1/crosscompile.patch')
-rw-r--r-- | meta-extras/packages/python/python-2.5.1/crosscompile.patch | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/meta-extras/packages/python/python-2.5.1/crosscompile.patch b/meta-extras/packages/python/python-2.5.1/crosscompile.patch new file mode 100644 index 0000000000..f456048ef5 --- /dev/null +++ b/meta-extras/packages/python/python-2.5.1/crosscompile.patch | |||
@@ -0,0 +1,110 @@ | |||
1 | # | ||
2 | # Patch (C) by Michael 'Mickey' Lauer <mlauer@vanille-media.de> | ||
3 | # | ||
4 | Index: Python-2.5.1/Makefile.pre.in | ||
5 | =================================================================== | ||
6 | --- Python-2.5.1.orig/Makefile.pre.in | ||
7 | +++ Python-2.5.1/Makefile.pre.in | ||
8 | @@ -170,6 +170,7 @@ UNICODE_OBJS= @UNICODE_OBJS@ | ||
9 | |||
10 | PYTHON= python$(EXE) | ||
11 | BUILDPYTHON= python$(BUILDEXE) | ||
12 | +HOSTPYTHON= $(BUILDPYTHON) | ||
13 | |||
14 | # === Definitions added by makesetup === | ||
15 | |||
16 | @@ -196,7 +197,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar | ||
17 | ########################################################################## | ||
18 | # Parser | ||
19 | PGEN= Parser/pgen$(EXE) | ||
20 | - | ||
21 | +HOSTPGEN= $(PGEN)$(EXE) | ||
22 | POBJS= \ | ||
23 | Parser/acceler.o \ | ||
24 | Parser/grammar1.o \ | ||
25 | @@ -345,8 +346,8 @@ platform: $(BUILDPYTHON) | ||
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 | # Build static library | ||
36 | @@ -470,7 +471,7 @@ Modules/python.o: $(srcdir)/Modules/pyth | ||
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 | @@ -773,19 +774,19 @@ libinstall: $(BUILDPYTHON) $(srcdir)/Lib | ||
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 'bad_coding|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 'bad_coding|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 | @@ -885,7 +886,7 @@ libainstall: all | ||
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 | Index: Python-2.5.1/setup.py | ||
79 | =================================================================== | ||
80 | --- Python-2.5.1.orig/setup.py | ||
81 | +++ Python-2.5.1/setup.py | ||
82 | @@ -211,6 +211,7 @@ class PyBuildExt(build_ext): | ||
83 | except ImportError, why: | ||
84 | self.announce('*** WARNING: renaming "%s" since importing it' | ||
85 | ' failed: %s' % (ext.name, why), level=3) | ||
86 | + return | ||
87 | assert not self.inplace | ||
88 | basename, tail = os.path.splitext(ext_filename) | ||
89 | newname = basename + "_failed" + tail | ||
90 | @@ -244,8 +245,8 @@ class PyBuildExt(build_ext): | ||
91 | |||
92 | def detect_modules(self): | ||
93 | # Ensure that /usr/local is always used | ||
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 | + # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | ||
97 | + # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | ||
98 | |||
99 | # Add paths specified in the environment variables LDFLAGS and | ||
100 | # CPPFLAGS for header and library files. | ||
101 | @@ -341,6 +342,9 @@ class PyBuildExt(build_ext): | ||
102 | |||
103 | # XXX Omitted modules: gl, pure, dl, SGI-specific modules | ||
104 | |||
105 | + lib_dirs = [ os.getenv( "STAGING_LIBDIR" ) ] | ||
106 | + inc_dirs = [ os.getenv( "STAGING_INCDIR" ) ] | ||
107 | + | ||
108 | # | ||
109 | # The following modules are all pretty straightforward, and compile | ||
110 | # on pretty much any POSIXish platform. | ||