diff options
Diffstat (limited to 'meta/recipes-devtools/python/python-native/multilib.patch')
-rw-r--r-- | meta/recipes-devtools/python/python-native/multilib.patch | 235 |
1 files changed, 0 insertions, 235 deletions
diff --git a/meta/recipes-devtools/python/python-native/multilib.patch b/meta/recipes-devtools/python/python-native/multilib.patch deleted file mode 100644 index af0f173c6d..0000000000 --- a/meta/recipes-devtools/python/python-native/multilib.patch +++ /dev/null | |||
@@ -1,235 +0,0 @@ | |||
1 | Rebased for Python 2.7.9 | ||
2 | |||
3 | Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | ||
4 | |||
5 | 2011/09/29 | ||
6 | The python recipe building was failing because python-native | ||
7 | could not handle sys.lib var. sys.lib var is defined in the | ||
8 | multilib patch hence added this multilib.patch for python-native | ||
9 | recipe. | ||
10 | |||
11 | Upstream-Status: Inappropriate [oe-specific] | ||
12 | |||
13 | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
14 | |||
15 | Index: Python-2.7.14/Include/pythonrun.h | ||
16 | =================================================================== | ||
17 | --- Python-2.7.14.orig/Include/pythonrun.h | ||
18 | +++ Python-2.7.14/Include/pythonrun.h | ||
19 | @@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void); | ||
20 | /* In their own files */ | ||
21 | PyAPI_FUNC(const char *) Py_GetVersion(void); | ||
22 | PyAPI_FUNC(const char *) Py_GetPlatform(void); | ||
23 | +PyAPI_FUNC(const char *) Py_GetLib(void); | ||
24 | PyAPI_FUNC(const char *) Py_GetCopyright(void); | ||
25 | PyAPI_FUNC(const char *) Py_GetCompiler(void); | ||
26 | PyAPI_FUNC(const char *) Py_GetBuildInfo(void); | ||
27 | Index: Python-2.7.14/Lib/distutils/command/install.py | ||
28 | =================================================================== | ||
29 | --- Python-2.7.14.orig/Lib/distutils/command/install.py | ||
30 | +++ Python-2.7.14/Lib/distutils/command/install.py | ||
31 | @@ -22,6 +22,8 @@ from site import USER_BASE | ||
32 | from site import USER_SITE | ||
33 | |||
34 | |||
35 | +libname = sys.lib | ||
36 | + | ||
37 | if sys.version < "2.2": | ||
38 | WINDOWS_SCHEME = { | ||
39 | 'purelib': '$base', | ||
40 | @@ -42,7 +44,7 @@ else: | ||
41 | INSTALL_SCHEMES = { | ||
42 | 'unix_prefix': { | ||
43 | 'purelib': '$base/lib/python$py_version_short/site-packages', | ||
44 | - 'platlib': '$platbase/lib/python$py_version_short/site-packages', | ||
45 | + 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', | ||
46 | 'headers': '$base/include/python$py_version_short/$dist_name', | ||
47 | 'scripts': '$base/bin', | ||
48 | 'data' : '$base', | ||
49 | Index: Python-2.7.14/Lib/pydoc.py | ||
50 | =================================================================== | ||
51 | --- Python-2.7.14.orig/Lib/pydoc.py | ||
52 | +++ Python-2.7.14/Lib/pydoc.py | ||
53 | @@ -375,7 +375,7 @@ class Doc: | ||
54 | docmodule = docclass = docroutine = docother = docproperty = docdata = fail | ||
55 | |||
56 | def getdocloc(self, object, | ||
57 | - basedir=os.path.join(sys.exec_prefix, "lib", | ||
58 | + basedir=os.path.join(sys.exec_prefix, "sys.lib", | ||
59 | "python"+sys.version[0:3])): | ||
60 | """Return the location of module docs or None""" | ||
61 | |||
62 | Index: Python-2.7.14/Lib/site.py | ||
63 | =================================================================== | ||
64 | --- Python-2.7.14.orig/Lib/site.py | ||
65 | +++ Python-2.7.14/Lib/site.py | ||
66 | @@ -288,13 +288,19 @@ def getsitepackages(): | ||
67 | if sys.platform in ('os2emx', 'riscos'): | ||
68 | sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) | ||
69 | elif os.sep == '/': | ||
70 | - sitepackages.append(os.path.join(prefix, "lib", | ||
71 | + sitepackages.append(os.path.join(prefix, sys.lib, | ||
72 | "python" + sys.version[:3], | ||
73 | "site-packages")) | ||
74 | - sitepackages.append(os.path.join(prefix, "lib", "site-python")) | ||
75 | + if sys.lib != "lib": | ||
76 | + sitepackages.append(os.path.join(prefix, "lib", | ||
77 | + "python" + sys.version[:3], | ||
78 | + "site-packages")) | ||
79 | + sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) | ||
80 | + if sys.lib != "lib": | ||
81 | + sitepackages.append(os.path.join(prefix, "lib", "site-python")) | ||
82 | else: | ||
83 | sitepackages.append(prefix) | ||
84 | - sitepackages.append(os.path.join(prefix, "lib", "site-packages")) | ||
85 | + sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) | ||
86 | return sitepackages | ||
87 | |||
88 | def addsitepackages(known_paths): | ||
89 | Index: Python-2.7.14/Lib/test/test_dl.py | ||
90 | =================================================================== | ||
91 | --- Python-2.7.14.orig/Lib/test/test_dl.py | ||
92 | +++ Python-2.7.14/Lib/test/test_dl.py | ||
93 | @@ -4,10 +4,11 @@ | ||
94 | import unittest | ||
95 | from test.test_support import verbose, import_module | ||
96 | dl = import_module('dl', deprecated=True) | ||
97 | +import sys | ||
98 | |||
99 | sharedlibs = [ | ||
100 | - ('/usr/lib/libc.so', 'getpid'), | ||
101 | - ('/lib/libc.so.6', 'getpid'), | ||
102 | + ('/usr/'+sys.lib+'/libc.so', 'getpid'), | ||
103 | + ('/'+sys.lib+'/libc.so.6', 'getpid'), | ||
104 | ('/usr/bin/cygwin1.dll', 'getpid'), | ||
105 | ('/usr/lib/libc.dylib', 'getpid'), | ||
106 | ] | ||
107 | Index: Python-2.7.14/Lib/trace.py | ||
108 | =================================================================== | ||
109 | --- Python-2.7.14.orig/Lib/trace.py | ||
110 | +++ Python-2.7.14/Lib/trace.py | ||
111 | @@ -754,10 +754,10 @@ def main(argv=None): | ||
112 | # should I also call expanduser? (after all, could use $HOME) | ||
113 | |||
114 | s = s.replace("$prefix", | ||
115 | - os.path.join(sys.prefix, "lib", | ||
116 | + os.path.join(sys.prefix, sys.lib, | ||
117 | "python" + sys.version[:3])) | ||
118 | s = s.replace("$exec_prefix", | ||
119 | - os.path.join(sys.exec_prefix, "lib", | ||
120 | + os.path.join(sys.exec_prefix, sys.lib, | ||
121 | "python" + sys.version[:3])) | ||
122 | s = os.path.normpath(s) | ||
123 | ignore_dirs.append(s) | ||
124 | Index: Python-2.7.14/Makefile.pre.in | ||
125 | =================================================================== | ||
126 | --- Python-2.7.14.orig/Makefile.pre.in | ||
127 | +++ Python-2.7.14/Makefile.pre.in | ||
128 | @@ -91,6 +91,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG | ||
129 | |||
130 | # Machine-dependent subdirectories | ||
131 | MACHDEP= @MACHDEP@ | ||
132 | +LIB= @LIB@ | ||
133 | |||
134 | # Multiarch directory (may be empty) | ||
135 | MULTIARCH= @MULTIARCH@ | ||
136 | @@ -110,7 +111,7 @@ LIBDIR= @libdir@ | ||
137 | MANDIR= @mandir@ | ||
138 | INCLUDEDIR= @includedir@ | ||
139 | CONFINCLUDEDIR= $(exec_prefix)/include | ||
140 | -SCRIPTDIR= $(prefix)/lib | ||
141 | +SCRIPTDIR= $(prefix)/@LIB@ | ||
142 | |||
143 | # Detailed destination directories | ||
144 | BINLIBDEST= $(LIBDIR)/python$(VERSION) | ||
145 | @@ -644,6 +645,7 @@ Modules/getpath.o: $(srcdir)/Modules/get | ||
146 | -DEXEC_PREFIX='"$(exec_prefix)"' \ | ||
147 | -DVERSION='"$(VERSION)"' \ | ||
148 | -DVPATH='"$(VPATH)"' \ | ||
149 | + -DLIB='"$(LIB)"' \ | ||
150 | -o $@ $(srcdir)/Modules/getpath.c | ||
151 | |||
152 | Modules/python.o: $(srcdir)/Modules/python.c | ||
153 | @@ -692,7 +694,7 @@ regen-ast: | ||
154 | Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h | ||
155 | |||
156 | Python/getplatform.o: $(srcdir)/Python/getplatform.c | ||
157 | - $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c | ||
158 | + $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c | ||
159 | |||
160 | Python/importdl.o: $(srcdir)/Python/importdl.c | ||
161 | $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c | ||
162 | Index: Python-2.7.14/Modules/getpath.c | ||
163 | =================================================================== | ||
164 | --- Python-2.7.14.orig/Modules/getpath.c | ||
165 | +++ Python-2.7.14/Modules/getpath.c | ||
166 | @@ -100,6 +100,13 @@ | ||
167 | #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" | ||
168 | #endif | ||
169 | |||
170 | +#define LIB_PYTHON LIB "/python" VERSION | ||
171 | + | ||
172 | +#ifndef PYTHONPATH | ||
173 | +#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \ | ||
174 | + EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload" | ||
175 | +#endif | ||
176 | + | ||
177 | #ifndef LANDMARK | ||
178 | #define LANDMARK "os.py" | ||
179 | #endif | ||
180 | @@ -108,7 +115,7 @@ static char prefix[MAXPATHLEN+1]; | ||
181 | static char exec_prefix[MAXPATHLEN+1]; | ||
182 | static char progpath[MAXPATHLEN+1]; | ||
183 | static char *module_search_path = NULL; | ||
184 | -static char lib_python[] = "lib/python" VERSION; | ||
185 | +static char lib_python[] = LIB_PYTHON; | ||
186 | |||
187 | static void | ||
188 | reduce(char *dir) | ||
189 | Index: Python-2.7.14/Python/getplatform.c | ||
190 | =================================================================== | ||
191 | --- Python-2.7.14.orig/Python/getplatform.c | ||
192 | +++ Python-2.7.14/Python/getplatform.c | ||
193 | @@ -10,3 +10,13 @@ Py_GetPlatform(void) | ||
194 | { | ||
195 | return PLATFORM; | ||
196 | } | ||
197 | + | ||
198 | +#ifndef LIB | ||
199 | +#define LIB "lib" | ||
200 | +#endif | ||
201 | + | ||
202 | +const char * | ||
203 | +Py_GetLib(void) | ||
204 | +{ | ||
205 | + return LIB; | ||
206 | +} | ||
207 | Index: Python-2.7.14/Python/sysmodule.c | ||
208 | =================================================================== | ||
209 | --- Python-2.7.14.orig/Python/sysmodule.c | ||
210 | +++ Python-2.7.14/Python/sysmodule.c | ||
211 | @@ -1437,6 +1437,8 @@ _PySys_Init(void) | ||
212 | PyString_FromString(Py_GetCopyright())); | ||
213 | SET_SYS_FROM_STRING("platform", | ||
214 | PyString_FromString(Py_GetPlatform())); | ||
215 | + SET_SYS_FROM_STRING("lib", | ||
216 | + PyString_FromString(Py_GetLib())); | ||
217 | SET_SYS_FROM_STRING("executable", | ||
218 | PyString_FromString(Py_GetProgramFullPath())); | ||
219 | SET_SYS_FROM_STRING("prefix", | ||
220 | Index: Python-2.7.14/configure.ac | ||
221 | =================================================================== | ||
222 | --- Python-2.7.14.orig/configure.ac | ||
223 | +++ Python-2.7.14/configure.ac | ||
224 | @@ -758,6 +758,11 @@ SunOS*) | ||
225 | ;; | ||
226 | esac | ||
227 | |||
228 | +AC_SUBST(LIB) | ||
229 | +AC_MSG_CHECKING(LIB) | ||
230 | +LIB=`basename ${libdir}` | ||
231 | +AC_MSG_RESULT($LIB) | ||
232 | + | ||
233 | |||
234 | AC_SUBST(LIBRARY) | ||
235 | AC_MSG_CHECKING(LIBRARY) | ||