1 |
commit: 83eb744d8b60b3c911902999a40c0479823c271b |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 3 09:48:00 2016 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 3 10:47:37 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83eb744d |
7 |
|
8 |
dev-python/pypy3: Sync between release and live ebuild |
9 |
|
10 |
.../pypy3/files/2.4.0-21_all_distutils_c++.patch | 251 +++++++++++++++++++++ |
11 |
dev-python/pypy3/pypy3-2.4.0-r2.ebuild | 9 +- |
12 |
dev-python/pypy3/pypy3-9999.ebuild | 10 +- |
13 |
3 files changed, 264 insertions(+), 6 deletions(-) |
14 |
|
15 |
diff --git a/dev-python/pypy3/files/2.4.0-21_all_distutils_c++.patch b/dev-python/pypy3/files/2.4.0-21_all_distutils_c++.patch |
16 |
new file mode 100644 |
17 |
index 0000000..90525d5 |
18 |
--- /dev/null |
19 |
+++ b/dev-python/pypy3/files/2.4.0-21_all_distutils_c++.patch |
20 |
@@ -0,0 +1,251 @@ |
21 |
+http://bugs.python.org/issue1222585 |
22 |
+ |
23 |
+--- Lib/distutils/cygwinccompiler.py |
24 |
++++ Lib/distutils/cygwinccompiler.py |
25 |
+@@ -136,9 +136,13 @@ |
26 |
+ self.set_executables(compiler='gcc -mcygwin -O -Wall', |
27 |
+ compiler_so='gcc -mcygwin -mdll -O -Wall', |
28 |
+ compiler_cxx='g++ -mcygwin -O -Wall', |
29 |
++ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall', |
30 |
+ linker_exe='gcc -mcygwin', |
31 |
+ linker_so=('%s -mcygwin %s' % |
32 |
+- (self.linker_dll, shared_option))) |
33 |
++ (self.linker_dll, shared_option)), |
34 |
++ linker_exe_cxx='g++ -mcygwin', |
35 |
++ linker_so_cxx=('%s -mcygwin %s' % |
36 |
++ (self.linker_dll, shared_option))) |
37 |
+ |
38 |
+ # cygwin and mingw32 need different sets of libraries |
39 |
+ if self.gcc_version == "2.91.57": |
40 |
+@@ -162,8 +166,12 @@ |
41 |
+ raise CompileError(msg) |
42 |
+ else: # for other files use the C-compiler |
43 |
+ try: |
44 |
+- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + |
45 |
+- extra_postargs) |
46 |
++ if self.detect_language(src) == 'c++': |
47 |
++ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + |
48 |
++ extra_postargs) |
49 |
++ else: |
50 |
++ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + |
51 |
++ extra_postargs) |
52 |
+ except DistutilsExecError as msg: |
53 |
+ raise CompileError(msg) |
54 |
+ |
55 |
+@@ -294,10 +302,15 @@ |
56 |
+ self.set_executables(compiler='gcc -mno-cygwin -O -Wall', |
57 |
+ compiler_so='gcc -mno-cygwin -mdll -O -Wall', |
58 |
+ compiler_cxx='g++ -mno-cygwin -O -Wall', |
59 |
++ compiler_so_cxx='g++ -mno-cygwin -mdll -O -Wall', |
60 |
+ linker_exe='gcc -mno-cygwin', |
61 |
+ linker_so='%s -mno-cygwin %s %s' |
62 |
+ % (self.linker_dll, shared_option, |
63 |
+- entry_point)) |
64 |
++ entry_point), |
65 |
++ linker_exe_cxx='g++ -mno-cygwin', |
66 |
++ linker_so_cxx='%s -mno-cygwin %s %s' |
67 |
++ % (self.linker_dll, shared_option, |
68 |
++ entry_point)) |
69 |
+ # Maybe we should also append -mthreads, but then the finished |
70 |
+ # dlls need another dll (mingwm10.dll see Mingw32 docs) |
71 |
+ # (-mthreads: Support thread-safe exception handling on `Mingw32') |
72 |
+--- Lib/distutils/emxccompiler.py |
73 |
++++ Lib/distutils/emxccompiler.py |
74 |
+@@ -63,8 +63,12 @@ |
75 |
+ # XXX optimization, warnings etc. should be customizable. |
76 |
+ self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', |
77 |
+ compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', |
78 |
++ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', |
79 |
++ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', |
80 |
+ linker_exe='gcc -Zomf -Zmt -Zcrtdll', |
81 |
+- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll') |
82 |
++ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll', |
83 |
++ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll', |
84 |
++ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll') |
85 |
+ |
86 |
+ # want the gcc library statically linked (so that we don't have |
87 |
+ # to distribute a version dependent on the compiler we have) |
88 |
+@@ -81,8 +85,12 @@ |
89 |
+ raise CompileError(msg) |
90 |
+ else: # for other files use the C-compiler |
91 |
+ try: |
92 |
+- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + |
93 |
+- extra_postargs) |
94 |
++ if self.detect_language(src) == 'c++': |
95 |
++ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + |
96 |
++ extra_postargs) |
97 |
++ else: |
98 |
++ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + |
99 |
++ extra_postargs) |
100 |
+ except DistutilsExecError as msg: |
101 |
+ raise CompileError(msg) |
102 |
+ |
103 |
+--- Lib/distutils/sysconfig_cpython.py |
104 |
++++ Lib/distutils/sysconfig_cpython.py |
105 |
+@@ -170,9 +170,12 @@ |
106 |
+ _osx_support.customize_compiler(_config_vars) |
107 |
+ _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' |
108 |
+ |
109 |
+- (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ |
110 |
+- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', |
111 |
+- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') |
112 |
++ (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \ |
113 |
++ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', |
114 |
++ 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') |
115 |
++ |
116 |
++ cflags = '' |
117 |
++ cxxflags = '' |
118 |
+ |
119 |
+ newcc = None |
120 |
+ if 'CC' in os.environ: |
121 |
+@@ -181,19 +184,27 @@ |
122 |
+ cxx = os.environ['CXX'] |
123 |
+ if 'LDSHARED' in os.environ: |
124 |
+ ldshared = os.environ['LDSHARED'] |
125 |
++ if 'LDCXXSHARED' in os.environ: |
126 |
++ ldcxxshared = os.environ['LDCXXSHARED'] |
127 |
+ if 'CPP' in os.environ: |
128 |
+ cpp = os.environ['CPP'] |
129 |
+ else: |
130 |
+ cpp = cc + " -E" # not always |
131 |
+ if 'LDFLAGS' in os.environ: |
132 |
+ ldshared = ldshared + ' ' + os.environ['LDFLAGS'] |
133 |
++ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS'] |
134 |
+ if 'CFLAGS' in os.environ: |
135 |
+- cflags = opt + ' ' + os.environ['CFLAGS'] |
136 |
++ cflags = os.environ['CFLAGS'] |
137 |
+ ldshared = ldshared + ' ' + os.environ['CFLAGS'] |
138 |
++ if 'CXXFLAGS' in os.environ: |
139 |
++ cxxflags = os.environ['CXXFLAGS'] |
140 |
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS'] |
141 |
+ if 'CPPFLAGS' in os.environ: |
142 |
+ cpp = cpp + ' ' + os.environ['CPPFLAGS'] |
143 |
+ cflags = cflags + ' ' + os.environ['CPPFLAGS'] |
144 |
++ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS'] |
145 |
+ ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] |
146 |
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS'] |
147 |
+ if 'AR' in os.environ: |
148 |
+ ar = os.environ['AR'] |
149 |
+ if 'ARFLAGS' in os.environ: |
150 |
+@@ -202,13 +213,17 @@ |
151 |
+ archiver = ar + ' ' + ar_flags |
152 |
+ |
153 |
+ cc_cmd = cc + ' ' + cflags |
154 |
++ cxx_cmd = cxx + ' ' + cxxflags |
155 |
+ compiler.set_executables( |
156 |
+ preprocessor=cpp, |
157 |
+ compiler=cc_cmd, |
158 |
+ compiler_so=cc_cmd + ' ' + ccshared, |
159 |
+- compiler_cxx=cxx, |
160 |
++ compiler_cxx=cxx_cmd, |
161 |
++ compiler_so_cxx=cxx_cmd + ' ' + ccshared, |
162 |
+ linker_so=ldshared, |
163 |
+ linker_exe=cc, |
164 |
++ linker_so_cxx=ldcxxshared, |
165 |
++ linker_exe_cxx=cxx, |
166 |
+ archiver=archiver) |
167 |
+ |
168 |
+ compiler.shared_lib_extension = shlib_suffix |
169 |
+--- Lib/distutils/unixccompiler.py |
170 |
++++ Lib/distutils/unixccompiler.py |
171 |
+@@ -52,14 +52,17 @@ |
172 |
+ # are pretty generic; they will probably have to be set by an outsider |
173 |
+ # (eg. using information discovered by the sysconfig about building |
174 |
+ # Python extensions). |
175 |
+- executables = {'preprocessor' : None, |
176 |
+- 'compiler' : ["cc"], |
177 |
+- 'compiler_so' : ["cc"], |
178 |
+- 'compiler_cxx' : ["cc"], |
179 |
+- 'linker_so' : ["cc", "-shared"], |
180 |
+- 'linker_exe' : ["cc"], |
181 |
+- 'archiver' : ["ar", "-cr"], |
182 |
+- 'ranlib' : None, |
183 |
++ executables = {'preprocessor' : None, |
184 |
++ 'compiler' : ["cc"], |
185 |
++ 'compiler_so' : ["cc"], |
186 |
++ 'compiler_cxx' : ["c++"], |
187 |
++ 'compiler_so_cxx' : ["c++"], |
188 |
++ 'linker_so' : ["cc", "-shared"], |
189 |
++ 'linker_exe' : ["cc"], |
190 |
++ 'linker_so_cxx' : ["c++", "-shared"], |
191 |
++ 'linker_exe_cxx' : ["c++"], |
192 |
++ 'archiver' : ["ar", "-cr"], |
193 |
++ 'ranlib' : None, |
194 |
+ } |
195 |
+ |
196 |
+ if sys.platform[:6] == "darwin": |
197 |
+@@ -108,12 +111,19 @@ |
198 |
+ |
199 |
+ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): |
200 |
+ compiler_so = self.compiler_so |
201 |
++ compiler_so_cxx = self.compiler_so_cxx |
202 |
+ if sys.platform == 'darwin': |
203 |
+ compiler_so = _osx_support.compiler_fixup(compiler_so, |
204 |
+ cc_args + extra_postargs) |
205 |
++ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx, |
206 |
++ cc_args + extra_postargs) |
207 |
+ try: |
208 |
+- self.spawn(compiler_so + cc_args + [src, '-o', obj] + |
209 |
+- extra_postargs) |
210 |
++ if self.detect_language(src) == 'c++': |
211 |
++ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] + |
212 |
++ extra_postargs) |
213 |
++ else: |
214 |
++ self.spawn(compiler_so + cc_args + [src, '-o', obj] + |
215 |
++ extra_postargs) |
216 |
+ except DistutilsExecError as msg: |
217 |
+ raise CompileError(msg) |
218 |
+ |
219 |
+@@ -171,22 +181,16 @@ |
220 |
+ ld_args.extend(extra_postargs) |
221 |
+ self.mkpath(os.path.dirname(output_filename)) |
222 |
+ try: |
223 |
+- if target_desc == CCompiler.EXECUTABLE: |
224 |
+- linker = self.linker_exe[:] |
225 |
++ if target_lang == "c++": |
226 |
++ if target_desc == CCompiler.EXECUTABLE: |
227 |
++ linker = self.linker_exe_cxx[:] |
228 |
++ else: |
229 |
++ linker = self.linker_so_cxx[:] |
230 |
+ else: |
231 |
+- linker = self.linker_so[:] |
232 |
+- if target_lang == "c++" and self.compiler_cxx: |
233 |
+- # skip over environment variable settings if /usr/bin/env |
234 |
+- # is used to set up the linker's environment. |
235 |
+- # This is needed on OSX. Note: this assumes that the |
236 |
+- # normal and C++ compiler have the same environment |
237 |
+- # settings. |
238 |
+- i = 0 |
239 |
+- if os.path.basename(linker[0]) == "env": |
240 |
+- i = 1 |
241 |
+- while '=' in linker[i]: |
242 |
+- i += 1 |
243 |
+- linker[i] = self.compiler_cxx[i] |
244 |
++ if target_desc == CCompiler.EXECUTABLE: |
245 |
++ linker = self.linker_exe[:] |
246 |
++ else: |
247 |
++ linker = self.linker_so[:] |
248 |
+ |
249 |
+ if sys.platform == 'darwin': |
250 |
+ linker = _osx_support.compiler_fixup(linker, ld_args) |
251 |
+--- Lib/_osx_support.py |
252 |
++++ Lib/_osx_support.py |
253 |
+@@ -14,13 +14,13 @@ |
254 |
+ # configuration variables that may contain universal build flags, |
255 |
+ # like "-arch" or "-isdkroot", that may need customization for |
256 |
+ # the user environment |
257 |
+-_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', |
258 |
+- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', |
259 |
+- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', |
260 |
+- 'PY_CORE_CFLAGS') |
261 |
++_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', |
262 |
++ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED', |
263 |
++ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', |
264 |
++ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS') |
265 |
+ |
266 |
+ # configuration variables that may contain compiler calls |
267 |
+-_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') |
268 |
++_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX') |
269 |
+ |
270 |
+ # prefix added to original configuration variable names |
271 |
+ _INITPRE = '_OSX_SUPPORT_INITIAL_' |
272 |
|
273 |
diff --git a/dev-python/pypy3/pypy3-2.4.0-r2.ebuild b/dev-python/pypy3/pypy3-2.4.0-r2.ebuild |
274 |
index 87a1a3d..446c8d6 100644 |
275 |
--- a/dev-python/pypy3/pypy3-2.4.0-r2.ebuild |
276 |
+++ b/dev-python/pypy3/pypy3-2.4.0-r2.ebuild |
277 |
@@ -50,9 +50,9 @@ pkg_pretend() { |
278 |
CHECKREQS_MEMORY="3G" |
279 |
use amd64 && CHECKREQS_MEMORY="6G" |
280 |
fi |
281 |
- fi |
282 |
|
283 |
- check-reqs_pkg_pretend |
284 |
+ check-reqs_pkg_pretend |
285 |
+ fi |
286 |
} |
287 |
|
288 |
pkg_setup() { |
289 |
@@ -87,6 +87,11 @@ src_prepare() { |
290 |
-e "s^@libdir@^$(get_libdir)^" \ |
291 |
-i lib-python/3/distutils/command/install.py || die |
292 |
|
293 |
+ # apply CPython stdlib patches |
294 |
+ pushd lib-python/3 > /dev/null || die |
295 |
+ epatch "${FILESDIR}"/2.4.0-21_all_distutils_c++.patch |
296 |
+ popd > /dev/null || die |
297 |
+ |
298 |
epatch_user |
299 |
} |
300 |
|
301 |
|
302 |
diff --git a/dev-python/pypy3/pypy3-9999.ebuild b/dev-python/pypy3/pypy3-9999.ebuild |
303 |
index 8050779..5f1b62c 100644 |
304 |
--- a/dev-python/pypy3/pypy3-9999.ebuild |
305 |
+++ b/dev-python/pypy3/pypy3-9999.ebuild |
306 |
@@ -9,22 +9,24 @@ PYTHON_COMPAT=( python2_7 pypy ) |
307 |
EHG_PROJECT="pypy" |
308 |
EHG_REPO_URI="https://bitbucket.org/pypy/pypy" |
309 |
EHG_REVISION="py3k" |
310 |
-inherit check-reqs eutils mercurial multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator |
311 |
+inherit check-reqs eutils mercurial multilib multiprocessing pax-utils \ |
312 |
+ python-any-r1 toolchain-funcs versionator |
313 |
|
314 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
315 |
+DESCRIPTION="A fast, compliant alternative implementation of Python 3" |
316 |
HOMEPAGE="http://pypy.org/" |
317 |
SRC_URI="" |
318 |
|
319 |
LICENSE="MIT" |
320 |
SLOT="0/$(get_version_component_range 1-2 ${PV})" |
321 |
KEYWORDS="" |
322 |
-IUSE="bzip2 gdbm +jit low-memory ncurses sandbox +shadowstack sqlite cpu_flags_x86_sse2 test tk" |
323 |
+IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox +shadowstack sqlite cpu_flags_x86_sse2 tk" |
324 |
|
325 |
RDEPEND=">=sys-libs/zlib-1.1.3:0= |
326 |
virtual/libffi:0= |
327 |
virtual/libintl:0= |
328 |
dev-libs/expat:0= |
329 |
- dev-libs/openssl:0=[-bindist] |
330 |
+ !libressl? ( dev-libs/openssl:0= ) |
331 |
+ libressl? ( dev-libs/libressl:= ) |
332 |
bzip2? ( app-arch/bzip2:0= ) |
333 |
gdbm? ( sys-libs/gdbm:0= ) |
334 |
ncurses? ( sys-libs/ncurses:0= ) |