summaryrefslogtreecommitdiff
path: root/dev-python/pypy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /dev-python/pypy
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'dev-python/pypy')
-rw-r--r--dev-python/pypy/Manifest5
-rw-r--r--dev-python/pypy/files/7.3.3-distutils-cxx.patch387
-rw-r--r--dev-python/pypy/pypy-7.3.3.ebuild176
-rw-r--r--dev-python/pypy/pypy-7.3.3_rc1.ebuild176
4 files changed, 744 insertions, 0 deletions
diff --git a/dev-python/pypy/Manifest b/dev-python/pypy/Manifest
index 6fadbbd94936..c802bfc29c10 100644
--- a/dev-python/pypy/Manifest
+++ b/dev-python/pypy/Manifest
@@ -1,10 +1,15 @@
AUX 1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch 555 BLAKE2B 4976bf66e4e96f89e64ad79910bb7b6fc7c3929cf7b7f1a0a59e66b5bb87e600864df2556f1dccf7695223121c7271382227e16cfb8fb7851cf56be25542b7ab SHA512 f2df0a67480bbe46fbb25dd06abcbc226a7034410855105012045287e662a598fae467f5bc81b3d4adb738f812bf41819aaa5827151db0d6bba573305ee88474
AUX 5.8.0_all_distutils_cxx.patch 18248 BLAKE2B c48346df7bab8a38552eb7439e37f2c57c00ec534cb5e20a54d0c2a7d5f975b65746e556dc0a5876665498f165945adf9e8af5a053980b317dfe4c75c2338f62 SHA512 a1bfe2ac4380c87094d4b934603956260eafa5ad6059160603e636690d99ae65181e5752fba38f145ccfb263340a1aa03a46e31f7ceccb5643df14b0190e1d8a
AUX 7.3.1-gentoo-path.patch 1575 BLAKE2B e374b879aabdb1a9b4d3bb07ba03510e9df7c00e6fba13e117dd718268118ade06fa76f7468855463fa50112fb780fddb9687198f4a24bb0a6cc69b5b79e70d4 SHA512 14e14e4c000166bfe3f1cd10377baecc721b43c2df43c0d5d85e8dc6f220e1a453d7fe30cfbaab547e5483f8f493ddd840620b8de4de6d55abe8f9cddcca2464
+AUX 7.3.3-distutils-cxx.patch 18613 BLAKE2B af9f2a5f0248a865d1a5c7423b35a9a14d7cf8a3d885f5ddeafa68b0c0358a0a9eebf5ba1b687558102c3dd4e2a5b4399db1f4f701628b8fff8f0f4d9795550f SHA512 332396a0a1b8181946ef3b70cd76fad8ef6f06b3fc267229ef70fda5e6d48193981ed5620a5f3577a12e3cfda22a75ee4fdad12351a57c9ade96b3f1796d651c
DIST pypy2.7-v7.3.1-src.tar.bz2 21053306 BLAKE2B 071d59b7978c98e9ed9243d9a64d93d21b524351cb9a45e0f7d48828f919c84585a1164e7c38739fdd8828ab4b1eedade96dff7d64d0d9cbfe00c74d88d532bb SHA512 1bec44fa0fc4b1186e25f69303f9e332df32184be990d86fba41c40152664a93bd65eabf4dded133371271402cea9b150b60c13bce89d1004b276f0908c0b8f1
DIST pypy2.7-v7.3.2-src.tar.bz2 21142873 BLAKE2B e6bcd2dc28ef740962d053753ccd172e3895fc83fe23a319c003248e0986f9805839daddd13a0f480f1e9ee813979742699cb0bc8c42b6b05c193fedf67aea4f SHA512 b40d93d615a27e3a035007307a8ab2b49ff90f3047af914b268a80feb8219d372eca14c04a8b0dea91efb992653457b7c6d088c784de32c414cc48879f2d15fc
+DIST pypy2.7-v7.3.3-src.tar.bz2 20881821 BLAKE2B ce1ecdd1fffe40574c7662da6038b84d2bca47ab168939ef0c12be2c6348317f17a94a3026e7fa53c71601edc153aefd98f770bd148e7af07ca751c0a5fc1252 SHA512 c2b6c44fdcac5f9445fab01572f859228fc286891fd09a4ddb95d283683d805276c853ec8e61fcd04cb9ee811d0e959d19bb03fdd7442c044f28a773633122e7
+DIST pypy2.7-v7.3.3rc1-src.tar.bz2 20933100 BLAKE2B afbf3c15924e6a215b6323fe97e9782912f09ba1e1db6652b37897ead07deaaa97f591a91f3695e958e8e2dee2626bbda94c4043c025b3f52a12279dc66e483c SHA512 0ddbdcf7ef825888ff748ebdd84cb501653e3a4a0e506e35810f9693b5d3b388c2f636396616f0c8fcc96dc806fa02d74830c1f37ca11fdcfdfd32c3bcd1fdd0
DIST python-gentoo-patches-2.7.17-r1.tar.xz 14708 BLAKE2B f6e25236a471649de122d0f29506f7a4f34044a568ead47a68980411d9722b761fe1f9d653d5edccb6978b65c8c1eecbef55f403b94f32b37c0ad68e061505a8 SHA512 ecdde5e38c6fe5e69691fb3a68c8f4f43da7857d4abaff763d3cf6ad864ba43c769c03b186b60f2736a1ffb1e3e4c9982715d1b8a99ff3f5740096153bb8a90f
DIST python-gentoo-patches-2.7.18-r1.tar.xz 15500 BLAKE2B 7008b29827dbbd80d4ab8f010ccf9efced99c6b4b9109e4430c0ba269ce53529cb6fedd832502c8d2d3aa21938749cc3591c2545b21c0a59a6e60f8598e84ccc SHA512 e656ab07281fd932b92165674619bbf55ecf410d2937ae4ae771d490b4532540498cc731d30d19c1e8aafd1f64df8a406bbfbb46ea985b3dcd8edb89a0b7f20f
EBUILD pypy-7.3.1-r3.ebuild 5851 BLAKE2B ebc9ea70cced86be882e8b58bf810b417b36463c9559b7a7816b4560fa0a03ca79489c9c9ddc0f5b7b9d3d5bddf36f7afeded2f8bfa2eb71e52738a2e03a8948 SHA512 71a7a5cf51767c1913a96af6afb03a91f7002c5d0c98aef66445e27d1e9cc6eda6af9c9c3267db2702f6b288ecb65906fa60df69b5d2f2287a838d4ff7c91576
EBUILD pypy-7.3.2.ebuild 5573 BLAKE2B 8003673bb846858ea9718eeab505d4eb333c4aeb433f2c9f901f0fea2eb66b8e5d1a213598d4381903536a6d217d1e64bd01071b2ceaa37280d90908958ed156 SHA512 53664dd522887de6b54a4746f54a96c4f7bbe3c39dc935d285acefa989c651d1eefdc22a3a7be88dff15d7536db390c7cf25e1041ba4c2d63a5ba02cfc058092
+EBUILD pypy-7.3.3.ebuild 5590 BLAKE2B 5ca78c00d5325430b76d24ddec8d65414d379bf3618f394a76dba98492fbac71905d87e1fbce343e33fdda5cb51e2701e4c64f26edbe17edf4cf7bb6c5d30c21 SHA512 55bf654715cee22d61f53feb8602cd8a29433b1f9acf04765e32410616493b040e3b6d1fdb8cf84471ed554b3b22475cd8e3cce71b0da8faca512f7c3a922caa
+EBUILD pypy-7.3.3_rc1.ebuild 5541 BLAKE2B a06a6d4cc570c52aac68a86edc25537d36df47ab3131ccb655dc712ec338f0511d379b51f57a03bb525359965ff66011269495782653fd1a1499dae8af72c44a SHA512 d66499412886a6a3a317de75e1e5992f47950f602055a65a71914651dc5b1754c9335aa9a1154f8bf847b677ef9ccb8031721af4e6e22b6f9775daa4c2afc4f5
MISC metadata.xml 240 BLAKE2B 41e6a4d9da33dab2decc5ff419924f382a8f64d27a81fdb97576db8c6cf125be95911747946ec8be1b453f56617fef1084f5947f84b50a8db419d46df2ae8a0f SHA512 9c23321eaa853f851bf00195ea64ac2ba093e516f9b57855ee5aa58fbb1988130c9f0c17c2a9ce9fae4ee033e0a28a70c868e0f5acdfa1dd316ab533c5279d59
diff --git a/dev-python/pypy/files/7.3.3-distutils-cxx.patch b/dev-python/pypy/files/7.3.3-distutils-cxx.patch
new file mode 100644
index 000000000000..d5939d7417f2
--- /dev/null
+++ b/dev-python/pypy/files/7.3.3-distutils-cxx.patch
@@ -0,0 +1,387 @@
+From 5ca45626481778f12654cd2ea8c45b5eeb2363c6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 13 Nov 2020 01:02:28 +0100
+Subject: [PATCH] Fancy patch for distutils C++ support, rebased for
+ pypy7.3.3rc1
+
+---
+ lib-python/2.7/_osx_support.py | 10 ++--
+ lib-python/2.7/distutils/cygwinccompiler.py | 21 ++++++-
+ lib-python/2.7/distutils/emxccompiler.py | 14 ++++-
+ lib-python/2.7/distutils/sysconfig_cpython.py | 26 +++++++--
+ lib-python/2.7/distutils/sysconfig_pypy.py | 37 ++++++++++---
+ lib-python/2.7/distutils/unixccompiler.py | 55 ++++++++++---------
+ 6 files changed, 112 insertions(+), 51 deletions(-)
+
+diff --git a/lib-python/2.7/_osx_support.py b/lib-python/2.7/_osx_support.py
+index d2aaae7..8bcdb05 100644
+--- a/lib-python/2.7/_osx_support.py
++++ b/lib-python/2.7/_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/2.7/distutils/cygwinccompiler.py b/lib-python/2.7/distutils/cygwinccompiler.py
+index 767400c..7133097 100644
+--- a/lib-python/2.7/distutils/cygwinccompiler.py
++++ b/lib-python/2.7/distutils/cygwinccompiler.py
+@@ -120,8 +120,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
+@@ -135,9 +137,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":
+@@ -163,8 +169,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, msg:
+ raise CompileError, msg
+
+@@ -330,9 +340,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/2.7/distutils/emxccompiler.py b/lib-python/2.7/distutils/emxccompiler.py
+index a017205..bdc532c 100644
+--- a/lib-python/2.7/distutils/emxccompiler.py
++++ b/lib-python/2.7/distutils/emxccompiler.py
+@@ -65,8 +65,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)
+@@ -83,8 +87,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, msg:
+ raise CompileError, msg
+
+diff --git a/lib-python/2.7/distutils/sysconfig_cpython.py b/lib-python/2.7/distutils/sysconfig_cpython.py
+index 6a14f70..2cce5bc 100644
+--- a/lib-python/2.7/distutils/sysconfig_cpython.py
++++ b/lib-python/2.7/distutils/sysconfig_cpython.py
+@@ -181,10 +181,12 @@ def customize_compiler(compiler):
+ _osx_support.customize_compiler(_config_vars)
+ _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
+
+- (cc, cxx, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
+- get_config_vars('CC', 'CXX', 'CFLAGS',
+- 'CCSHARED', 'LDSHARED', 'SO', 'AR',
+- 'ARFLAGS')
++ (cc, cxx, ccshared, ldshared, ldcxxshared, so_ext, ar, ar_flags) = \
++ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
++ 'SO', 'AR', 'ARFLAGS')
++
++ cflags = ''
++ cxxflags = ''
+
+ if 'CC' in os.environ:
+ newcc = os.environ['CC']
+@@ -199,19 +201,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 = cflags + ' ' + 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:
+@@ -220,13 +230,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 = so_ext
+diff --git a/lib-python/2.7/distutils/sysconfig_pypy.py b/lib-python/2.7/distutils/sysconfig_pypy.py
+index ec9f5a3..192974d 100644
+--- a/lib-python/2.7/distutils/sysconfig_pypy.py
++++ b/lib-python/2.7/distutils/sysconfig_pypy.py
+@@ -67,6 +67,7 @@ def _init_posix():
+ g['CFLAGS'] = "-DNDEBUG -O2"
+ g['CCSHARED'] = "-fPIC"
+ g['LDSHARED'] = "cc -pthread -shared"
++ g['LDCXXSHARED'] = "c++ -pthread -shared"
+ g['SO'] = [s[0] for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION][0]
+ g['AR'] = "ar"
+ g['ARFLAGS'] = "rc"
+@@ -85,6 +86,7 @@ def _init_posix():
+ # just a guess
+ arch = platform.machine()
+ g['LDSHARED'] += ' -undefined dynamic_lookup'
++ g['LDCXXSHARED'] += ' -undefined dynamic_lookup'
+ g['CC'] += ' -arch %s' % (arch,)
+ g['MACOSX_DEPLOYMENT_TARGET'] = '10.7'
+
+@@ -183,37 +185,52 @@ def customize_compiler(compiler):
+ _osx_support.customize_compiler(_config_vars)
+ _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
+
+- (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
+- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
+- 'CCSHARED', 'LDSHARED', 'SO', 'AR',
+- 'ARFLAGS')
++ (cc, cxx, ccshared, ldshared, ldcxxshared, so_ext, ar, ar_flags) = \
++ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
++ 'SO', 'AR', 'ARFLAGS')
++
++ cflags = ''
++ cxxflags = ''
+
+ if 'CC' in os.environ:
+ newcc = os.environ['CC']
+- if (sys.platform == 'darwin'
++ if (True
+ and 'LDSHARED' not in os.environ
+ and ldshared.startswith(cc)):
+ # On OS X, if CC is overridden, use that as the default
+ # command for LDSHARED as well
++ # Gentoo: s/OS X/every system/
+ ldshared = newcc + ldshared[len(cc):]
+ cc = newcc
+ if 'CXX' in os.environ:
+- cxx = os.environ['CXX']
++ newcxx = os.environ['CXX']
++ if ('LDCXXSHARED' not in os.environ
++ and ldcxxshared.startswith(cxx)):
++ ldcxxshared = newcxx + ldcxxshared[len(cxx):]
++ cxx = newcxx
+ 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:
+@@ -222,13 +239,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 = so_ext
+diff --git a/lib-python/2.7/distutils/unixccompiler.py b/lib-python/2.7/distutils/unixccompiler.py
+index 250ff12..7e64543 100644
+--- a/lib-python/2.7/distutils/unixccompiler.py
++++ b/lib-python/2.7/distutils/unixccompiler.py
+@@ -55,14 +55,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":
+@@ -129,12 +132,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, msg:
+ raise CompileError, msg
+
+@@ -191,23 +201,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 = 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.29.2
+
diff --git a/dev-python/pypy/pypy-7.3.3.ebuild b/dev-python/pypy/pypy-7.3.3.ebuild
new file mode 100644
index 000000000000..dfe53d9ae357
--- /dev/null
+++ b/dev-python/pypy/pypy-7.3.3.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit pax-utils python-utils-r1
+
+MY_P=pypy2.7-v${PV/_/}
+# note: remember to update this to newest dev-lang/python:2.7 on bump
+PATCHSET="python-gentoo-patches-2.7.18-r1"
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python language"
+HOMEPAGE="https://pypy.org/"
+SRC_URI="https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2
+ https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz"
+S="${WORKDIR}/${MY_P}-src"
+
+LICENSE="MIT"
+# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")'
+SLOT="0/73"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 gdbm +jit libressl ncurses sqlite tk"
+
+RDEPEND="
+ || (
+ dev-python/pypy-exe:${PV}[bzip2?,ncurses?]
+ dev-python/pypy-exe-bin:${PV}
+ )
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ gdbm? ( sys-libs/gdbm:0= )
+ sqlite? ( dev-db/sqlite:3= )
+ tk? (
+ dev-lang/tk:0=
+ dev-tcltk/tix:0=
+ )
+ !<dev-python/pypy-bin-7.3.0:0"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ eapply "${FILESDIR}/7.3.1-gentoo-path.patch"
+ eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
+ eapply "${FILESDIR}/7.3.3-distutils-cxx.patch"
+
+ sed -e "s^@EPREFIX@^${EPREFIX}^" \
+ -i lib-python/2.7/distutils/command/install.py || die
+
+ # apply CPython stdlib patches
+ pushd lib-python/2.7 > /dev/null || die
+ # TODO: cpy turkish locale patch now fixes C code
+ # probably needs better port to pypy, if it is broken there
+ eapply -p2 "${WORKDIR}/${PATCHSET}"/0010-use_pyxml.patch
+ popd > /dev/null || die
+
+ # this test relies on pypy-c hardcoding correct build time paths
+ sed -i -e 's:test_executable_without_cwd:_&:' \
+ lib-python/2.7/test/test_subprocess.py || die
+ # requires Internet
+ sed -i -e '/class NetworkedTests/i@unittest.skip("Requires networking")' \
+ lib-python/2.7/test/test_ssl.py || die
+
+ eapply_user
+}
+
+src_compile() {
+ # copy over to make sys.prefix happy
+ cp -p "${BROOT}"/usr/lib/pypy2.7/pypy-c-${PV} pypy-c || die
+ cp -p "${BROOT}"/usr/lib/pypy2.7/include/${PV}/* include/ || die
+ # (not installed by pypy)
+ rm pypy/module/cpyext/include/_numpypy/numpy/README || die
+ mv pypy/module/cpyext/include/* include/ || die
+ mv pypy/module/cpyext/parse/*.h include/ || die
+ pax-mark m pypy-c
+
+ einfo "Generating caches and CFFI modules ..."
+
+ # Generate Grammar and PatternGrammar pickles.
+ ./pypy-c -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 = {
+# "_ssl": "_ssl_build.py",
+# "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,
+ cffi_targets=( ssl audioop syslog pwdgrp resource )
+ use gdbm && cffi_targets+=( gdbm )
+ use ncurses && cffi_targets+=( curses )
+ 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 lib_pypy || die
+ for t in "${cffi_targets[@]}"; do
+ # tkinter doesn't work via -m
+ ../pypy-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
+ done
+
+ # Cleanup temporary objects
+ find -name "_cffi_*.[co]" -delete || die
+ find -type d -empty -delete || die
+}
+
+src_test() {
+ # (unset)
+ local -x PYTHONDONTWRITEBYTECODE=
+ local -x COLUMNS=80
+
+ local ignored_tests=(
+ # network
+ --ignore=lib-python/2.7/test/test_urllibnet.py
+ --ignore=lib-python/2.7/test/test_urllib2net.py
+ # lots of free space
+ --ignore=lib-python/2.7/test/test_zipfile64.py
+ )
+
+ ./pypy-c ./pypy/test_all.py --pypy=./pypy-c -vv \
+ "${ignored_tests[@]}" lib-python || die
+}
+
+src_install() {
+ local dest=/usr/lib/pypy2.7
+ einfo "Installing PyPy ..."
+ dosym pypy-c-${PV} "${dest}/pypy-c"
+ insinto "${dest}"
+ # preserve mtimes to avoid obsoleting caches
+ insopts -p
+ doins -r include lib_pypy lib-python
+
+ # replace copied headers with symlinks
+ for x in "${BROOT}"/usr/lib/pypy2.7/include/${PV}/*; do
+ dosym "${PV}/${x##*/}" "${dest}/include/${x##*/}"
+ done
+
+ dosym ../lib/pypy2.7/pypy-c /usr/bin/pypy
+ dodoc README.rst
+
+ if ! use gdbm; then
+ rm -r "${ED}${dest}"/lib_pypy/gdbm.py \
+ "${ED}${dest}"/lib-python/*2.7/test/test_gdbm.py || die
+ fi
+ if ! use sqlite; then
+ rm -r "${ED}${dest}"/lib-python/*2.7/sqlite3 \
+ "${ED}${dest}"/lib_pypy/_sqlite3.py \
+ "${ED}${dest}"/lib-python/*2.7/test/test_sqlite.py || die
+ fi
+ if ! use tk; then
+ rm -r "${ED}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \
+ "${ED}${dest}"/lib_pypy/_tkinter \
+ "${ED}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die
+ fi
+
+ local -x EPYTHON=pypy
+ local -x PYTHON=${ED}${dest}/pypy-c-${PV}
+ # temporarily copy to build tree to facilitate module builds
+ cp -p "${BROOT}${dest}/pypy-c-${PV}" "${PYTHON}" || die
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_moduleinto /usr/lib/pypy2.7/site-packages
+ python_domodule epython.py
+
+ einfo "Byte-compiling Python standard library..."
+ python_optimize "${ED}${dest}"
+
+ # remove to avoid collisions
+ rm "${PYTHON}" || die
+}
diff --git a/dev-python/pypy/pypy-7.3.3_rc1.ebuild b/dev-python/pypy/pypy-7.3.3_rc1.ebuild
new file mode 100644
index 000000000000..74c92f4c6828
--- /dev/null
+++ b/dev-python/pypy/pypy-7.3.3_rc1.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit pax-utils python-utils-r1
+
+MY_P=pypy2.7-v${PV/_/}
+# note: remember to update this to newest dev-lang/python:2.7 on bump
+PATCHSET="python-gentoo-patches-2.7.18-r1"
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python language"
+HOMEPAGE="https://pypy.org/"
+SRC_URI="https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2
+ https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz"
+S="${WORKDIR}/${MY_P}-src"
+
+LICENSE="MIT"
+# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")'
+SLOT="0/73"
+KEYWORDS=""
+IUSE="bzip2 gdbm +jit libressl ncurses sqlite tk"
+
+RDEPEND="
+ || (
+ dev-python/pypy-exe:${PV}[bzip2?,ncurses?]
+ dev-python/pypy-exe-bin:${PV}
+ )
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ gdbm? ( sys-libs/gdbm:0= )
+ sqlite? ( dev-db/sqlite:3= )
+ tk? (
+ dev-lang/tk:0=
+ dev-tcltk/tix:0=
+ )
+ !<dev-python/pypy-bin-7.3.0:0"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ eapply "${FILESDIR}/7.3.1-gentoo-path.patch"
+ eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
+ eapply "${FILESDIR}/7.3.3-distutils-cxx.patch"
+
+ sed -e "s^@EPREFIX@^${EPREFIX}^" \
+ -i lib-python/2.7/distutils/command/install.py || die
+
+ # apply CPython stdlib patches
+ pushd lib-python/2.7 > /dev/null || die
+ # TODO: cpy turkish locale patch now fixes C code
+ # probably needs better port to pypy, if it is broken there
+ eapply -p2 "${WORKDIR}/${PATCHSET}"/0010-use_pyxml.patch
+ popd > /dev/null || die
+
+ # this test relies on pypy-c hardcoding correct build time paths
+ sed -i -e 's:test_executable_without_cwd:_&:' \
+ lib-python/2.7/test/test_subprocess.py || die
+ # requires Internet
+ sed -i -e '/class NetworkedTests/i@unittest.skip("Requires networking")' \
+ lib-python/2.7/test/test_ssl.py || die
+
+ eapply_user
+}
+
+src_compile() {
+ # copy over to make sys.prefix happy
+ cp -p "${BROOT}"/usr/lib/pypy2.7/pypy-c-${PV} pypy-c || die
+ cp -p "${BROOT}"/usr/lib/pypy2.7/include/${PV}/* include/ || die
+ # (not installed by pypy)
+ rm pypy/module/cpyext/include/_numpypy/numpy/README || die
+ mv pypy/module/cpyext/include/* include/ || die
+ mv pypy/module/cpyext/parse/*.h include/ || die
+ pax-mark m pypy-c
+
+ einfo "Generating caches and CFFI modules ..."
+
+ # Generate Grammar and PatternGrammar pickles.
+ ./pypy-c -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 = {
+# "_ssl": "_ssl_build.py",
+# "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,
+ cffi_targets=( ssl audioop syslog pwdgrp resource )
+ use gdbm && cffi_targets+=( gdbm )
+ use ncurses && cffi_targets+=( curses )
+ 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 lib_pypy || die
+ for t in "${cffi_targets[@]}"; do
+ # tkinter doesn't work via -m
+ ../pypy-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
+ done
+
+ # Cleanup temporary objects
+ find -name "_cffi_*.[co]" -delete || die
+ find -type d -empty -delete || die
+}
+
+src_test() {
+ # (unset)
+ local -x PYTHONDONTWRITEBYTECODE=
+ local -x COLUMNS=80
+
+ local ignored_tests=(
+ # network
+ --ignore=lib-python/2.7/test/test_urllibnet.py
+ --ignore=lib-python/2.7/test/test_urllib2net.py
+ # lots of free space
+ --ignore=lib-python/2.7/test/test_zipfile64.py
+ )
+
+ ./pypy-c ./pypy/test_all.py --pypy=./pypy-c -vv \
+ "${ignored_tests[@]}" lib-python || die
+}
+
+src_install() {
+ local dest=/usr/lib/pypy2.7
+ einfo "Installing PyPy ..."
+ dosym pypy-c-${PV} "${dest}/pypy-c"
+ insinto "${dest}"
+ # preserve mtimes to avoid obsoleting caches
+ insopts -p
+ doins -r include lib_pypy lib-python
+
+ # replace copied headers with symlinks
+ for x in "${BROOT}"/usr/lib/pypy2.7/include/${PV}/*; do
+ dosym "${PV}/${x##*/}" "${dest}/include/${x##*/}"
+ done
+
+ dosym ../lib/pypy2.7/pypy-c /usr/bin/pypy
+ dodoc README.rst
+
+ if ! use gdbm; then
+ rm -r "${ED}${dest}"/lib_pypy/gdbm.py \
+ "${ED}${dest}"/lib-python/*2.7/test/test_gdbm.py || die
+ fi
+ if ! use sqlite; then
+ rm -r "${ED}${dest}"/lib-python/*2.7/sqlite3 \
+ "${ED}${dest}"/lib_pypy/_sqlite3.py \
+ "${ED}${dest}"/lib-python/*2.7/test/test_sqlite.py || die
+ fi
+ if ! use tk; then
+ rm -r "${ED}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \
+ "${ED}${dest}"/lib_pypy/_tkinter \
+ "${ED}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die
+ fi
+
+ local -x EPYTHON=pypy
+ local -x PYTHON=${ED}${dest}/pypy-c-${PV}
+ # temporarily copy to build tree to facilitate module builds
+ cp -p "${BROOT}${dest}/pypy-c-${PV}" "${PYTHON}" || die
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_moduleinto /usr/lib/pypy2.7/site-packages
+ python_domodule epython.py
+
+ einfo "Byte-compiling Python standard library..."
+ python_optimize "${ED}${dest}"
+
+ # remove to avoid collisions
+ rm "${PYTHON}" || die
+}