Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
Date: Sun, 15 Oct 2017 09:38:20
Message-Id: 1508060282.a46e22a8d586b11151dd9f974f0588f8d98df431.mgorny@gentoo
1 commit: a46e22a8d586b11151dd9f974f0588f8d98df431
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 15 09:16:59 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 15 09:38:02 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a46e22a8
7
8 dev-python/pypy3: Drop old
9
10 dev-python/pypy3/Manifest | 3 -
11 dev-python/pypy3/files/5.2.0-distutils-c++.patch | 284 -----------------
12 dev-python/pypy3/files/5.7.1-kill-flto.patch | 27 --
13 .../pypy3/files/5.7.1_all_distutils_cxx.patch | 342 ---------------------
14 dev-python/pypy3/metadata.xml | 1 -
15 dev-python/pypy3/pypy3-5.5.0_alpha.ebuild | 260 ----------------
16 dev-python/pypy3/pypy3-5.7.1-r2.ebuild | 238 --------------
17 7 files changed, 1155 deletions(-)
18
19 diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest
20 index ba2c2b770e8..b145fb4f4b2 100644
21 --- a/dev-python/pypy3/Manifest
22 +++ b/dev-python/pypy3/Manifest
23 @@ -1,5 +1,2 @@
24 -DIST pypy3-v5.7.1-src.tar.bz2 28811162 SHA256 40ece0145282980ac121390f13709404c0532896507d5767496381180b631bd0 SHA512 f8ead8214ad7d89fe80e24d97b13ece7f2c80b2f11446257a2eab0e3025fc7d8fec26474b0e9eb2b2e3ccd629532dd062829459361b601add12e40793bd5aa60 WHIRLPOOL 180a5cb39c9a5e3840f4940463dd9cccf44486f11a657d2ac644d1eac4561068f08905fdadc495918fb0ceaf018d4b85a3e5756ca6d99a020310b46bdb16ef87
25 DIST pypy3-v5.8.0-src.tar.bz2 28986883 SHA256 9d090127335c3c0fd2b14c8835bf91752e62756e55ea06aad3353f24a6854223 SHA512 d78b4c899a5643028664365ed973a7b292a8e5b3989cc75203cd381ea3cda7dd73121c574726e23dca86e8364fcfcf42c372c9deee438c805f30d6e1c4ac115a WHIRLPOOL b7567fa21e3ded400a72ec06197184df37e0b5893adfb55622ea9afb668bfbda7ebbecd9b80660efef42f160838966d103c4181a9b07355e873981b35f4bf104
26 DIST pypy3-v5.9.0-src.tar.bz2 29055111 SHA256 a014f47f50a1480f871a0b82705f904b38c93c4ca069850eb37653fedafb1b97 SHA512 3d5384d644fdd1bc8b95f5747dbd1771ae06eb2cfc7b57be359b8bf40177676afd097620d0cb9d9000c40d8cce075cfa6bfd92de987d3dd927c04d7d595dc5bd WHIRLPOOL e0936d56c64c3c077910c4713295010ec3e0fabebe654115ddf07407884d1564db7de2f85bcedf1226449c516085f3e4814a2c523f0d48e3ad8ac21150a93a72
27 -DIST pypy3.3-v5.5.0-alpha-src.tar.bz2 25122033 SHA256 d5591c34d77253e9ed57d182b6f49585b95f7c09c3e121f0e8630e5a7e75ab5f SHA512 b2cf9700e45c452293297edffe08e572dffc3c567026b4b5d9165c1ba1b4d858ffc8a6754f5f28781020016c36440e5c02d07562d075b12444c9c32ea5dd2168 WHIRLPOOL 6bde174969413c55d6d077cd14e737c4f034f19935536af1bffaf3a1caa456d2bf6850760a18c274ad99089bd5ab7331d7d185f914cd6c69f708abf857d35df3
28 -DIST python-gentoo-patches-3.3.5-0.tar.xz 12892 SHA256 a7240de9598033cb40f8f273d8104d4e2b1dcaea028d45ac28efaa3c680ff6f7 SHA512 27eef4c2b3f631b000db3f6a5c426d9b498d63a08fe82b1ab7c2c010fb72208109461a5f008d47703852526655b70a734ea95be8742897026db5750bb9cc9d16 WHIRLPOOL edab9222d7da94cab3b1de0e1a27c6c7dbd49194b813a0a1cf9e532063029c4e4f19151c9f4878eeabed3168ff1f97eae7f008280c7ed2897fc14c5516c68d7e
29
30 diff --git a/dev-python/pypy3/files/5.2.0-distutils-c++.patch b/dev-python/pypy3/files/5.2.0-distutils-c++.patch
31 deleted file mode 100644
32 index 1251694107d..00000000000
33 --- a/dev-python/pypy3/files/5.2.0-distutils-c++.patch
34 +++ /dev/null
35 @@ -1,284 +0,0 @@
36 -From e3afe6721897c8de830055621313bc0659518415 Mon Sep 17 00:00:00 2001
37 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
38 -Date: Thu, 9 Jun 2016 20:48:10 +0200
39 -Subject: [PATCH] distutils c++ fixes, python3.3 patch updated for pypy3.3
40 -
41 ----
42 - lib-python/3/_osx_support.py | 10 +++---
43 - lib-python/3/distutils/cygwinccompiler.py | 21 +++++++++--
44 - lib-python/3/distutils/emxccompiler.py | 14 ++++++--
45 - lib-python/3/distutils/sysconfig_cpython.py | 25 ++++++++++---
46 - lib-python/3/distutils/unixccompiler.py | 54 ++++++++++++++++-------------
47 - 5 files changed, 83 insertions(+), 41 deletions(-)
48 -
49 -diff --git a/lib-python/3/_osx_support.py b/lib-python/3/_osx_support.py
50 -index 50b2d17..1d19599 100644
51 ---- a/lib-python/3/_osx_support.py
52 -+++ b/lib-python/3/_osx_support.py
53 -@@ -14,13 +14,13 @@ __all__ = [
54 - # configuration variables that may contain universal build flags,
55 - # like "-arch" or "-isdkroot", that may need customization for
56 - # the user environment
57 --_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
58 -- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
59 -- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
60 -- 'PY_CORE_CFLAGS')
61 -+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS',
62 -+ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED',
63 -+ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS',
64 -+ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS')
65 -
66 - # configuration variables that may contain compiler calls
67 --_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX')
68 -+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX')
69 -
70 - # prefix added to original configuration variable names
71 - _INITPRE = '_OSX_SUPPORT_INITIAL_'
72 -diff --git a/lib-python/3/distutils/cygwinccompiler.py b/lib-python/3/distutils/cygwinccompiler.py
73 -index e0074a1..1b383d3 100644
74 ---- a/lib-python/3/distutils/cygwinccompiler.py
75 -+++ b/lib-python/3/distutils/cygwinccompiler.py
76 -@@ -124,8 +124,10 @@ class CygwinCCompiler(UnixCCompiler):
77 - # dllwrap 2.10.90 is buggy
78 - if self.ld_version >= "2.10.90":
79 - self.linker_dll = "gcc"
80 -+ self.linker_dll_cxx = "g++"
81 - else:
82 - self.linker_dll = "dllwrap"
83 -+ self.linker_dll_cxx = "dllwrap"
84 -
85 - # ld_version >= "2.13" support -shared so use it instead of
86 - # -mdll -static
87 -@@ -139,9 +141,13 @@ class CygwinCCompiler(UnixCCompiler):
88 - self.set_executables(compiler='gcc -mcygwin -O -Wall',
89 - compiler_so='gcc -mcygwin -mdll -O -Wall',
90 - compiler_cxx='g++ -mcygwin -O -Wall',
91 -+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
92 - linker_exe='gcc -mcygwin',
93 - linker_so=('%s -mcygwin %s' %
94 -- (self.linker_dll, shared_option)))
95 -+ (self.linker_dll, shared_option)),
96 -+ linker_exe_cxx='g++ -mcygwin',
97 -+ linker_so_cxx=('%s -mcygwin %s' %
98 -+ (self.linker_dll_cxx, shared_option)))
99 -
100 - # cygwin and mingw32 need different sets of libraries
101 - if self.gcc_version == "2.91.57":
102 -@@ -165,8 +171,12 @@ class CygwinCCompiler(UnixCCompiler):
103 - raise CompileError(msg)
104 - else: # for other files use the C-compiler
105 - try:
106 -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
107 -- extra_postargs)
108 -+ if self.detect_language(src) == 'c++':
109 -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
110 -+ extra_postargs)
111 -+ else:
112 -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
113 -+ extra_postargs)
114 - except DistutilsExecError as msg:
115 - raise CompileError(msg)
116 -
117 -@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler):
118 - self.set_executables(compiler='gcc%s -O -Wall' % no_cygwin,
119 - compiler_so='gcc%s -mdll -O -Wall' % no_cygwin,
120 - compiler_cxx='g++%s -O -Wall' % no_cygwin,
121 -+ compiler_so_cxx='g++%s -mdll -O -Wall' % no_cygwin,
122 - linker_exe='gcc%s' % no_cygwin,
123 - linker_so='%s%s %s %s'
124 - % (self.linker_dll, no_cygwin,
125 -+ shared_option, entry_point),
126 -+ linker_exe_cxx='g++%s' % no_cygwin,
127 -+ linker_so_cxx='%s%s %s %s'
128 -+ % (self.linker_dll_cxx, no_cygwin,
129 - shared_option, entry_point))
130 - # Maybe we should also append -mthreads, but then the finished
131 - # dlls need another dll (mingwm10.dll see Mingw32 docs)
132 -diff --git a/lib-python/3/distutils/emxccompiler.py b/lib-python/3/distutils/emxccompiler.py
133 -index 3675f8d..17d2afa 100644
134 ---- a/lib-python/3/distutils/emxccompiler.py
135 -+++ b/lib-python/3/distutils/emxccompiler.py
136 -@@ -63,8 +63,12 @@ class EMXCCompiler (UnixCCompiler):
137 - # XXX optimization, warnings etc. should be customizable.
138 - self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
139 - compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
140 -+ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
141 -+ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
142 - linker_exe='gcc -Zomf -Zmt -Zcrtdll',
143 -- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
144 -+ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll',
145 -+ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll',
146 -+ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll')
147 -
148 - # want the gcc library statically linked (so that we don't have
149 - # to distribute a version dependent on the compiler we have)
150 -@@ -81,8 +85,12 @@ class EMXCCompiler (UnixCCompiler):
151 - raise CompileError(msg)
152 - else: # for other files use the C-compiler
153 - try:
154 -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
155 -- extra_postargs)
156 -+ if self.detect_language(src) == 'c++':
157 -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
158 -+ extra_postargs)
159 -+ else:
160 -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
161 -+ extra_postargs)
162 - except DistutilsExecError as msg:
163 - raise CompileError(msg)
164 -
165 -diff --git a/lib-python/3/distutils/sysconfig_cpython.py b/lib-python/3/distutils/sysconfig_cpython.py
166 -index b947988..3f19020 100644
167 ---- a/lib-python/3/distutils/sysconfig_cpython.py
168 -+++ b/lib-python/3/distutils/sysconfig_cpython.py
169 -@@ -191,9 +191,12 @@ def customize_compiler(compiler):
170 - _osx_support.customize_compiler(_config_vars)
171 - _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
172 -
173 -- (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
174 -- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
175 -- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
176 -+ (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
177 -+ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
178 -+ 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
179 -+
180 -+ cflags = ''
181 -+ cxxflags = ''
182 -
183 - if 'CC' in os.environ:
184 - newcc = os.environ['CC']
185 -@@ -208,19 +211,27 @@ def customize_compiler(compiler):
186 - cxx = os.environ['CXX']
187 - if 'LDSHARED' in os.environ:
188 - ldshared = os.environ['LDSHARED']
189 -+ if 'LDCXXSHARED' in os.environ:
190 -+ ldcxxshared = os.environ['LDCXXSHARED']
191 - if 'CPP' in os.environ:
192 - cpp = os.environ['CPP']
193 - else:
194 - cpp = cc + " -E" # not always
195 - if 'LDFLAGS' in os.environ:
196 - ldshared = ldshared + ' ' + os.environ['LDFLAGS']
197 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
198 - if 'CFLAGS' in os.environ:
199 -- cflags = opt + ' ' + os.environ['CFLAGS']
200 -+ cflags = os.environ['CFLAGS']
201 - ldshared = ldshared + ' ' + os.environ['CFLAGS']
202 -+ if 'CXXFLAGS' in os.environ:
203 -+ cxxflags = os.environ['CXXFLAGS']
204 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
205 - if 'CPPFLAGS' in os.environ:
206 - cpp = cpp + ' ' + os.environ['CPPFLAGS']
207 - cflags = cflags + ' ' + os.environ['CPPFLAGS']
208 -+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
209 - ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
210 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
211 - if 'AR' in os.environ:
212 - ar = os.environ['AR']
213 - if 'ARFLAGS' in os.environ:
214 -@@ -229,13 +240,17 @@ def customize_compiler(compiler):
215 - archiver = ar + ' ' + ar_flags
216 -
217 - cc_cmd = cc + ' ' + cflags
218 -+ cxx_cmd = cxx + ' ' + cxxflags
219 - compiler.set_executables(
220 - preprocessor=cpp,
221 - compiler=cc_cmd,
222 - compiler_so=cc_cmd + ' ' + ccshared,
223 -- compiler_cxx=cxx,
224 -+ compiler_cxx=cxx_cmd,
225 -+ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
226 - linker_so=ldshared,
227 - linker_exe=cc,
228 -+ linker_so_cxx=ldcxxshared,
229 -+ linker_exe_cxx=cxx,
230 - archiver=archiver)
231 -
232 - compiler.shared_lib_extension = shlib_suffix
233 -diff --git a/lib-python/3/distutils/unixccompiler.py b/lib-python/3/distutils/unixccompiler.py
234 -index 6819d50..19345ee 100644
235 ---- a/lib-python/3/distutils/unixccompiler.py
236 -+++ b/lib-python/3/distutils/unixccompiler.py
237 -@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler):
238 - # are pretty generic; they will probably have to be set by an outsider
239 - # (eg. using information discovered by the sysconfig about building
240 - # Python extensions).
241 -- executables = {'preprocessor' : None,
242 -- 'compiler' : ["cc"],
243 -- 'compiler_so' : ["cc"],
244 -- 'compiler_cxx' : ["c++"], # pypy: changed, 'cc' is bogus
245 -- 'linker_so' : ["cc", "-shared"],
246 -- 'linker_exe' : ["cc"],
247 -- 'archiver' : ["ar", "-cr"],
248 -- 'ranlib' : None,
249 -+ executables = {'preprocessor' : None,
250 -+ 'compiler' : ["cc"],
251 -+ 'compiler_so' : ["cc"],
252 -+ 'compiler_cxx' : ["c++"],
253 -+ 'compiler_so_cxx' : ["c++"],
254 -+ 'linker_so' : ["cc", "-shared"],
255 -+ 'linker_exe' : ["cc"],
256 -+ 'linker_so_cxx' : ["c++", "-shared"],
257 -+ 'linker_exe_cxx' : ["c++"],
258 -+ 'archiver' : ["ar", "-cr"],
259 -+ 'ranlib' : None,
260 - }
261 -
262 - if sys.platform[:6] == "darwin":
263 -@@ -123,12 +126,19 @@ class UnixCCompiler(CCompiler):
264 -
265 - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
266 - compiler_so = self.compiler_so
267 -+ compiler_so_cxx = self.compiler_so_cxx
268 - if sys.platform == 'darwin':
269 - compiler_so = _osx_support.compiler_fixup(compiler_so,
270 - cc_args + extra_postargs)
271 -+ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
272 -+ cc_args + extra_postargs)
273 - try:
274 -- self.spawn(compiler_so + cc_args + [src, '-o', obj] +
275 -- extra_postargs)
276 -+ if self.detect_language(src) == 'c++':
277 -+ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
278 -+ extra_postargs)
279 -+ else:
280 -+ self.spawn(compiler_so + cc_args + [src, '-o', obj] +
281 -+ extra_postargs)
282 - except DistutilsExecError as msg:
283 - raise CompileError(msg)
284 -
285 -@@ -186,22 +196,16 @@ class UnixCCompiler(CCompiler):
286 - ld_args.extend(extra_postargs)
287 - self.mkpath(os.path.dirname(output_filename))
288 - try:
289 -- if target_desc == CCompiler.EXECUTABLE:
290 -- linker = self.linker_exe[:]
291 -+ if target_lang == "c++":
292 -+ if target_desc == CCompiler.EXECUTABLE:
293 -+ linker = self.linker_exe_cxx[:]
294 -+ else:
295 -+ linker = self.linker_so_cxx[:]
296 - else:
297 -- linker = self.linker_so[:]
298 -- if target_lang == "c++" and self.compiler_cxx:
299 -- # skip over environment variable settings if /usr/bin/env
300 -- # is used to set up the linker's environment.
301 -- # This is needed on OSX. Note: this assumes that the
302 -- # normal and C++ compiler have the same environment
303 -- # settings.
304 -- i = 0
305 -- if os.path.basename(linker[0]) == "env":
306 -- i = 1
307 -- while '=' in linker[i]:
308 -- i += 1
309 -- linker[i] = self.compiler_cxx[i]
310 -+ if target_desc == CCompiler.EXECUTABLE:
311 -+ linker = self.linker_exe[:]
312 -+ else:
313 -+ linker = self.linker_so[:]
314 -
315 - if sys.platform == 'darwin':
316 - linker = _osx_support.compiler_fixup(linker, ld_args)
317 ---
318 -2.8.4
319 -
320
321 diff --git a/dev-python/pypy3/files/5.7.1-kill-flto.patch b/dev-python/pypy3/files/5.7.1-kill-flto.patch
322 deleted file mode 100644
323 index 92395bdb6ca..00000000000
324 --- a/dev-python/pypy3/files/5.7.1-kill-flto.patch
325 +++ /dev/null
326 @@ -1,27 +0,0 @@
327 -From 261f9280d9736965a8626c2d6a6fadd4254b2b89 Mon Sep 17 00:00:00 2001
328 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
329 -Date: Tue, 25 Apr 2017 17:03:46 +0200
330 -Subject: [PATCH] Kill -flto
331 -
332 ----
333 - rpython/translator/platform/posix.py | 4 ----
334 - 1 file changed, 4 deletions(-)
335 -
336 -diff --git a/rpython/translator/platform/posix.py b/rpython/translator/platform/posix.py
337 -index a8d4768..20a2934 100644
338 ---- a/rpython/translator/platform/posix.py
339 -+++ b/rpython/translator/platform/posix.py
340 -@@ -130,10 +130,6 @@ class BasePosix(Platform):
341 - else:
342 - cflags = tuple(self.cflags) + tuple(self.standalone_only)
343 -
344 -- # xxx check which compilers accept this option or not
345 -- if not config or config.translation.gcrootfinder != 'asmgcc':
346 -- cflags = ('-flto',) + cflags
347 --
348 - m = GnuMakefile(path)
349 - m.exe_name = path.join(exe_name.basename)
350 - m.eci = eci
351 ---
352 -2.12.2
353 -
354
355 diff --git a/dev-python/pypy3/files/5.7.1_all_distutils_cxx.patch b/dev-python/pypy3/files/5.7.1_all_distutils_cxx.patch
356 deleted file mode 100644
357 index 52a833f29d9..00000000000
358 --- a/dev-python/pypy3/files/5.7.1_all_distutils_cxx.patch
359 +++ /dev/null
360 @@ -1,342 +0,0 @@
361 -From b2f2c9d23996d431d606ac7d8ed731a5302b4e97 Mon Sep 17 00:00:00 2001
362 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
363 -Date: Tue, 25 Apr 2017 17:42:33 +0200
364 -Subject: [PATCH] Fancy distutils C++ support, rebased for PyPy3.5
365 -
366 -https://bugs.python.org/issue1222585
367 ----
368 - _osx_support.py | 10 +++---
369 - distutils/cygwinccompiler.py | 21 +++++++++--
370 - distutils/sysconfig_cpython.py | 25 ++++++++++---
371 - distutils/sysconfig_pypy.py | 35 +++++++++++++++----
372 - distutils/unixccompiler.py | 54 ++++++++++++++++-------------
373 - 5 files changed, 100 insertions(+), 45 deletions(-)
374 -
375 -diff --git a/_osx_support.py b/_osx_support.py
376 -index 13fcd8b..0525be1 100644
377 ---- a/_osx_support.py
378 -+++ b/_osx_support.py
379 -@@ -14,13 +14,13 @@ __all__ = [
380 - # configuration variables that may contain universal build flags,
381 - # like "-arch" or "-isdkroot", that may need customization for
382 - # the user environment
383 --_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
384 -- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
385 -- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
386 -- 'PY_CORE_CFLAGS')
387 -+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS',
388 -+ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED',
389 -+ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS',
390 -+ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS')
391 -
392 - # configuration variables that may contain compiler calls
393 --_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX')
394 -+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX')
395 -
396 - # prefix added to original configuration variable names
397 - _INITPRE = '_OSX_SUPPORT_INITIAL_'
398 -diff --git a/distutils/cygwinccompiler.py b/distutils/cygwinccompiler.py
399 -index c879646..a6157fb 100644
400 ---- a/distutils/cygwinccompiler.py
401 -+++ b/distutils/cygwinccompiler.py
402 -@@ -125,8 +125,10 @@ class CygwinCCompiler(UnixCCompiler):
403 - # dllwrap 2.10.90 is buggy
404 - if self.ld_version >= "2.10.90":
405 - self.linker_dll = "gcc"
406 -+ self.linker_dll_cxx = "g++"
407 - else:
408 - self.linker_dll = "dllwrap"
409 -+ self.linker_dll_cxx = "dllwrap"
410 -
411 - # ld_version >= "2.13" support -shared so use it instead of
412 - # -mdll -static
413 -@@ -140,9 +142,13 @@ class CygwinCCompiler(UnixCCompiler):
414 - self.set_executables(compiler='gcc -mcygwin -O -Wall',
415 - compiler_so='gcc -mcygwin -mdll -O -Wall',
416 - compiler_cxx='g++ -mcygwin -O -Wall',
417 -+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
418 - linker_exe='gcc -mcygwin',
419 - linker_so=('%s -mcygwin %s' %
420 -- (self.linker_dll, shared_option)))
421 -+ (self.linker_dll, shared_option)),
422 -+ linker_exe_cxx='g++ -mcygwin',
423 -+ linker_so_cxx=('%s -mcygwin %s' %
424 -+ (self.linker_dll_cxx, shared_option)))
425 -
426 - # cygwin and mingw32 need different sets of libraries
427 - if self.gcc_version == "2.91.57":
428 -@@ -166,8 +172,12 @@ class CygwinCCompiler(UnixCCompiler):
429 - raise CompileError(msg)
430 - else: # for other files use the C-compiler
431 - try:
432 -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
433 -- extra_postargs)
434 -+ if self.detect_language(src) == 'c++':
435 -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
436 -+ extra_postargs)
437 -+ else:
438 -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
439 -+ extra_postargs)
440 - except DistutilsExecError as msg:
441 - raise CompileError(msg)
442 -
443 -@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler):
444 - self.set_executables(compiler='gcc -O -Wall',
445 - compiler_so='gcc -mdll -O -Wall',
446 - compiler_cxx='g++ -O -Wall',
447 -+ compiler_so_cxx='g++ -mdll -O -Wall',
448 - linker_exe='gcc',
449 - linker_so='%s %s %s'
450 - % (self.linker_dll, shared_option,
451 -+ entry_point),
452 -+ linker_exe_cxx='g++',
453 -+ linker_so_cxx='%s %s %s'
454 -+ % (self.linker_dll_cxx, shared_option,
455 - entry_point))
456 - # Maybe we should also append -mthreads, but then the finished
457 - # dlls need another dll (mingwm10.dll see Mingw32 docs)
458 -diff --git a/distutils/sysconfig_cpython.py b/distutils/sysconfig_cpython.py
459 -index 573724d..0a04f33 100644
460 ---- a/distutils/sysconfig_cpython.py
461 -+++ b/distutils/sysconfig_cpython.py
462 -@@ -173,9 +173,12 @@ def customize_compiler(compiler):
463 - _osx_support.customize_compiler(_config_vars)
464 - _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
465 -
466 -- (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
467 -- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
468 -- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
469 -+ (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
470 -+ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
471 -+ 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
472 -+
473 -+ cflags = ''
474 -+ cxxflags = ''
475 -
476 - if 'CC' in os.environ:
477 - newcc = os.environ['CC']
478 -@@ -190,19 +193,27 @@ def customize_compiler(compiler):
479 - cxx = os.environ['CXX']
480 - if 'LDSHARED' in os.environ:
481 - ldshared = os.environ['LDSHARED']
482 -+ if 'LDCXXSHARED' in os.environ:
483 -+ ldcxxshared = os.environ['LDCXXSHARED']
484 - if 'CPP' in os.environ:
485 - cpp = os.environ['CPP']
486 - else:
487 - cpp = cc + " -E" # not always
488 - if 'LDFLAGS' in os.environ:
489 - ldshared = ldshared + ' ' + os.environ['LDFLAGS']
490 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
491 - if 'CFLAGS' in os.environ:
492 -- cflags = opt + ' ' + os.environ['CFLAGS']
493 -+ cflags = os.environ['CFLAGS']
494 - ldshared = ldshared + ' ' + os.environ['CFLAGS']
495 -+ if 'CXXFLAGS' in os.environ:
496 -+ cxxflags = os.environ['CXXFLAGS']
497 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
498 - if 'CPPFLAGS' in os.environ:
499 - cpp = cpp + ' ' + os.environ['CPPFLAGS']
500 - cflags = cflags + ' ' + os.environ['CPPFLAGS']
501 -+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
502 - ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
503 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
504 - if 'AR' in os.environ:
505 - ar = os.environ['AR']
506 - if 'ARFLAGS' in os.environ:
507 -@@ -211,13 +222,17 @@ def customize_compiler(compiler):
508 - archiver = ar + ' ' + ar_flags
509 -
510 - cc_cmd = cc + ' ' + cflags
511 -+ cxx_cmd = cxx + ' ' + cxxflags
512 - compiler.set_executables(
513 - preprocessor=cpp,
514 - compiler=cc_cmd,
515 - compiler_so=cc_cmd + ' ' + ccshared,
516 -- compiler_cxx=cxx,
517 -+ compiler_cxx=cxx_cmd,
518 -+ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
519 - linker_so=ldshared,
520 - linker_exe=cc,
521 -+ linker_so_cxx=ldcxxshared,
522 -+ linker_exe_cxx=cxx,
523 - archiver=archiver)
524 -
525 - compiler.shared_lib_extension = shlib_suffix
526 -diff --git a/distutils/sysconfig_pypy.py b/distutils/sysconfig_pypy.py
527 -index a0a8dec..aa97c4e 100644
528 ---- a/distutils/sysconfig_pypy.py
529 -+++ b/distutils/sysconfig_pypy.py
530 -@@ -72,6 +72,7 @@ def _init_posix():
531 - g['CFLAGS'] = "-DNDEBUG -O2"
532 - g['CCSHARED'] = "-fPIC"
533 - g['LDSHARED'] = "gcc -pthread -shared"
534 -+ g['LDCXXSHARED'] = "g++ -pthread -shared"
535 - g['EXT_SUFFIX'] = so_ext
536 - g['SHLIB_SUFFIX'] = so_ext
537 - g['SO'] = so_ext # deprecated in Python 3, for backward compatibility
538 -@@ -156,36 +157,52 @@ def customize_compiler(compiler):
539 - _osx_support.customize_compiler(_config_vars)
540 - _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
541 -
542 -- (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
543 -- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
544 -- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
545 -+ (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
546 -+ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
547 -+ 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
548 -+
549 -+ cflags = ''
550 -+ cxxflags = ''
551 -
552 - if 'CC' in os.environ:
553 - newcc = os.environ['CC']
554 -- if (sys.platform == 'darwin'
555 -+ if (True
556 - and 'LDSHARED' not in os.environ
557 - and ldshared.startswith(cc)):
558 - # On OS X, if CC is overridden, use that as the default
559 - # command for LDSHARED as well
560 -+ # Gentoo: s/OS X/every system/
561 - ldshared = newcc + ldshared[len(cc):]
562 - cc = newcc
563 - if 'CXX' in os.environ:
564 -- cxx = os.environ['CXX']
565 -+ newcxx = os.environ['CXX']
566 -+ if ('LDCXXSHARED' not in os.environ
567 -+ and ldcxxshared.startswith(cxx)):
568 -+ ldcxxshared = newcxx + ldcxxshared[len(cxx):]
569 -+ cxx = newcxx
570 - if 'LDSHARED' in os.environ:
571 - ldshared = os.environ['LDSHARED']
572 -+ if 'LDCXXSHARED' in os.environ:
573 -+ ldcxxshared = os.environ['LDCXXSHARED']
574 - if 'CPP' in os.environ:
575 - cpp = os.environ['CPP']
576 - else:
577 - cpp = cc + " -E" # not always
578 - if 'LDFLAGS' in os.environ:
579 - ldshared = ldshared + ' ' + os.environ['LDFLAGS']
580 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
581 - if 'CFLAGS' in os.environ:
582 -- cflags = opt + ' ' + os.environ['CFLAGS']
583 -+ cflags = os.environ['CFLAGS']
584 - ldshared = ldshared + ' ' + os.environ['CFLAGS']
585 -+ if 'CXXFLAGS' in os.environ:
586 -+ cxxflags = os.environ['CXXFLAGS']
587 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
588 - if 'CPPFLAGS' in os.environ:
589 - cpp = cpp + ' ' + os.environ['CPPFLAGS']
590 - cflags = cflags + ' ' + os.environ['CPPFLAGS']
591 -+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
592 - ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
593 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
594 - if 'AR' in os.environ:
595 - ar = os.environ['AR']
596 - if 'ARFLAGS' in os.environ:
597 -@@ -194,13 +211,17 @@ def customize_compiler(compiler):
598 - archiver = ar + ' ' + ar_flags
599 -
600 - cc_cmd = cc + ' ' + cflags
601 -+ cxx_cmd = cxx + ' ' + cxxflags
602 - compiler.set_executables(
603 - preprocessor=cpp,
604 - compiler=cc_cmd,
605 - compiler_so=cc_cmd + ' ' + ccshared,
606 -- compiler_cxx=cxx,
607 -+ compiler_cxx=cxx_cmd,
608 -+ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
609 - linker_so=ldshared,
610 - linker_exe=cc,
611 -+ linker_so_cxx=ldcxxshared,
612 -+ linker_exe_cxx=cxx,
613 - archiver=archiver)
614 -
615 - compiler.shared_lib_extension = shlib_suffix
616 -diff --git a/distutils/unixccompiler.py b/distutils/unixccompiler.py
617 -index 254b22d..c9cacc1 100644
618 ---- a/distutils/unixccompiler.py
619 -+++ b/distutils/unixccompiler.py
620 -@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler):
621 - # are pretty generic; they will probably have to be set by an outsider
622 - # (eg. using information discovered by the sysconfig about building
623 - # Python extensions).
624 -- executables = {'preprocessor' : None,
625 -- 'compiler' : ["cc"],
626 -- 'compiler_so' : ["cc"],
627 -- 'compiler_cxx' : ["c++"], # pypy: changed, 'cc' is bogus
628 -- 'linker_so' : ["cc", "-shared"],
629 -- 'linker_exe' : ["cc"],
630 -- 'archiver' : ["ar", "-cr"],
631 -- 'ranlib' : None,
632 -+ executables = {'preprocessor' : None,
633 -+ 'compiler' : ["cc"],
634 -+ 'compiler_so' : ["cc"],
635 -+ 'compiler_cxx' : ["c++"],
636 -+ 'compiler_so_cxx' : ["c++"],
637 -+ 'linker_so' : ["cc", "-shared"],
638 -+ 'linker_exe' : ["cc"],
639 -+ 'linker_so_cxx' : ["c++", "-shared"],
640 -+ 'linker_exe_cxx' : ["c++"],
641 -+ 'archiver' : ["ar", "-cr"],
642 -+ 'ranlib' : None,
643 - }
644 -
645 - if sys.platform[:6] == "darwin":
646 -@@ -125,12 +128,19 @@ class UnixCCompiler(CCompiler):
647 -
648 - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
649 - compiler_so = self.compiler_so
650 -+ compiler_so_cxx = self.compiler_so_cxx
651 - if sys.platform == 'darwin':
652 - compiler_so = _osx_support.compiler_fixup(compiler_so,
653 - cc_args + extra_postargs)
654 -+ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
655 -+ cc_args + extra_postargs)
656 - try:
657 -- self.spawn(compiler_so + cc_args + [src, '-o', obj] +
658 -- extra_postargs)
659 -+ if self.detect_language(src) == 'c++':
660 -+ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
661 -+ extra_postargs)
662 -+ else:
663 -+ self.spawn(compiler_so + cc_args + [src, '-o', obj] +
664 -+ extra_postargs)
665 - except DistutilsExecError as msg:
666 - raise CompileError(msg)
667 -
668 -@@ -188,22 +198,16 @@ class UnixCCompiler(CCompiler):
669 - ld_args.extend(extra_postargs)
670 - self.mkpath(os.path.dirname(output_filename))
671 - try:
672 -- if target_desc == CCompiler.EXECUTABLE:
673 -- linker = self.linker_exe[:]
674 -+ if target_lang == "c++":
675 -+ if target_desc == CCompiler.EXECUTABLE:
676 -+ linker = self.linker_exe_cxx[:]
677 -+ else:
678 -+ linker = self.linker_so_cxx[:]
679 - else:
680 -- linker = self.linker_so[:]
681 -- if target_lang == "c++" and self.compiler_cxx:
682 -- # skip over environment variable settings if /usr/bin/env
683 -- # is used to set up the linker's environment.
684 -- # This is needed on OSX. Note: this assumes that the
685 -- # normal and C++ compiler have the same environment
686 -- # settings.
687 -- i = 0
688 -- if os.path.basename(linker[0]) == "env":
689 -- i = 1
690 -- while '=' in linker[i]:
691 -- i += 1
692 -- linker[i] = self.compiler_cxx[i]
693 -+ if target_desc == CCompiler.EXECUTABLE:
694 -+ linker = self.linker_exe[:]
695 -+ else:
696 -+ linker = self.linker_so[:]
697 -
698 - if sys.platform == 'darwin':
699 - linker = _osx_support.compiler_fixup(linker, ld_args)
700 ---
701 -2.12.2
702 -
703
704 diff --git a/dev-python/pypy3/metadata.xml b/dev-python/pypy3/metadata.xml
705 index 8114c70878c..89f86a0b2be 100644
706 --- a/dev-python/pypy3/metadata.xml
707 +++ b/dev-python/pypy3/metadata.xml
708 @@ -10,7 +10,6 @@
709 This makes it possible to build PyPy using ~3.5G of RAM on amd64 and ~half of that on x86,
710 at the cost of lengthened build time.</flag>
711 <flag name="sandbox">Enable sandboxing functionality</flag>
712 - <flag name="shadowstack">Use a shadow stack for finding GC roots</flag>
713 </use>
714 <upstream>
715 <remote-id type="bitbucket">pypy/pypy</remote-id>
716
717 diff --git a/dev-python/pypy3/pypy3-5.5.0_alpha.ebuild b/dev-python/pypy3/pypy3-5.5.0_alpha.ebuild
718 deleted file mode 100644
719 index 3c4ac7df716..00000000000
720 --- a/dev-python/pypy3/pypy3-5.5.0_alpha.ebuild
721 +++ /dev/null
722 @@ -1,260 +0,0 @@
723 -# Copyright 1999-2017 Gentoo Foundation
724 -# Distributed under the terms of the GNU General Public License v2
725 -
726 -EAPI=5
727 -
728 -# pypy3 needs to be built using python 2
729 -PYTHON_COMPAT=( python2_7 pypy )
730 -inherit check-reqs eutils multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator
731 -
732 -CPY_PATCHSET_VERSION="3.3.5-0"
733 -
734 -DESCRIPTION="A fast, compliant alternative implementation of the Python (3.3) language"
735 -HOMEPAGE="http://pypy.org/"
736 -SRC_URI="https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v${PV/_/-}-src.tar.bz2
737 - https://dev.gentoo.org/~floppym/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz"
738 -
739 -LICENSE="MIT"
740 -# XX from pypy3-XX.so module suffix
741 -SLOT="0/55"
742 -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
743 -IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox +shadowstack sqlite cpu_flags_x86_sse2 tk"
744 -
745 -RDEPEND=">=sys-libs/zlib-1.1.3:0=
746 - virtual/libffi:0=
747 - virtual/libintl:0=
748 - dev-libs/expat:0=
749 - !libressl? ( dev-libs/openssl:0=[-bindist] )
750 - libressl? ( dev-libs/libressl:0= )
751 - bzip2? ( app-arch/bzip2:0= )
752 - gdbm? ( sys-libs/gdbm:0= )
753 - ncurses? ( sys-libs/ncurses:0= )
754 - sqlite? ( dev-db/sqlite:3= )
755 - tk? (
756 - dev-lang/tk:0=
757 - dev-tcltk/tix:0=
758 - )
759 - !dev-python/pypy3-bin:0"
760 -DEPEND="${RDEPEND}
761 - low-memory? ( virtual/pypy:0 )
762 - !low-memory? ( ${PYTHON_DEPS} )"
763 -# doc? ( dev-python/sphinx )
764 -
765 -# Who would care about predictable directory names?
766 -S="${WORKDIR}/pypy3-v${PV%_*}-src"
767 -
768 -pkg_pretend() {
769 - if [[ ${MERGE_TYPE} != binary ]]; then
770 - if use low-memory; then
771 - CHECKREQS_MEMORY="1750M"
772 - use amd64 && CHECKREQS_MEMORY="3500M"
773 - else
774 - CHECKREQS_MEMORY="3G"
775 - use amd64 && CHECKREQS_MEMORY="6G"
776 - fi
777 -
778 - check-reqs_pkg_pretend
779 - fi
780 -}
781 -
782 -pkg_setup() {
783 - if [[ ${MERGE_TYPE} != binary ]]; then
784 - pkg_pretend
785 -
786 - # unset to allow forcing pypy below :)
787 - use low-memory && local EPYTHON=
788 - if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
789 - einfo "Using PyPy to perform the translation."
790 - local EPYTHON=pypy
791 - else
792 - einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
793 - einfo "recommends using PyPy for that. If you wish to do so, please install"
794 - einfo "virtual/pypy and ensure that EPYTHON variable is unset."
795 - fi
796 -
797 - python-any-r1_pkg_setup
798 - fi
799 -}
800 -
801 -src_prepare() {
802 - epatch "${FILESDIR}/4.0.0-gentoo-path.patch" \
803 - "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" \
804 - "${FILESDIR}"/2.5.0-shared-lib.patch # 517002
805 -
806 - sed -e "s^@EPREFIX@^${EPREFIX}^" \
807 - -e "s^@libdir@^$(get_libdir)^" \
808 - -i lib-python/3/distutils/command/install.py || die
809 -
810 - # apply CPython stdlib patches
811 - pushd lib-python/3 > /dev/null || die
812 - epatch "${FILESDIR}"/5.2.0-distutils-c++.patch \
813 - "${WORKDIR}"/patches/24_all_sqlite-3.8.4.patch
814 - popd > /dev/null || die
815 -
816 - epatch_user
817 -}
818 -
819 -src_configure() {
820 - tc-export CC
821 -
822 - local jit_backend
823 - if use jit; then
824 - jit_backend='--jit-backend='
825 -
826 - # We only need the explicit sse2 switch for x86.
827 - # On other arches we can rely on autodetection which uses
828 - # compiler macros. Plus, --jit-backend= doesn't accept all
829 - # the modern values...
830 -
831 - if use x86; then
832 - if use cpu_flags_x86_sse2; then
833 - jit_backend+=x86
834 - else
835 - jit_backend+=x86-without-sse2
836 - fi
837 - else
838 - jit_backend+=auto
839 - fi
840 - fi
841 -
842 - local args=(
843 - --shared
844 - $(usex jit -Ojit -O2)
845 - $(usex shadowstack --gcrootfinder=shadowstack '')
846 - $(usex sandbox --sandbox '')
847 -
848 - ${jit_backend}
849 - --make-jobs=$(makeopts_jobs)
850 -
851 - pypy/goal/targetpypystandalone
852 - )
853 -
854 - # Avoid linking against libraries disabled by use flags
855 - local opts=(
856 - bzip2:bz2
857 - ncurses:_minimal_curses
858 - )
859 -
860 - local opt
861 - for opt in "${opts[@]}"; do
862 - local flag=${opt%:*}
863 - local mod=${opt#*:}
864 -
865 - args+=(
866 - $(usex ${flag} --withmod --withoutmod)-${mod}
867 - )
868 - done
869 -
870 - local interp=( "${PYTHON}" )
871 - if use low-memory; then
872 - interp=( env PYPY_GC_MAX_DELTA=200MB
873 - "${PYTHON}" --jit loop_longevity=300 )
874 - fi
875 -
876 - # translate into the C sources
877 - # we're going to make them ourselves since otherwise pypy does not
878 - # free up the unneeded memory before spawning the compiler
879 - set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
880 - echo -e "\033[1m${@}\033[0m"
881 - "${@}" || die "translation failed"
882 -}
883 -
884 -src_compile() {
885 - emake -C "${T}"/usession*-0/testing_1
886 -
887 - # copy back to make sys.prefix happy
888 - cp -p "${T}"/usession*-0/testing_1/{pypy-c,libpypy-c.so} . || die
889 - pax-mark m pypy-c libpypy-c.so
890 -
891 - #use doc && emake -C pypy/doc html
892 -}
893 -
894 -src_test() {
895 - # (unset)
896 - local -x PYTHONDONTWRITEBYTECODE
897 -
898 - # Test runner requires Python 2 too. However, it spawns PyPy3
899 - # internally so that we end up testing the correct interpreter.
900 - "${PYTHON}" ./pypy/test_all.py --pypy=./pypy-c lib-python || die
901 -}
902 -
903 -src_install() {
904 - local dest=/usr/$(get_libdir)/pypy3
905 - einfo "Installing PyPy ..."
906 - exeinto "${dest}"
907 - doexe pypy-c libpypy-c.so
908 - pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so"
909 - insinto "${dest}"
910 - doins -r include lib_pypy lib-python
911 - dosym ../$(get_libdir)/pypy3/pypy-c /usr/bin/pypy3
912 - dodoc README.rst
913 -
914 - if ! use gdbm; then
915 - rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \
916 - "${ED%/}${dest}"/lib-python/*3/test/test_gdbm.py || die
917 - fi
918 - if ! use sqlite; then
919 - rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
920 - "${ED%/}${dest}"/lib_pypy/_sqlite3.py \
921 - "${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die
922 - fi
923 - if ! use tk; then
924 - rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \
925 - "${ED%/}${dest}"/lib_pypy/_tkinter \
926 - "${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
927 - fi
928 -
929 - # Install docs
930 - #use doc && dohtml -r pypy/doc/_build/html/
931 -
932 - einfo "Generating caches and byte-compiling ..."
933 -
934 - local -x PYTHON=${ED%/}${dest}/pypy-c
935 - local -x LD_LIBRARY_PATH="${ED%/}${dest}"
936 - # we can't use eclass function since PyPy is dumb and always gives
937 - # paths relative to the interpreter
938 - local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages
939 - python_export pypy3 EPYTHON
940 -
941 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
942 - python_domodule epython.py
943 -
944 - # Generate Grammar and PatternGrammar pickles.
945 - "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
946 - || die "Generation of Grammar and PatternGrammar pickles failed"
947 -
948 - # Generate cffi modules
949 - # Please keep in sync with pypy/tool/build_cffi_imports.py!
950 -#cffi_build_scripts = {
951 -# "sqlite3": "_sqlite3_build.py",
952 -# "audioop": "_audioop_build.py",
953 -# "tk": "_tkinter/tklib_build.py",
954 -# "curses": "_curses_build.py" if sys.platform != "win32" else None,
955 -# "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
956 -# "_gdbm": "_gdbm_build.py" if sys.platform != "win32" else None,
957 -# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
958 -# "resource": "_resource_build.py" if sys.platform != "win32" else None,
959 -# "lzma": "_lzma_build.py",
960 -# "_decimal": "_decimal_build.py",
961 - cffi_targets=( audioop syslog pwdgrp resource lzma decimal )
962 - use gdbm && cffi_targets+=( gdbm )
963 - use ncurses && cffi_targets+=( curses )
964 - use sqlite && cffi_targets+=( sqlite3 )
965 - use tk && cffi_targets+=( tkinter/tklib )
966 -
967 - local t
968 - # all modules except tkinter output to .
969 - # tkinter outputs to the correct dir ...
970 - cd "${ED%/}${dest}"/lib_pypy || die
971 - for t in "${cffi_targets[@]}"; do
972 - # tkinter doesn't work via -m
973 - "${PYTHON}" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
974 - done
975 -
976 - # Cleanup temporary objects
977 - find "${ED%/}${dest}" -name "_cffi_*.[co]" -delete || die
978 - find "${ED%/}${dest}" -type d -empty -delete || die
979 -
980 - # compile the installed modules
981 - python_optimize "${ED%/}${dest}"
982 -}
983
984 diff --git a/dev-python/pypy3/pypy3-5.7.1-r2.ebuild b/dev-python/pypy3/pypy3-5.7.1-r2.ebuild
985 deleted file mode 100644
986 index e0a8417672e..00000000000
987 --- a/dev-python/pypy3/pypy3-5.7.1-r2.ebuild
988 +++ /dev/null
989 @@ -1,238 +0,0 @@
990 -# Copyright 1999-2017 Gentoo Foundation
991 -# Distributed under the terms of the GNU General Public License v2
992 -
993 -EAPI=6
994 -
995 -# pypy3 needs to be built using python 2
996 -PYTHON_COMPAT=( python2_7 pypy )
997 -inherit check-reqs pax-utils python-any-r1 toolchain-funcs versionator
998 -
999 -MY_P=pypy3-v${PV}
1000 -
1001 -DESCRIPTION="A fast, compliant alternative implementation of the Python (3.3) language"
1002 -HOMEPAGE="http://pypy.org/"
1003 -SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
1004 -
1005 -LICENSE="MIT"
1006 -# XX from pypy3-XX.so module suffix
1007 -SLOT="0/57"
1008 -KEYWORDS="~amd64 ~amd64-linux"
1009 -IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite tk"
1010 -
1011 -RDEPEND=">=sys-libs/zlib-1.1.3:0=
1012 - virtual/libffi:0=
1013 - virtual/libintl:0=
1014 - dev-libs/expat:0=
1015 - !libressl? ( dev-libs/openssl:0=[-bindist] )
1016 - libressl? ( dev-libs/libressl:0= )
1017 - bzip2? ( app-arch/bzip2:0= )
1018 - gdbm? ( sys-libs/gdbm:0= )
1019 - ncurses? ( sys-libs/ncurses:0= )
1020 - sqlite? ( dev-db/sqlite:3= )
1021 - tk? (
1022 - dev-lang/tk:0=
1023 - dev-tcltk/tix:0=
1024 - )
1025 - !dev-python/pypy3-bin:0"
1026 -DEPEND="${RDEPEND}
1027 - low-memory? ( virtual/pypy:0 )
1028 - !low-memory? ( ${PYTHON_DEPS} )"
1029 -# doc? ( dev-python/sphinx )
1030 -
1031 -S="${WORKDIR}/${MY_P}-src"
1032 -
1033 -pkg_pretend() {
1034 - if [[ ${MERGE_TYPE} != binary ]]; then
1035 - if use low-memory; then
1036 - CHECKREQS_MEMORY="1750M"
1037 - use amd64 && CHECKREQS_MEMORY="3500M"
1038 - else
1039 - CHECKREQS_MEMORY="3G"
1040 - use amd64 && CHECKREQS_MEMORY="6G"
1041 - fi
1042 -
1043 - check-reqs_pkg_pretend
1044 - fi
1045 -}
1046 -
1047 -pkg_setup() {
1048 - if [[ ${MERGE_TYPE} != binary ]]; then
1049 - pkg_pretend
1050 -
1051 - # unset to allow forcing pypy below :)
1052 - use low-memory && local EPYTHON=
1053 - if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
1054 - einfo "Using PyPy to perform the translation."
1055 - local EPYTHON=pypy
1056 - else
1057 - einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
1058 - einfo "recommends using PyPy for that. If you wish to do so, please install"
1059 - einfo "virtual/pypy and ensure that EPYTHON variable is unset."
1060 - fi
1061 -
1062 - python-any-r1_pkg_setup
1063 - fi
1064 -}
1065 -
1066 -src_prepare() {
1067 - eapply "${FILESDIR}/4.0.0-gentoo-path.patch"
1068 - eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
1069 - eapply "${FILESDIR}"/2.5.0-shared-lib.patch # 517002
1070 - # disarm implicit -flto
1071 - eapply "${FILESDIR}"/5.7.1-kill-flto.patch
1072 -
1073 - sed -e "s^@EPREFIX@^${EPREFIX}^" \
1074 - -e "s^@libdir@^$(get_libdir)^" \
1075 - -i lib-python/3/distutils/command/install.py || die
1076 -
1077 - # apply CPython stdlib patches
1078 - pushd lib-python/3 > /dev/null || die
1079 - eapply "${FILESDIR}"/5.7.1_all_distutils_cxx.patch
1080 - eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
1081 - popd > /dev/null || die
1082 -
1083 - eapply_user
1084 -}
1085 -
1086 -src_configure() {
1087 - tc-export CC
1088 -
1089 - local args=(
1090 - --shared
1091 - $(usex jit -Ojit -O2)
1092 - $(usex sandbox --sandbox '')
1093 -
1094 - --jit-backend=auto
1095 -
1096 - pypy/goal/targetpypystandalone
1097 - )
1098 -
1099 - # Avoid linking against libraries disabled by use flags
1100 - local opts=(
1101 - bzip2:bz2
1102 - ncurses:_minimal_curses
1103 - )
1104 -
1105 - local opt
1106 - for opt in "${opts[@]}"; do
1107 - local flag=${opt%:*}
1108 - local mod=${opt#*:}
1109 -
1110 - args+=(
1111 - $(usex ${flag} --withmod --withoutmod)-${mod}
1112 - )
1113 - done
1114 -
1115 - local interp=( "${PYTHON}" )
1116 - if use low-memory; then
1117 - interp=( env PYPY_GC_MAX_DELTA=200MB
1118 - "${PYTHON}" --jit loop_longevity=300 )
1119 - fi
1120 -
1121 - # translate into the C sources
1122 - # we're going to make them ourselves since otherwise pypy does not
1123 - # free up the unneeded memory before spawning the compiler
1124 - set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
1125 - echo -e "\033[1m${@}\033[0m"
1126 - "${@}" || die "translation failed"
1127 -}
1128 -
1129 -src_compile() {
1130 - emake -C "${T}"/usession*-0/testing_1
1131 -
1132 - # copy back to make sys.prefix happy
1133 - cp -p "${T}"/usession*-0/testing_1/{pypy3-c,libpypy3-c.so} . || die
1134 - pax-mark m pypy3-c libpypy3-c.so
1135 -
1136 - #use doc && emake -C pypy/doc html
1137 -}
1138 -
1139 -src_test() {
1140 - # (unset)
1141 - local -x PYTHONDONTWRITEBYTECODE
1142 -
1143 - # Test runner requires Python 2 too. However, it spawns PyPy3
1144 - # internally so that we end up testing the correct interpreter.
1145 - "${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c lib-python || die
1146 -}
1147 -
1148 -src_install() {
1149 - local dest=/usr/$(get_libdir)/pypy3
1150 - einfo "Installing PyPy ..."
1151 - exeinto "${dest}"
1152 - doexe pypy3-c libpypy3-c.so
1153 - pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so"
1154 - insinto "${dest}"
1155 - doins -r include lib_pypy lib-python
1156 - dosym ../$(get_libdir)/pypy3/pypy3-c /usr/bin/pypy3
1157 - dodoc README.rst
1158 -
1159 - if ! use gdbm; then
1160 - rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die
1161 - fi
1162 - if ! use sqlite; then
1163 - rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
1164 - "${ED%/}${dest}"/lib_pypy/_sqlite3* \
1165 - "${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die
1166 - fi
1167 - if ! use tk; then
1168 - rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \
1169 - "${ED%/}${dest}"/lib_pypy/_tkinter \
1170 - "${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
1171 - fi
1172 -
1173 - # Install docs
1174 - #use doc && dohtml -r pypy/doc/_build/html/
1175 -
1176 - einfo "Generating caches and byte-compiling ..."
1177 -
1178 - local -x PYTHON=${ED%/}${dest}/pypy3-c
1179 - local -x LD_LIBRARY_PATH="${ED%/}${dest}"
1180 - # we can't use eclass function since PyPy is dumb and always gives
1181 - # paths relative to the interpreter
1182 - local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages
1183 - python_export pypy3 EPYTHON
1184 -
1185 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
1186 - python_domodule epython.py
1187 -
1188 - # Generate Grammar and PatternGrammar pickles.
1189 - "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
1190 - || die "Generation of Grammar and PatternGrammar pickles failed"
1191 -
1192 - # Generate cffi modules
1193 - # Please keep in sync with pypy/tool/build_cffi_imports.py!
1194 -#cffi_build_scripts = {
1195 -# "sqlite3": "_sqlite3_build.py",
1196 -# "audioop": "_audioop_build.py",
1197 -# "tk": "_tkinter/tklib_build.py",
1198 -# "curses": "_curses_build.py" if sys.platform != "win32" else None,
1199 -# "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
1200 -# "_gdbm": "_gdbm_build.py" if sys.platform != "win32" else None,
1201 -# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
1202 -# "resource": "_resource_build.py" if sys.platform != "win32" else None,
1203 -# "lzma": "_lzma_build.py",
1204 -# "_decimal": "_decimal_build.py",
1205 -# "ssl": "_ssl_build.py",
1206 - cffi_targets=( audioop syslog pwdgrp resource lzma decimal ssl )
1207 - use gdbm && cffi_targets+=( gdbm )
1208 - use ncurses && cffi_targets+=( curses )
1209 - use sqlite && cffi_targets+=( sqlite3 )
1210 - use tk && cffi_targets+=( tkinter/tklib )
1211 -
1212 - local t
1213 - # all modules except tkinter output to .
1214 - # tkinter outputs to the correct dir ...
1215 - cd "${ED%/}${dest}"/lib_pypy || die
1216 - for t in "${cffi_targets[@]}"; do
1217 - # tkinter doesn't work via -m
1218 - "${PYTHON}" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
1219 - done
1220 -
1221 - # Cleanup temporary objects
1222 - find "${ED%/}${dest}" -name "_cffi_*.[co]" -delete || die
1223 - find "${ED%/}${dest}" -type d -empty -delete || die
1224 -
1225 - # compile the installed modules
1226 - python_optimize "${ED%/}${dest}"
1227 -}