public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3-bin/, dev-python/pypy3-bin/files/
@ 2016-02-06 22:45 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2016-02-06 22:45 UTC (permalink / raw
  To: gentoo-commits

commit:     1ef1c999e139a2cdf6de4cd905234b191a101b9a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  6 22:03:47 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Feb  6 22:45:07 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ef1c999

dev-python/pypy3-bin: Fix ncurses-6 compat, #564454

 dev-python/pypy3-bin/files/2.4.0-ncurses6.patch |  34 +++++
 dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild  | 177 ++++++++++++++++++++++++
 2 files changed, 211 insertions(+)

diff --git a/dev-python/pypy3-bin/files/2.4.0-ncurses6.patch b/dev-python/pypy3-bin/files/2.4.0-ncurses6.patch
new file mode 100644
index 0000000..63a450f
--- /dev/null
+++ b/dev-python/pypy3-bin/files/2.4.0-ncurses6.patch
@@ -0,0 +1,34 @@
+Patch by Vadim A. Misbakh-Soloviov (mva)
+https://bugs.gentoo.org/show_bug.cgi?id=564454
+
+--- lib_pypy/_curses.py.old     2016-01-18 19:13:00.241886442 +0000
++++ lib_pypy/_curses.py 2016-01-18 19:26:01.061885605 +0000
+@@ -1,6 +1,7 @@
+ """Reimplementation of the standard extension module '_curses' using cffi."""
+
+ import sys
++import platform
+ if sys.platform == 'win32':
+     #This module does not exist in windows
+     raise ImportError('No module named _curses')
+@@ -10,12 +11,18 @@
+
+ ffi = FFI()
+
++# Monkeypatch to make it build against ncurses-6.
++# Inspired by https://goo.gl/xvjQcd
++_type = "uint32_t"
++if platform.machine() == "x86_64":
++    _type = "unsigned"
++
+ ffi.cdef("""
+ typedef ... WINDOW;
+ typedef ... SCREEN;
+-typedef unsigned long mmask_t;
++typedef """+_type+""" mmask_t;
+ typedef unsigned char bool;
+-typedef unsigned long chtype;
++typedef """+_type+""" chtype;
+ typedef chtype attr_t;
+
+ typedef struct

diff --git a/dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild b/dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild
new file mode 100644
index 0000000..aa19868
--- /dev/null
+++ b/dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2015 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 versionator
+
+BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}"
+
+DESCRIPTION="A fast, compliant alternative implementation of Python 3 (binary package)"
+HOMEPAGE="http://pypy.org/"
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/pypy3-${PV}-src.tar.bz2
+	amd64? (
+		jit? ( shadowstack? (
+			${BINHOST}/${P}-amd64+bzip2+jit+ncurses+shadowstack.tar.xz
+		) )
+		jit? ( !shadowstack? (
+			${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.xz
+		) )
+		!jit? ( !shadowstack? (
+			${BINHOST}/${P}-amd64+bzip2+ncurses.tar.xz
+		) )
+	)
+	x86? (
+		cpu_flags_x86_sse2? (
+			jit? ( shadowstack? (
+				${BINHOST}/${P}-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.xz
+			) )
+			jit? ( !shadowstack? (
+				${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.xz
+			) )
+			!jit? ( !shadowstack? (
+				${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.xz
+			) )
+		)
+		!cpu_flags_x86_sse2? (
+			!jit? ( !shadowstack? (
+				${BINHOST}/${P}-x86+bzip2+ncurses.tar.xz
+			) )
+		)
+	)"
+
+# 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="app-arch/xz-utils
+	test? ( ${RDEPEND}
+		${PYTHON_DEPS} )"
+#	doc? ( ${PYTHON_DEPS}
+#		dev-python/sphinx )
+PDEPEND="app-admin/python-updater"
+
+S=${WORKDIR}/pypy3-${PV}-src
+
+src_prepare() {
+	epatch "${FILESDIR}/1.9-scripts-location.patch" \
+		"${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" \
+		"${FILESDIR}/2.4.0-ncurses6.patch"
+
+	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
+
+	# ctypes config cache
+	# this one we need to do with python2 too...
+	"${PYTHON}" lib_pypy/ctypes_config_cache/rebuild.py \
+		|| die "Failed to rebuild ctypes config cache"
+}
+
+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() {
+	einfo "Installing PyPy ..."
+	insinto "/usr/$(get_libdir)/pypy3"
+	doins -r include lib_pypy lib-python pypy-c libpypy-c.so
+	fperms a+x ${INSDESTTREE}/pypy-c ${INSDESTTREE}/libpypy-c.so
+	pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" "${ED%/}${INSDESTTREE}/libpypy-c.so"
+	dosym ../$(get_libdir)/pypy3/pypy-c /usr/bin/pypy3
+	dodoc README.rst
+
+	if ! use gdbm; then
+		rm -r "${ED%/}${INSDESTTREE}"/lib_pypy/gdbm.py \
+			"${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_gdbm.py || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/sqlite3 \
+			"${ED%/}${INSDESTTREE}"/lib_pypy/_sqlite3.py \
+			"${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_sqlite.py || die
+	fi
+	if ! use tk; then
+		rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/{idlelib,tkinter} \
+			"${ED%/}${INSDESTTREE}"/lib_pypy/_tkinter \
+			"${ED%/}${INSDESTTREE}"/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%/}${INSDESTTREE}/pypy-c
+	local -x LD_LIBRARY_PATH="${ED%/}${INSDESTTREE}"
+	# 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 cache
+	# Please keep in sync with pypy/tool/release/package.py!
+	"${PYTHON}" -c "import _curses" || die "Failed to import _curses (cffi)"
+	"${PYTHON}" -c "import syslog" || die "Failed to import syslog (cffi)"
+	if use gdbm; then
+		"${PYTHON}" -c "import _gdbm" || die "Failed to import gdbm (cffi)"
+	fi
+	if use sqlite; then
+		"${PYTHON}" -c "import _sqlite3" || die "Failed to import _sqlite3 (cffi)"
+	fi
+	if use tk; then
+		"${PYTHON}" -c "import _tkinter" || die "Failed to import _tkinter (cffi)"
+	fi
+
+	# Cleanup temporary objects
+	find "${ED%/}${INSDESTTREE}" -name "_cffi_*.[co]" -delete || die
+	find "${ED%/}${INSDESTTREE}" -type d -empty -delete || die
+
+	# compile the installed modules
+	python_optimize "${ED%/}${INSDESTTREE}"
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3-bin/, dev-python/pypy3-bin/files/
@ 2016-02-06 22:45 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2016-02-06 22:45 UTC (permalink / raw
  To: gentoo-commits

commit:     44b2bf1075d2cd868887f1e1aa6ac13bc070ab77
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  6 22:38:39 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Feb  6 22:45:07 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44b2bf10

dev-python/pypy3-bin: Copy Gentoo path fixes from dev-python/pypy

 dev-python/pypy3-bin/files/4.0.0-gentoo-path.patch | 50 ++++++++++++++++++++++
 dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild     |  2 +-
 2 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/dev-python/pypy3-bin/files/4.0.0-gentoo-path.patch b/dev-python/pypy3-bin/files/4.0.0-gentoo-path.patch
new file mode 100644
index 0000000..cf96d3f
--- /dev/null
+++ b/dev-python/pypy3-bin/files/4.0.0-gentoo-path.patch
@@ -0,0 +1,50 @@
+From 165e05bbdc93e54411217c0198d0a5cbb9de4e33 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 27 Nov 2015 17:02:42 +0100
+Subject: [PATCH] Gentoo: override paths for system-wide install based on
+ sys.prefix
+
+Override all default distutils install paths to ones suitable for
+system-wide install when sys.prefix indicates we're running the Gentoo
+system-wide install of PyPy with no prefix overrides (e.g. virtualenv).
+
+Fixes: https://bugs.gentoo.org/462306
+Fixes: https://bugs.gentoo.org/465546
+---
+ lib-python/3/distutils/command/install.py | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/lib-python/3/distutils/command/install.py b/lib-python/3/distutils/command/install.py
+index fc43951..fed5218 100644
+--- a/lib-python/3/distutils/command/install.py
++++ b/lib-python/3/distutils/command/install.py
+@@ -90,6 +90,13 @@ INSTALL_SCHEMES = {
+         'scripts': '$base/bin',
+         'data'   : '$base',
+         },
++    'gentoo': {
++        'purelib': '$base/site-packages',
++        'platlib': '$base/site-packages',
++        'headers': '$base/include',
++        'scripts': '@EPREFIX@/usr/bin',
++        'data'   : '@EPREFIX@/usr',
++        },
+     }
+ 
+ # The keys to an installation scheme; if any new types of files are to be
+@@ -476,7 +483,11 @@ class install (Command):
+         # it's the caller's problem if they supply a bad name!
+         if (hasattr(sys, 'pypy_version_info') and
+             not name.endswith(('_user', '_home'))):
+-            name = 'pypy'
++            if self.install_base == os.path.normpath('@EPREFIX@/usr/@libdir@/pypy3'):
++                # override paths for system-wide install
++                name = 'gentoo'
++            else:
++                name = 'pypy'
+         scheme = INSTALL_SCHEMES[name]
+         for key in SCHEME_KEYS:
+             attrname = 'install_' + key
+-- 
+2.6.3
+

diff --git a/dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild b/dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild
index aa19868..fd93b92 100644
--- a/dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild
+++ b/dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild
@@ -78,7 +78,7 @@ PDEPEND="app-admin/python-updater"
 S=${WORKDIR}/pypy3-${PV}-src
 
 src_prepare() {
-	epatch "${FILESDIR}/1.9-scripts-location.patch" \
+	epatch "${FILESDIR}/4.0.0-gentoo-path.patch" \
 		"${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" \
 		"${FILESDIR}/2.4.0-ncurses6.patch"
 


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3-bin/, dev-python/pypy3-bin/files/
@ 2016-03-03 10:47 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2016-03-03 10:47 UTC (permalink / raw
  To: gentoo-commits

commit:     a85aadd9f207634b86ae7aac4c99b698c9f772e0
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  3 09:51:14 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Mar  3 10:47:37 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a85aadd9

dev-python/pypy3-bin: Copy patches from dev-python/pypy3

 .../files/2.4.0-21_all_distutils_c++.patch         | 251 +++++++++++++++++++++
 .../pypy3-bin/files/pypy3-2.4.0-libressl.patch     | 187 +++++++++++++++
 dev-python/pypy3-bin/pypy3-bin-2.4.0-r4.ebuild     |  13 +-
 3 files changed, 448 insertions(+), 3 deletions(-)

diff --git a/dev-python/pypy3-bin/files/2.4.0-21_all_distutils_c++.patch b/dev-python/pypy3-bin/files/2.4.0-21_all_distutils_c++.patch
new file mode 100644
index 0000000..90525d5
--- /dev/null
+++ b/dev-python/pypy3-bin/files/2.4.0-21_all_distutils_c++.patch
@@ -0,0 +1,251 @@
+http://bugs.python.org/issue1222585
+
+--- Lib/distutils/cygwinccompiler.py
++++ Lib/distutils/cygwinccompiler.py
+@@ -136,9 +136,13 @@
+         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, shared_option)))
+ 
+         # cygwin and mingw32 need different sets of libraries
+         if self.gcc_version == "2.91.57":
+@@ -162,8 +166,12 @@
+                 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)
+ 
+@@ -294,10 +302,15 @@
+         self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
+                              compiler_so='gcc -mno-cygwin -mdll -O -Wall',
+                              compiler_cxx='g++ -mno-cygwin -O -Wall',
++                             compiler_so_cxx='g++ -mno-cygwin -mdll -O -Wall',
+                              linker_exe='gcc -mno-cygwin',
+                              linker_so='%s -mno-cygwin %s %s'
+                                         % (self.linker_dll, shared_option,
+-                                           entry_point))
++                                           entry_point),
++                             linker_exe_cxx='g++ -mno-cygwin',
++                             linker_so_cxx='%s -mno-cygwin %s %s'
++                                            % (self.linker_dll, shared_option,
++                                               entry_point))
+         # Maybe we should also append -mthreads, but then the finished
+         # dlls need another dll (mingwm10.dll see Mingw32 docs)
+         # (-mthreads: Support thread-safe exception handling on `Mingw32')
+--- Lib/distutils/emxccompiler.py
++++ Lib/distutils/emxccompiler.py
+@@ -63,8 +63,12 @@
+         # 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 @@
+                 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)
+ 
+--- Lib/distutils/sysconfig_cpython.py
++++ Lib/distutils/sysconfig_cpython.py
+@@ -170,9 +170,12 @@
+                 _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 = ''
+ 
+         newcc = None
+         if 'CC' in os.environ:
+@@ -181,19 +184,27 @@
+             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:
+@@ -202,13 +213,17 @@
+             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
+--- Lib/distutils/unixccompiler.py
++++ Lib/distutils/unixccompiler.py
+@@ -52,14 +52,17 @@
+     # 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' : ["cc"],
+-                   '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":
+@@ -108,12 +111,19 @@
+ 
+     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)
+ 
+@@ -171,22 +181,16 @@
+                 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)
+--- Lib/_osx_support.py
++++ Lib/_osx_support.py
+@@ -14,13 +14,13 @@
+ # 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/dev-python/pypy3-bin/files/pypy3-2.4.0-libressl.patch b/dev-python/pypy3-bin/files/pypy3-2.4.0-libressl.patch
new file mode 100644
index 0000000..5852939
--- /dev/null
+++ b/dev-python/pypy3-bin/files/pypy3-2.4.0-libressl.patch
@@ -0,0 +1,187 @@
+From 66bef80988c9efe60b61c6bc05f3206b4c3df7e8 Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Mon, 12 Oct 2015 20:43:50 +0200
+Subject: [PATCH] Add LibreSSL support, patches backported from upstream
+
+https://bitbucket.org/pypy/pypy/pull-requests/333/deal-with-platforms-without-rand_egd-take/diff
+---
+ pypy/module/_ssl/interp_ssl.py                 | 34 +++++++++++++++-----------
+ pypy/module/_ssl/test/test_ssl.py              |  8 +++---
+ rpython/rlib/ropenssl.py                       |  6 ++++-
+ rpython/rtyper/tool/rffi_platform.py           | 12 ++++++---
+ rpython/rtyper/tool/test/test_rffi_platform.py | 24 +++++++++++++++++-
+ 5 files changed, 61 insertions(+), 23 deletions(-)
+
+diff --git a/pypy/module/_ssl/interp_ssl.py b/pypy/module/_ssl/interp_ssl.py
+index 0cac165..f210167 100644
+--- a/pypy/module/_ssl/interp_ssl.py
++++ b/pypy/module/_ssl/interp_ssl.py
+@@ -310,20 +310,26 @@ if HAVE_OPENSSL_RAND:
+         res = libssl_RAND_status()
+         return space.wrap(res)
+ 
+-    @unwrap_spec(path=str)
+-    def RAND_egd(space, path):
+-        """RAND_egd(path) -> bytes
+-
+-        Queries the entropy gather daemon (EGD) on socket path.  Returns number
+-        of bytes read.  Raises socket.sslerror if connection to EGD fails or
+-        if it does provide enough data to seed PRNG."""
+-        with rffi.scoped_str2charp(path) as socket_path:
+-            bytes = libssl_RAND_egd(socket_path)
+-        if bytes == -1:
+-            raise ssl_error(space,
+-                            "EGD connection failed or EGD did not return "
+-                            "enough data to seed the PRNG")
+-        return space.wrap(bytes)
++    if HAVE_OPENSSL_RAND_EGD:
++        @unwrap_spec(path=str)
++        def RAND_egd(space, path):
++            """RAND_egd(path) -> bytes
++
++            Queries the entropy gather daemon (EGD) on socket path.  Returns number
++            of bytes read.  Raises socket.sslerror if connection to EGD fails or
++            if it does provide enough data to seed PRNG."""
++            with rffi.scoped_str2charp(path) as socket_path:
++                bytes = libssl_RAND_egd(socket_path)
++            if bytes == -1:
++                raise ssl_error(space,
++                                "EGD connection failed or EGD did not return "
++                                "enough data to seed the PRNG")
++            return space.wrap(bytes)
++    else:
++        # Dummy func for platforms missing RAND_egd(). Most likely LibreSSL.
++        @unwrap_spec(path=str)
++        def RAND_egd(space, path):
++            raise ssl_error(space, "RAND_egd unavailable")
+ 
+ 
+ class SSLSocket(W_Root):
+diff --git a/pypy/module/_ssl/test/test_ssl.py b/pypy/module/_ssl/test/test_ssl.py
+index 3204610..9722fd5 100644
+--- a/pypy/module/_ssl/test/test_ssl.py
++++ b/pypy/module/_ssl/test/test_ssl.py
+@@ -33,7 +33,8 @@ class AppTestSSL:
+         assert isinstance(_ssl.OPENSSL_VERSION_INFO, tuple)
+         assert len(_ssl.OPENSSL_VERSION_INFO) == 5
+         assert isinstance(_ssl.OPENSSL_VERSION, str)
+-        assert 'openssl' in _ssl.OPENSSL_VERSION.lower()
++        lower_version = _ssl.OPENSSL_VERSION.lower()
++        assert 'openssl' in lower_version or "libressl" in lower_version
+ 
+     def test_RAND_add(self):
+         import _ssl
+@@ -64,8 +65,9 @@ class AppTestSSL:
+ 
+     def test_sslwrap(self):
+         import ssl, _socket, sys, gc
+-        if sys.platform == 'darwin' or 'freebsd' in sys.platform:
+-            skip("hangs indefinitely on OSX & FreeBSD (also on CPython)")
++        if sys.platform == 'darwin' or 'freebsd' in sys.platform or \
++                'openbsd' in sys.platform:
++            skip("hangs indefinitely on OSX & BSD (also on CPython)")
+         s = _socket.socket()
+         ss = ssl.wrap_socket(s)
+ 
+diff --git a/rpython/rlib/ropenssl.py b/rpython/rlib/ropenssl.py
+index c36779d..6fe45d0 100644
+--- a/rpython/rlib/ropenssl.py
++++ b/rpython/rlib/ropenssl.py
+@@ -168,6 +168,9 @@ OBJ_NAME = rffi.CArrayPtr(OBJ_NAME_st)
+ 
+ HAVE_OPENSSL_RAND = OPENSSL_VERSION_NUMBER >= 0x0090500f
+ HAVE_SSL_CTX_CLEAR_OPTIONS = OPENSSL_VERSION_NUMBER >= 0x009080df
++HAVE_OPENSSL_RAND_EGD = rffi_platform.has('RAND_egd("/")',
++                                          '#include <openssl/rand.h>',
++                                          libraries=['ssl', 'crypto'])
+ 
+ def external(name, argtypes, restype, **kw):
+     kw['compilation_info'] = eci
+@@ -194,7 +197,8 @@ ssl_external('CRYPTO_set_id_callback',
+ if HAVE_OPENSSL_RAND:
+     ssl_external('RAND_add', [rffi.CCHARP, rffi.INT, rffi.DOUBLE], lltype.Void)
+     ssl_external('RAND_status', [], rffi.INT)
+-    ssl_external('RAND_egd', [rffi.CCHARP], rffi.INT)
++    if HAVE_OPENSSL_RAND_EGD:
++        ssl_external('RAND_egd', [rffi.CCHARP], rffi.INT)
+ ssl_external('SSL_CTX_new', [SSL_METHOD], SSL_CTX)
+ ssl_external('SSL_get_SSL_CTX', [SSL], SSL_CTX)
+ ssl_external('TLSv1_method', [], SSL_METHOD)
+diff --git a/rpython/rtyper/tool/rffi_platform.py b/rpython/rtyper/tool/rffi_platform.py
+index 1760877..1d56c20 100755
+--- a/rpython/rtyper/tool/rffi_platform.py
++++ b/rpython/rtyper/tool/rffi_platform.py
+@@ -17,12 +17,15 @@ from rpython.rlib.rarithmetic import r_uint, r_longlong, r_ulonglong, intmask
+ #
+ # Helpers for simple cases
+ 
+-def eci_from_header(c_header_source, include_dirs=None):
++def eci_from_header(c_header_source, include_dirs=None, libraries=None):
+     if include_dirs is None:
+         include_dirs = []
++    if libraries is None:
++        libraries = []
+     return ExternalCompilationInfo(
+         post_include_bits=[c_header_source],
+-        include_dirs=include_dirs
++        include_dirs=include_dirs,
++        libraries=libraries,
+     )
+ 
+ def getstruct(name, c_header_source, interesting_fields):
+@@ -75,9 +78,10 @@ def getintegerfunctionresult(function, args=None, c_header_source='', includes=[
+         CConfig._compilation_info_.includes = includes
+     return configure(CConfig)['RESULT']
+ 
+-def has(name, c_header_source, include_dirs=None):
++def has(name, c_header_source, include_dirs=None, libraries=None):
+     class CConfig:
+-        _compilation_info_ = eci_from_header(c_header_source, include_dirs)
++        _compilation_info_ = \
++            eci_from_header(c_header_source, include_dirs, libraries)
+         HAS = Has(name)
+     return configure(CConfig)['HAS']
+ 
+diff --git a/rpython/rtyper/tool/test/test_rffi_platform.py b/rpython/rtyper/tool/test/test_rffi_platform.py
+index bfa069e..4feae87 100644
+--- a/rpython/rtyper/tool/test/test_rffi_platform.py
++++ b/rpython/rtyper/tool/test/test_rffi_platform.py
+@@ -271,12 +271,34 @@ def test_array():
+                                        [("d_name", lltype.FixedSizeArray(rffi.CHAR, 1))])
+     assert dirent.c_d_name.length == 32
+ 
+-def test_has():
++def test_has_0001():
+     assert rffi_platform.has("x", "int x = 3;")
+     assert not rffi_platform.has("x", "")
+     # has() should also not crash if it is given an invalid #include
+     assert not rffi_platform.has("x", "#include <some/path/which/cannot/exist>")
+ 
++def test_has_0002():
++    assert rffi_platform.has("pow", "#include <math.h>", libraries=["m"])
++
++def test_has_0003():
++    """multiple libraries"""
++    assert rffi_platform.has("pow", "#include <math.h>", libraries=["m", "c"])
++
++def test_has_0004():
++    """bogus symbol name"""
++    assert not rffi_platform.has("pow", "#include <math.h>",
++                                 libraries=["boguslibname"])
++
++def test_has_0005():
++    """bogus symbol name and lib name"""
++    assert not rffi_platform.has("bogus_symbol_name", "#include <math.h>",
++                                 libraries=["boguslibname"])
++
++def test_has_0006():
++    """missing include"""
++    assert not rffi_platform.has("pow", "", libraries=["m"])
++
++
+ def test_verify_eci():
+     eci = ExternalCompilationInfo()
+     rffi_platform.verify_eci(eci)
+-- 
+2.6.1
+

diff --git a/dev-python/pypy3-bin/pypy3-bin-2.4.0-r4.ebuild b/dev-python/pypy3-bin/pypy3-bin-2.4.0-r4.ebuild
index 2a4fa3e..adee3b6 100644
--- a/dev-python/pypy3-bin/pypy3-bin-2.4.0-r4.ebuild
+++ b/dev-python/pypy3-bin/pypy3-bin-2.4.0-r4.ebuild
@@ -82,14 +82,21 @@ QA_PREBUILT="
 	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" \
-		"${FILESDIR}/2.4.0-ncurses6.patch"
+	epatch \
+		"${FILESDIR}/4.0.0-gentoo-path.patch" \
+		"${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
+	epatch "${FILESDIR}/2.4.0-ncurses6.patch"
+	epatch "${FILESDIR}"/pypy3-2.4.0-libressl.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}"/2.4.0-21_all_distutils_c++.patch
+	popd > /dev/null || die
+
 	epatch_user
 }
 


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3-bin/, dev-python/pypy3-bin/files/
@ 2016-03-03 10:47 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2016-03-03 10:47 UTC (permalink / raw
  To: gentoo-commits

commit:     aa651b62c76002f94eb5b6c6bf03b7124bc3e97e
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  3 09:56:59 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Mar  3 10:47:37 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa651b62

dev-python/pypy3-bin: Drop old

 dev-python/pypy3-bin/Manifest                      |   7 -
 .../pypy3-bin/files/1.9-scripts-location.patch     |  11 --
 dev-python/pypy3-bin/pypy3-bin-2.4.0-r1.ebuild     | 176 --------------------
 dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild     | 177 ---------------------
 4 files changed, 371 deletions(-)

diff --git a/dev-python/pypy3-bin/Manifest b/dev-python/pypy3-bin/Manifest
index 52de5f0..6485ca5 100644
--- a/dev-python/pypy3-bin/Manifest
+++ b/dev-python/pypy3-bin/Manifest
@@ -1,7 +1,4 @@
 DIST pypy3-2.4.0-src.tar.bz2 14693194 SHA256 d9ba207d6eecf8a0dc4414e9f4e92db1abd143e8cc6ec4a6bdcac75b29f104f3 SHA512 7e2b0c21f1833b8cd61251c2d58c6a9f99207e5d582618f0036886ff28dcb313541dce1c36bd1b57b332a36a94b13e416bb7b67110be7c8ece8283749ba712be WHIRLPOOL bd02009c828b7b491b46b260d687d268561e5372766adccbcb58e87a3f1c545f293c54e5cdd6e6b7fb95feb678677137211ee890f106140ce1bc256f8563d2cd
-DIST pypy3-bin-2.4.0-amd64+bzip2+jit+ncurses+shadowstack.tar.xz 9687272 SHA256 8f03fc87ec796877e5a13111f509a5d1c06284bc31133d25c4c9cca6a82f7039 SHA512 ec5e3ef4f2f4b06c31df5ab9fc4a9f7a2a08f744a0128e6ab8215767d4fba7a3e35e319ff9d9a0de4d018ed35eed24809c82928972a860a220ea45f284087770 WHIRLPOOL 15ba1d18ae4fc5d0968fa5c6cadfcb8762b258d683c770530ac35067ca91210f8d825facd775602a9d2b578542a4b760a0a11a9b0a6d59f539d4e7043fcad734
-DIST pypy3-bin-2.4.0-amd64+bzip2+jit+ncurses.tar.xz 11047984 SHA256 558176dacd1e3222fb56b8c3226077288281ee2a131149fdbb2a54561d5bc7d9 SHA512 cde76c37bf9c043a4fde4a2d07a04366f3c906562e6ed640544ac0228b511729b481c6cd6b7b25b80c02a69cdd02707d427edcd8e46e41313b31161313c6c5fb WHIRLPOOL 9eb8dc5d3319bf2c09baae38ecaa23c1f7ee38b4ea20f72a9fde3f68004ac4f3cbe807ff93e6cba5318745a251d09d2f951cb5a86f04c41b2e05d151d1f6cd03
-DIST pypy3-bin-2.4.0-amd64+bzip2+ncurses.tar.xz 6281232 SHA256 326115bcd7ad2d659b69842182dee4fc2adb558f20a3e44ab4b803fa70c43a21 SHA512 f938aa797e352f80a99095a15bf83a758f0c203adc402cf92494f909ad870457a28ae14b5959880e55898c2ce92ce0b08b05e3d691133758bca52f524c8aad73 WHIRLPOOL b0aa4c24d645aa914aa439646b813dfcae14e6731af86d4348d24637bbdb7f88a26d3a63ff5262749ee654715eaf5312beb4879341d222aaedfcd3e81acd2426
 DIST pypy3-bin-2.4.0-nossl2-amd64+bzip2+jit+ncurses+shadowstack.tar.lz 9320887 SHA256 98a2a6f1ba738e8e39b272e757cfa4b90684be05b58f28e9d7766d2e3238bed2 SHA512 b9569c7d9f607ec89dfc2adadea86d485e99c2cc8a9bd2751fbf450b331a706acd8cab9b67730162f67a74ccb682ec23769556cfb3b028265a7e5b06e920bd07 WHIRLPOOL 450be6f24c7bd58fc801bb95ca08f1d5874c2df0a5e75e062847b25f7a11e1ed81dfbb1b38e9607882593f96a2d3171c7f59cb63fd039c3ebf542bee7a53d09d
 DIST pypy3-bin-2.4.0-nossl2-amd64+bzip2+jit+ncurses.tar.lz 10751255 SHA256 aca3afd551ab073d91c9d3d6e7bfffdbee2ccab0672d461b9abc0d3087d6ccab SHA512 85032e9418f03319dbf827fd68870d8c5d8f368f5b416ff9a96af48a1b3bcfd651a66c0d1c3372bf522c1d7433734d1d167e8fb037ca998f55c1ad4c13ed5a5d WHIRLPOOL 0eb02a3c4e7d6d5fbbdf239a68c067f87449a07a8a63a3a03858ada73fcf13a09a1b3f9f8402a173fd17baee4565de9f2b68038471527b8f43f14c4251af6432
 DIST pypy3-bin-2.4.0-nossl2-amd64+bzip2+ncurses.tar.lz 6188358 SHA256 2ee5d99218a02bac26a77327db3bcf754f36ed40ef0593567895ee2ad128bc04 SHA512 a07b3c3cdf16592af9ea76d8f70c053f6e75f3b92e10d019921dd8024161b8953477c3da7a5d82912f1f10f0ab4581e299215e7a5f50ee0ff923648e7a18d8cc WHIRLPOOL 75da4de6977382729d21881d7d66895871ad3e5f53a108bfad3c97d9f6db6dec6754f353e600436853d4d06586b350d4e47ccfa7ca25364c54b276fd629e5d5b
@@ -9,7 +6,3 @@ 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-2.4.0-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.xz 8159232 SHA256 65bb567693048894d13c7ffecda126a222ebb641dc6c6e0a899197da8f0844d8 SHA512 734e42d6962b4411d9beab55013454dd27bd18c342ed334e07f85e217cd7d992cbaffb36ee3e74469662860f130d1065a381e49a6b8287fa83736ffe75cb8a5a WHIRLPOOL a5b7ed4a177dc5c1322e79551166d3be8e478e969b223db4fe6a2e9fddaf2e4c22633726a667e3deca19763f44edd4e3f4c20c477da5d7e26c88f21d4ce70544
-DIST pypy3-bin-2.4.0-x86+bzip2+jit+ncurses+sse2.tar.xz 9121216 SHA256 5f03284815a313065b99da0154a08831e3ae2c6e43c4ce515de1aff60c4537ad SHA512 f069ece90666385eb8aade97ad81c4c6c2480dee1bf3b1cb520c4fc1d123d17f7ef2cbf7ed25b72b24e56165c08ded671c8bce74ed2ea2f1b6e57ca9fdd214ae WHIRLPOOL 8cf368e0efa416d3cba06ea61bc97ed7ead0e25f5008c948d1bec8d0494fd9908d1e6640414ffe7c6b6260badef41da114370f2a5ef28a63234203a604e1be4e
-DIST pypy3-bin-2.4.0-x86+bzip2+ncurses+sse2.tar.xz 5366816 SHA256 bff57d563dbce1b4858d87161c2338e5ed6ed20008a8dc4fb78cbb9e320d1188 SHA512 afb395257b0259b096a9fdbae405ffb021950dfda39ddc490777662ab77d0573b5b51e6381241c09debbca0a706637dba39c8644c878e541b83d68a94fc9ad1e WHIRLPOOL a1e1079a68b03b65a0680c65080d6c6dc48e4a652dd634bfaa805a6117c67da84bcc65ee2fe6711a61ab86a905bd2a6993e0ac88547a807eca3722f70ca890fb
-DIST pypy3-bin-2.4.0-x86+bzip2+ncurses.tar.xz 5439032 SHA256 3bd4e476ff76da1f3c111a11abe0ef72683ba719934ede1252c32de6200beb25 SHA512 d11805b704baa51097261f0886bd160f9d1a3e220ceeeaa5741c3aaf9ee8437479b2f371889dbe2ad72f16559de86c1e71bfd17f45375071cafc535d7c30b3cc WHIRLPOOL 41ef35df997da9aca90be8442001b6807c1a8dd0a7d4e66c0c925dc74546db35e6d54a2bf292c8bca732427786019e7e5041d19e6169e2573a058f269a0332ce

diff --git a/dev-python/pypy3-bin/files/1.9-scripts-location.patch b/dev-python/pypy3-bin/files/1.9-scripts-location.patch
deleted file mode 100644
index 6ed1285..0000000
--- a/dev-python/pypy3-bin/files/1.9-scripts-location.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/lib-python/3/distutils/command/install.py
-+++ b/lib-python/3/distutils/command/install.py
-@@ -87,7 +87,7 @@
-         'purelib': '$base/site-packages',
-         'platlib': '$base/site-packages',
-         'headers': '$base/include',
--        'scripts': '$base/bin',
-+        'scripts': '/usr/bin',
-         'data'   : '$base',
-         },
-     }

diff --git a/dev-python/pypy3-bin/pypy3-bin-2.4.0-r1.ebuild b/dev-python/pypy3-bin/pypy3-bin-2.4.0-r1.ebuild
deleted file mode 100644
index 21b40bb..0000000
--- a/dev-python/pypy3-bin/pypy3-bin-2.4.0-r1.ebuild
+++ /dev/null
@@ -1,176 +0,0 @@
-# Copyright 1999-2015 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 versionator
-
-BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}"
-
-DESCRIPTION="A fast, compliant alternative implementation of Python 3 (binary package)"
-HOMEPAGE="http://pypy.org/"
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/pypy3-${PV}-src.tar.bz2
-	amd64? (
-		jit? ( shadowstack? (
-			${BINHOST}/${P}-amd64+bzip2+jit+ncurses+shadowstack.tar.xz
-		) )
-		jit? ( !shadowstack? (
-			${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.xz
-		) )
-		!jit? ( !shadowstack? (
-			${BINHOST}/${P}-amd64+bzip2+ncurses.tar.xz
-		) )
-	)
-	x86? (
-		cpu_flags_x86_sse2? (
-			jit? ( shadowstack? (
-				${BINHOST}/${P}-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.xz
-			) )
-			jit? ( !shadowstack? (
-				${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.xz
-			) )
-			!jit? ( !shadowstack? (
-				${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.xz
-			) )
-		)
-		!cpu_flags_x86_sse2? (
-			!jit? ( !shadowstack? (
-				${BINHOST}/${P}-x86+bzip2+ncurses.tar.xz
-			) )
-		)
-	)"
-
-# 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-5*:0
-	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="app-arch/xz-utils
-	test? ( ${RDEPEND}
-		${PYTHON_DEPS} )"
-#	doc? ( ${PYTHON_DEPS}
-#		dev-python/sphinx )
-PDEPEND="app-admin/python-updater"
-
-S=${WORKDIR}/pypy3-${PV}-src
-
-src_prepare() {
-	epatch "${FILESDIR}/1.9-scripts-location.patch" \
-		"${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
-
-	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
-
-	# ctypes config cache
-	# this one we need to do with python2 too...
-	"${PYTHON}" lib_pypy/ctypes_config_cache/rebuild.py \
-		|| die "Failed to rebuild ctypes config cache"
-}
-
-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() {
-	einfo "Installing PyPy ..."
-	insinto "/usr/$(get_libdir)/pypy3"
-	doins -r include lib_pypy lib-python pypy-c libpypy-c.so
-	fperms a+x ${INSDESTTREE}/pypy-c ${INSDESTTREE}/libpypy-c.so
-	pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" "${ED%/}${INSDESTTREE}/libpypy-c.so"
-	dosym ../$(get_libdir)/pypy3/pypy-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED%/}${INSDESTTREE}"/lib_pypy/gdbm.py \
-			"${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_gdbm.py || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/sqlite3 \
-			"${ED%/}${INSDESTTREE}"/lib_pypy/_sqlite3.py \
-			"${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/{idlelib,tkinter} \
-			"${ED%/}${INSDESTTREE}"/lib_pypy/_tkinter \
-			"${ED%/}${INSDESTTREE}"/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%/}${INSDESTTREE}/pypy-c
-	local -x LD_LIBRARY_PATH="${ED%/}${INSDESTTREE}"
-	# 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 cache
-	# Please keep in sync with pypy/tool/release/package.py!
-	"${PYTHON}" -c "import _curses" || die "Failed to import _curses (cffi)"
-	"${PYTHON}" -c "import syslog" || die "Failed to import syslog (cffi)"
-	if use gdbm; then
-		"${PYTHON}" -c "import _gdbm" || die "Failed to import gdbm (cffi)"
-	fi
-	if use sqlite; then
-		"${PYTHON}" -c "import _sqlite3" || die "Failed to import _sqlite3 (cffi)"
-	fi
-	if use tk; then
-		"${PYTHON}" -c "import _tkinter" || die "Failed to import _tkinter (cffi)"
-	fi
-
-	# Cleanup temporary objects
-	find "${ED%/}${INSDESTTREE}" -name "_cffi_*.[co]" -delete || die
-	find "${ED%/}${INSDESTTREE}" -type d -empty -delete || die
-
-	# compile the installed modules
-	python_optimize "${ED%/}${INSDESTTREE}"
-}

diff --git a/dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild b/dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild
deleted file mode 100644
index fd93b92..0000000
--- a/dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild
+++ /dev/null
@@ -1,177 +0,0 @@
-# Copyright 1999-2015 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 versionator
-
-BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}"
-
-DESCRIPTION="A fast, compliant alternative implementation of Python 3 (binary package)"
-HOMEPAGE="http://pypy.org/"
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/pypy3-${PV}-src.tar.bz2
-	amd64? (
-		jit? ( shadowstack? (
-			${BINHOST}/${P}-amd64+bzip2+jit+ncurses+shadowstack.tar.xz
-		) )
-		jit? ( !shadowstack? (
-			${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.xz
-		) )
-		!jit? ( !shadowstack? (
-			${BINHOST}/${P}-amd64+bzip2+ncurses.tar.xz
-		) )
-	)
-	x86? (
-		cpu_flags_x86_sse2? (
-			jit? ( shadowstack? (
-				${BINHOST}/${P}-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.xz
-			) )
-			jit? ( !shadowstack? (
-				${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.xz
-			) )
-			!jit? ( !shadowstack? (
-				${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.xz
-			) )
-		)
-		!cpu_flags_x86_sse2? (
-			!jit? ( !shadowstack? (
-				${BINHOST}/${P}-x86+bzip2+ncurses.tar.xz
-			) )
-		)
-	)"
-
-# 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="app-arch/xz-utils
-	test? ( ${RDEPEND}
-		${PYTHON_DEPS} )"
-#	doc? ( ${PYTHON_DEPS}
-#		dev-python/sphinx )
-PDEPEND="app-admin/python-updater"
-
-S=${WORKDIR}/pypy3-${PV}-src
-
-src_prepare() {
-	epatch "${FILESDIR}/4.0.0-gentoo-path.patch" \
-		"${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" \
-		"${FILESDIR}/2.4.0-ncurses6.patch"
-
-	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
-
-	# ctypes config cache
-	# this one we need to do with python2 too...
-	"${PYTHON}" lib_pypy/ctypes_config_cache/rebuild.py \
-		|| die "Failed to rebuild ctypes config cache"
-}
-
-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() {
-	einfo "Installing PyPy ..."
-	insinto "/usr/$(get_libdir)/pypy3"
-	doins -r include lib_pypy lib-python pypy-c libpypy-c.so
-	fperms a+x ${INSDESTTREE}/pypy-c ${INSDESTTREE}/libpypy-c.so
-	pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" "${ED%/}${INSDESTTREE}/libpypy-c.so"
-	dosym ../$(get_libdir)/pypy3/pypy-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED%/}${INSDESTTREE}"/lib_pypy/gdbm.py \
-			"${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_gdbm.py || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/sqlite3 \
-			"${ED%/}${INSDESTTREE}"/lib_pypy/_sqlite3.py \
-			"${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/{idlelib,tkinter} \
-			"${ED%/}${INSDESTTREE}"/lib_pypy/_tkinter \
-			"${ED%/}${INSDESTTREE}"/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%/}${INSDESTTREE}/pypy-c
-	local -x LD_LIBRARY_PATH="${ED%/}${INSDESTTREE}"
-	# 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 cache
-	# Please keep in sync with pypy/tool/release/package.py!
-	"${PYTHON}" -c "import _curses" || die "Failed to import _curses (cffi)"
-	"${PYTHON}" -c "import syslog" || die "Failed to import syslog (cffi)"
-	if use gdbm; then
-		"${PYTHON}" -c "import _gdbm" || die "Failed to import gdbm (cffi)"
-	fi
-	if use sqlite; then
-		"${PYTHON}" -c "import _sqlite3" || die "Failed to import _sqlite3 (cffi)"
-	fi
-	if use tk; then
-		"${PYTHON}" -c "import _tkinter" || die "Failed to import _tkinter (cffi)"
-	fi
-
-	# Cleanup temporary objects
-	find "${ED%/}${INSDESTTREE}" -name "_cffi_*.[co]" -delete || die
-	find "${ED%/}${INSDESTTREE}" -type d -empty -delete || die
-
-	# compile the installed modules
-	python_optimize "${ED%/}${INSDESTTREE}"
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3-bin/, dev-python/pypy3-bin/files/
@ 2016-05-05  9:14 Patrice Clement
  0 siblings, 0 replies; 11+ messages in thread
From: Patrice Clement @ 2016-05-05  9:14 UTC (permalink / raw
  To: gentoo-commits

commit:     7488e1201b5655cee6968fe29f8c68409ffcc9ad
Author:     PPed72 <paolo.pedroni <AT> iol <DOT> it>
AuthorDate: Mon May  2 08:39:04 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Thu May  5 08:59:13 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7488e120

dev-python/pypy3-bin: fix regression in tkinter

Gentoo-bug: 533384
Fix binary package as well as per mgorny request
Closes: https://github.com/gentoo/gentoo/pull/1326

Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 .../files/pypy3-2.4.0-fix-tkinter-regression.patch | 74 ++++++++++++++++++++++
 dev-python/pypy3-bin/pypy3-bin-2.4.0-r4.ebuild     |  1 +
 2 files changed, 75 insertions(+)

diff --git a/dev-python/pypy3-bin/files/pypy3-2.4.0-fix-tkinter-regression.patch b/dev-python/pypy3-bin/files/pypy3-2.4.0-fix-tkinter-regression.patch
new file mode 100644
index 0000000..a92152e
--- /dev/null
+++ b/dev-python/pypy3-bin/files/pypy3-2.4.0-fix-tkinter-regression.patch
@@ -0,0 +1,74 @@
+# HG changeset patch
+# User Philip Jenvey <pjenvey@underboss.org>
+# Date 1414136649 25200
+# Branch py3k
+# Node ID 8c340acffe279d63dd2df525173713b2054619c8
+# Parent  a87e6542c186bdc7408ea027aed83c62820a9c49
+issue1899: fix broken bytes usage from default
+
+diff --git a/lib_pypy/_tkinter/app.py b/lib_pypy/_tkinter/app.py
+--- a/lib_pypy/_tkinter/app.py
++++ b/lib_pypy/_tkinter/app.py
+@@ -439,7 +439,7 @@
+         if isinstance(s, int):
+             return s
+         s = s.encode('utf-8')
+-        if '\x00' in s:
++        if b'\x00' in s:
+             raise TypeError
+         v = tkffi.new("int*")
+         res = tklib.Tcl_GetBoolean(self.interp, s, v)
+@@ -451,7 +451,7 @@
+         if isinstance(s, int):
+             return s
+         s = s.encode('utf-8')
+-        if '\x00' in s:
++        if b'\x00' in s:
+             raise TypeError
+         v = tkffi.new("int*")
+         res = tklib.Tcl_GetInt(self.interp, s, v)
+@@ -463,7 +463,7 @@
+         if isinstance(s, float):
+             return s
+         s = s.encode('utf-8')
+-        if '\x00' in s:
++        if b'\x00' in s:
+             raise TypeError
+         v = tkffi.new("double*")
+         res = tklib.Tcl_GetDouble(self.interp, s, v)
+@@ -472,7 +472,7 @@
+         return v[0]
+ 
+     def exprboolean(self, s):
+-        if '\x00' in s:
++        if b'\x00' in s:
+             raise TypeError
+         v = tkffi.new("int*")
+         res = tklib.Tcl_ExprBoolean(self.interp, s, v)
+@@ -481,7 +481,7 @@
+         return v[0]
+ 
+     def exprlong(self, s):
+-        if '\x00' in s:
++        if b'\x00' in s:
+             raise TypeError
+         v = tkffi.new("long*")
+         res = tklib.Tcl_ExprLong(self.interp, s, v)
+@@ -490,7 +490,7 @@
+         return v[0]
+ 
+     def exprdouble(self, s):
+-        if '\x00' in s:
++        if b'\x00' in s:
+             raise TypeError
+         v = tkffi.new("double*")
+         res = tklib.Tcl_ExprDouble(self.interp, s, v)
+@@ -499,7 +499,7 @@
+         return v[0]
+ 
+     def exprstring(self, s):
+-        if '\x00' in s:
++        if b'\x00' in s:
+             raise TypeError
+         res = tklib.Tcl_ExprString(self.interp, s)
+         if res == tklib.TCL_ERROR:

diff --git a/dev-python/pypy3-bin/pypy3-bin-2.4.0-r4.ebuild b/dev-python/pypy3-bin/pypy3-bin-2.4.0-r4.ebuild
index adee3b6..d80da51 100644
--- a/dev-python/pypy3-bin/pypy3-bin-2.4.0-r4.ebuild
+++ b/dev-python/pypy3-bin/pypy3-bin-2.4.0-r4.ebuild
@@ -87,6 +87,7 @@ src_prepare() {
 		"${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
 	epatch "${FILESDIR}/2.4.0-ncurses6.patch"
 	epatch "${FILESDIR}"/pypy3-2.4.0-libressl.patch
+	epatch "${FILESDIR}/pypy3-2.4.0-fix-tkinter-regression.patch" 
 
 	sed -e "s^@EPREFIX@^${EPREFIX}^" \
 		-e "s^@libdir@^$(get_libdir)^" \


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3-bin/, dev-python/pypy3-bin/files/
@ 2016-06-09 19:46 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2016-06-09 19:46 UTC (permalink / raw
  To: gentoo-commits

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?= <mgorny@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}"
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3-bin/, dev-python/pypy3-bin/files/
@ 2017-10-15  9:38 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2017-10-15  9:38 UTC (permalink / raw
  To: gentoo-commits

commit:     65d59639dae7010c3fcd22e1ba0968fc3d07fe2b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 15 09:13:50 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Oct 15 09:38:00 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65d59639

dev-python/pypy3-bin: Drop old

 dev-python/pypy3-bin/Manifest                      |  12 -
 .../pypy3-bin/files/5.2.0-distutils-c++.patch      | 284 -----------------
 .../pypy3-bin/files/5.7.1_all_distutils_cxx.patch  | 342 ---------------------
 dev-python/pypy3-bin/metadata.xml                  |   3 -
 dev-python/pypy3-bin/pypy3-bin-5.5.0_alpha.ebuild  | 200 ------------
 dev-python/pypy3-bin/pypy3-bin-5.7.1-r1.ebuild     | 171 -----------
 6 files changed, 1012 deletions(-)

diff --git a/dev-python/pypy3-bin/Manifest b/dev-python/pypy3-bin/Manifest
index c82571c44c1..fdeaa1135c4 100644
--- a/dev-python/pypy3-bin/Manifest
+++ b/dev-python/pypy3-bin/Manifest
@@ -1,12 +1,3 @@
-DIST pypy3-bin-5.5.0_alpha-amd64+bzip2+jit+ncurses+shadowstack.tar.lz 10860820 SHA256 46437ffdc3327b11fb116071ec8bb5c93aa94ac143a7105cadb678be708faeb5 SHA512 ed93e8452c82e627699aa876cfa55d2fd84d7ec7c6698e2a20bda2a5bb564def68b51a2e62ca45a36f88805cbca453b0a8a6565016428c4eef22a5539bb24647 WHIRLPOOL 858befe94e009628cee4e8527aaaa1e8e92fe264ff91b382fed74ba31314eccf914c403b376792eec322bcead140e8159d255b265bc88832accb3d65d16fd78c
-DIST pypy3-bin-5.5.0_alpha-amd64+bzip2+jit+ncurses.tar.lz 11610069 SHA256 a400bd9c2df450647278dec93d397e4d040fd058f78309e8cdaff8b0792b8c01 SHA512 e0dca44387c03306691c63263aae7d484a5244b686cfd57315d7c4bd630fd5fba888d8cb57855d3f84c9bda576194597e4048877990456812f747d7d099b5819 WHIRLPOOL 3f61e0b02bbfc77a413fe38aca59c626857b1b8a05b952e7a832e4d3cc20dd5d98d9173161d08cd92587e2a7b44a2a55ba61f516c632611cb4d16a20f3eb4e74
-DIST pypy3-bin-5.5.0_alpha-amd64+bzip2+ncurses.tar.lz 6243046 SHA256 34ae3b199194a90f0867e95306b6530faa3acafb9dc9ef077ba4e229f3a5d0de SHA512 4fdae8644c40734281d81adb5c8273a0f2429c47bff8672a7f98988195c6e9ab82d9a1443e2d1c1bc2ca75d471c112ac40ac403e75808d8610dce94fee15031b WHIRLPOOL ca2c5b4f0334f1193ef5cd6bf7ebe9034fbd176f0ce34b6302125c6e2b175e69129ca53d21ef34327bb064cf90af907c10bd81d62ccb429298020043a41fdfa0
-DIST pypy3-bin-5.5.0_alpha-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz 8656783 SHA256 52bff882b65d4664661c70657c927d69cbc0b9377c7d0ae20ed8ca562d8e13f4 SHA512 6ae588077d92d1c4d494e2b657a3d963989e3f3cf2d689ec4cf460f196d69234d13b88160ebb46334af0733f5ec13720abb0d2bc3184c6744b9218a8a5f6440a WHIRLPOOL 81593ba510a71cc7ef47f3013e89e468bb5671da32a0ca5cdbfc1579cd2df90ce3b53ed59f2974243bc1b21eb8ea8d509d66ea4d2539c56f8a15ba9a3e7c6127
-DIST pypy3-bin-5.5.0_alpha-x86+bzip2+jit+ncurses+sse2.tar.lz 9549100 SHA256 fdd95b1fb91d669e1861b2dff52b97af0d01aaedf61eb11f07c8f92cd398c7f6 SHA512 2ac8cb894cafae8da81bddb601185941b42933aa41bda8d1696eb70ca22cbeaa0c23385e4a4cd640c46f9e301acfc2f9bc89adaf5a7f5cbef4bc23ca8af550bb WHIRLPOOL e4c21be6b52468135ff6e53434a8ae8c0450880d0f5c8d37bdc18a99f9ceb0ae101c82b8a7a6ae2088297f9dbfa7146fcf80a24948dd3316d56f0f798cc7ecec
-DIST pypy3-bin-5.5.0_alpha-x86+bzip2+ncurses+sse2.tar.lz 5231919 SHA256 6a9848bc2d1d948a91bc15ce20768bc7024726ec7afdd2767bfba25926a35c7f SHA512 fbdc955b1c2873d07e8ad36dd697fbb21932ac50726e76fed20da1fca218b329f18c81b8b4a65cd7ece26091859529d5bb56c7ed2efaf14ae8d9988581d88d9b WHIRLPOOL 08ffd98122e4745af4e785ebb986cd7d185472ec0879bb9dc6070b14de6d35e4177e35a85326468329a06617df03880744e23a6bef825f67d40476c92c7d430e
-DIST pypy3-bin-5.5.0_alpha-x86+bzip2+ncurses.tar.lz 5232239 SHA256 d808aa66ecd5b3d868554ad29b0eee3948e3de69390826bcb5e6b8ceb2408037 SHA512 5e107304537855f459cc7bee92d3b2d05e16f2421d2249205c34f40f1f9415ca657f3e0842c79de98fed732e0a2752b280b44880f96eeeaa0d50d4b4bf2c525c WHIRLPOOL 562fe0c00aeb83a74d9f1ccba4ffed70b5efa6592ef04c82ea06c38afc560e97aa02b835de8b69925690149c1d6803ecfbcad7eefd59bdf4462bdbbbf82c2577
-DIST pypy3-bin-5.7.1-amd64+bzip2+jit+ncurses.tar.lz 10329767 SHA256 041d6b6af48ec4a2de0062a2ae48a3d2a8e827d450b76fc4232f4a9eca8cbc47 SHA512 a5959d4bd5d267ea0386e4fab4b86b83f7597aaa3174281f15f180e0c83125af1437c0a693b0d534929c7199df5958a5f48867c72d1ce24494b2238523cde2aa WHIRLPOOL 8eef898eac108726b89751e6af80c112f46800ab1dd4efad118e71adb6c7cbaccbe46360da3be7d5ad5702262a2e377bfc530b7519fc38532123884c84e0c1ee
-DIST pypy3-bin-5.7.1-amd64+bzip2+ncurses.tar.lz 6352387 SHA256 0243a016a7b836af72e6e1172f2a4516b9705169a9ba2318093b5c3005917766 SHA512 a63b02dfc11b7675bd4ccceb58801aeb1fd40d0245196dd7fa9f646e4618f46c8e6c4d95072c6432381064d37bc13cb74fbd383d19f8769f069827a8969e7a95 WHIRLPOOL f09b82a6c8a4dada7597bfbe0b2ecd07d90d724eae3d2cc6f35a69c0f219b420236ed8ad37024ad8f9516d729389cbe919f58a48cf1aa323c3a74220c62b8aa3
 DIST pypy3-bin-5.8.0-amd64+bzip2+jit+ncurses.tar.lz 10706804 SHA256 fd8e3550426d747f65d52fb2edbe5b9133c1946eed5f1ada5a454fe5a99b489f SHA512 38e46503ba50987a36b68e7d6316b64a00c1e2fa0d2d0b0e0e517bbfa96cb777522346d2c4a78cc7bdf44fa237453dc97867f9323785ba38b21c1f1058d5e701 WHIRLPOOL 59ecc9f9c5d4a29819d0911cc1402f38bd9708ec3e28ba90cb33159b88e11a150a33390c2a73e26831de578ec77598018945e001a1bc3e8f2659b17743a3cdf6
 DIST pypy3-bin-5.8.0-amd64+bzip2+ncurses.tar.lz 6626453 SHA256 f840fba90a52e0bfaf9f7f3197f47823154709b86b33dbe61df1f721d8eb46ef SHA512 51d418668c48f8e2d740264855e193353900d56893c0fc81de09e8fab338a36a696a725dd3387ee1d626f82e8319b797bfa4957a5cc8f0b11610b3e6ece67539 WHIRLPOOL 45348517cb0bf8e98ac53149314288716cf8ee972505c354192a46b6472fff694cc037689f2f61707396ed55b9baebe35fa4e99695789f93cb8edeaa08e71fe2
 DIST pypy3-bin-5.9.0-amd64+bzip2+jit+ncurses.tar.lz 10510722 SHA256 e970e4750897e6fb2a703511adc863611fe4a9da1f0190b8b6231babbd56bc02 SHA512 659ed24c9f540168203098fc9b6086cc22a42767b55f3dbbf132b11cf8e1bc01a66baac78d7689dcc31d9f06e7f2ecfbda9969c9ba150d5af9c462e480aa288c WHIRLPOOL 4293c2d4912032360513cbfff03ad9271a90802652fc360c199c3469130871d66d8cf48c87a2d72c660f03e0318c8e08efb87fc33973b0c97b964bd61c2726cb
@@ -14,8 +5,5 @@ DIST pypy3-bin-5.9.0-amd64+bzip2+ncurses.tar.lz 6589457 SHA256 e9ff832ce9a1d3384
 DIST pypy3-bin-5.9.0-x86+bzip2+jit+ncurses+sse2.tar.lz 8595527 SHA256 9d7a4d4b25f1a3f8a7376e5f19dfcbe98753233dee1c14a98d1a19fb7ca553bd SHA512 6d118cf2e9a657dcf719ca5e508b5b4bb2ab7f85ec3597840706b748ea2f6d582ed884fc34697a3ec36e343de4a40b113d7c8749683a53f2dda299a9e106a2f8 WHIRLPOOL 635f45fd92b94042e44d1f81a2b4312b6c0d79ffa776d21532c495501d344d1f5fa5561eba944f797a6c69a7c52ae59d0a2217af6c7f8e54197fc2fd99c4c83e
 DIST pypy3-bin-5.9.0-x86+bzip2+ncurses+sse2.tar.lz 5654668 SHA256 7d8ced801dc94c0cf19ac580d7ebb21f7ebeae98f3a991ae8a37a925b4fe2669 SHA512 a378159ca39654fbf117e3bd5a0cdcdb23100a21caf837bba5d764b63bf039a791b27d397a6be918a2539d721fc8564f2b10a163df3bae89a4ddb3991ac33ec8 WHIRLPOOL 0e3ab5dacf2bdf5c2e08d21330fd4cad34b5f4424863a999469c53a1b61980fd4307795545f5e735b53aa198634646a11387a753552c66c40dba47599716c2ca
 DIST pypy3-bin-5.9.0-x86+bzip2+ncurses.tar.lz 5640443 SHA256 13c47cdd603d647e8a5fe0d11a7165abd2599ad7ae2f6bbdd47829785b62f955 SHA512 663fae9004eb7f002b849d4697ef67fb72df33faddfba7272a6d795432ecca4c110dc1fab43617909f962584c7519582f085854f55829ccc63dc988654b6add5 WHIRLPOOL 57a16723235fc3a4e1fcb3defb68cecfa0a78f090750c6a3001904d68e1240094659828affc4d34113e81bb7aa5aed5865e4da6afb7aa3a16d815c26fd83c8c5
-DIST pypy3-v5.7.1-src.tar.bz2 28811162 SHA256 40ece0145282980ac121390f13709404c0532896507d5767496381180b631bd0 SHA512 f8ead8214ad7d89fe80e24d97b13ece7f2c80b2f11446257a2eab0e3025fc7d8fec26474b0e9eb2b2e3ccd629532dd062829459361b601add12e40793bd5aa60 WHIRLPOOL 180a5cb39c9a5e3840f4940463dd9cccf44486f11a657d2ac644d1eac4561068f08905fdadc495918fb0ceaf018d4b85a3e5756ca6d99a020310b46bdb16ef87
 DIST pypy3-v5.8.0-src.tar.bz2 28986883 SHA256 9d090127335c3c0fd2b14c8835bf91752e62756e55ea06aad3353f24a6854223 SHA512 d78b4c899a5643028664365ed973a7b292a8e5b3989cc75203cd381ea3cda7dd73121c574726e23dca86e8364fcfcf42c372c9deee438c805f30d6e1c4ac115a WHIRLPOOL b7567fa21e3ded400a72ec06197184df37e0b5893adfb55622ea9afb668bfbda7ebbecd9b80660efef42f160838966d103c4181a9b07355e873981b35f4bf104
 DIST pypy3-v5.9.0-src.tar.bz2 29055111 SHA256 a014f47f50a1480f871a0b82705f904b38c93c4ca069850eb37653fedafb1b97 SHA512 3d5384d644fdd1bc8b95f5747dbd1771ae06eb2cfc7b57be359b8bf40177676afd097620d0cb9d9000c40d8cce075cfa6bfd92de987d3dd927c04d7d595dc5bd WHIRLPOOL e0936d56c64c3c077910c4713295010ec3e0fabebe654115ddf07407884d1564db7de2f85bcedf1226449c516085f3e4814a2c523f0d48e3ad8ac21150a93a72
-DIST pypy3.3-v5.5.0-alpha-src.tar.bz2 25122033 SHA256 d5591c34d77253e9ed57d182b6f49585b95f7c09c3e121f0e8630e5a7e75ab5f SHA512 b2cf9700e45c452293297edffe08e572dffc3c567026b4b5d9165c1ba1b4d858ffc8a6754f5f28781020016c36440e5c02d07562d075b12444c9c32ea5dd2168 WHIRLPOOL 6bde174969413c55d6d077cd14e737c4f034f19935536af1bffaf3a1caa456d2bf6850760a18c274ad99089bd5ab7331d7d185f914cd6c69f708abf857d35df3
-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
deleted file mode 100644
index 1251694107d..00000000000
--- a/dev-python/pypy3-bin/files/5.2.0-distutils-c++.patch
+++ /dev/null
@@ -1,284 +0,0 @@
-From e3afe6721897c8de830055621313bc0659518415 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@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/files/5.7.1_all_distutils_cxx.patch b/dev-python/pypy3-bin/files/5.7.1_all_distutils_cxx.patch
deleted file mode 100644
index 52a833f29d9..00000000000
--- a/dev-python/pypy3-bin/files/5.7.1_all_distutils_cxx.patch
+++ /dev/null
@@ -1,342 +0,0 @@
-From b2f2c9d23996d431d606ac7d8ed731a5302b4e97 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Tue, 25 Apr 2017 17:42:33 +0200
-Subject: [PATCH] Fancy distutils C++ support, rebased for PyPy3.5
-
-https://bugs.python.org/issue1222585
----
- _osx_support.py                | 10 +++---
- distutils/cygwinccompiler.py   | 21 +++++++++--
- distutils/sysconfig_cpython.py | 25 ++++++++++---
- distutils/sysconfig_pypy.py    | 35 +++++++++++++++----
- distutils/unixccompiler.py     | 54 ++++++++++++++++-------------
- 5 files changed, 100 insertions(+), 45 deletions(-)
-
-diff --git a/_osx_support.py b/_osx_support.py
-index 13fcd8b..0525be1 100644
---- a/_osx_support.py
-+++ b/_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/distutils/cygwinccompiler.py b/distutils/cygwinccompiler.py
-index c879646..a6157fb 100644
---- a/distutils/cygwinccompiler.py
-+++ b/distutils/cygwinccompiler.py
-@@ -125,8 +125,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
-@@ -140,9 +142,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":
-@@ -166,8 +172,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 -O -Wall',
-                              compiler_so='gcc -mdll -O -Wall',
-                              compiler_cxx='g++ -O -Wall',
-+                             compiler_so_cxx='g++ -mdll -O -Wall',
-                              linker_exe='gcc',
-                              linker_so='%s %s %s'
-                                         % (self.linker_dll, shared_option,
-+                                           entry_point),
-+                             linker_exe_cxx='g++',
-+                             linker_so_cxx='%s %s %s'
-+                                        % (self.linker_dll_cxx, 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/distutils/sysconfig_cpython.py b/distutils/sysconfig_cpython.py
-index 573724d..0a04f33 100644
---- a/distutils/sysconfig_cpython.py
-+++ b/distutils/sysconfig_cpython.py
-@@ -173,9 +173,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']
-@@ -190,19 +193,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:
-@@ -211,13 +222,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/distutils/sysconfig_pypy.py b/distutils/sysconfig_pypy.py
-index a0a8dec..aa97c4e 100644
---- a/distutils/sysconfig_pypy.py
-+++ b/distutils/sysconfig_pypy.py
-@@ -72,6 +72,7 @@ def _init_posix():
-     g['CFLAGS'] = "-DNDEBUG -O2"
-     g['CCSHARED'] = "-fPIC"
-     g['LDSHARED'] = "gcc -pthread -shared"
-+    g['LDCXXSHARED'] = "g++ -pthread -shared"
-     g['EXT_SUFFIX'] = so_ext
-     g['SHLIB_SUFFIX'] = so_ext
-     g['SO'] = so_ext  # deprecated in Python 3, for backward compatibility
-@@ -156,36 +157,52 @@ 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']
--            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:
-@@ -194,13 +211,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/distutils/unixccompiler.py b/distutils/unixccompiler.py
-index 254b22d..c9cacc1 100644
---- a/distutils/unixccompiler.py
-+++ b/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":
-@@ -125,12 +128,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)
- 
-@@ -188,22 +198,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.12.2
-

diff --git a/dev-python/pypy3-bin/metadata.xml b/dev-python/pypy3-bin/metadata.xml
index fd25587b849..ff5bc95069a 100644
--- a/dev-python/pypy3-bin/metadata.xml
+++ b/dev-python/pypy3-bin/metadata.xml
@@ -5,9 +5,6 @@
 		<email>python@gentoo.org</email>
 		<name>Python</name>
 	</maintainer>
-	<use>
-		<flag name="shadowstack">Use a shadow stack for finding GC roots</flag>
-	</use>
 	<upstream>
 		<remote-id type="bitbucket">pypy/pypy</remote-id>
 	</upstream>

diff --git a/dev-python/pypy3-bin/pypy3-bin-5.5.0_alpha.ebuild b/dev-python/pypy3-bin/pypy3-bin-5.5.0_alpha.ebuild
deleted file mode 100644
index 98c88850baf..00000000000
--- a/dev-python/pypy3-bin/pypy3-bin-5.5.0_alpha.ebuild
+++ /dev/null
@@ -1,200 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-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"
-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/pypy3.3-v${PV/_/-}-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"
-# XX from pypy3-XX.so module suffix
-SLOT="0/55"
-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 )
-
-# Who would care about predictable directory names?
-S="${WORKDIR}/pypy3-v${PV%_*}-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
-
-	#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}"
-}

diff --git a/dev-python/pypy3-bin/pypy3-bin-5.7.1-r1.ebuild b/dev-python/pypy3-bin/pypy3-bin-5.7.1-r1.ebuild
deleted file mode 100644
index a69f3049b29..00000000000
--- a/dev-python/pypy3-bin/pypy3-bin-5.7.1-r1.ebuild
+++ /dev/null
@@ -1,171 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# some random parts need python 2...
-PYTHON_COMPAT=( python2_7 pypy )
-inherit pax-utils python-any-r1 unpacker versionator
-
-BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy3-bin/${PV}"
-MY_P=pypy3-v${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
-	amd64? (
-		jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz )
-		!jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz )
-	)"
-
-LICENSE="MIT"
-# XX from pypy3-XX.so module suffix
-SLOT="0/57"
-KEYWORDS="~amd64"
-IUSE="gdbm +jit sqlite 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=[-bindist]
-	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
-	app-arch/xz-utils
-	test? ( ${PYTHON_DEPS} )"
-#	doc? ( ${PYTHON_DEPS}
-#		dev-python/sphinx )
-
-S=${WORKDIR}/${MY_P}-src
-
-QA_PREBUILT="
-	usr/lib*/pypy3/pypy3-c
-	usr/lib*/pypy3/libpypy3-c.so"
-
-src_prepare() {
-	eapply "${FILESDIR}/4.0.0-gentoo-path.patch"
-	eapply "${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
-	eapply "${FILESDIR}"/5.7.1_all_distutils_cxx.patch
-	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
-	popd > /dev/null || die
-
-	eapply_user
-}
-
-src_compile() {
-	# Tadaam! PyPy compiled!
-	mv "${WORKDIR}"/${P}*/{libpypy3-c.so,pypy3-c} . || die
-	mv "${WORKDIR}"/${P}*/include/*.h include/ || die
-	mv pypy/module/cpyext/include/*.h include/ || die
-	mv pypy/module/cpyext/parse/*.h include/ || die
-
-	#use doc && emake -C pypy/doc/ html
-	#needed even without jit :( also needed in both compile and install phases
-	pax-mark m pypy3-c libpypy3-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=./pypy3-c lib-python || die
-}
-
-src_install() {
-	local dest=/usr/$(get_libdir)/pypy3
-	einfo "Installing PyPy ..."
-	insinto "${dest}"
-	doins -r include lib_pypy lib-python pypy3-c libpypy3-c.so
-	fperms a+x ${dest}/pypy3-c ${dest}/libpypy3-c.so
-	pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so"
-	dosym ../$(get_libdir)/pypy3/pypy3-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
-			"${ED%/}${dest}"/lib_pypy/_sqlite3* \
-			"${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 && dodoc -r pypy/doc/_build/html
-
-	einfo "Generating caches and byte-compiling ..."
-
-	local -x PYTHON=${ED%/}${dest}/pypy3-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",
-#    "ssl": "_ssl_build.py",
-	cffi_targets=( audioop curses syslog pwdgrp resource lzma decimal ssl )
-	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}"
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3-bin/, dev-python/pypy3-bin/files/
@ 2019-10-18 16:24 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2019-10-18 16:24 UTC (permalink / raw
  To: gentoo-commits

commit:     00ac54a0f250fdae8e8d8f16437ae22e32bea76b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 18 15:56:59 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Oct 18 16:24:23 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00ac54a0

dev-python/pypy3-bin: Bump to 7.2.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pypy3-bin/Manifest                      |   5 +
 .../pypy3-bin/files/7.2.0-distutils-cxx.patch      | 306 +++++++++++++++++++++
 dev-python/pypy3-bin/pypy3-bin-7.2.0.ebuild        | 184 +++++++++++++
 3 files changed, 495 insertions(+)

diff --git a/dev-python/pypy3-bin/Manifest b/dev-python/pypy3-bin/Manifest
index 2ff35e7bb57..7ed305dcae7 100644
--- a/dev-python/pypy3-bin/Manifest
+++ b/dev-python/pypy3-bin/Manifest
@@ -4,4 +4,9 @@ DIST pypy3-bin-7.1.1-x86+bzip2+jit+ncurses+sse2.tar.lz 8540485 BLAKE2B a7de0db24
 DIST pypy3-bin-7.1.1-x86+bzip2+ncurses+sse2.tar.lz 5523574 BLAKE2B 44f760842b0f232f7f5fb7a2fe3f60ff1f832dec3b0c16d1fd27ab36d09c12d6be8aa6727a880c3400506ea415317ddfb982439c1a581a03909099eeb6ea8cf6 SHA512 df664a7afa5bdd329d19046c81e362782c4f9358add2b7e54100df10a23434b9a341ec504ac1d49b2b017917937ab23ffd3cf723f86b65d7080789f795f5a4d3
 DIST pypy3-bin-7.1.1-x86+bzip2+ncurses.r1.tar.lz 5550959 BLAKE2B 72b1f84f0c70b07bd622b4d9ba67b165ce047037acc9a4fb46427b07db8793610f71dc389fc5cede209663c7d36750faf6247d5b6eb3be006c6cc58e4a94b0eb SHA512 3c522a9cf0e94aa8c14e9982a09231517c2c2b46e73a9c69bc6c43c44afefa3958de8879ac0fff2d43f8a0fc79117bdee645599d8e1d6a0def9806b44a4b1bc9
 DIST pypy3-bin-7.1.1-x86+bzip2+ncurses.tar.lz 5545191 BLAKE2B 2afc40968977cd6956cb305a829811640e8437f0a811435a20ec694181286c94c820fd4148e3b6323a014ff391400d5265a7c1ee8b918c3db91ac02b44f3d585 SHA512 a1dad750491c5f524217986817a046c5c7a97b2b250a1d24b6a077d2d8067e249966cd331a5336fa2960a3d317c1aa83196c3e3b2f4a0734d79fe43cd9b55032
+DIST pypy3-bin-7.2.0-amd64+bzip2+jit+ncurses.tar.lz 11429130 BLAKE2B 41de1efcfc72704a3b8fcee1fa0ca030bca0dc07b75856dbc9ee5a9e40c6298406360d3342dffde38131f6d708a6dc07d3708d6e6478dc95d7c6a6ece2d7b86b SHA512 7a97797a961e12d5498dadb5bc87ad9d43a9e9dea88a7617236dba79230f5f0cc02ab8ab21a60c279cca4a341dd3d814d50d4029b94be1f525bf7b9294d19269
+DIST pypy3-bin-7.2.0-amd64+bzip2+ncurses.tar.lz 7174734 BLAKE2B c2f916433a6105a04c70f6b53c43dc479b64f26794a75a6e6b7122fb7d2f4f825c47d2eb82cf95ecb795e494879718aad88661b2fe12faa87b737cbcd20b5a47 SHA512 c4a635b6b819a104ff1b1f3b39363c9bb5cab4299cff2fb6e78c64984691d3116b8378e8a47500f9c626bbf48c4a3a8d26fa23fe2daa945bcc3dc97db9b4a8c9
+DIST pypy3-bin-7.2.0-x86+bzip2+jit+ncurses+sse2.tar.lz 8662494 BLAKE2B bf37ac682098c49efba0f05999ce70368c91cbc0012cdcde86303424fd225eb50a8b6fa058e0c3a9511c2668da47a042f1b836f9142ed4b112db43da3addd6ce SHA512 6fc0d15e5d82ab06937ca099d1ea2f77d00a6d4e1b4c6d9637c39944c0f077ae0c5eb0edb7c6746aaafb76cb0e8a0458340c888e340df2c8438515f55a38017e
+DIST pypy3-bin-7.2.0-x86+bzip2+ncurses+sse2.tar.lz 5625900 BLAKE2B d6642cc8b37f9c032ed23da41c5597bd41615c55312bee5b0de3e8543fb74ecf2504c74d9d3c8a51c0fc42285812835cab70d6f8a5a5f15f0d7b637260e0a656 SHA512 1014ea6d37cfa7a6cb60eb47b6a0e959036aaa5c774852484a57f75d4e5450fb50c1b170f571a1288ba70d710b0731e946773cb05751eca6478b4fffb185dc94
 DIST pypy3.6-v7.1.1-src.tar.bz2 23171982 BLAKE2B be43528bc6f3e02d146016a4969bd8c7a9e880a3bd3b77f441aac6d22ef67700f71e0171ec000066bd2c0bd506db64af69d6b75b59a92222dd0353ee70e6629b SHA512 17e78f9c7080d597a6283d8e8247d1ca78f09a14ff221db8c3d90d255b5befc73102b317ca34a80979e544d5ee72f3e5e649f89d185a085f4cc15012da4d0473
+DIST pypy3.6-v7.2.0-src.tar.bz2 21850076 BLAKE2B 756ea3034fe8971c979ec83c9cbfac55a680f3ef03b276475aa4318f3480ae5ede609b8413412df64db553a33979670498b1f97184f3b57406619c9db7f01127 SHA512 bcbb53062a473d504bcc082cf6286f6169c83d1f38d22c4d7c4e46ddc32bca9d91e71194637e6650db5bec02b29fe262b22fe236d627b6bc3e6e0c59c66c07cc

diff --git a/dev-python/pypy3-bin/files/7.2.0-distutils-cxx.patch b/dev-python/pypy3-bin/files/7.2.0-distutils-cxx.patch
new file mode 100644
index 00000000000..89a38050c80
--- /dev/null
+++ b/dev-python/pypy3-bin/files/7.2.0-distutils-cxx.patch
@@ -0,0 +1,306 @@
+diff --git a/lib-python/3/distutils/cygwinccompiler.py b/lib-python/3/distutils/cygwinccompiler.py
+index 1c36990..ead3174 100644
+--- a/lib-python/3/distutils/cygwinccompiler.py
++++ b/lib-python/3/distutils/cygwinccompiler.py
+@@ -125,8 +125,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
+@@ -140,9 +142,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":
+@@ -166,8 +172,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 -O -Wall',
+                              compiler_so='gcc -mdll -O -Wall',
+                              compiler_cxx='g++ -O -Wall',
++                             compiler_so_cxx='g++ -mdll -O -Wall',
+                              linker_exe='gcc',
+                              linker_so='%s %s %s'
+                                         % (self.linker_dll, shared_option,
++                                           entry_point),
++                             linker_exe_cxx='g++',
++                             linker_so_cxx='%s %s %s'
++                                        % (self.linker_dll_cxx, 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/sysconfig_cpython.py b/lib-python/3/distutils/sysconfig_cpython.py
+index b8340f1..a8c5473 100644
+--- a/lib-python/3/distutils/sysconfig_cpython.py
++++ b/lib-python/3/distutils/sysconfig_cpython.py
+@@ -170,9 +170,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']
+@@ -187,19 +190,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:
+@@ -208,13 +219,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/sysconfig_pypy.py b/lib-python/3/distutils/sysconfig_pypy.py
+index bf1748e..70dfd72 100644
+--- a/lib-python/3/distutils/sysconfig_pypy.py
++++ b/lib-python/3/distutils/sysconfig_pypy.py
+@@ -145,36 +145,52 @@ 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']
+-            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:
+@@ -183,13 +199,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 2944ceb..cf2f219 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":
+@@ -125,12 +128,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)
+ 
+@@ -188,22 +198,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)
+diff --git a/lib_pypy/_sysconfigdata.py b/lib_pypy/_sysconfigdata.py
+index 4d2b0bc..5ed9641 100644
+--- a/lib_pypy/_sysconfigdata.py
++++ b/lib_pypy/_sysconfigdata.py
+@@ -15,6 +15,7 @@ build_time_vars = {
+     'CFLAGS': "-DNDEBUG -O2",
+     'CCSHARED': "-fPIC",
+     'LDSHARED': "cc -pthread -shared",
++    'LDCXXSHARED': "c++ -pthread -shared",
+     'EXT_SUFFIX': so_ext,
+     'SHLIB_SUFFIX': ".so",
+     'AR': "ar",

diff --git a/dev-python/pypy3-bin/pypy3-bin-7.2.0.ebuild b/dev-python/pypy3-bin/pypy3-bin-7.2.0.ebuild
new file mode 100644
index 00000000000..53f4a07681a
--- /dev/null
+++ b/dev-python/pypy3-bin/pypy3-bin-7.2.0.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Test runner needs Python 2.
+PYTHON_COMPAT=( python2_7 pypy )
+inherit pax-utils python-any-r1 unpacker
+
+BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy3-bin/${PV}"
+MY_P=pypy3.6-v${PV}
+
+DESCRIPTION="Pre-built version of PyPy3"
+HOMEPAGE="https://pypy.org/"
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2
+	amd64? (
+		jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz )
+		!jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz )
+	)
+	x86? (
+		cpu_flags_x86_sse2? (
+			jit? ( ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz )
+			!jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz )
+		)
+	)"
+
+LICENSE="MIT"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+SLOT="0/72-py36"
+KEYWORDS="~amd64 ~x86"
+IUSE="gdbm +jit libressl sqlite cpu_flags_x86_sse2 test tk"
+RESTRICT="!test? ( test )"
+# Supported variants
+REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
+
+RDEPEND="
+	app-arch/bzip2:0/1
+	dev-libs/expat:0/0
+	dev-libs/libffi:0/7
+	sys-devel/gcc:*
+	>=sys-libs/glibc-2.28
+	sys-libs/ncurses:0/6
+	sys-libs/zlib:0/1
+	gdbm? ( sys-libs/gdbm:0= )
+	!libressl? ( dev-libs/openssl:0=[-bindist] )
+	libressl? ( dev-libs/libressl:0= )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+	!dev-python/pypy3:0"
+DEPEND="${RDEPEND}
+	app-arch/lzip
+	app-arch/xz-utils
+	test? ( ${PYTHON_DEPS} )"
+
+S=${WORKDIR}/${MY_P}-src
+
+QA_PREBUILT="
+	usr/lib/pypy3.6/pypy3-c
+	usr/lib/pypy3.6/libpypy3-c.so"
+
+src_prepare() {
+	eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
+	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
+	eapply "${FILESDIR}"/7.2.0-distutils-cxx.patch
+
+	sed -e "s^@EPREFIX@^${EPREFIX}^" \
+		-i lib-python/3/distutils/command/install.py || die
+
+	# apply CPython stdlib patches
+	pushd lib-python/3 > /dev/null || die
+	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
+	popd > /dev/null || die
+
+	eapply_user
+}
+
+src_compile() {
+	# Tadaam! PyPy compiled!
+	mv "${WORKDIR}"/${P}*/{libpypy3-c.so,pypy3-c} . || die
+	mv "${WORKDIR}"/${P}*/include/*.h include/ || die
+	mv pypy/module/cpyext/include/*.h include/ || die
+	mv pypy/module/cpyext/parse/*.h include/ || die
+
+	pax-mark m pypy3-c libpypy3-c.so
+
+	einfo "Generating caches and CFFI modules ..."
+
+	# Generate Grammar and PatternGrammar pickles.
+	./pypy3-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 = {
+#    "_blake2": "_blake2/_blake2_build.py",
+#    "_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,
+#    "lzma": "_lzma_build.py",
+#    "_decimal": "_decimal_build.py",
+#    "ssl": "_ssl_build.py",
+#    "_blake2": "_blake2/_blake2_build.py",
+#    "_sha3": "_sha3/_sha3_build.py",
+	cffi_targets=( blake2/_blake2 sha3/_sha3 ssl
+		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 lib_pypy || die
+	for t in "${cffi_targets[@]}"; do
+		# tkinter doesn't work via -m
+		../pypy3-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=
+
+	# 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=./pypy3-c -vv lib-python || die
+}
+
+src_install() {
+	local dest=/usr/lib/pypy3.6
+	einfo "Installing PyPy ..."
+	exeinto "${dest}"
+	doexe pypy3-c libpypy3-c.so
+	pax-mark m "${ED}${dest}/pypy3-c" "${ED}${dest}/libpypy3-c.so"
+	insinto "${dest}"
+	# preserve mtimes to avoid obsoleting caches
+	insopts -p
+	doins -r include lib_pypy lib-python
+	dosym ../lib/pypy3.6/pypy3-c /usr/bin/pypy3
+	dodoc README.rst
+
+	if ! use gdbm; then
+		rm -r "${ED}${dest}"/lib_pypy/_gdbm* || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED}${dest}"/lib-python/*3/sqlite3 \
+			"${ED}${dest}"/lib_pypy/_sqlite3* \
+			"${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
+
+	einfo "Generating caches and byte-compiling ..."
+
+	local -x PYTHON=${ED}${dest}/pypy3-c
+	# we can't use eclass function since PyPy is dumb and always gives
+	# paths relative to the interpreter
+	local PYTHON_SITEDIR=${EPREFIX}/usr/lib/pypy3.6/site-packages
+	python_export pypy3 EPYTHON
+
+	echo "EPYTHON='${EPYTHON}'" > epython.py || die
+	python_domodule epython.py
+
+	einfo "Byte-compiling Python standard library..."
+
+	# compile the installed modules
+	python_optimize "${ED}${dest}"
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3-bin/, dev-python/pypy3-bin/files/
@ 2019-11-01  8:07 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2019-11-01  8:07 UTC (permalink / raw
  To: gentoo-commits

commit:     bc29c449012661931f5ed9716547a9d88a90b792
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  1 07:46:30 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Nov  1 08:03:23 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc29c449

dev-python/pypy3-bin: Fix Gentoo path patch

Bug: https://bugs.gentoo.org/465546
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pypy3-bin/files/7.0.0-gentoo-path.patch                      | 2 +-
 .../pypy3-bin/{pypy3-bin-7.2.0.ebuild => pypy3-bin-7.2.0-r1.ebuild}     | 0
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-python/pypy3-bin/files/7.0.0-gentoo-path.patch b/dev-python/pypy3-bin/files/7.0.0-gentoo-path.patch
index 17409fa89a4..135e496f253 100644
--- a/dev-python/pypy3-bin/files/7.0.0-gentoo-path.patch
+++ b/dev-python/pypy3-bin/files/7.0.0-gentoo-path.patch
@@ -39,7 +39,7 @@ index 77a1827d4b..255603967f 100644
          if (hasattr(sys, 'pypy_version_info') and
              not name.endswith(('_user', '_home'))):
 -            name = 'pypy'
-+            if self.install_base == os.path.normpath('@EPREFIX@/usr/lib/pypy3.5'):
++            if self.install_base == os.path.normpath('@EPREFIX@/usr/lib/pypy3.6'):
 +                # override paths for system-wide install
 +                name = 'gentoo'
 +            else:

diff --git a/dev-python/pypy3-bin/pypy3-bin-7.2.0.ebuild b/dev-python/pypy3-bin/pypy3-bin-7.2.0-r1.ebuild
similarity index 100%
rename from dev-python/pypy3-bin/pypy3-bin-7.2.0.ebuild
rename to dev-python/pypy3-bin/pypy3-bin-7.2.0-r1.ebuild


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3-bin/, dev-python/pypy3-bin/files/
@ 2019-11-01  8:07 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2019-11-01  8:07 UTC (permalink / raw
  To: gentoo-commits

commit:     0a8566d5827b15e7236a0ee3d02885ebcc398b73
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  1 07:49:06 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Nov  1 08:03:32 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a8566d5

dev-python/pypy3-bin: Drop 7.1.1

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pypy3-bin/Manifest                      |   7 -
 .../pypy3-bin/files/7.0.0_all_distutils_cxx.patch  | 347 ---------------------
 dev-python/pypy3-bin/pypy3-bin-7.1.1-r1.ebuild     | 188 -----------
 dev-python/pypy3-bin/pypy3-bin-7.1.1.ebuild        | 188 -----------
 4 files changed, 730 deletions(-)

diff --git a/dev-python/pypy3-bin/Manifest b/dev-python/pypy3-bin/Manifest
index 7ed305dcae7..5fce1c7302c 100644
--- a/dev-python/pypy3-bin/Manifest
+++ b/dev-python/pypy3-bin/Manifest
@@ -1,12 +1,5 @@
-DIST pypy3-bin-7.1.1-amd64+bzip2+jit+ncurses.tar.lz 11031375 BLAKE2B e01ac298d3c8ed06742429b36739223fd0dbf87a9df4d302349401aeda06dbaf5cd8b972ebe997a1e4130a378d63ab69ed25b3ded4b9608db5d59fbaef8d04f6 SHA512 e5ccf27683dc81a683df52f04092167774f3a9c9dd3a38347dc9d5cec181148885ed342165b16689d44533511cb58bfcfa397a5e51869649086fa362a3bebc98
-DIST pypy3-bin-7.1.1-amd64+bzip2+ncurses.tar.lz 6915836 BLAKE2B 0f3f2210e7f6e73872d32b2c01a911b52ad2a8c8987034709d9e4c72cfe11e422eea7b6522b19b3717876307d9fbbfbdfcc008dc2e3771dea083eeb61c202e6e SHA512 7fe6a19f56d7cdc142b368154e17af8936b8b730102c4a1c8a6b756a13b643d1375a51f45a0a3d345f7a8a23b75a81d35a6aa810129d231bf2091e156f69a914
-DIST pypy3-bin-7.1.1-x86+bzip2+jit+ncurses+sse2.tar.lz 8540485 BLAKE2B a7de0db24e4bc56d54cbc03d618f8e08932e23a1fe5a1ab227600c244e222a6dae723c72fbd5cdd059c3e3f52bd355c4c9ee18506f6b39961bd1473358d35bd3 SHA512 f3355109bc073e220a33e8763c2d2ccf152d223d3850bb85aac71c19170ce4b118a84f258a829c486209f3c3014264384b158de17c9a0156c24afcf5b130a8e0
-DIST pypy3-bin-7.1.1-x86+bzip2+ncurses+sse2.tar.lz 5523574 BLAKE2B 44f760842b0f232f7f5fb7a2fe3f60ff1f832dec3b0c16d1fd27ab36d09c12d6be8aa6727a880c3400506ea415317ddfb982439c1a581a03909099eeb6ea8cf6 SHA512 df664a7afa5bdd329d19046c81e362782c4f9358add2b7e54100df10a23434b9a341ec504ac1d49b2b017917937ab23ffd3cf723f86b65d7080789f795f5a4d3
-DIST pypy3-bin-7.1.1-x86+bzip2+ncurses.r1.tar.lz 5550959 BLAKE2B 72b1f84f0c70b07bd622b4d9ba67b165ce047037acc9a4fb46427b07db8793610f71dc389fc5cede209663c7d36750faf6247d5b6eb3be006c6cc58e4a94b0eb SHA512 3c522a9cf0e94aa8c14e9982a09231517c2c2b46e73a9c69bc6c43c44afefa3958de8879ac0fff2d43f8a0fc79117bdee645599d8e1d6a0def9806b44a4b1bc9
-DIST pypy3-bin-7.1.1-x86+bzip2+ncurses.tar.lz 5545191 BLAKE2B 2afc40968977cd6956cb305a829811640e8437f0a811435a20ec694181286c94c820fd4148e3b6323a014ff391400d5265a7c1ee8b918c3db91ac02b44f3d585 SHA512 a1dad750491c5f524217986817a046c5c7a97b2b250a1d24b6a077d2d8067e249966cd331a5336fa2960a3d317c1aa83196c3e3b2f4a0734d79fe43cd9b55032
 DIST pypy3-bin-7.2.0-amd64+bzip2+jit+ncurses.tar.lz 11429130 BLAKE2B 41de1efcfc72704a3b8fcee1fa0ca030bca0dc07b75856dbc9ee5a9e40c6298406360d3342dffde38131f6d708a6dc07d3708d6e6478dc95d7c6a6ece2d7b86b SHA512 7a97797a961e12d5498dadb5bc87ad9d43a9e9dea88a7617236dba79230f5f0cc02ab8ab21a60c279cca4a341dd3d814d50d4029b94be1f525bf7b9294d19269
 DIST pypy3-bin-7.2.0-amd64+bzip2+ncurses.tar.lz 7174734 BLAKE2B c2f916433a6105a04c70f6b53c43dc479b64f26794a75a6e6b7122fb7d2f4f825c47d2eb82cf95ecb795e494879718aad88661b2fe12faa87b737cbcd20b5a47 SHA512 c4a635b6b819a104ff1b1f3b39363c9bb5cab4299cff2fb6e78c64984691d3116b8378e8a47500f9c626bbf48c4a3a8d26fa23fe2daa945bcc3dc97db9b4a8c9
 DIST pypy3-bin-7.2.0-x86+bzip2+jit+ncurses+sse2.tar.lz 8662494 BLAKE2B bf37ac682098c49efba0f05999ce70368c91cbc0012cdcde86303424fd225eb50a8b6fa058e0c3a9511c2668da47a042f1b836f9142ed4b112db43da3addd6ce SHA512 6fc0d15e5d82ab06937ca099d1ea2f77d00a6d4e1b4c6d9637c39944c0f077ae0c5eb0edb7c6746aaafb76cb0e8a0458340c888e340df2c8438515f55a38017e
 DIST pypy3-bin-7.2.0-x86+bzip2+ncurses+sse2.tar.lz 5625900 BLAKE2B d6642cc8b37f9c032ed23da41c5597bd41615c55312bee5b0de3e8543fb74ecf2504c74d9d3c8a51c0fc42285812835cab70d6f8a5a5f15f0d7b637260e0a656 SHA512 1014ea6d37cfa7a6cb60eb47b6a0e959036aaa5c774852484a57f75d4e5450fb50c1b170f571a1288ba70d710b0731e946773cb05751eca6478b4fffb185dc94
-DIST pypy3.6-v7.1.1-src.tar.bz2 23171982 BLAKE2B be43528bc6f3e02d146016a4969bd8c7a9e880a3bd3b77f441aac6d22ef67700f71e0171ec000066bd2c0bd506db64af69d6b75b59a92222dd0353ee70e6629b SHA512 17e78f9c7080d597a6283d8e8247d1ca78f09a14ff221db8c3d90d255b5befc73102b317ca34a80979e544d5ee72f3e5e649f89d185a085f4cc15012da4d0473
 DIST pypy3.6-v7.2.0-src.tar.bz2 21850076 BLAKE2B 756ea3034fe8971c979ec83c9cbfac55a680f3ef03b276475aa4318f3480ae5ede609b8413412df64db553a33979670498b1f97184f3b57406619c9db7f01127 SHA512 bcbb53062a473d504bcc082cf6286f6169c83d1f38d22c4d7c4e46ddc32bca9d91e71194637e6650db5bec02b29fe262b22fe236d627b6bc3e6e0c59c66c07cc

diff --git a/dev-python/pypy3-bin/files/7.0.0_all_distutils_cxx.patch b/dev-python/pypy3-bin/files/7.0.0_all_distutils_cxx.patch
deleted file mode 100644
index a9099e5c9dc..00000000000
--- a/dev-python/pypy3-bin/files/7.0.0_all_distutils_cxx.patch
+++ /dev/null
@@ -1,347 +0,0 @@
-From 5c396fb8b644e5de82d9b54cdb088ea673e16e14 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Tue, 25 Apr 2017 17:42:33 +0200
-Subject: [PATCH] Fancy distutils C++ support, rebased for PyPy3.5/7.0.0
-
-https://bugs.python.org/issue1222585
----
- lib-python/3/_osx_support.py                | 10 ++--
- lib-python/3/distutils/cygwinccompiler.py   | 21 ++++++--
- lib-python/3/distutils/sysconfig_cpython.py | 25 ++++++++--
- lib-python/3/distutils/sysconfig_pypy.py    | 34 ++++++++++---
- lib-python/3/distutils/unixccompiler.py     | 54 +++++++++++----------
- lib_pypy/_sysconfigdata.py                  |  1 +
- 6 files changed, 100 insertions(+), 45 deletions(-)
-
-diff --git a/lib-python/3/_osx_support.py b/lib-python/3/_osx_support.py
-index 13fcd8b8d2..0525be1cbc 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 c879646c0f..a6157fbd5f 100644
---- a/lib-python/3/distutils/cygwinccompiler.py
-+++ b/lib-python/3/distutils/cygwinccompiler.py
-@@ -125,8 +125,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
-@@ -140,9 +142,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":
-@@ -166,8 +172,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 -O -Wall',
-                              compiler_so='gcc -mdll -O -Wall',
-                              compiler_cxx='g++ -O -Wall',
-+                             compiler_so_cxx='g++ -mdll -O -Wall',
-                              linker_exe='gcc',
-                              linker_so='%s %s %s'
-                                         % (self.linker_dll, shared_option,
-+                                           entry_point),
-+                             linker_exe_cxx='g++',
-+                             linker_so_cxx='%s %s %s'
-+                                        % (self.linker_dll_cxx, 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/sysconfig_cpython.py b/lib-python/3/distutils/sysconfig_cpython.py
-index 573724ddd7..0a04f33a86 100644
---- a/lib-python/3/distutils/sysconfig_cpython.py
-+++ b/lib-python/3/distutils/sysconfig_cpython.py
-@@ -173,9 +173,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']
-@@ -190,19 +193,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:
-@@ -211,13 +222,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/sysconfig_pypy.py b/lib-python/3/distutils/sysconfig_pypy.py
-index bf1748e300..70dfd72a1a 100644
---- a/lib-python/3/distutils/sysconfig_pypy.py
-+++ b/lib-python/3/distutils/sysconfig_pypy.py
-@@ -145,36 +145,52 @@ 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']
--            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:
-@@ -183,13 +199,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 32030ed150..1db3d5498b 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":
-@@ -125,12 +128,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)
- 
-@@ -188,22 +198,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)
-diff --git a/lib_pypy/_sysconfigdata.py b/lib_pypy/_sysconfigdata.py
-index 2ceafe80bf..ee3f802c41 100644
---- a/lib_pypy/_sysconfigdata.py
-+++ b/lib_pypy/_sysconfigdata.py
-@@ -15,6 +15,7 @@ build_time_vars = {
-     'CFLAGS': "-DNDEBUG -O2",
-     'CCSHARED': "-fPIC",
-     'LDSHARED': "cc -pthread -shared",
-+    'LDCXXSHARED': "c++ -pthread -shared",
-     'EXT_SUFFIX': so_ext,
-     'SHLIB_SUFFIX': ".so",
-     'AR': "ar",
--- 
-2.20.1
-

diff --git a/dev-python/pypy3-bin/pypy3-bin-7.1.1-r1.ebuild b/dev-python/pypy3-bin/pypy3-bin-7.1.1-r1.ebuild
deleted file mode 100644
index 453ae142dbd..00000000000
--- a/dev-python/pypy3-bin/pypy3-bin-7.1.1-r1.ebuild
+++ /dev/null
@@ -1,188 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# Test runner needs Python 2.
-PYTHON_COMPAT=( python2_7 pypy )
-inherit pax-utils python-any-r1 unpacker
-
-BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy3-bin/${PV}"
-MY_P=pypy3.6-v${PV}
-
-DESCRIPTION="A fast, compliant alternative implementation of Python 3.6 (binary package)"
-HOMEPAGE="http://pypy.org/"
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2
-	amd64? (
-		jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz )
-		!jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz )
-	)
-	x86? (
-		cpu_flags_x86_sse2? (
-			jit? ( ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz )
-			!jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz )
-		)
-		!cpu_flags_x86_sse2? (
-			!jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses.r1.tar.lz )
-		)
-	)"
-
-# Supported variants
-REQUIRED_USE="x86? ( !cpu_flags_x86_sse2? ( !jit ) )"
-
-LICENSE="MIT"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-SLOT="0/71-py36"
-KEYWORDS="~amd64 ~x86"
-IUSE="gdbm +jit libressl sqlite cpu_flags_x86_sse2 test tk"
-
-RDEPEND="
-	app-arch/bzip2:0/1
-	dev-libs/expat:0/0
-	dev-libs/libffi:0/7
-	sys-devel/gcc:*
-	>=sys-libs/glibc-2.28
-	sys-libs/ncurses:0/6
-	sys-libs/zlib:0/1
-	gdbm? ( sys-libs/gdbm:0= )
-	!libressl? ( dev-libs/openssl:0=[-bindist] )
-	libressl? ( dev-libs/libressl:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!dev-python/pypy3:0"
-DEPEND="${RDEPEND}
-	app-arch/lzip
-	app-arch/xz-utils
-	test? ( ${PYTHON_DEPS} )"
-
-S=${WORKDIR}/${MY_P}-src
-
-QA_PREBUILT="
-	usr/lib/pypy3.6/pypy3-c
-	usr/lib/pypy3.6/libpypy3-c.so"
-
-src_prepare() {
-	eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
-	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
-	eapply "${FILESDIR}"/7.0.0_all_distutils_cxx.patch
-
-	sed -e "s^@EPREFIX@^${EPREFIX}^" \
-		-i lib-python/3/distutils/command/install.py || die
-
-	# apply CPython stdlib patches
-	pushd lib-python/3 > /dev/null || die
-	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
-	popd > /dev/null || die
-
-	eapply_user
-}
-
-src_compile() {
-	# Tadaam! PyPy compiled!
-	mv "${WORKDIR}"/${P}*/{libpypy3-c.so,pypy3-c} . || die
-	mv "${WORKDIR}"/${P}*/include/*.h include/ || die
-	mv pypy/module/cpyext/include/*.h include/ || die
-	mv pypy/module/cpyext/parse/*.h include/ || die
-
-	pax-mark m pypy3-c libpypy3-c.so
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy3-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 = {
-#    "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",
-#    "ssl": "_ssl_build.py",
-#    "_blake2": "_blake2/_blake2_build.py",
-#    "_sha3": "_sha3/_sha3_build.py",
-	cffi_targets=( blake2/_blake2 sha3/_sha3 ssl
-		audioop curses syslog pwdgrp resource lzma decimal )
-	use gdbm && cffi_targets+=( gdbm )
-	use sqlite && cffi_targets+=( sqlite3 )
-	use tk && cffi_targets+=( tkinter/tklib )
-
-	einfo "Please disregard the import errors during CFFI cache generation."
-	einfo "They come from modules not built yet."
-
-	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
-		../pypy3-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=
-
-	# 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=./pypy3-c -vv lib-python || die
-}
-
-src_install() {
-	local dest=/usr/lib/pypy3.6
-	einfo "Installing PyPy ..."
-	exeinto "${dest}"
-	doexe pypy3-c libpypy3-c.so
-	pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so"
-	insinto "${dest}"
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r include lib_pypy lib-python
-	dosym ../lib/pypy3.6/pypy3-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
-			"${ED%/}${dest}"/lib_pypy/_sqlite3* \
-			"${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
-
-	einfo "Generating caches and byte-compiling ..."
-
-	local -x PYTHON=${ED%/}${dest}/pypy3-c
-	# we can't use eclass function since PyPy is dumb and always gives
-	# paths relative to the interpreter
-	local PYTHON_SITEDIR=${EPREFIX}/usr/lib/pypy3.6/site-packages
-	python_export pypy3 EPYTHON
-
-	echo "EPYTHON='${EPYTHON}'" > epython.py || die
-	python_domodule epython.py
-
-	einfo "Byte-compiling Python standard library..."
-
-	# compile the installed modules
-	python_optimize "${ED%/}${dest}"
-}

diff --git a/dev-python/pypy3-bin/pypy3-bin-7.1.1.ebuild b/dev-python/pypy3-bin/pypy3-bin-7.1.1.ebuild
deleted file mode 100644
index 0f8954a4f84..00000000000
--- a/dev-python/pypy3-bin/pypy3-bin-7.1.1.ebuild
+++ /dev/null
@@ -1,188 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# Test runner needs Python 2.
-PYTHON_COMPAT=( python2_7 pypy )
-inherit pax-utils python-any-r1 unpacker
-
-BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy3-bin/${PV}"
-MY_P=pypy3.6-v${PV}
-
-DESCRIPTION="A fast, compliant alternative implementation of Python 3.6 (binary package)"
-HOMEPAGE="http://pypy.org/"
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2
-	amd64? (
-		jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz )
-		!jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz )
-	)
-	x86? (
-		cpu_flags_x86_sse2? (
-			jit? ( ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz )
-			!jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz )
-		)
-		!cpu_flags_x86_sse2? (
-			!jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses.tar.lz )
-		)
-	)"
-
-# Supported variants
-REQUIRED_USE="x86? ( !cpu_flags_x86_sse2? ( !jit ) )"
-
-LICENSE="MIT"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-SLOT="0/71-py36"
-KEYWORDS="~amd64 ~x86"
-IUSE="gdbm +jit libressl sqlite cpu_flags_x86_sse2 test tk"
-
-RDEPEND="
-	app-arch/bzip2:0/1
-	dev-libs/expat:0/0
-	dev-libs/libffi:0/7
-	sys-devel/gcc:*
-	>=sys-libs/glibc-2.28
-	sys-libs/ncurses:0/6
-	sys-libs/zlib:0/1
-	gdbm? ( sys-libs/gdbm:0= )
-	!libressl? ( dev-libs/openssl:0=[-bindist] )
-	libressl? ( dev-libs/libressl:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!dev-python/pypy3:0"
-DEPEND="${RDEPEND}
-	app-arch/lzip
-	app-arch/xz-utils
-	test? ( ${PYTHON_DEPS} )"
-
-S=${WORKDIR}/${MY_P}-src
-
-QA_PREBUILT="
-	usr/lib/pypy3.6/pypy3-c
-	usr/lib/pypy3.6/libpypy3-c.so"
-
-src_prepare() {
-	eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
-	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
-	eapply "${FILESDIR}"/7.0.0_all_distutils_cxx.patch
-
-	sed -e "s^@EPREFIX@^${EPREFIX}^" \
-		-i lib-python/3/distutils/command/install.py || die
-
-	# apply CPython stdlib patches
-	pushd lib-python/3 > /dev/null || die
-	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
-	popd > /dev/null || die
-
-	eapply_user
-}
-
-src_compile() {
-	# Tadaam! PyPy compiled!
-	mv "${WORKDIR}"/${P}*/{libpypy3-c.so,pypy3-c} . || die
-	mv "${WORKDIR}"/${P}*/include/*.h include/ || die
-	mv pypy/module/cpyext/include/*.h include/ || die
-	mv pypy/module/cpyext/parse/*.h include/ || die
-
-	pax-mark m pypy3-c libpypy3-c.so
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy3-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 = {
-#    "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",
-#    "ssl": "_ssl_build.py",
-#    "_blake2": "_blake2/_blake2_build.py",
-#    "_sha3": "_sha3/_sha3_build.py",
-	cffi_targets=( blake2/_blake2 sha3/_sha3 ssl
-		audioop curses syslog pwdgrp resource lzma decimal )
-	use gdbm && cffi_targets+=( gdbm )
-	use sqlite && cffi_targets+=( sqlite3 )
-	use tk && cffi_targets+=( tkinter/tklib )
-
-	einfo "Please disregard the import errors during CFFI cache generation."
-	einfo "They come from modules not built yet."
-
-	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
-		../pypy3-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=
-
-	# 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=./pypy3-c -vv lib-python || die
-}
-
-src_install() {
-	local dest=/usr/lib/pypy3.6
-	einfo "Installing PyPy ..."
-	exeinto "${dest}"
-	doexe pypy3-c libpypy3-c.so
-	pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so"
-	insinto "${dest}"
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r include lib_pypy lib-python
-	dosym ../lib/pypy3.6/pypy3-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
-			"${ED%/}${dest}"/lib_pypy/_sqlite3* \
-			"${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
-
-	einfo "Generating caches and byte-compiling ..."
-
-	local -x PYTHON=${ED%/}${dest}/pypy3-c
-	# we can't use eclass function since PyPy is dumb and always gives
-	# paths relative to the interpreter
-	local PYTHON_SITEDIR=${EPREFIX}/usr/lib/pypy3.6/site-packages
-	python_export pypy3 EPYTHON
-
-	echo "EPYTHON='${EPYTHON}'" > epython.py || die
-	python_domodule epython.py
-
-	einfo "Byte-compiling Python standard library..."
-
-	# compile the installed modules
-	python_optimize "${ED%/}${dest}"
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3-bin/, dev-python/pypy3-bin/files/
@ 2019-12-30 11:59 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2019-12-30 11:59 UTC (permalink / raw
  To: gentoo-commits

commit:     46fca434de1e6e299e918018b70b0fcc9d635478
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 30 11:05:01 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Dec 30 11:57:55 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46fca434

dev-python/pypy3-bin: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pypy3-bin/Manifest                      |   5 -
 ....UnixCCompiler.runtime_library_dir_option.patch |  11 -
 dev-python/pypy3-bin/files/7.0.0-gentoo-path.patch |  52 ----
 .../pypy3-bin/files/7.2.0-distutils-cxx.patch      | 306 ---------------------
 .../files/python-3.5-distutils-OO-build.patch      |  80 ------
 dev-python/pypy3-bin/pypy3-bin-7.2.0-r1.ebuild     | 184 -------------
 6 files changed, 638 deletions(-)

diff --git a/dev-python/pypy3-bin/Manifest b/dev-python/pypy3-bin/Manifest
deleted file mode 100644
index 5fce1c7302c..00000000000
--- a/dev-python/pypy3-bin/Manifest
+++ /dev/null
@@ -1,5 +0,0 @@
-DIST pypy3-bin-7.2.0-amd64+bzip2+jit+ncurses.tar.lz 11429130 BLAKE2B 41de1efcfc72704a3b8fcee1fa0ca030bca0dc07b75856dbc9ee5a9e40c6298406360d3342dffde38131f6d708a6dc07d3708d6e6478dc95d7c6a6ece2d7b86b SHA512 7a97797a961e12d5498dadb5bc87ad9d43a9e9dea88a7617236dba79230f5f0cc02ab8ab21a60c279cca4a341dd3d814d50d4029b94be1f525bf7b9294d19269
-DIST pypy3-bin-7.2.0-amd64+bzip2+ncurses.tar.lz 7174734 BLAKE2B c2f916433a6105a04c70f6b53c43dc479b64f26794a75a6e6b7122fb7d2f4f825c47d2eb82cf95ecb795e494879718aad88661b2fe12faa87b737cbcd20b5a47 SHA512 c4a635b6b819a104ff1b1f3b39363c9bb5cab4299cff2fb6e78c64984691d3116b8378e8a47500f9c626bbf48c4a3a8d26fa23fe2daa945bcc3dc97db9b4a8c9
-DIST pypy3-bin-7.2.0-x86+bzip2+jit+ncurses+sse2.tar.lz 8662494 BLAKE2B bf37ac682098c49efba0f05999ce70368c91cbc0012cdcde86303424fd225eb50a8b6fa058e0c3a9511c2668da47a042f1b836f9142ed4b112db43da3addd6ce SHA512 6fc0d15e5d82ab06937ca099d1ea2f77d00a6d4e1b4c6d9637c39944c0f077ae0c5eb0edb7c6746aaafb76cb0e8a0458340c888e340df2c8438515f55a38017e
-DIST pypy3-bin-7.2.0-x86+bzip2+ncurses+sse2.tar.lz 5625900 BLAKE2B d6642cc8b37f9c032ed23da41c5597bd41615c55312bee5b0de3e8543fb74ecf2504c74d9d3c8a51c0fc42285812835cab70d6f8a5a5f15f0d7b637260e0a656 SHA512 1014ea6d37cfa7a6cb60eb47b6a0e959036aaa5c774852484a57f75d4e5450fb50c1b170f571a1288ba70d710b0731e946773cb05751eca6478b4fffb185dc94
-DIST pypy3.6-v7.2.0-src.tar.bz2 21850076 BLAKE2B 756ea3034fe8971c979ec83c9cbfac55a680f3ef03b276475aa4318f3480ae5ede609b8413412df64db553a33979670498b1f97184f3b57406619c9db7f01127 SHA512 bcbb53062a473d504bcc082cf6286f6169c83d1f38d22c4d7c4e46ddc32bca9d91e71194637e6650db5bec02b29fe262b22fe236d627b6bc3e6e0c59c66c07cc

diff --git a/dev-python/pypy3-bin/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch b/dev-python/pypy3-bin/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch
deleted file mode 100644
index 29d99dcfdb7..00000000000
--- a/dev-python/pypy3-bin/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/lib-python/3/distutils/unixccompiler.py
-+++ b/lib-python/3/distutils/unixccompiler.py
-@@ -297,7 +297,7 @@
-         # this time, there's no way to determine this information from
-         # the configuration data stored in the Python installation, so
-         # we use this hack.
--        compiler = os.path.basename(sysconfig.get_config_var("CC"))
-+        compiler = os.path.basename(self.compiler[0])
-         if sys.platform[:6] == "darwin":
-             # MacOSX's linker doesn't understand the -R flag at all
-             return "-L" + dir

diff --git a/dev-python/pypy3-bin/files/7.0.0-gentoo-path.patch b/dev-python/pypy3-bin/files/7.0.0-gentoo-path.patch
deleted file mode 100644
index 135e496f253..00000000000
--- a/dev-python/pypy3-bin/files/7.0.0-gentoo-path.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 44c16c344f137cc91a145294c4124174fc25ad16 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Fri, 27 Nov 2015 17:02:42 +0100
-Subject: [PATCH] Gentoo: override paths for system-wide install based on
- sys.prefix
-
-Override all default distutils install paths to ones suitable for
-system-wide install when sys.prefix indicates we're running the Gentoo
-system-wide install of PyPy with no prefix overrides (e.g. virtualenv).
-
-Fixes: https://bugs.gentoo.org/462306
-Fixes: https://bugs.gentoo.org/465546
-
-[updated for 7.0.0]
----
- lib-python/3/distutils/command/install.py | 13 ++++++++++++-
- 1 file changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/lib-python/3/distutils/command/install.py b/lib-python/3/distutils/command/install.py
-index 77a1827d4b..255603967f 100644
---- a/lib-python/3/distutils/command/install.py
-+++ b/lib-python/3/distutils/command/install.py
-@@ -50,6 +50,13 @@ INSTALL_SCHEMES = {
-         'scripts': '$base/bin',
-         'data'   : '$base',
-         },
-+    'gentoo': {
-+        'purelib': '$base/site-packages',
-+        'platlib': '$base/site-packages',
-+        'headers': '$base/include',
-+        'scripts': '@EPREFIX@/usr/bin',
-+        'data'   : '@EPREFIX@/usr',
-+        },
-     }
- 
- # user site schemes
-@@ -461,7 +468,11 @@ class install(Command):
-         # it's the caller's problem if they supply a bad name!
-         if (hasattr(sys, 'pypy_version_info') and
-             not name.endswith(('_user', '_home'))):
--            name = 'pypy'
-+            if self.install_base == os.path.normpath('@EPREFIX@/usr/lib/pypy3.6'):
-+                # override paths for system-wide install
-+                name = 'gentoo'
-+            else:
-+                name = 'pypy'
-         scheme = INSTALL_SCHEMES[name]
-         for key in SCHEME_KEYS:
-             attrname = 'install_' + key
--- 
-2.21.0.rc1
-

diff --git a/dev-python/pypy3-bin/files/7.2.0-distutils-cxx.patch b/dev-python/pypy3-bin/files/7.2.0-distutils-cxx.patch
deleted file mode 100644
index 89a38050c80..00000000000
--- a/dev-python/pypy3-bin/files/7.2.0-distutils-cxx.patch
+++ /dev/null
@@ -1,306 +0,0 @@
-diff --git a/lib-python/3/distutils/cygwinccompiler.py b/lib-python/3/distutils/cygwinccompiler.py
-index 1c36990..ead3174 100644
---- a/lib-python/3/distutils/cygwinccompiler.py
-+++ b/lib-python/3/distutils/cygwinccompiler.py
-@@ -125,8 +125,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
-@@ -140,9 +142,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":
-@@ -166,8 +172,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 -O -Wall',
-                              compiler_so='gcc -mdll -O -Wall',
-                              compiler_cxx='g++ -O -Wall',
-+                             compiler_so_cxx='g++ -mdll -O -Wall',
-                              linker_exe='gcc',
-                              linker_so='%s %s %s'
-                                         % (self.linker_dll, shared_option,
-+                                           entry_point),
-+                             linker_exe_cxx='g++',
-+                             linker_so_cxx='%s %s %s'
-+                                        % (self.linker_dll_cxx, 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/sysconfig_cpython.py b/lib-python/3/distutils/sysconfig_cpython.py
-index b8340f1..a8c5473 100644
---- a/lib-python/3/distutils/sysconfig_cpython.py
-+++ b/lib-python/3/distutils/sysconfig_cpython.py
-@@ -170,9 +170,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']
-@@ -187,19 +190,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:
-@@ -208,13 +219,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/sysconfig_pypy.py b/lib-python/3/distutils/sysconfig_pypy.py
-index bf1748e..70dfd72 100644
---- a/lib-python/3/distutils/sysconfig_pypy.py
-+++ b/lib-python/3/distutils/sysconfig_pypy.py
-@@ -145,36 +145,52 @@ 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']
--            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:
-@@ -183,13 +199,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 2944ceb..cf2f219 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":
-@@ -125,12 +128,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)
- 
-@@ -188,22 +198,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)
-diff --git a/lib_pypy/_sysconfigdata.py b/lib_pypy/_sysconfigdata.py
-index 4d2b0bc..5ed9641 100644
---- a/lib_pypy/_sysconfigdata.py
-+++ b/lib_pypy/_sysconfigdata.py
-@@ -15,6 +15,7 @@ build_time_vars = {
-     'CFLAGS': "-DNDEBUG -O2",
-     'CCSHARED': "-fPIC",
-     'LDSHARED': "cc -pthread -shared",
-+    'LDCXXSHARED': "c++ -pthread -shared",
-     'EXT_SUFFIX': so_ext,
-     'SHLIB_SUFFIX': ".so",
-     'AR': "ar",

diff --git a/dev-python/pypy3-bin/files/python-3.5-distutils-OO-build.patch b/dev-python/pypy3-bin/files/python-3.5-distutils-OO-build.patch
deleted file mode 100644
index ff4446662a9..00000000000
--- a/dev-python/pypy3-bin/files/python-3.5-distutils-OO-build.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 90507018442f9adabb586fd3d0a0206b9c2f2f50 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sun, 5 Jun 2016 08:18:01 +0200
-Subject: [PATCH] distutils: make -OO enable both opt-1 and opt-2 optimization
-
-Bug: http://bugs.python.org/issue27226
-Bug: https://bugs.gentoo.org/585060
----
- distutils/command/build_py.py    |  8 ++++----
- distutils/command/install_lib.py | 12 ++++++------
- 2 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/distutils/command/build_py.py b/distutils/command/build_py.py
-index cf0ca57..838d4e4 100644
---- a/distutils/command/build_py.py
-+++ b/distutils/command/build_py.py
-@@ -315,9 +315,9 @@ class build_py (Command):
-                 if self.compile:
-                     outputs.append(importlib.util.cache_from_source(
-                         filename, optimization=''))
--                if self.optimize > 0:
-+                for opt in range(1, self.optimize + 1):
-                     outputs.append(importlib.util.cache_from_source(
--                        filename, optimization=self.optimize))
-+                        filename, optimization=opt))
- 
-         outputs += [
-             os.path.join(build_dir, filename)
-@@ -387,8 +387,8 @@ class build_py (Command):
-         if self.compile:
-             byte_compile(files, optimize=0,
-                          force=self.force, prefix=prefix, dry_run=self.dry_run)
--        if self.optimize > 0:
--            byte_compile(files, optimize=self.optimize,
-+        for opt in range(1, self.optimize + 1):
-+            byte_compile(files, optimize=opt,
-                          force=self.force, prefix=prefix, dry_run=self.dry_run)
- 
- class build_py_2to3(build_py, Mixin2to3):
-diff --git a/distutils/command/install_lib.py b/distutils/command/install_lib.py
-index 6154cf0..049b662 100644
---- a/distutils/command/install_lib.py
-+++ b/distutils/command/install_lib.py
-@@ -24,8 +24,8 @@ class install_lib(Command):
-     #   2) compile .pyc only (--compile --no-optimize; default)
-     #   3) compile .pyc and "opt-1" .pyc (--compile --optimize)
-     #   4) compile "opt-1" .pyc only (--no-compile --optimize)
--    #   5) compile .pyc and "opt-2" .pyc (--compile --optimize-more)
--    #   6) compile "opt-2" .pyc only (--no-compile --optimize-more)
-+    #   5) compile .pyc, "opt-1" and "opt-2" .pyc (--compile --optimize-more)
-+    #   6) compile "opt-1" and "opt-2" .pyc (--no-compile --optimize-more)
-     #
-     # The UI for this is two options, 'compile' and 'optimize'.
-     # 'compile' is strictly boolean, and only decides whether to
-@@ -132,8 +132,8 @@ class install_lib(Command):
-             byte_compile(files, optimize=0,
-                          force=self.force, prefix=install_root,
-                          dry_run=self.dry_run)
--        if self.optimize > 0:
--            byte_compile(files, optimize=self.optimize,
-+        for opt in range(1, self.optimize + 1):
-+            byte_compile(files, optimize=opt,
-                          force=self.force, prefix=install_root,
-                          verbose=self.verbose, dry_run=self.dry_run)
- 
-@@ -167,9 +167,9 @@ class install_lib(Command):
-             if self.compile:
-                 bytecode_files.append(importlib.util.cache_from_source(
-                     py_file, optimization=''))
--            if self.optimize > 0:
-+            for opt in range(1, self.optimize + 1):
-                 bytecode_files.append(importlib.util.cache_from_source(
--                    py_file, optimization=self.optimize))
-+                    py_file, optimization=opt))
- 
-         return bytecode_files
- 
--- 
-2.8.3
-

diff --git a/dev-python/pypy3-bin/pypy3-bin-7.2.0-r1.ebuild b/dev-python/pypy3-bin/pypy3-bin-7.2.0-r1.ebuild
deleted file mode 100644
index 11871340755..00000000000
--- a/dev-python/pypy3-bin/pypy3-bin-7.2.0-r1.ebuild
+++ /dev/null
@@ -1,184 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# Test runner needs Python 2.
-PYTHON_COMPAT=( python2_7 pypy )
-inherit pax-utils python-any-r1 unpacker
-
-BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy3-bin/${PV}"
-MY_P=pypy3.6-v${PV}
-
-DESCRIPTION="Pre-built version of PyPy3"
-HOMEPAGE="https://pypy.org/"
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2
-	amd64? (
-		jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz )
-		!jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz )
-	)
-	x86? (
-		cpu_flags_x86_sse2? (
-			jit? ( ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz )
-			!jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz )
-		)
-	)"
-
-LICENSE="MIT"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-SLOT="0/72-py36"
-KEYWORDS="~amd64 ~x86"
-IUSE="gdbm +jit libressl sqlite cpu_flags_x86_sse2 test tk"
-RESTRICT="!test? ( test )"
-# Supported variants
-REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
-
-RDEPEND="
-	app-arch/bzip2:0/1
-	dev-libs/expat:0/0
-	dev-libs/libffi:0/7
-	sys-devel/gcc:*
-	>=sys-libs/glibc-2.28
-	sys-libs/ncurses:0/6
-	sys-libs/zlib:0/1
-	gdbm? ( sys-libs/gdbm:0= )
-	!libressl? ( dev-libs/openssl:0= )
-	libressl? ( dev-libs/libressl:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!dev-python/pypy3:0"
-DEPEND="${RDEPEND}
-	app-arch/lzip
-	app-arch/xz-utils
-	test? ( ${PYTHON_DEPS} )"
-
-S=${WORKDIR}/${MY_P}-src
-
-QA_PREBUILT="
-	usr/lib/pypy3.6/pypy3-c
-	usr/lib/pypy3.6/libpypy3-c.so"
-
-src_prepare() {
-	eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
-	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
-	eapply "${FILESDIR}"/7.2.0-distutils-cxx.patch
-
-	sed -e "s^@EPREFIX@^${EPREFIX}^" \
-		-i lib-python/3/distutils/command/install.py || die
-
-	# apply CPython stdlib patches
-	pushd lib-python/3 > /dev/null || die
-	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
-	popd > /dev/null || die
-
-	eapply_user
-}
-
-src_compile() {
-	# Tadaam! PyPy compiled!
-	mv "${WORKDIR}"/${P}*/{libpypy3-c.so,pypy3-c} . || die
-	mv "${WORKDIR}"/${P}*/include/*.h include/ || die
-	mv pypy/module/cpyext/include/*.h include/ || die
-	mv pypy/module/cpyext/parse/*.h include/ || die
-
-	pax-mark m pypy3-c libpypy3-c.so
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy3-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 = {
-#    "_blake2": "_blake2/_blake2_build.py",
-#    "_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,
-#    "lzma": "_lzma_build.py",
-#    "_decimal": "_decimal_build.py",
-#    "ssl": "_ssl_build.py",
-#    "_blake2": "_blake2/_blake2_build.py",
-#    "_sha3": "_sha3/_sha3_build.py",
-	cffi_targets=( blake2/_blake2 sha3/_sha3 ssl
-		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 lib_pypy || die
-	for t in "${cffi_targets[@]}"; do
-		# tkinter doesn't work via -m
-		../pypy3-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=
-
-	# 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=./pypy3-c -vv lib-python || die
-}
-
-src_install() {
-	local dest=/usr/lib/pypy3.6
-	einfo "Installing PyPy ..."
-	exeinto "${dest}"
-	doexe pypy3-c libpypy3-c.so
-	pax-mark m "${ED}${dest}/pypy3-c" "${ED}${dest}/libpypy3-c.so"
-	insinto "${dest}"
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r include lib_pypy lib-python
-	dosym ../lib/pypy3.6/pypy3-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED}${dest}"/lib_pypy/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED}${dest}"/lib-python/*3/sqlite3 \
-			"${ED}${dest}"/lib_pypy/_sqlite3* \
-			"${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
-
-	einfo "Generating caches and byte-compiling ..."
-
-	local -x PYTHON=${ED}${dest}/pypy3-c
-	# we can't use eclass function since PyPy is dumb and always gives
-	# paths relative to the interpreter
-	local PYTHON_SITEDIR=${EPREFIX}/usr/lib/pypy3.6/site-packages
-	python_export pypy3 EPYTHON
-
-	echo "EPYTHON='${EPYTHON}'" > epython.py || die
-	python_domodule epython.py
-
-	einfo "Byte-compiling Python standard library..."
-
-	# compile the installed modules
-	python_optimize "${ED}${dest}"
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-12-30 11:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-01  8:07 [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3-bin/, dev-python/pypy3-bin/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2019-12-30 11:59 Michał Górny
2019-11-01  8:07 Michał Górny
2019-10-18 16:24 Michał Górny
2017-10-15  9:38 Michał Górny
2016-06-09 19:46 Michał Górny
2016-05-05  9:14 Patrice Clement
2016-03-03 10:47 Michał Górny
2016-03-03 10:47 Michał Górny
2016-02-06 22:45 Michał Górny
2016-02-06 22:45 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox