commit:     b0a59314b76f45026e6d21d0fb7404e4d5d70c7f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 24 11:14:22 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Apr 24 15:08:22 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0a59314

dev-python/pypy3_9-exe: Bump to 7.3.16

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

 dev-python/pypy3_9-exe/Manifest                  |   2 +
 dev-python/pypy3_9-exe/pypy3_9-exe-7.3.16.ebuild | 132 +++++++++++++++++++++++
 2 files changed, 134 insertions(+)

diff --git a/dev-python/pypy3_9-exe/Manifest b/dev-python/pypy3_9-exe/Manifest
index 3e201830e36d..9901e21f155e 100644
--- a/dev-python/pypy3_9-exe/Manifest
+++ b/dev-python/pypy3_9-exe/Manifest
@@ -1,2 +1,4 @@
 DIST pypy3.9-gentoo-patches-7.3.15.tar.xz 5800 BLAKE2B 
e3466eb528c7cfaa8a189552041852d29bbacb45e08dc967deec1d8486107725ab2b2b1e65c98307983ff1f3ad038d3e54bf84eaadc32060185661c8023dea06
 SHA512 
c834433bfaaa1cd081fb71f9e122810b66fbd0a52f8473b6ec02a8615f0b0328da51ca1e3f0f209d325d9884876b634dbd1ec202f428620044fe5e60b4ce910a
+DIST pypy3.9-gentoo-patches-7.3.16.tar.xz 5764 BLAKE2B 
094740bc594bc63648bba997e2a8a8eddd857e6f63594fc3d5f3bca9e74bce101ab56ddf59afd75d62e91c17d89271d7f8b52da6b19adf480dd9fab9f0c6dc2c
 SHA512 
efbe3ac941be19b270336e7b31999114d4334cfd3cc0ab5f2499e41825a51bc7c005e10302114813741772ae0412466c000ab33b64f01d639d5689460f8befcb
 DIST pypy3.9-v7.3.15-src.tar.bz2 24694333 BLAKE2B 
151c3c8b828c7a35cfd63dd73b8683c3fe5529c5f6df7cc628d2967e5c61e16490b8663efe838fc6efd9f0b4a08fde8c9315e2f0a471bb62a2395055f2f130c6
 SHA512 
64faca74c507ef3e8dd2df34ad81874c24bc336e79ecf53bbbb43c21adebdea60efafe6ad38bdbf15bc2a677980d7db2c2c0affa04beb7e7e1b739d85e17f333
+DIST pypy3.9-v7.3.16-src.tar.bz2 23686849 BLAKE2B 
736b173d8bd6b19785e64827d289feb39e30e93caaef3071a5185cc5cbaab4aed23b9da89e34a464dad0c0d5142db9dc238a1dd221aea299f95bea2e47299a81
 SHA512 
bd13cddb0b4cab4e200d2eafd8239c76209a49f8e847193c5ed0fe446ca46271446fc762cafd2aa8f410d022bc65abcd48ba7148502b70b901565e187058310d

diff --git a/dev-python/pypy3_9-exe/pypy3_9-exe-7.3.16.ebuild 
b/dev-python/pypy3_9-exe/pypy3_9-exe-7.3.16.ebuild
new file mode 100644
index 000000000000..b75e5d8f5409
--- /dev/null
+++ b/dev-python/pypy3_9-exe/pypy3_9-exe-7.3.16.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2024 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*}
+PYVER=3.9
+MY_P="pypy${PYVER}-v${PYPY_PV/_}"
+PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_}"
+
+DESCRIPTION="PyPy3.9 executable (build from source)"
+HOMEPAGE="
+       https://www.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="${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_9-exe-bin:${SLOT}
+"
+DEPEND="
+       ${RDEPEND}
+"
+BDEPEND="
+       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