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