summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-12-30 12:17:39 +0100
committerMichał Górny <mgorny@gentoo.org>2022-12-30 15:32:54 +0100
commitb3e85530e81b9a8249815355f1e53b39e0c6eab1 (patch)
tree3a78d4c06e18a2017e1d1a01f4d950ac2c89b8d7
parentdev-python/pypy: Bump to 7.3.11 (diff)
downloadgentoo-b3e85530e81b9a8249815355f1e53b39e0c6eab1.tar.gz
gentoo-b3e85530e81b9a8249815355f1e53b39e0c6eab1.tar.bz2
gentoo-b3e85530e81b9a8249815355f1e53b39e0c6eab1.zip
dev-python/pypy3-exe: Bump to 7.3.11
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-python/pypy3-exe/Manifest2
-rw-r--r--dev-python/pypy3-exe/pypy3-exe-7.3.11.ebuild126
2 files changed, 128 insertions, 0 deletions
diff --git a/dev-python/pypy3-exe/Manifest b/dev-python/pypy3-exe/Manifest
index 4c1972bf2684..c04d96f5f6e5 100644
--- a/dev-python/pypy3-exe/Manifest
+++ b/dev-python/pypy3-exe/Manifest
@@ -1,2 +1,4 @@
DIST pypy3.9-gentoo-patches-7.3.10.tar.xz 10012 BLAKE2B 45186cf6e8608995af6c0d763a2d676d862ba886acb3a0e0f0056309123d0db75240a175ecf90e24889a139f228dffc788872a5ca84736f4ce0901eda0acb789 SHA512 e6c39666f34bb7e2db72f153fad2d89421b30c04de88812637027a7e8a73bccc7620a7296b2b205464ad7fd0c911bc7a7f0dc0fc504dc8d163f7087b8b0c61b3
+DIST pypy3.9-gentoo-patches-7.3.11.tar.xz 6444 BLAKE2B adcc1ae4c3ae2c5317a05d6de51785945625d8bcc7cb35bd6608fa80f09b37c483c95663eacb0353013a5abec308d25b12666699c65512f5f3a6d7345f2b5b18 SHA512 f2064ecffa09ba23f5f8c281ca4c8c0740cb6b57185d66c02eec2bcb77cfb566b1a2db4f52c472bcaf0d5fb759ee8003b27761af37785d12465c2010fd73c49d
DIST pypy3.9-v7.3.10-src.tar.bz2 23416039 BLAKE2B 1b13e8bbe6c38c4b9183a632063aeed593986bc7906cfe527fa7534d29f9b1ae0f1e6d3795ff73be19f5737c3fd9d1b3cc2777f30d9237d853e4266bea60a5bb SHA512 1ed3fc9cdda7f3144141fc6a37b124e7141cb3f294ce8b5ca3c3aa30a3c58715e168879decaa796c890a9a287c82c2dbabb81db5f6b8d17f4215d7d3261fe9a8
+DIST pypy3.9-v7.3.11-src.tar.bz2 23460769 BLAKE2B fa8a827c28813243926c8689addb008c0a43acdc3f81a18749a8f2c1926b6294f2c0c95a4c315e3b77ce84b4f337af7a0bce5daf8dcb60ead965532d4af183cb SHA512 33c978ffbeeb39453028d1d1646ccfdace062ce48a5d939245bea41643038dd3687e80e34f88fa0622bcb175d7dd78f75cbe36b24229c8052f09d2d17dcdfd8c
diff --git a/dev-python/pypy3-exe/pypy3-exe-7.3.11.ebuild b/dev-python/pypy3-exe/pypy3-exe-7.3.11.ebuild
new file mode 100644
index 000000000000..b6be3f4fae2a
--- /dev/null
+++ b/dev-python/pypy3-exe/pypy3-exe-7.3.11.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit check-reqs pax-utils toolchain-funcs
+
+PYPY_PV=${PV%_p*}
+MY_P=pypy3.9-v${PYPY_PV/_}
+PATCHSET="pypy3.9-gentoo-patches-${PV/_}"
+
+DESCRIPTION="PyPy3 executable (build from source)"
+HOMEPAGE="https://www.pypy.org/"
+SRC_URI="
+ https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2
+ https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
+"
+S="${WORKDIR}/${MY_P}-src"
+
+LICENSE="MIT"
+SLOT="3.9-${PYPY_PV}"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+jit low-memory ncurses cpu_flags_x86_sse2"
+
+RDEPEND="
+ app-arch/bzip2:0=
+ dev-libs/expat:0=
+ dev-libs/libffi:0=
+ >=sys-libs/zlib-1.1.3:0=
+ virtual/libintl:0=
+ ncurses? ( sys-libs/ncurses:0= )
+ !dev-python/pypy3-exe-bin:${SLOT}
+"
+DEPEND="
+ ${RDEPEND}
+"
+BDEPEND="
+ dev-python/pypy
+"
+
+check_env() {
+ if use low-memory; then
+ CHECKREQS_MEMORY="1750M"
+ use amd64 && CHECKREQS_MEMORY="3500M"
+ else
+ CHECKREQS_MEMORY="3G"
+ use amd64 && CHECKREQS_MEMORY="6G"
+ fi
+
+ check-reqs_pkg_pretend
+}
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && check_env
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && check_env
+}
+
+src_prepare() {
+ local PATCHES=(
+ "${WORKDIR}/${PATCHSET}"
+ )
+ default
+}
+
+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=(
+ --no-shared
+ $(usex jit -Ojit -O2)
+
+ ${jit_backend}
+
+ pypy/goal/targetpypystandalone
+ --withmod-bz2
+ $(usex ncurses --with{,out}mod-_minimal_curses)
+ )
+
+ local interp=( pypy )
+ if use low-memory; then
+ local -x PYPY_GC_MAX_DELTA=200MB
+ interp+=( --jit loop_longevity=300 )
+ fi
+
+ # translate into the C sources
+ # we're going to build them ourselves since otherwise pypy does not
+ # free up the unneeded memory before spawning the compiler
+ set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
+ echo -e "\033[1m${@}\033[0m"
+ "${@}" || die "translation failed"
+}
+
+src_compile() {
+ emake -C "${T}"/usession*-0/testing_1
+}
+
+src_install() {
+ cd "${T}"/usession*-0 || die
+ newbin testing_1/pypy3.9-c pypy3.9-c-${PYPY_PV}
+ insinto /usr/include/pypy3.9/${PYPY_PV}
+ doins *.h
+ pax-mark m "${ED}/usr/bin/pypy3.9-c-${PYPY_PV}"
+}