commit:     7660556cdb093779382f3228452fe6a2cd237ee3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 14 13:05:51 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Feb 14 22:07:15 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7660556c

dev-python/pypy3: Sync live ebuild

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

 dev-python/pypy3/pypy3-9999.ebuild | 61 +++++++++++---------------------------
 1 file changed, 18 insertions(+), 43 deletions(-)

diff --git a/dev-python/pypy3/pypy3-9999.ebuild 
b/dev-python/pypy3/pypy3-9999.ebuild
index 9aabe19e3d3..3b0362d0252 100644
--- a/dev-python/pypy3/pypy3-9999.ebuild
+++ b/dev-python/pypy3/pypy3-9999.ebuild
@@ -1,24 +1,26 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 # pypy3 needs to be built using python 2
 PYTHON_COMPAT=( python2_7 pypy )
 EHG_PROJECT="pypy"
 EHG_REPO_URI="https://bitbucket.org/pypy/pypy";
-EHG_REVISION="py3k"
-inherit check-reqs mercurial pax-utils python-any-r1 toolchain-funcs 
versionator
+EHG_REVISION="py3.5"
+inherit check-reqs mercurial pax-utils python-any-r1 toolchain-funcs
 
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.3) 
language"
+MY_P=pypy3.5-v${PV}
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (3.5) 
language"
 HOMEPAGE="http://pypy.org/";
 SRC_URI=""
 
 LICENSE="MIT"
 # pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-SLOT="0/60"
+SLOT="0/71"
 KEYWORDS=""
-IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite 
cpu_flags_x86_sse2 tk"
+IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite tk"
 
 RDEPEND=">=sys-libs/zlib-1.1.3:0=
        virtual/libffi:0=
@@ -47,8 +49,7 @@ DEPEND="${RDEPEND}
                )
        )"
 
-# Who would care about predictable directory names?
-S="${WORKDIR}/pypy3-v${PV%_*}-src"
+S="${WORKDIR}/${MY_P}-src"
 
 check_env() {
        if use low-memory; then
@@ -91,17 +92,12 @@ src_unpack() {
 }
 
 src_prepare() {
-       eapply "${FILESDIR}/4.0.0-gentoo-path.patch"
        eapply 
"${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
        eapply "${FILESDIR}"/5.9.0-shared-lib.patch     # 517002
-
-       sed -e "s^@EPREFIX@^${EPREFIX}^" \
-               -e "s^@libdir@^$(get_libdir)^" \
-               -i lib-python/3/distutils/command/install.py || die
+       eapply "${FILESDIR}"/7.0.0_all_distutils_cxx.patch
 
        # apply CPython stdlib patches
        pushd lib-python/3 > /dev/null || die
-       eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch
        eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
        popd > /dev/null || die
 
@@ -111,32 +107,12 @@ src_prepare() {
 src_configure() {
        tc-export CC
 
-       local jit_backend
-       if use jit; then
-               jit_backend='--jit-backend='
-
-               # We only need the explicit sse2 switch for x86.
-               # On other arches we can rely on autodetection which uses
-               # compiler macros. Plus, --jit-backend= doesn't accept all
-               # the modern values...
-
-               if use x86; then
-                       if use cpu_flags_x86_sse2; then
-                               jit_backend+=x86
-                       else
-                               jit_backend+=x86-without-sse2
-                       fi
-               else
-                       jit_backend+=auto
-               fi
-       fi
-
        local args=(
                --shared
                $(usex jit -Ojit -O2)
                $(usex sandbox --sandbox '')
 
-               ${jit_backend}
+               --jit-backend=auto
 
                pypy/goal/targetpypystandalone
        )
@@ -197,7 +173,7 @@ src_compile() {
 #    "resource": "_resource_build.py" if sys.platform != "win32" else None,
 #    "lzma": "_lzma_build.py",
 #    "_decimal": "_decimal_build.py",
-#    "ssl": "_ssl_build.py",
+#    "_ssl": "_ssl_build.py",
        cffi_targets=( audioop syslog pwdgrp resource lzma decimal ssl )
        use gdbm && cffi_targets+=( gdbm )
        use ncurses && cffi_targets+=( curses )
@@ -228,7 +204,7 @@ src_test() {
 }
 
 src_install() {
-       local dest=/usr/$(get_libdir)/pypy3
+       local dest=/usr/lib/pypy3.5
        einfo "Installing PyPy ..."
        exeinto "${dest}"
        doexe pypy3-c libpypy3-c.so
@@ -237,16 +213,15 @@ src_install() {
        # preserve mtimes to avoid obsoleting caches
        insopts -p
        doins -r include lib_pypy lib-python
-       dosym ../$(get_libdir)/pypy3/pypy3-c /usr/bin/pypy3
+       dosym ../lib/pypy3.5/pypy3-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
+               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.py \
+                       "${ED%/}${dest}"/lib_pypy/_sqlite3* \
                        "${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || 
die
        fi
        if ! use tk; then
@@ -260,7 +235,7 @@ src_install() {
        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/$(get_libdir)/pypy3/site-packages
+       local PYTHON_SITEDIR=${EPREFIX}/usr/lib/pypy3.5/site-packages
        python_export pypy3 EPYTHON
 
        echo "EPYTHON='${EPYTHON}'" > epython.py || die

Reply via email to