commit:     ac2e2988f0a6ebf3e5cd890f0388044da1ff1230
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 14 06:32:49 2026 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Mar 14 09:45:42 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac2e2988

dev-lang/pypy3-exe: Bump to 3.11.7.3.21

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

 dev-lang/pypy3-exe/Manifest                     |   2 +
 dev-lang/pypy3-exe/pypy3-exe-3.11.7.3.21.ebuild | 137 ++++++++++++++++++++++++
 2 files changed, 139 insertions(+)

diff --git a/dev-lang/pypy3-exe/Manifest b/dev-lang/pypy3-exe/Manifest
index 17f039736e67..29c84f922ba0 100644
--- a/dev-lang/pypy3-exe/Manifest
+++ b/dev-lang/pypy3-exe/Manifest
@@ -1,2 +1,4 @@
 DIST pypy3.11-gentoo-patches-7.3.20.tar.xz 3108 BLAKE2B 
2af9b49714010aa0c0eb7161b6cda2b7a0199b2c6d4abadbc05984b4dce18324b0d22655d1621098376d6a7da01341dbd730c62fa3b6d64967dc5ee16bd90fb9
 SHA512 
780d69f67d1594ae39ce8c3a4d743b627631466c42b11e9f84909fc6a37e0b0f54eb82569f62c588eb9214b3235c204e3684ddcde8785a0e6d360d7806d35fd2
+DIST pypy3.11-gentoo-patches-7.3.21.tar.xz 3104 BLAKE2B 
fa8d166f340f1b1be14e5f74b0e9dcb792805cd90cc4c2b38dbe9a57eb40cc105ac838d7f90b2e7d8e67c440feaefb768e2cff2dec5ecc3ebb19277183ff8ed4
 SHA512 
cfd7a5a3320128d154e4c4408d7489e86b50d98e7ffc35a0dc8e609a2d5e5c1209ccaa2b2d8b1c4f2ab9cca23ca0d44c6d88825ad91399be6f44d1b938d78c4c
 DIST pypy3.11-v7.3.20-src.tar.bz2 24907202 BLAKE2B 
eef877362365908b665cbd0ea266daebe5fa7a3f224ac0d133664244b712214e2ae93ab655e2f82257beef125c3cef301e50810c97ba4c035efa4930902aed32
 SHA512 
b957adeca5d5bd33cf1e9769459282488fdd9b1ec9398d20b35681ca88492bc01bdee91bb2c212e75fb946555f9be9869b7944b20207aef5a63c7035702b8cfa
+DIST pypy3.11-v7.3.21-src.tar.bz2 24944719 BLAKE2B 
c78675c2b188a363894bb8f78a72048d648b19f7038162ee9818e8af47c6713bfde6dbddd3ed340de8dac12c9854af2b52f7a05fcd61e2a14bf2dc45fc9fe362
 SHA512 
33df3dcb195f9920227aa03ab60fb5abcaf18567b1a281ef1f4010803316b6281adf7f79eb082f1084bff41cfcdff7c0fa4a82460ecd2d792f4cf3e588b4e1a7

diff --git a/dev-lang/pypy3-exe/pypy3-exe-3.11.7.3.21.ebuild 
b/dev-lang/pypy3-exe/pypy3-exe-3.11.7.3.21.ebuild
new file mode 100644
index 000000000000..bcbd1c34ecb1
--- /dev/null
+++ b/dev-lang/pypy3-exe/pypy3-exe-3.11.7.3.21.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit check-reqs pax-utils toolchain-funcs
+
+PYVER=$(ver_cut 1-2)
+PATCHSET_PV=$(ver_cut 3-)
+PYPY_PV=${PATCHSET_PV%_p*}
+
+MY_P="pypy${PYVER}-v${PYPY_PV/_}"
+PATCHSET="pypy${PYVER}-gentoo-patches-${PATCHSET_PV/_rc/rc}"
+
+DESCRIPTION="PyPy3.11 executable (build from source)"
+HOMEPAGE="
+       https://pypy.org/
+       https://github.com/pypy/pypy/
+"
+SRC_URI="
+       https://downloads.python.org/pypy/${MY_P}-src.tar.bz2
+       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="${PV%_p*}"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="+jit low-memory ncurses cpu_flags_x86_sse2"
+
+RDEPEND="
+       app-arch/bzip2:0=
+       dev-libs/expat:0=
+       dev-libs/libffi:0=
+       >=virtual/zlib-1.1.3:=
+       virtual/libintl:0=
+       ncurses? ( sys-libs/ncurses:0= )
+       !dev-lang/pypy3-exe-bin:${SLOT}
+"
+DEPEND="
+       ${RDEPEND}
+"
+BDEPEND="
+       || (
+               dev-lang/pypy:2.7
+               dev-python/pypy
+       )
+       virtual/pkgconfig
+"
+
+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/pypy${PYVER}-c" "pypy${PYVER}-c-${PYPY_PV}"
+       insinto "/usr/include/pypy${PYVER}/${PYPY_PV}"
+       doins *.h
+       pax-mark m "${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}"
+}

Reply via email to