1 |
commit: e2f6a801849582d65e7124a0dce977b02151f594 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 25 19:35:01 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 25 21:49:24 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2f6a801 |
7 |
|
8 |
dev-python/pypy3-bin: Bump to 5.7.1 |
9 |
|
10 |
dev-python/pypy3-bin/Manifest | 6 + |
11 |
.../pypy3-bin/files/5.7.1_all_distutils_cxx.patch | 342 +++++++++++++++++++++ |
12 |
dev-python/pypy3-bin/pypy3-bin-5.7.1.ebuild | 183 +++++++++++ |
13 |
3 files changed, 531 insertions(+) |
14 |
|
15 |
diff --git a/dev-python/pypy3-bin/Manifest b/dev-python/pypy3-bin/Manifest |
16 |
index a1172a5dd52..e2fb319f815 100644 |
17 |
--- a/dev-python/pypy3-bin/Manifest |
18 |
+++ b/dev-python/pypy3-bin/Manifest |
19 |
@@ -5,5 +5,11 @@ DIST pypy3-bin-5.5.0_alpha-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz 8656783 |
20 |
DIST pypy3-bin-5.5.0_alpha-x86+bzip2+jit+ncurses+sse2.tar.lz 9549100 SHA256 fdd95b1fb91d669e1861b2dff52b97af0d01aaedf61eb11f07c8f92cd398c7f6 SHA512 2ac8cb894cafae8da81bddb601185941b42933aa41bda8d1696eb70ca22cbeaa0c23385e4a4cd640c46f9e301acfc2f9bc89adaf5a7f5cbef4bc23ca8af550bb WHIRLPOOL e4c21be6b52468135ff6e53434a8ae8c0450880d0f5c8d37bdc18a99f9ceb0ae101c82b8a7a6ae2088297f9dbfa7146fcf80a24948dd3316d56f0f798cc7ecec |
21 |
DIST pypy3-bin-5.5.0_alpha-x86+bzip2+ncurses+sse2.tar.lz 5231919 SHA256 6a9848bc2d1d948a91bc15ce20768bc7024726ec7afdd2767bfba25926a35c7f SHA512 fbdc955b1c2873d07e8ad36dd697fbb21932ac50726e76fed20da1fca218b329f18c81b8b4a65cd7ece26091859529d5bb56c7ed2efaf14ae8d9988581d88d9b WHIRLPOOL 08ffd98122e4745af4e785ebb986cd7d185472ec0879bb9dc6070b14de6d35e4177e35a85326468329a06617df03880744e23a6bef825f67d40476c92c7d430e |
22 |
DIST pypy3-bin-5.5.0_alpha-x86+bzip2+ncurses.tar.lz 5232239 SHA256 d808aa66ecd5b3d868554ad29b0eee3948e3de69390826bcb5e6b8ceb2408037 SHA512 5e107304537855f459cc7bee92d3b2d05e16f2421d2249205c34f40f1f9415ca657f3e0842c79de98fed732e0a2752b280b44880f96eeeaa0d50d4b4bf2c525c WHIRLPOOL 562fe0c00aeb83a74d9f1ccba4ffed70b5efa6592ef04c82ea06c38afc560e97aa02b835de8b69925690149c1d6803ecfbcad7eefd59bdf4462bdbbbf82c2577 |
23 |
+DIST pypy3-bin-5.7.1-amd64+bzip2+jit+ncurses.tar.lz 10329767 SHA256 041d6b6af48ec4a2de0062a2ae48a3d2a8e827d450b76fc4232f4a9eca8cbc47 SHA512 a5959d4bd5d267ea0386e4fab4b86b83f7597aaa3174281f15f180e0c83125af1437c0a693b0d534929c7199df5958a5f48867c72d1ce24494b2238523cde2aa WHIRLPOOL 8eef898eac108726b89751e6af80c112f46800ab1dd4efad118e71adb6c7cbaccbe46360da3be7d5ad5702262a2e377bfc530b7519fc38532123884c84e0c1ee |
24 |
+DIST pypy3-bin-5.7.1-amd64+bzip2+ncurses.tar.lz 6352387 SHA256 0243a016a7b836af72e6e1172f2a4516b9705169a9ba2318093b5c3005917766 SHA512 a63b02dfc11b7675bd4ccceb58801aeb1fd40d0245196dd7fa9f646e4618f46c8e6c4d95072c6432381064d37bc13cb74fbd383d19f8769f069827a8969e7a95 WHIRLPOOL f09b82a6c8a4dada7597bfbe0b2ecd07d90d724eae3d2cc6f35a69c0f219b420236ed8ad37024ad8f9516d729389cbe919f58a48cf1aa323c3a74220c62b8aa3 |
25 |
+DIST pypy3-bin-5.7.1-x86+bzip2+jit+ncurses+sse2.tar.lz 8453840 SHA256 62def5b073ab62d1dbfa87a0d42dd7eb3d61bc4e3652895c917debf179863c78 SHA512 b9c0b127990afbcdd4ee2adc3cb4909db39078467249ef8e5aed127962b9066dc9456273a5d74c5c30e088fe5c7906efaf57e70004c1976173ef47a95d300c46 WHIRLPOOL 906e6a4bf08b137c8d676c58b6fd67e8ef8a2d4dabb67cdd88c335e70f633380af45499d8fe740b63da1265dd630febb7b3ab672a61f590c84f06161aca7f4d8 |
26 |
+DIST pypy3-bin-5.7.1-x86+bzip2+ncurses+sse2.tar.lz 5425311 SHA256 cf261a6cd49906acae44dd53fa96ba1911c27f3d563b817f39ea6db7a3e8652d SHA512 58231cdd747f4e515af095f8f1bac61ca1fd8c670fb194ffc7103d277d28394a577f1aaad6673236edd6136844d1e7dea6bc900660ac598d59c6a1e2799a726b WHIRLPOOL b09aea2f29376f2886f078f93f2bcd630fc0d4894630d5bb2e6d1e2bae0fda5bc7a7c10c4cc74ed576f605a0c862784f82eba1ec8110e4bc0a68679723f355fa |
27 |
+DIST pypy3-bin-5.7.1-x86+bzip2+ncurses.tar.lz 5425898 SHA256 33811bbeb290c777ae40881e0dfceb678d661b3bd56fc8e9a7247d367db44879 SHA512 19b3eb9f08a7bc89a8c41024b70529b6c1721a6e4ff907e53c06e99787b7b9356c08e554212b7f6e599f40a4cfaec09e765e0504e4b32e2191f7b5071f307d16 WHIRLPOOL 5f9e61550cfa2a983ca3b30eb3569caec9e202d713d4f0513a01e08ec402a6824ab04cd2585019b389f7c4486ef259a333d2c1087a9fe00e33899d9975e80599 |
28 |
+DIST pypy3-v5.7.1-src.tar.bz2 28811162 SHA256 40ece0145282980ac121390f13709404c0532896507d5767496381180b631bd0 SHA512 f8ead8214ad7d89fe80e24d97b13ece7f2c80b2f11446257a2eab0e3025fc7d8fec26474b0e9eb2b2e3ccd629532dd062829459361b601add12e40793bd5aa60 WHIRLPOOL 180a5cb39c9a5e3840f4940463dd9cccf44486f11a657d2ac644d1eac4561068f08905fdadc495918fb0ceaf018d4b85a3e5756ca6d99a020310b46bdb16ef87 |
29 |
DIST pypy3.3-v5.5.0-alpha-src.tar.bz2 25122033 SHA256 d5591c34d77253e9ed57d182b6f49585b95f7c09c3e121f0e8630e5a7e75ab5f SHA512 b2cf9700e45c452293297edffe08e572dffc3c567026b4b5d9165c1ba1b4d858ffc8a6754f5f28781020016c36440e5c02d07562d075b12444c9c32ea5dd2168 WHIRLPOOL 6bde174969413c55d6d077cd14e737c4f034f19935536af1bffaf3a1caa456d2bf6850760a18c274ad99089bd5ab7331d7d185f914cd6c69f708abf857d35df3 |
30 |
DIST python-gentoo-patches-3.3.5-0.tar.xz 12892 SHA256 a7240de9598033cb40f8f273d8104d4e2b1dcaea028d45ac28efaa3c680ff6f7 SHA512 27eef4c2b3f631b000db3f6a5c426d9b498d63a08fe82b1ab7c2c010fb72208109461a5f008d47703852526655b70a734ea95be8742897026db5750bb9cc9d16 WHIRLPOOL edab9222d7da94cab3b1de0e1a27c6c7dbd49194b813a0a1cf9e532063029c4e4f19151c9f4878eeabed3168ff1f97eae7f008280c7ed2897fc14c5516c68d7e |
31 |
|
32 |
diff --git a/dev-python/pypy3-bin/files/5.7.1_all_distutils_cxx.patch b/dev-python/pypy3-bin/files/5.7.1_all_distutils_cxx.patch |
33 |
new file mode 100644 |
34 |
index 00000000000..52a833f29d9 |
35 |
--- /dev/null |
36 |
+++ b/dev-python/pypy3-bin/files/5.7.1_all_distutils_cxx.patch |
37 |
@@ -0,0 +1,342 @@ |
38 |
+From b2f2c9d23996d431d606ac7d8ed731a5302b4e97 Mon Sep 17 00:00:00 2001 |
39 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
40 |
+Date: Tue, 25 Apr 2017 17:42:33 +0200 |
41 |
+Subject: [PATCH] Fancy distutils C++ support, rebased for PyPy3.5 |
42 |
+ |
43 |
+https://bugs.python.org/issue1222585 |
44 |
+--- |
45 |
+ _osx_support.py | 10 +++--- |
46 |
+ distutils/cygwinccompiler.py | 21 +++++++++-- |
47 |
+ distutils/sysconfig_cpython.py | 25 ++++++++++--- |
48 |
+ distutils/sysconfig_pypy.py | 35 +++++++++++++++---- |
49 |
+ distutils/unixccompiler.py | 54 ++++++++++++++++------------- |
50 |
+ 5 files changed, 100 insertions(+), 45 deletions(-) |
51 |
+ |
52 |
+diff --git a/_osx_support.py b/_osx_support.py |
53 |
+index 13fcd8b..0525be1 100644 |
54 |
+--- a/_osx_support.py |
55 |
++++ b/_osx_support.py |
56 |
+@@ -14,13 +14,13 @@ __all__ = [ |
57 |
+ # configuration variables that may contain universal build flags, |
58 |
+ # like "-arch" or "-isdkroot", that may need customization for |
59 |
+ # the user environment |
60 |
+-_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', |
61 |
+- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', |
62 |
+- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', |
63 |
+- 'PY_CORE_CFLAGS') |
64 |
++_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', |
65 |
++ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED', |
66 |
++ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', |
67 |
++ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS') |
68 |
+ |
69 |
+ # configuration variables that may contain compiler calls |
70 |
+-_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') |
71 |
++_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX') |
72 |
+ |
73 |
+ # prefix added to original configuration variable names |
74 |
+ _INITPRE = '_OSX_SUPPORT_INITIAL_' |
75 |
+diff --git a/distutils/cygwinccompiler.py b/distutils/cygwinccompiler.py |
76 |
+index c879646..a6157fb 100644 |
77 |
+--- a/distutils/cygwinccompiler.py |
78 |
++++ b/distutils/cygwinccompiler.py |
79 |
+@@ -125,8 +125,10 @@ class CygwinCCompiler(UnixCCompiler): |
80 |
+ # dllwrap 2.10.90 is buggy |
81 |
+ if self.ld_version >= "2.10.90": |
82 |
+ self.linker_dll = "gcc" |
83 |
++ self.linker_dll_cxx = "g++" |
84 |
+ else: |
85 |
+ self.linker_dll = "dllwrap" |
86 |
++ self.linker_dll_cxx = "dllwrap" |
87 |
+ |
88 |
+ # ld_version >= "2.13" support -shared so use it instead of |
89 |
+ # -mdll -static |
90 |
+@@ -140,9 +142,13 @@ class CygwinCCompiler(UnixCCompiler): |
91 |
+ self.set_executables(compiler='gcc -mcygwin -O -Wall', |
92 |
+ compiler_so='gcc -mcygwin -mdll -O -Wall', |
93 |
+ compiler_cxx='g++ -mcygwin -O -Wall', |
94 |
++ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall', |
95 |
+ linker_exe='gcc -mcygwin', |
96 |
+ linker_so=('%s -mcygwin %s' % |
97 |
+- (self.linker_dll, shared_option))) |
98 |
++ (self.linker_dll, shared_option)), |
99 |
++ linker_exe_cxx='g++ -mcygwin', |
100 |
++ linker_so_cxx=('%s -mcygwin %s' % |
101 |
++ (self.linker_dll_cxx, shared_option))) |
102 |
+ |
103 |
+ # cygwin and mingw32 need different sets of libraries |
104 |
+ if self.gcc_version == "2.91.57": |
105 |
+@@ -166,8 +172,12 @@ class CygwinCCompiler(UnixCCompiler): |
106 |
+ raise CompileError(msg) |
107 |
+ else: # for other files use the C-compiler |
108 |
+ try: |
109 |
+- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + |
110 |
+- extra_postargs) |
111 |
++ if self.detect_language(src) == 'c++': |
112 |
++ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + |
113 |
++ extra_postargs) |
114 |
++ else: |
115 |
++ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + |
116 |
++ extra_postargs) |
117 |
+ except DistutilsExecError as msg: |
118 |
+ raise CompileError(msg) |
119 |
+ |
120 |
+@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler): |
121 |
+ self.set_executables(compiler='gcc -O -Wall', |
122 |
+ compiler_so='gcc -mdll -O -Wall', |
123 |
+ compiler_cxx='g++ -O -Wall', |
124 |
++ compiler_so_cxx='g++ -mdll -O -Wall', |
125 |
+ linker_exe='gcc', |
126 |
+ linker_so='%s %s %s' |
127 |
+ % (self.linker_dll, shared_option, |
128 |
++ entry_point), |
129 |
++ linker_exe_cxx='g++', |
130 |
++ linker_so_cxx='%s %s %s' |
131 |
++ % (self.linker_dll_cxx, shared_option, |
132 |
+ entry_point)) |
133 |
+ # Maybe we should also append -mthreads, but then the finished |
134 |
+ # dlls need another dll (mingwm10.dll see Mingw32 docs) |
135 |
+diff --git a/distutils/sysconfig_cpython.py b/distutils/sysconfig_cpython.py |
136 |
+index 573724d..0a04f33 100644 |
137 |
+--- a/distutils/sysconfig_cpython.py |
138 |
++++ b/distutils/sysconfig_cpython.py |
139 |
+@@ -173,9 +173,12 @@ def customize_compiler(compiler): |
140 |
+ _osx_support.customize_compiler(_config_vars) |
141 |
+ _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' |
142 |
+ |
143 |
+- (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ |
144 |
+- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', |
145 |
+- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') |
146 |
++ (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \ |
147 |
++ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', |
148 |
++ 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') |
149 |
++ |
150 |
++ cflags = '' |
151 |
++ cxxflags = '' |
152 |
+ |
153 |
+ if 'CC' in os.environ: |
154 |
+ newcc = os.environ['CC'] |
155 |
+@@ -190,19 +193,27 @@ def customize_compiler(compiler): |
156 |
+ cxx = os.environ['CXX'] |
157 |
+ if 'LDSHARED' in os.environ: |
158 |
+ ldshared = os.environ['LDSHARED'] |
159 |
++ if 'LDCXXSHARED' in os.environ: |
160 |
++ ldcxxshared = os.environ['LDCXXSHARED'] |
161 |
+ if 'CPP' in os.environ: |
162 |
+ cpp = os.environ['CPP'] |
163 |
+ else: |
164 |
+ cpp = cc + " -E" # not always |
165 |
+ if 'LDFLAGS' in os.environ: |
166 |
+ ldshared = ldshared + ' ' + os.environ['LDFLAGS'] |
167 |
++ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS'] |
168 |
+ if 'CFLAGS' in os.environ: |
169 |
+- cflags = opt + ' ' + os.environ['CFLAGS'] |
170 |
++ cflags = os.environ['CFLAGS'] |
171 |
+ ldshared = ldshared + ' ' + os.environ['CFLAGS'] |
172 |
++ if 'CXXFLAGS' in os.environ: |
173 |
++ cxxflags = os.environ['CXXFLAGS'] |
174 |
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS'] |
175 |
+ if 'CPPFLAGS' in os.environ: |
176 |
+ cpp = cpp + ' ' + os.environ['CPPFLAGS'] |
177 |
+ cflags = cflags + ' ' + os.environ['CPPFLAGS'] |
178 |
++ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS'] |
179 |
+ ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] |
180 |
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS'] |
181 |
+ if 'AR' in os.environ: |
182 |
+ ar = os.environ['AR'] |
183 |
+ if 'ARFLAGS' in os.environ: |
184 |
+@@ -211,13 +222,17 @@ def customize_compiler(compiler): |
185 |
+ archiver = ar + ' ' + ar_flags |
186 |
+ |
187 |
+ cc_cmd = cc + ' ' + cflags |
188 |
++ cxx_cmd = cxx + ' ' + cxxflags |
189 |
+ compiler.set_executables( |
190 |
+ preprocessor=cpp, |
191 |
+ compiler=cc_cmd, |
192 |
+ compiler_so=cc_cmd + ' ' + ccshared, |
193 |
+- compiler_cxx=cxx, |
194 |
++ compiler_cxx=cxx_cmd, |
195 |
++ compiler_so_cxx=cxx_cmd + ' ' + ccshared, |
196 |
+ linker_so=ldshared, |
197 |
+ linker_exe=cc, |
198 |
++ linker_so_cxx=ldcxxshared, |
199 |
++ linker_exe_cxx=cxx, |
200 |
+ archiver=archiver) |
201 |
+ |
202 |
+ compiler.shared_lib_extension = shlib_suffix |
203 |
+diff --git a/distutils/sysconfig_pypy.py b/distutils/sysconfig_pypy.py |
204 |
+index a0a8dec..aa97c4e 100644 |
205 |
+--- a/distutils/sysconfig_pypy.py |
206 |
++++ b/distutils/sysconfig_pypy.py |
207 |
+@@ -72,6 +72,7 @@ def _init_posix(): |
208 |
+ g['CFLAGS'] = "-DNDEBUG -O2" |
209 |
+ g['CCSHARED'] = "-fPIC" |
210 |
+ g['LDSHARED'] = "gcc -pthread -shared" |
211 |
++ g['LDCXXSHARED'] = "g++ -pthread -shared" |
212 |
+ g['EXT_SUFFIX'] = so_ext |
213 |
+ g['SHLIB_SUFFIX'] = so_ext |
214 |
+ g['SO'] = so_ext # deprecated in Python 3, for backward compatibility |
215 |
+@@ -156,36 +157,52 @@ def customize_compiler(compiler): |
216 |
+ _osx_support.customize_compiler(_config_vars) |
217 |
+ _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' |
218 |
+ |
219 |
+- (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ |
220 |
+- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', |
221 |
+- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') |
222 |
++ (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \ |
223 |
++ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', |
224 |
++ 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') |
225 |
++ |
226 |
++ cflags = '' |
227 |
++ cxxflags = '' |
228 |
+ |
229 |
+ if 'CC' in os.environ: |
230 |
+ newcc = os.environ['CC'] |
231 |
+- if (sys.platform == 'darwin' |
232 |
++ if (True |
233 |
+ and 'LDSHARED' not in os.environ |
234 |
+ and ldshared.startswith(cc)): |
235 |
+ # On OS X, if CC is overridden, use that as the default |
236 |
+ # command for LDSHARED as well |
237 |
++ # Gentoo: s/OS X/every system/ |
238 |
+ ldshared = newcc + ldshared[len(cc):] |
239 |
+ cc = newcc |
240 |
+ if 'CXX' in os.environ: |
241 |
+- cxx = os.environ['CXX'] |
242 |
++ newcxx = os.environ['CXX'] |
243 |
++ if ('LDCXXSHARED' not in os.environ |
244 |
++ and ldcxxshared.startswith(cxx)): |
245 |
++ ldcxxshared = newcxx + ldcxxshared[len(cxx):] |
246 |
++ cxx = newcxx |
247 |
+ if 'LDSHARED' in os.environ: |
248 |
+ ldshared = os.environ['LDSHARED'] |
249 |
++ if 'LDCXXSHARED' in os.environ: |
250 |
++ ldcxxshared = os.environ['LDCXXSHARED'] |
251 |
+ if 'CPP' in os.environ: |
252 |
+ cpp = os.environ['CPP'] |
253 |
+ else: |
254 |
+ cpp = cc + " -E" # not always |
255 |
+ if 'LDFLAGS' in os.environ: |
256 |
+ ldshared = ldshared + ' ' + os.environ['LDFLAGS'] |
257 |
++ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS'] |
258 |
+ if 'CFLAGS' in os.environ: |
259 |
+- cflags = opt + ' ' + os.environ['CFLAGS'] |
260 |
++ cflags = os.environ['CFLAGS'] |
261 |
+ ldshared = ldshared + ' ' + os.environ['CFLAGS'] |
262 |
++ if 'CXXFLAGS' in os.environ: |
263 |
++ cxxflags = os.environ['CXXFLAGS'] |
264 |
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS'] |
265 |
+ if 'CPPFLAGS' in os.environ: |
266 |
+ cpp = cpp + ' ' + os.environ['CPPFLAGS'] |
267 |
+ cflags = cflags + ' ' + os.environ['CPPFLAGS'] |
268 |
++ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS'] |
269 |
+ ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] |
270 |
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS'] |
271 |
+ if 'AR' in os.environ: |
272 |
+ ar = os.environ['AR'] |
273 |
+ if 'ARFLAGS' in os.environ: |
274 |
+@@ -194,13 +211,17 @@ def customize_compiler(compiler): |
275 |
+ archiver = ar + ' ' + ar_flags |
276 |
+ |
277 |
+ cc_cmd = cc + ' ' + cflags |
278 |
++ cxx_cmd = cxx + ' ' + cxxflags |
279 |
+ compiler.set_executables( |
280 |
+ preprocessor=cpp, |
281 |
+ compiler=cc_cmd, |
282 |
+ compiler_so=cc_cmd + ' ' + ccshared, |
283 |
+- compiler_cxx=cxx, |
284 |
++ compiler_cxx=cxx_cmd, |
285 |
++ compiler_so_cxx=cxx_cmd + ' ' + ccshared, |
286 |
+ linker_so=ldshared, |
287 |
+ linker_exe=cc, |
288 |
++ linker_so_cxx=ldcxxshared, |
289 |
++ linker_exe_cxx=cxx, |
290 |
+ archiver=archiver) |
291 |
+ |
292 |
+ compiler.shared_lib_extension = shlib_suffix |
293 |
+diff --git a/distutils/unixccompiler.py b/distutils/unixccompiler.py |
294 |
+index 254b22d..c9cacc1 100644 |
295 |
+--- a/distutils/unixccompiler.py |
296 |
++++ b/distutils/unixccompiler.py |
297 |
+@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler): |
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 |
+@@ -125,12 +128,19 @@ class UnixCCompiler(CCompiler): |
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 as msg: |
343 |
+ raise CompileError(msg) |
344 |
+ |
345 |
+@@ -188,22 +198,16 @@ class UnixCCompiler(CCompiler): |
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 += 1 |
369 |
+- linker[i] = self.compiler_cxx[i] |
370 |
++ if target_desc == CCompiler.EXECUTABLE: |
371 |
++ linker = self.linker_exe[:] |
372 |
++ else: |
373 |
++ linker = self.linker_so[:] |
374 |
+ |
375 |
+ if sys.platform == 'darwin': |
376 |
+ linker = _osx_support.compiler_fixup(linker, ld_args) |
377 |
+-- |
378 |
+2.12.2 |
379 |
+ |
380 |
|
381 |
diff --git a/dev-python/pypy3-bin/pypy3-bin-5.7.1.ebuild b/dev-python/pypy3-bin/pypy3-bin-5.7.1.ebuild |
382 |
new file mode 100644 |
383 |
index 00000000000..cd1e988958c |
384 |
--- /dev/null |
385 |
+++ b/dev-python/pypy3-bin/pypy3-bin-5.7.1.ebuild |
386 |
@@ -0,0 +1,183 @@ |
387 |
+# Copyright 1999-2017 Gentoo Foundation |
388 |
+# Distributed under the terms of the GNU General Public License v2 |
389 |
+ |
390 |
+EAPI=6 |
391 |
+ |
392 |
+# some random parts need python 2... |
393 |
+PYTHON_COMPAT=( python2_7 pypy ) |
394 |
+inherit pax-utils python-any-r1 unpacker versionator |
395 |
+ |
396 |
+BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy3-bin/${PV}" |
397 |
+MY_P=pypy3-v${PV} |
398 |
+ |
399 |
+DESCRIPTION="A fast, compliant alternative implementation of Python 3.3 (binary package)" |
400 |
+HOMEPAGE="http://pypy.org/" |
401 |
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2 |
402 |
+ amd64? ( |
403 |
+ jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz ) |
404 |
+ !jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz ) |
405 |
+ ) |
406 |
+ x86? ( |
407 |
+ cpu_flags_x86_sse2? ( |
408 |
+ jit? ( ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz ) |
409 |
+ !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz ) |
410 |
+ ) |
411 |
+ !cpu_flags_x86_sse2? ( |
412 |
+ !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses.tar.lz ) |
413 |
+ ) |
414 |
+ )" |
415 |
+ |
416 |
+# Supported variants |
417 |
+REQUIRED_USE="x86? ( !cpu_flags_x86_sse2? ( !jit ) )" |
418 |
+ |
419 |
+LICENSE="MIT" |
420 |
+# XX from pypy3-XX.so module suffix |
421 |
+SLOT="0/57" |
422 |
+KEYWORDS="~amd64 ~x86" |
423 |
+IUSE="gdbm +jit sqlite cpu_flags_x86_sse2 test tk" |
424 |
+ |
425 |
+# yep, world would be easier if people started filling subslots... |
426 |
+RDEPEND=" |
427 |
+ app-arch/bzip2:0= |
428 |
+ dev-libs/expat:0= |
429 |
+ dev-libs/libffi:0= |
430 |
+ dev-libs/openssl:0=[-bindist] |
431 |
+ sys-libs/glibc:2.2= |
432 |
+ sys-libs/ncurses:0/6 |
433 |
+ sys-libs/zlib:0= |
434 |
+ gdbm? ( sys-libs/gdbm:0= ) |
435 |
+ sqlite? ( dev-db/sqlite:3= ) |
436 |
+ tk? ( |
437 |
+ dev-lang/tk:0= |
438 |
+ dev-tcltk/tix:0= |
439 |
+ ) |
440 |
+ !dev-python/pypy3:0" |
441 |
+DEPEND="${RDEPEND} |
442 |
+ app-arch/lzip |
443 |
+ app-arch/xz-utils |
444 |
+ test? ( ${PYTHON_DEPS} )" |
445 |
+# doc? ( ${PYTHON_DEPS} |
446 |
+# dev-python/sphinx ) |
447 |
+ |
448 |
+S=${WORKDIR}/${MY_P}-src |
449 |
+ |
450 |
+QA_PREBUILT=" |
451 |
+ usr/lib*/pypy3/pypy3-c |
452 |
+ usr/lib*/pypy3/libpypy3-c.so" |
453 |
+ |
454 |
+src_prepare() { |
455 |
+ eapply "${FILESDIR}/4.0.0-gentoo-path.patch" |
456 |
+ eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
457 |
+ |
458 |
+ sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
459 |
+ -e "s^@libdir@^$(get_libdir)^" \ |
460 |
+ -i lib-python/3/distutils/command/install.py || die |
461 |
+ |
462 |
+ # apply CPython stdlib patches |
463 |
+ pushd lib-python/3 > /dev/null || die |
464 |
+ eapply "${FILESDIR}"/5.7.1_all_distutils_cxx.patch |
465 |
+ popd > /dev/null || die |
466 |
+ |
467 |
+ eapply_user |
468 |
+} |
469 |
+ |
470 |
+src_compile() { |
471 |
+ # Tadaam! PyPy compiled! |
472 |
+ mv "${WORKDIR}"/${P}*/{libpypy3-c.so,pypy3-c} . || die |
473 |
+ mv "${WORKDIR}"/${P}*/include/*.h include/ || die |
474 |
+ mv pypy/module/cpyext/include/*.h include/ || die |
475 |
+ mv pypy/module/cpyext/parse/*.h include/ || die |
476 |
+ |
477 |
+ #use doc && emake -C pypy/doc/ html |
478 |
+ #needed even without jit :( also needed in both compile and install phases |
479 |
+ pax-mark m pypy3-c libpypy3-c.so |
480 |
+} |
481 |
+ |
482 |
+src_test() { |
483 |
+ # (unset) |
484 |
+ local -x PYTHONDONTWRITEBYTECODE |
485 |
+ |
486 |
+ # Test runner requires Python 2 too. However, it spawns PyPy3 |
487 |
+ # internally so that we end up testing the correct interpreter. |
488 |
+ "${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c lib-python || die |
489 |
+} |
490 |
+ |
491 |
+src_install() { |
492 |
+ local dest=/usr/$(get_libdir)/pypy3 |
493 |
+ einfo "Installing PyPy ..." |
494 |
+ insinto "${dest}" |
495 |
+ doins -r include lib_pypy lib-python pypy3-c libpypy3-c.so |
496 |
+ fperms a+x ${dest}/pypy3-c ${dest}/libpypy3-c.so |
497 |
+ pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so" |
498 |
+ dosym ../$(get_libdir)/pypy3/pypy3-c /usr/bin/pypy3 |
499 |
+ dodoc README.rst |
500 |
+ |
501 |
+ if ! use gdbm; then |
502 |
+ rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \ |
503 |
+ "${ED%/}${dest}"/lib-python/*3/test/test_gdbm.py || die |
504 |
+ fi |
505 |
+ if ! use sqlite; then |
506 |
+ rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \ |
507 |
+ "${ED%/}${dest}"/lib_pypy/_sqlite3.py \ |
508 |
+ "${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die |
509 |
+ fi |
510 |
+ if ! use tk; then |
511 |
+ rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \ |
512 |
+ "${ED%/}${dest}"/lib_pypy/_tkinter \ |
513 |
+ "${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die |
514 |
+ fi |
515 |
+ |
516 |
+ # Install docs |
517 |
+ #use doc && dodoc -r pypy/doc/_build/html |
518 |
+ |
519 |
+ einfo "Generating caches and byte-compiling ..." |
520 |
+ |
521 |
+ local -x PYTHON=${ED%/}${dest}/pypy3-c |
522 |
+ local -x LD_LIBRARY_PATH="${ED%/}${dest}" |
523 |
+ # we can't use eclass function since PyPy is dumb and always gives |
524 |
+ # paths relative to the interpreter |
525 |
+ local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages |
526 |
+ python_export pypy3 EPYTHON |
527 |
+ |
528 |
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die |
529 |
+ python_domodule epython.py |
530 |
+ |
531 |
+ # Generate Grammar and PatternGrammar pickles. |
532 |
+ "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ |
533 |
+ || die "Generation of Grammar and PatternGrammar pickles failed" |
534 |
+ |
535 |
+ # Generate cffi modules |
536 |
+ # Please keep in sync with pypy/tool/build_cffi_imports.py! |
537 |
+#cffi_build_scripts = { |
538 |
+# "sqlite3": "_sqlite3_build.py", |
539 |
+# "audioop": "_audioop_build.py", |
540 |
+# "tk": "_tkinter/tklib_build.py", |
541 |
+# "curses": "_curses_build.py" if sys.platform != "win32" else None, |
542 |
+# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, |
543 |
+# "_gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, |
544 |
+# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, |
545 |
+# "resource": "_resource_build.py" if sys.platform != "win32" else None, |
546 |
+# "lzma": "_lzma_build.py", |
547 |
+# "_decimal": "_decimal_build.py", |
548 |
+# "ssl": "_ssl_build.py", |
549 |
+ cffi_targets=( audioop curses syslog pwdgrp resource lzma decimal ssl ) |
550 |
+ use gdbm && cffi_targets+=( gdbm ) |
551 |
+ use sqlite && cffi_targets+=( sqlite3 ) |
552 |
+ use tk && cffi_targets+=( tkinter/tklib ) |
553 |
+ |
554 |
+ local t |
555 |
+ # all modules except tkinter output to . |
556 |
+ # tkinter outputs to the correct dir ... |
557 |
+ cd "${ED%/}${dest}"/lib_pypy || die |
558 |
+ for t in "${cffi_targets[@]}"; do |
559 |
+ # tkinter doesn't work via -m |
560 |
+ "${PYTHON}" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" |
561 |
+ done |
562 |
+ |
563 |
+ # Cleanup temporary objects |
564 |
+ find "${ED%/}${dest}" -name "_cffi_*.[co]" -delete || die |
565 |
+ find "${ED%/}${dest}" -type d -empty -delete || die |
566 |
+ |
567 |
+ # compile the installed modules |
568 |
+ python_optimize "${ED%/}${dest}" |
569 |
+} |