|
Lines 1-13
Link Here
|
| 1 |
# Copyright 1999-2018 Gentoo Foundation |
1 |
# Copyright 1999-2019 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
|
3 |
|
| 4 |
EAPI=6 |
4 |
EAPI=7 |
| 5 |
|
5 |
|
| 6 |
# pypy3 needs to be built using python 2 |
6 |
# pypy3 needs to be built using python 2 |
| 7 |
PYTHON_COMPAT=( python2_7 pypy ) |
7 |
PYTHON_COMPAT=( python2_7 pypy ) |
| 8 |
inherit check-reqs pax-utils python-any-r1 toolchain-funcs versionator |
8 |
inherit check-reqs pax-utils python-any-r1 toolchain-funcs |
| 9 |
|
9 |
|
| 10 |
MY_P=pypy3-v${PV} |
10 |
MY_P=pypy3.5-v${PV} |
| 11 |
|
11 |
|
| 12 |
DESCRIPTION="A fast, compliant alternative implementation of the Python (3.5) language" |
12 |
DESCRIPTION="A fast, compliant alternative implementation of the Python (3.5) language" |
| 13 |
HOMEPAGE="http://pypy.org/" |
13 |
HOMEPAGE="http://pypy.org/" |
|
Lines 15-21
Link Here
|
| 15 |
|
15 |
|
| 16 |
LICENSE="MIT" |
16 |
LICENSE="MIT" |
| 17 |
# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))' |
17 |
# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))' |
| 18 |
SLOT="0/60" |
18 |
SLOT="0/71" |
| 19 |
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
19 |
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
| 20 |
IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite tk" |
20 |
IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite tk" |
| 21 |
|
21 |
|
|
Lines 84-100
Link Here
|
| 84 |
} |
84 |
} |
| 85 |
|
85 |
|
| 86 |
src_prepare() { |
86 |
src_prepare() { |
| 87 |
eapply "${FILESDIR}/4.0.0-gentoo-path.patch" |
|
|
| 88 |
eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
87 |
eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
| 89 |
eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002 |
88 |
eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002 |
| 90 |
|
89 |
|
| 91 |
sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
90 |
# apply CPython stdlib patches |
| 92 |
-e "s^@libdir@^$(get_libdir)^" \ |
91 |
eapply "${FILESDIR}"/7.0.0_all_distutils_cxx.patch |
| 93 |
-i lib-python/3/distutils/command/install.py || die |
|
|
| 94 |
|
| 95 |
# apply CPython stdlib patches |
| 96 |
pushd lib-python/3 > /dev/null || die |
92 |
pushd lib-python/3 > /dev/null || die |
| 97 |
eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch |
|
|
| 98 |
eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch |
93 |
eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch |
| 99 |
popd > /dev/null || die |
94 |
popd > /dev/null || die |
| 100 |
|
95 |
|
|
Lines 201-207
Link Here
|
| 201 |
} |
196 |
} |
| 202 |
|
197 |
|
| 203 |
src_install() { |
198 |
src_install() { |
| 204 |
local dest=/usr/$(get_libdir)/pypy3 |
199 |
local dest=/usr/$(get_libdir)/pypy3.5 |
| 205 |
einfo "Installing PyPy ..." |
200 |
einfo "Installing PyPy ..." |
| 206 |
exeinto "${dest}" |
201 |
exeinto "${dest}" |
| 207 |
doexe pypy3-c libpypy3-c.so |
202 |
doexe pypy3-c libpypy3-c.so |
|
Lines 210-216
Link Here
|
| 210 |
# preserve mtimes to avoid obsoleting caches |
205 |
# preserve mtimes to avoid obsoleting caches |
| 211 |
insopts -p |
206 |
insopts -p |
| 212 |
doins -r include lib_pypy lib-python |
207 |
doins -r include lib_pypy lib-python |
| 213 |
dosym ../$(get_libdir)/pypy3/pypy3-c /usr/bin/pypy3 |
208 |
dosym ../$(get_libdir)/pypy3.5/pypy3-c /usr/bin/pypy3 |
| 214 |
dodoc README.rst |
209 |
dodoc README.rst |
| 215 |
|
210 |
|
| 216 |
if ! use gdbm; then |
211 |
if ! use gdbm; then |
|
Lines 232-238
Link Here
|
| 232 |
local -x PYTHON=${ED%/}${dest}/pypy3-c |
227 |
local -x PYTHON=${ED%/}${dest}/pypy3-c |
| 233 |
# we can't use eclass function since PyPy is dumb and always gives |
228 |
# we can't use eclass function since PyPy is dumb and always gives |
| 234 |
# paths relative to the interpreter |
229 |
# paths relative to the interpreter |
| 235 |
local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages |
230 |
local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3.5/site-packages |
| 236 |
python_export pypy3 EPYTHON |
231 |
python_export pypy3 EPYTHON |
| 237 |
|
232 |
|
| 238 |
echo "EPYTHON='${EPYTHON}'" > epython.py || die |
233 |
echo "EPYTHON='${EPYTHON}'" > epython.py || die |