diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-devtools/python/python-native/multilib.patch | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-devtools/python/python-native/multilib.patch')
-rw-r--r-- | meta/recipes-devtools/python/python-native/multilib.patch | 243 |
1 files changed, 243 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-native/multilib.patch b/meta/recipes-devtools/python/python-native/multilib.patch new file mode 100644 index 0000000000..0526031ada --- /dev/null +++ b/meta/recipes-devtools/python/python-native/multilib.patch | |||
@@ -0,0 +1,243 @@ | |||
1 | commit 248279e54467a8cd5cde98fc124d1d1384703513 | ||
2 | Author: Yu Ke <ke.yu@intel.com> | ||
3 | Date: Tue Jun 28 21:21:29 2011 +0800 | ||
4 | |||
5 | SUSE patch for the lib64 issue | ||
6 | |||
7 | see detail in http://bugs.python.org/issue1294959 | ||
8 | |||
9 | also rebased a bit for Yocto python 2.6.6 | ||
10 | |||
11 | Picked-by: Yu Ke <ke.yu@intel.com> | ||
12 | |||
13 | |||
14 | 2011/09/29 | ||
15 | The python recipe building was failing because python-native | ||
16 | could not handle sys.lib var. sys.lib var is defined in the | ||
17 | multilib patch hence added this multilib.patch for python-native | ||
18 | recipe. | ||
19 | |||
20 | Upstream-Status: Inappropriate [oe-specific] | ||
21 | |||
22 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
23 | |||
24 | Index: Python-2.7.2/Include/pythonrun.h | ||
25 | =================================================================== | ||
26 | --- Python-2.7.2.orig/Include/pythonrun.h | ||
27 | +++ Python-2.7.2/Include/pythonrun.h | ||
28 | @@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void); | ||
29 | /* In their own files */ | ||
30 | PyAPI_FUNC(const char *) Py_GetVersion(void); | ||
31 | PyAPI_FUNC(const char *) Py_GetPlatform(void); | ||
32 | +PyAPI_FUNC(const char *) Py_GetLib(void); | ||
33 | PyAPI_FUNC(const char *) Py_GetCopyright(void); | ||
34 | PyAPI_FUNC(const char *) Py_GetCompiler(void); | ||
35 | PyAPI_FUNC(const char *) Py_GetBuildInfo(void); | ||
36 | Index: Python-2.7.2/Lib/distutils/command/install.py | ||
37 | =================================================================== | ||
38 | --- Python-2.7.2.orig/Lib/distutils/command/install.py | ||
39 | +++ Python-2.7.2/Lib/distutils/command/install.py | ||
40 | @@ -22,6 +22,8 @@ from site import USER_BASE | ||
41 | from site import USER_SITE | ||
42 | |||
43 | |||
44 | +libname = sys.lib | ||
45 | + | ||
46 | if sys.version < "2.2": | ||
47 | WINDOWS_SCHEME = { | ||
48 | 'purelib': '$base', | ||
49 | @@ -42,7 +44,7 @@ else: | ||
50 | INSTALL_SCHEMES = { | ||
51 | 'unix_prefix': { | ||
52 | 'purelib': '$base/lib/python$py_version_short/site-packages', | ||
53 | - 'platlib': '$platbase/lib/python$py_version_short/site-packages', | ||
54 | + 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', | ||
55 | 'headers': '$base/include/python$py_version_short/$dist_name', | ||
56 | 'scripts': '$base/bin', | ||
57 | 'data' : '$base', | ||
58 | Index: Python-2.7.2/Lib/pydoc.py | ||
59 | =================================================================== | ||
60 | --- Python-2.7.2.orig/Lib/pydoc.py | ||
61 | +++ Python-2.7.2/Lib/pydoc.py | ||
62 | @@ -352,7 +352,7 @@ class Doc: | ||
63 | |||
64 | docloc = os.environ.get("PYTHONDOCS", | ||
65 | "http://docs.python.org/library") | ||
66 | - basedir = os.path.join(sys.exec_prefix, "lib", | ||
67 | + basedir = os.path.join(sys.exec_prefix, sys.lib, | ||
68 | "python"+sys.version[0:3]) | ||
69 | if (isinstance(object, type(os)) and | ||
70 | (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', | ||
71 | Index: Python-2.7.2/Lib/site.py | ||
72 | =================================================================== | ||
73 | --- Python-2.7.2.orig/Lib/site.py | ||
74 | +++ Python-2.7.2/Lib/site.py | ||
75 | @@ -300,13 +300,19 @@ def getsitepackages(): | ||
76 | if sys.platform in ('os2emx', 'riscos'): | ||
77 | sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) | ||
78 | elif os.sep == '/': | ||
79 | - sitepackages.append(os.path.join(prefix, "lib", | ||
80 | + sitepackages.append(os.path.join(prefix, sys.lib, | ||
81 | "python" + sys.version[:3], | ||
82 | "site-packages")) | ||
83 | - sitepackages.append(os.path.join(prefix, "lib", "site-python")) | ||
84 | + if sys.lib != "lib": | ||
85 | + sitepackages.append(os.path.join(prefix, "lib", | ||
86 | + "python" + sys.version[:3], | ||
87 | + "site-packages")) | ||
88 | + sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) | ||
89 | + if sys.lib != "lib": | ||
90 | + sitepackages.append(os.path.join(prefix, "lib", "site-python")) | ||
91 | else: | ||
92 | sitepackages.append(prefix) | ||
93 | - sitepackages.append(os.path.join(prefix, "lib", "site-packages")) | ||
94 | + sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) | ||
95 | if sys.platform == "darwin": | ||
96 | # for framework builds *only* we add the standard Apple | ||
97 | # locations. | ||
98 | Index: Python-2.7.2/Lib/test/test_dl.py | ||
99 | =================================================================== | ||
100 | --- Python-2.7.2.orig/Lib/test/test_dl.py | ||
101 | +++ Python-2.7.2/Lib/test/test_dl.py | ||
102 | @@ -5,10 +5,11 @@ | ||
103 | import unittest | ||
104 | from test.test_support import verbose, import_module | ||
105 | dl = import_module('dl', deprecated=True) | ||
106 | +import sys | ||
107 | |||
108 | sharedlibs = [ | ||
109 | - ('/usr/lib/libc.so', 'getpid'), | ||
110 | - ('/lib/libc.so.6', 'getpid'), | ||
111 | + ('/usr/'+sys.lib+'/libc.so', 'getpid'), | ||
112 | + ('/'+sys.lib+'/libc.so.6', 'getpid'), | ||
113 | ('/usr/bin/cygwin1.dll', 'getpid'), | ||
114 | ('/usr/lib/libc.dylib', 'getpid'), | ||
115 | ] | ||
116 | Index: Python-2.7.2/Lib/trace.py | ||
117 | =================================================================== | ||
118 | --- Python-2.7.2.orig/Lib/trace.py | ||
119 | +++ Python-2.7.2/Lib/trace.py | ||
120 | @@ -762,10 +762,10 @@ def main(argv=None): | ||
121 | # should I also call expanduser? (after all, could use $HOME) | ||
122 | |||
123 | s = s.replace("$prefix", | ||
124 | - os.path.join(sys.prefix, "lib", | ||
125 | + os.path.join(sys.prefix, sys.lib, | ||
126 | "python" + sys.version[:3])) | ||
127 | s = s.replace("$exec_prefix", | ||
128 | - os.path.join(sys.exec_prefix, "lib", | ||
129 | + os.path.join(sys.exec_prefix, sys.lib, | ||
130 | "python" + sys.version[:3])) | ||
131 | s = os.path.normpath(s) | ||
132 | ignore_dirs.append(s) | ||
133 | Index: Python-2.7.2/Makefile.pre.in | ||
134 | =================================================================== | ||
135 | --- Python-2.7.2.orig/Makefile.pre.in | ||
136 | +++ Python-2.7.2/Makefile.pre.in | ||
137 | @@ -81,6 +81,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG | ||
138 | |||
139 | # Machine-dependent subdirectories | ||
140 | MACHDEP= @MACHDEP@ | ||
141 | +LIB= @LIB@ | ||
142 | |||
143 | # Install prefix for architecture-independent files | ||
144 | prefix= @prefix@ | ||
145 | @@ -97,7 +98,7 @@ LIBDIR= @libdir@ | ||
146 | MANDIR= @mandir@ | ||
147 | INCLUDEDIR= @includedir@ | ||
148 | CONFINCLUDEDIR= $(exec_prefix)/include | ||
149 | -SCRIPTDIR= $(prefix)/lib | ||
150 | +SCRIPTDIR= $(prefix)/@LIB@ | ||
151 | |||
152 | # Detailed destination directories | ||
153 | BINLIBDEST= $(LIBDIR)/python$(VERSION) | ||
154 | @@ -532,6 +533,7 @@ Modules/getpath.o: $(srcdir)/Modules/get | ||
155 | -DEXEC_PREFIX='"$(exec_prefix)"' \ | ||
156 | -DVERSION='"$(VERSION)"' \ | ||
157 | -DVPATH='"$(VPATH)"' \ | ||
158 | + -DLIB='"$(LIB)"' \ | ||
159 | -o $@ $(srcdir)/Modules/getpath.c | ||
160 | |||
161 | Modules/python.o: $(srcdir)/Modules/python.c | ||
162 | @@ -566,7 +568,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES) | ||
163 | Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) | ||
164 | |||
165 | Python/getplatform.o: $(srcdir)/Python/getplatform.c | ||
166 | - $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c | ||
167 | + $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c | ||
168 | |||
169 | Python/importdl.o: $(srcdir)/Python/importdl.c | ||
170 | $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c | ||
171 | Index: Python-2.7.2/Modules/getpath.c | ||
172 | =================================================================== | ||
173 | --- Python-2.7.2.orig/Modules/getpath.c | ||
174 | +++ Python-2.7.2/Modules/getpath.c | ||
175 | @@ -116,9 +116,11 @@ | ||
176 | #define EXEC_PREFIX PREFIX | ||
177 | #endif | ||
178 | |||
179 | +#define LIB_PYTHON LIB "/python" VERSION | ||
180 | + | ||
181 | #ifndef PYTHONPATH | ||
182 | -#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ | ||
183 | - EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" | ||
184 | +#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \ | ||
185 | + EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload" | ||
186 | #endif | ||
187 | |||
188 | #ifndef LANDMARK | ||
189 | @@ -129,7 +131,7 @@ static char prefix[MAXPATHLEN+1]; | ||
190 | static char exec_prefix[MAXPATHLEN+1]; | ||
191 | static char progpath[MAXPATHLEN+1]; | ||
192 | static char *module_search_path = NULL; | ||
193 | -static char lib_python[] = "lib/python" VERSION; | ||
194 | +static char lib_python[] = LIB_PYTHON; | ||
195 | |||
196 | static void | ||
197 | reduce(char *dir) | ||
198 | Index: Python-2.7.2/Python/getplatform.c | ||
199 | =================================================================== | ||
200 | --- Python-2.7.2.orig/Python/getplatform.c | ||
201 | +++ Python-2.7.2/Python/getplatform.c | ||
202 | @@ -10,3 +10,13 @@ Py_GetPlatform(void) | ||
203 | { | ||
204 | return PLATFORM; | ||
205 | } | ||
206 | + | ||
207 | +#ifndef LIB | ||
208 | +#define LIB "lib" | ||
209 | +#endif | ||
210 | + | ||
211 | +const char * | ||
212 | +Py_GetLib(void) | ||
213 | +{ | ||
214 | + return LIB; | ||
215 | +} | ||
216 | Index: Python-2.7.2/Python/sysmodule.c | ||
217 | =================================================================== | ||
218 | --- Python-2.7.2.orig/Python/sysmodule.c | ||
219 | +++ Python-2.7.2/Python/sysmodule.c | ||
220 | @@ -1416,6 +1416,8 @@ _PySys_Init(void) | ||
221 | PyString_FromString(Py_GetCopyright())); | ||
222 | SET_SYS_FROM_STRING("platform", | ||
223 | PyString_FromString(Py_GetPlatform())); | ||
224 | + SET_SYS_FROM_STRING("lib", | ||
225 | + PyString_FromString(Py_GetLib())); | ||
226 | SET_SYS_FROM_STRING("executable", | ||
227 | PyString_FromString(Py_GetProgramFullPath())); | ||
228 | SET_SYS_FROM_STRING("prefix", | ||
229 | Index: Python-2.7.2/configure.in | ||
230 | =================================================================== | ||
231 | --- Python-2.7.2.orig/configure.in | ||
232 | +++ Python-2.7.2/configure.in | ||
233 | @@ -629,6 +629,10 @@ SunOS*) | ||
234 | ;; | ||
235 | esac | ||
236 | |||
237 | +AC_SUBST(LIB) | ||
238 | +AC_MSG_CHECKING(LIB) | ||
239 | +LIB=`basename ${libdir}` | ||
240 | +AC_MSG_RESULT($LIB) | ||
241 | |||
242 | AC_SUBST(LIBRARY) | ||
243 | AC_MSG_CHECKING(LIBRARY) | ||