commit:     77720eff10bebf2dc7163e86bf8e19fdc9364fd2
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  9 19:35:22 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jun  9 19:46:02 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77720eff

dev-python/pypy3-bin: Add 5.2.0-alpha1

 dev-python/pypy3-bin/Manifest                      |   9 +
 .../pypy3-bin/files/5.2.0-distutils-c++.patch      | 284 +++++++++++++++++++++
 dev-python/pypy3-bin/pypy3-bin-5.2.0_alpha1.ebuild | 202 +++++++++++++++
 3 files changed, 495 insertions(+)

diff --git a/dev-python/pypy3-bin/Manifest b/dev-python/pypy3-bin/Manifest
index 6485ca5..0fd8fdc 100644
--- a/dev-python/pypy3-bin/Manifest
+++ b/dev-python/pypy3-bin/Manifest
@@ -6,3 +6,12 @@ DIST 
pypy3-bin-2.4.0-nossl2-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz 824613
 DIST pypy3-bin-2.4.0-nossl2-x86+bzip2+jit+ncurses+sse2.tar.lz 9073643 SHA256 
436128604cc9649228992206abcfef84ff14994984b3da91b2d4ee1ab654274c SHA512 
0cffa75008f174d0703d07e86ed1036a27efe7707b14e2a5c6bfe92bd703ad0ce7223a0b590aeffe1e7dd11756d385ac9e2eba9a7d49d6d970377aef8aa2d8bb
 WHIRLPOOL 
579625d8e36bd22ca04a2468592f784269bd514799725a5fe0f5ce47e09477dada96a95c2296e46a8f4d03fc82aff6100c7a89c4e71993b033a31516ffc0b2a4
 DIST pypy3-bin-2.4.0-nossl2-x86+bzip2+ncurses+sse2.tar.lz 5549183 SHA256 
ecb7dae543219b4bc1d75114a0a5316d870a4a92ae439b9679ae8436903fcc77 SHA512 
06040c2f843ce77573616f9fc5a9773ffb67957860d33ca26538a39ba68aa56eea98bc0af0e99e6319f50ee42ff894a9f4944b7924348f20ce90078f0615a707
 WHIRLPOOL 
ebf165deb7b65cbfef081841037206a74658906e49b52225c1966874f3f8ad39f19157c801653e2797a03b9fd0287a5c4e7ffb7d53d951fb5686eaba9c533b29
 DIST pypy3-bin-2.4.0-nossl2-x86+bzip2+ncurses.tar.lz 5503668 SHA256 
7cc045e8ec9e7d4c01eb0dd9e83296bbf38483bcd0a5af0298ef53b9dc0bc63d SHA512 
fa398b43a479c71bcd708e30055716dbe0c8f6421ed632a3ed8b3fa1cf30310e5325106b2c5d2be70b3a7e3bc706e70b599ffa34497ef6a0aeb78df534397f79
 WHIRLPOOL 
c13aee013422d552cbf34fa41326f7edfb1a3817801a3ac72ff472b92460528876505b88e6bd95866dbf731d707d1ba789f22ae76d3a004cded36772afab2436
+DIST pypy3-bin-5.2.0_alpha1-amd64+bzip2+jit+ncurses+shadowstack.tar.lz 
10607836 SHA256 
2fe7ab10ef9dc527fa6a187c8d81ada8e507ce3319496eb929507bc7f556b6f3 SHA512 
6bc108500c2a87c806592c95ddd0cf65c2792648e6b9788b7503a14297d7c2f742357f9565066faea44c0968402a3b4e6054198dadf99044d61141e58dc21ef7
 WHIRLPOOL 
c9d3f9c7655f2b55267570b7b1c3c942c6d7d9e947822fc3dc92c503aed49cbe6c0017749cd029ea9c262e26182d72deb10d3f8c772aab1033113f6270586a45
+DIST pypy3-bin-5.2.0_alpha1-amd64+bzip2+jit+ncurses.tar.lz 11330839 SHA256 
10c4d1689d3fb1dd25e0ea765132a65799bdef8f0ca952241ef32cdf2f53e4e8 SHA512 
e7f68ae8dfaab4894b4340e35cf14b16e47da8b192ea5aea97d33d7ec2b39ddc657ea36ac088325ffbd149bcc2bbc9528b9bd13f5cb8fd653ee2657a85d489f8
 WHIRLPOOL 
13faf88eff92ce6596e5d924e926e1ab56a97e668123852ec12a17ad57b7439d91528c4fb636190c7688823c7d68bc6b425ee115ed2c80811062ad715b08952d
+DIST pypy3-bin-5.2.0_alpha1-amd64+bzip2+ncurses.tar.lz 6215094 SHA256 
3cb22aee7c12a244b68215cdb03ee2c31589fdce55781dfa9cec706ede027d42 SHA512 
00d1669cb7b208e18f48da339f4d843cff8bff49178fa547e8caf7b568e796dd8a2ede8204535e12b57e534375e752417e2a3f8023529673988fa315d8c1684b
 WHIRLPOOL 
6e21ce63aacf1b07199947bd7ca36b263bee49a7a975b5f08d29f2ed9d971feeb77fb14c6052f822e7bb04ab1794f2bb0a04de34870bb454d88abf9f65a13761
+DIST pypy3-bin-5.2.0_alpha1-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz 
8533753 SHA256 7ec05fa19bbad93e6a25500fedf212f495eb8952ec486feb52379b979bd8ee3a 
SHA512 
ab87d575e0c06ee6533fe61a6c0fad5fe8bf77417772fd196588449c81263801ac14dd8367821d61263cabbde2c05b33cebb0f5e8057d0a9eabb2e68a66571ad
 WHIRLPOOL 
19b32146ac28497e8d80eeec4bbccdfc6ddff65ff768b2828905e9bc5e6b597cbafe631da7091eb4c91969362f24f12edd1ae726a4f3e41b637a32aaab7cf946
+DIST pypy3-bin-5.2.0_alpha1-x86+bzip2+jit+ncurses+sse2.tar.lz 9328963 SHA256 
b6a8097c834e1dbb62b5042fb754c03a86d70e3c3c54f8b2c2c1268828f9ade1 SHA512 
121305c1c5c84ac3ac1beec18ba5fcf2ca9f53ba4abfa200dd3fb688be0d261552f6f44c7ccf64b37cd52f95720e149efac5608d81e65c172298ecd5da9af16a
 WHIRLPOOL 
5bb4f533f6a747ed9b4eb0eaccaf7ad86498eb3267270706510ee249b2bc5c2a95de4e16015bed633d60bd8ab4b10c09aad1719e411f61c8d7fbef3f7cc85851
+DIST pypy3-bin-5.2.0_alpha1-x86+bzip2+ncurses+sse2.tar.lz 5197922 SHA256 
4cd32da0468db5863d5f975637009f81c594c878d9a954b7aa0198029b4869f7 SHA512 
1568f3784feee713bf893cd27e1b159d55a39014a8ae69be80648e79ec8e415da425da2140d537f7c3d9a1854d14e76816d132938a3a350dd20ce97dddf032d9
 WHIRLPOOL 
a1f0cce9f24b7d04a602e0ddc2770b9431a3e708832f680ab923346769292ed5493cc3bc1e748676978966dacb4f42e6b4137ee0e05010d81b8d3d819fd740aa
+DIST pypy3-bin-5.2.0_alpha1-x86+bzip2+ncurses.tar.lz 5197502 SHA256 
443b6542da9bb14826eff2b1080d16005a4a9fe6672eef41c5d29d8852b47904 SHA512 
859037552e699b3bc172ab93f7e32315ae1d4b1a6f8d15bbbb14ca1a389f36360eb04cfc792d79bb99b418d1fd507d0d084f2652e04688bd53eed05391197c2c
 WHIRLPOOL 
f6003d1c6d05f54ea72f00755fa5b708ffc16ba180ed74846422b0cbbf95cdf9ad0b1109068ed72f43ac2b945b10bf37453984b88cfb30b335c9f5ba4878265d
+DIST pypy3.3-v5.2.0-alpha1-src.tar.bz2 24390595 SHA256 
344c2f088c82ea1274964bb0505ab80d3f9e538cc03f91aa109325ddbaa61426 SHA512 
1b6bcab12a7f4dd0ac44158b8acafd64de4b9bcc277385ba4c05982381dcd577fa6ec7b2247f70d2671055f3669764b92b4447b32d51ded58c60e6ec23509595
 WHIRLPOOL 
9455686af04f31da52da812e4f48d773c1ce45180ba067a308a779fa8b468b5a10c446a28d7468e61278801837705e882240a2e17884bc94069e564a5706f177
+DIST python-gentoo-patches-3.3.5-0.tar.xz 12892 SHA256 
a7240de9598033cb40f8f273d8104d4e2b1dcaea028d45ac28efaa3c680ff6f7 SHA512 
27eef4c2b3f631b000db3f6a5c426d9b498d63a08fe82b1ab7c2c010fb72208109461a5f008d47703852526655b70a734ea95be8742897026db5750bb9cc9d16
 WHIRLPOOL 
edab9222d7da94cab3b1de0e1a27c6c7dbd49194b813a0a1cf9e532063029c4e4f19151c9f4878eeabed3168ff1f97eae7f008280c7ed2897fc14c5516c68d7e

diff --git a/dev-python/pypy3-bin/files/5.2.0-distutils-c++.patch 
b/dev-python/pypy3-bin/files/5.2.0-distutils-c++.patch
new file mode 100644
index 0000000..1251694
--- /dev/null
+++ b/dev-python/pypy3-bin/files/5.2.0-distutils-c++.patch
@@ -0,0 +1,284 @@
+From e3afe6721897c8de830055621313bc0659518415 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgo...@gentoo.org>
+Date: Thu, 9 Jun 2016 20:48:10 +0200
+Subject: [PATCH] distutils c++ fixes, python3.3 patch updated for pypy3.3
+
+---
+ lib-python/3/_osx_support.py                | 10 +++---
+ lib-python/3/distutils/cygwinccompiler.py   | 21 +++++++++--
+ lib-python/3/distutils/emxccompiler.py      | 14 ++++++--
+ lib-python/3/distutils/sysconfig_cpython.py | 25 ++++++++++---
+ lib-python/3/distutils/unixccompiler.py     | 54 ++++++++++++++++-------------
+ 5 files changed, 83 insertions(+), 41 deletions(-)
+
+diff --git a/lib-python/3/_osx_support.py b/lib-python/3/_osx_support.py
+index 50b2d17..1d19599 100644
+--- a/lib-python/3/_osx_support.py
++++ b/lib-python/3/_osx_support.py
+@@ -14,13 +14,13 @@ __all__ = [
+ # configuration variables that may contain universal build flags,
+ # like "-arch" or "-isdkroot", that may need customization for
+ # the user environment
+-_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
+-                            'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
+-                            'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
+-                            'PY_CORE_CFLAGS')
++_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS',
++                          'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 
'LDCXXSHARED',
++                          'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS',
++                          'PY_CPPFLAGS', 'PY_CORE_CFLAGS')
+ 
+ # configuration variables that may contain compiler calls
+-_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX')
++_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX')
+ 
+ # prefix added to original configuration variable names
+ _INITPRE = '_OSX_SUPPORT_INITIAL_'
+diff --git a/lib-python/3/distutils/cygwinccompiler.py 
b/lib-python/3/distutils/cygwinccompiler.py
+index e0074a1..1b383d3 100644
+--- a/lib-python/3/distutils/cygwinccompiler.py
++++ b/lib-python/3/distutils/cygwinccompiler.py
+@@ -124,8 +124,10 @@ class CygwinCCompiler(UnixCCompiler):
+         # dllwrap 2.10.90 is buggy
+         if self.ld_version >= "2.10.90":
+             self.linker_dll = "gcc"
++            self.linker_dll_cxx = "g++"
+         else:
+             self.linker_dll = "dllwrap"
++            self.linker_dll_cxx = "dllwrap"
+ 
+         # ld_version >= "2.13" support -shared so use it instead of
+         # -mdll -static
+@@ -139,9 +141,13 @@ class CygwinCCompiler(UnixCCompiler):
+         self.set_executables(compiler='gcc -mcygwin -O -Wall',
+                              compiler_so='gcc -mcygwin -mdll -O -Wall',
+                              compiler_cxx='g++ -mcygwin -O -Wall',
++                             compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
+                              linker_exe='gcc -mcygwin',
+                              linker_so=('%s -mcygwin %s' %
+-                                        (self.linker_dll, shared_option)))
++                                        (self.linker_dll, shared_option)),
++                             linker_exe_cxx='g++ -mcygwin',
++                             linker_so_cxx=('%s -mcygwin %s' %
++                                            (self.linker_dll_cxx, 
shared_option)))
+ 
+         # cygwin and mingw32 need different sets of libraries
+         if self.gcc_version == "2.91.57":
+@@ -165,8 +171,12 @@ class CygwinCCompiler(UnixCCompiler):
+                 raise CompileError(msg)
+         else: # for other files use the C-compiler
+             try:
+-                self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
+-                           extra_postargs)
++                if self.detect_language(src) == 'c++':
++                    self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', 
obj] +
++                               extra_postargs)
++                else:
++                    self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
++                               extra_postargs)
+             except DistutilsExecError as msg:
+                 raise CompileError(msg)
+ 
+@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler):
+         self.set_executables(compiler='gcc%s -O -Wall' % no_cygwin,
+                              compiler_so='gcc%s -mdll -O -Wall' % no_cygwin,
+                              compiler_cxx='g++%s -O -Wall' % no_cygwin,
++                             compiler_so_cxx='g++%s -mdll -O -Wall' % 
no_cygwin,
+                              linker_exe='gcc%s' % no_cygwin,
+                              linker_so='%s%s %s %s'
+                                     % (self.linker_dll, no_cygwin,
++                                       shared_option, entry_point),
++                             linker_exe_cxx='g++%s' % no_cygwin,
++                             linker_so_cxx='%s%s %s %s'
++                                    % (self.linker_dll_cxx, no_cygwin,
+                                        shared_option, entry_point))
+         # Maybe we should also append -mthreads, but then the finished
+         # dlls need another dll (mingwm10.dll see Mingw32 docs)
+diff --git a/lib-python/3/distutils/emxccompiler.py 
b/lib-python/3/distutils/emxccompiler.py
+index 3675f8d..17d2afa 100644
+--- a/lib-python/3/distutils/emxccompiler.py
++++ b/lib-python/3/distutils/emxccompiler.py
+@@ -63,8 +63,12 @@ class EMXCCompiler (UnixCCompiler):
+         # XXX optimization, warnings etc. should be customizable.
+         self.set_executables(compiler='gcc -Zomf -Zmt -O3 
-fomit-frame-pointer -mprobe -Wall',
+                              compiler_so='gcc -Zomf -Zmt -O3 
-fomit-frame-pointer -mprobe -Wall',
++                             compiler_cxx='g++ -Zomf -Zmt -O3 
-fomit-frame-pointer -mprobe -Wall',
++                             compiler_so_cxx='g++ -Zomf -Zmt -O3 
-fomit-frame-pointer -mprobe -Wall',
+                              linker_exe='gcc -Zomf -Zmt -Zcrtdll',
+-                             linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
++                             linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll',
++                             linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll',
++                             linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll')
+ 
+         # want the gcc library statically linked (so that we don't have
+         # to distribute a version dependent on the compiler we have)
+@@ -81,8 +85,12 @@ class EMXCCompiler (UnixCCompiler):
+                 raise CompileError(msg)
+         else: # for other files use the C-compiler
+             try:
+-                self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
+-                           extra_postargs)
++                if self.detect_language(src) == 'c++':
++                    self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', 
obj] +
++                               extra_postargs)
++                else:
++                    self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
++                               extra_postargs)
+             except DistutilsExecError as msg:
+                 raise CompileError(msg)
+ 
+diff --git a/lib-python/3/distutils/sysconfig_cpython.py 
b/lib-python/3/distutils/sysconfig_cpython.py
+index b947988..3f19020 100644
+--- a/lib-python/3/distutils/sysconfig_cpython.py
++++ b/lib-python/3/distutils/sysconfig_cpython.py
+@@ -191,9 +191,12 @@ def customize_compiler(compiler):
+                 _osx_support.customize_compiler(_config_vars)
+                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
+ 
+-        (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, 
ar_flags) = \
+-            get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
+-                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 
'ARFLAGS')
++        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, 
ar_flags) = \
++            get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 
'LDCXXSHARED',
++                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
++
++        cflags = ''
++        cxxflags = ''
+ 
+         if 'CC' in os.environ:
+             newcc = os.environ['CC']
+@@ -208,19 +211,27 @@ def customize_compiler(compiler):
+             cxx = os.environ['CXX']
+         if 'LDSHARED' in os.environ:
+             ldshared = os.environ['LDSHARED']
++        if 'LDCXXSHARED' in os.environ:
++            ldcxxshared = os.environ['LDCXXSHARED']
+         if 'CPP' in os.environ:
+             cpp = os.environ['CPP']
+         else:
+             cpp = cc + " -E"           # not always
+         if 'LDFLAGS' in os.environ:
+             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
+         if 'CFLAGS' in os.environ:
+-            cflags = opt + ' ' + os.environ['CFLAGS']
++            cflags = os.environ['CFLAGS']
+             ldshared = ldshared + ' ' + os.environ['CFLAGS']
++        if 'CXXFLAGS' in os.environ:
++            cxxflags = os.environ['CXXFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
+         if 'CPPFLAGS' in os.environ:
+             cpp = cpp + ' ' + os.environ['CPPFLAGS']
+             cflags = cflags + ' ' + os.environ['CPPFLAGS']
++            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
+             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
+         if 'AR' in os.environ:
+             ar = os.environ['AR']
+         if 'ARFLAGS' in os.environ:
+@@ -229,13 +240,17 @@ def customize_compiler(compiler):
+             archiver = ar + ' ' + ar_flags
+ 
+         cc_cmd = cc + ' ' + cflags
++        cxx_cmd = cxx + ' ' + cxxflags
+         compiler.set_executables(
+             preprocessor=cpp,
+             compiler=cc_cmd,
+             compiler_so=cc_cmd + ' ' + ccshared,
+-            compiler_cxx=cxx,
++            compiler_cxx=cxx_cmd,
++            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
+             linker_so=ldshared,
+             linker_exe=cc,
++            linker_so_cxx=ldcxxshared,
++            linker_exe_cxx=cxx,
+             archiver=archiver)
+ 
+         compiler.shared_lib_extension = shlib_suffix
+diff --git a/lib-python/3/distutils/unixccompiler.py 
b/lib-python/3/distutils/unixccompiler.py
+index 6819d50..19345ee 100644
+--- a/lib-python/3/distutils/unixccompiler.py
++++ b/lib-python/3/distutils/unixccompiler.py
+@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler):
+     # are pretty generic; they will probably have to be set by an outsider
+     # (eg. using information discovered by the sysconfig about building
+     # Python extensions).
+-    executables = {'preprocessor' : None,
+-                   'compiler'     : ["cc"],
+-                   'compiler_so'  : ["cc"],
+-                   'compiler_cxx' : ["c++"],  # pypy: changed, 'cc' is bogus
+-                   'linker_so'    : ["cc", "-shared"],
+-                   'linker_exe'   : ["cc"],
+-                   'archiver'     : ["ar", "-cr"],
+-                   'ranlib'       : None,
++    executables = {'preprocessor'    : None,
++                   'compiler'        : ["cc"],
++                   'compiler_so'     : ["cc"],
++                   'compiler_cxx'    : ["c++"],
++                   'compiler_so_cxx' : ["c++"],
++                   'linker_so'       : ["cc", "-shared"],
++                   'linker_exe'      : ["cc"],
++                   'linker_so_cxx'   : ["c++", "-shared"],
++                   'linker_exe_cxx'  : ["c++"],
++                   'archiver'        : ["ar", "-cr"],
++                   'ranlib'          : None,
+                   }
+ 
+     if sys.platform[:6] == "darwin":
+@@ -123,12 +126,19 @@ class UnixCCompiler(CCompiler):
+ 
+     def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
+         compiler_so = self.compiler_so
++        compiler_so_cxx = self.compiler_so_cxx
+         if sys.platform == 'darwin':
+             compiler_so = _osx_support.compiler_fixup(compiler_so,
+                                                     cc_args + extra_postargs)
++            compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
++                                                    cc_args + extra_postargs)
+         try:
+-            self.spawn(compiler_so + cc_args + [src, '-o', obj] +
+-                       extra_postargs)
++            if self.detect_language(src) == 'c++':
++                self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
++                           extra_postargs)
++            else:
++                self.spawn(compiler_so + cc_args + [src, '-o', obj] +
++                           extra_postargs)
+         except DistutilsExecError as msg:
+             raise CompileError(msg)
+ 
+@@ -186,22 +196,16 @@ class UnixCCompiler(CCompiler):
+                 ld_args.extend(extra_postargs)
+             self.mkpath(os.path.dirname(output_filename))
+             try:
+-                if target_desc == CCompiler.EXECUTABLE:
+-                    linker = self.linker_exe[:]
++                if target_lang == "c++":
++                    if target_desc == CCompiler.EXECUTABLE:
++                        linker = self.linker_exe_cxx[:]
++                    else:
++                        linker = self.linker_so_cxx[:]
+                 else:
+-                    linker = self.linker_so[:]
+-                if target_lang == "c++" and self.compiler_cxx:
+-                    # skip over environment variable settings if /usr/bin/env
+-                    # is used to set up the linker's environment.
+-                    # This is needed on OSX. Note: this assumes that the
+-                    # normal and C++ compiler have the same environment
+-                    # settings.
+-                    i = 0
+-                    if os.path.basename(linker[0]) == "env":
+-                        i = 1
+-                        while '=' in linker[i]:
+-                            i += 1
+-                    linker[i] = self.compiler_cxx[i]
++                    if target_desc == CCompiler.EXECUTABLE:
++                        linker = self.linker_exe[:]
++                    else:
++                        linker = self.linker_so[:]
+ 
+                 if sys.platform == 'darwin':
+                     linker = _osx_support.compiler_fixup(linker, ld_args)
+-- 
+2.8.4
+

diff --git a/dev-python/pypy3-bin/pypy3-bin-5.2.0_alpha1.ebuild 
b/dev-python/pypy3-bin/pypy3-bin-5.2.0_alpha1.ebuild
new file mode 100644
index 0000000..d1035ca
--- /dev/null
+++ b/dev-python/pypy3-bin/pypy3-bin-5.2.0_alpha1.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# some random parts need python 2...
+PYTHON_COMPAT=( python2_7 pypy )
+inherit eutils multilib pax-utils python-any-r1 unpacker versionator
+
+CPY_PATCHSET_VERSION="3.3.5-0"
+MY_P=pypy3.3-v${PV/_/-}
+BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy3-bin/${PV}";
+
+DESCRIPTION="A fast, compliant alternative implementation of Python 3.3 
(binary package)"
+HOMEPAGE="http://pypy.org/";
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2
+       
https://dev.gentoo.org/~floppym/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz
+       amd64? (
+               jit? ( shadowstack? (
+                       
${BINHOST}/${P}-amd64+bzip2+jit+ncurses+shadowstack.tar.lz
+               ) )
+               jit? ( !shadowstack? (
+                       ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz
+               ) )
+               !jit? ( !shadowstack? (
+                       ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz
+               ) )
+       )
+       x86? (
+               cpu_flags_x86_sse2? (
+                       jit? ( shadowstack? (
+                               
${BINHOST}/${P}-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz
+                       ) )
+                       jit? ( !shadowstack? (
+                               
${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz
+                       ) )
+                       !jit? ( !shadowstack? (
+                               ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz
+                       ) )
+               )
+               !cpu_flags_x86_sse2? (
+                       !jit? ( !shadowstack? (
+                               ${BINHOST}/${P}-x86+bzip2+ncurses.tar.lz
+                       ) )
+               )
+       )"
+
+# Supported variants
+REQUIRED_USE="!jit? ( !shadowstack )
+       x86? ( !cpu_flags_x86_sse2? ( !jit !shadowstack ) )"
+
+LICENSE="MIT"
+SLOT="0/$(get_version_component_range 1-2 ${PV})"
+KEYWORDS="~amd64 ~x86"
+IUSE="gdbm +jit +shadowstack sqlite cpu_flags_x86_sse2 test tk"
+
+# yep, world would be easier if people started filling subslots...
+RDEPEND="
+       app-arch/bzip2:0=
+       dev-libs/expat:0=
+       dev-libs/libffi:0=
+       dev-libs/openssl:0=
+       sys-libs/glibc:2.2=
+       sys-libs/ncurses:0/6
+       sys-libs/zlib:0=
+       gdbm? ( sys-libs/gdbm:0= )
+       sqlite? ( dev-db/sqlite:3= )
+       tk? (
+               dev-lang/tk:0=
+               dev-tcltk/tix:0=
+       )
+       !dev-python/pypy3:0"
+DEPEND="${RDEPEND}
+       app-arch/lzip
+       test? ( ${PYTHON_DEPS} )"
+#      doc? ( ${PYTHON_DEPS}
+#              dev-python/sphinx )
+PDEPEND="app-admin/python-updater"
+
+S=${WORKDIR}/${MY_P}-src
+
+QA_PREBUILT="
+       usr/lib*/pypy3/pypy-c
+       usr/lib*/pypy3/libpypy-c.so"
+
+src_prepare() {
+       epatch "${FILESDIR}/4.0.0-gentoo-path.patch" \
+               
"${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
+
+       sed -e "s^@EPREFIX@^${EPREFIX}^" \
+               -e "s^@libdir@^$(get_libdir)^" \
+               -i lib-python/3/distutils/command/install.py || die
+
+       # apply CPython stdlib patches
+       pushd lib-python/3 > /dev/null || die
+       epatch "${FILESDIR}"/5.2.0-distutils-c++.patch \
+               "${WORKDIR}"/patches/24_all_sqlite-3.8.4.patch
+       popd > /dev/null || die
+
+       epatch_user
+}
+
+src_compile() {
+       # Tadaam! PyPy compiled!
+       mv "${WORKDIR}"/${P}*/{libpypy-c.so,pypy-c} . || die
+       mv "${WORKDIR}"/${P}*/include/*.h include/ || die
+       mv pypy/module/cpyext/include/*.h include/ || die
+       mv pypy/module/cpyext/include/numpy include/ || die
+
+       #use doc && emake -C pypy/doc/ html
+       #needed even without jit :( also needed in both compile and install 
phases
+       pax-mark m pypy-c libpypy-c.so
+}
+
+src_test() {
+       # (unset)
+       local -x PYTHONDONTWRITEBYTECODE
+
+       # Test runner requires Python 2 too. However, it spawns PyPy3
+       # internally so that we end up testing the correct interpreter.
+       "${PYTHON}" ./pypy/test_all.py --pypy=./pypy-c lib-python || die
+}
+
+src_install() {
+       local dest=/usr/$(get_libdir)/pypy3
+       einfo "Installing PyPy ..."
+       insinto "${dest}"
+       doins -r include lib_pypy lib-python pypy-c libpypy-c.so
+       fperms a+x ${dest}/pypy-c ${dest}/libpypy-c.so
+       pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so"
+       dosym ../$(get_libdir)/pypy3/pypy-c /usr/bin/pypy3
+       dodoc README.rst
+
+       if ! use gdbm; then
+               rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \
+                       "${ED%/}${dest}"/lib-python/*3/test/test_gdbm.py || die
+       fi
+       if ! use sqlite; then
+               rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
+                       "${ED%/}${dest}"/lib_pypy/_sqlite3.py \
+                       "${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || 
die
+       fi
+       if ! use tk; then
+               rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \
+                       "${ED%/}${dest}"/lib_pypy/_tkinter \
+                       
"${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
+       fi
+
+       # Install docs
+       #use doc && dohtml -r pypy/doc/_build/html/
+
+       einfo "Generating caches and byte-compiling ..."
+
+       local -x PYTHON=${ED%/}${dest}/pypy-c
+       local -x LD_LIBRARY_PATH="${ED%/}${dest}"
+       # we can't use eclass function since PyPy is dumb and always gives
+       # paths relative to the interpreter
+       local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages
+       python_export pypy3 EPYTHON
+
+       echo "EPYTHON='${EPYTHON}'" > epython.py || die
+       python_domodule epython.py
+
+       # Generate Grammar and PatternGrammar pickles.
+       "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; 
lib2to3.patcomp.PatternCompiler()" \
+               || die "Generation of Grammar and PatternGrammar pickles failed"
+
+       # Generate cffi modules
+       # Please keep in sync with pypy/tool/build_cffi_imports.py!
+#cffi_build_scripts = {
+#    "sqlite3": "_sqlite3_build.py",
+#    "audioop": "_audioop_build.py",
+#    "tk": "_tkinter/tklib_build.py",
+#    "curses": "_curses_build.py" if sys.platform != "win32" else None,
+#    "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
+#    "_gdbm": "_gdbm_build.py"  if sys.platform != "win32" else None,
+#    "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
+#    "resource": "_resource_build.py" if sys.platform != "win32" else None,
+#    "lzma": "_lzma_build.py",
+#    "_decimal": "_decimal_build.py",
+       cffi_targets=( audioop curses syslog pwdgrp resource lzma decimal )
+       use gdbm && cffi_targets+=( gdbm )
+       use sqlite && cffi_targets+=( sqlite3 )
+       use tk && cffi_targets+=( tkinter/tklib )
+
+       local t
+       # all modules except tkinter output to .
+       # tkinter outputs to the correct dir ...
+       cd "${ED%/}${dest}"/lib_pypy || die
+       for t in "${cffi_targets[@]}"; do
+               # tkinter doesn't work via -m
+               "${PYTHON}" "_${t}_build.py" || die "Failed to build CFFI 
bindings for ${t}"
+       done
+
+       # Cleanup temporary objects
+       find "${ED%/}${dest}" -name "_cffi_*.[co]" -delete || die
+       find "${ED%/}${dest}" -type d -empty -delete || die
+
+       # compile the installed modules
+       python_optimize "${ED%/}${dest}"
+}

Reply via email to