summaryrefslogtreecommitdiff
path: root/dev-python/pypy3_9-exe
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-04-24 23:59:27 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-04-24 23:59:27 +0100
commitb987a550f067c3da93b0664cf1fdc8a624c0aa38 (patch)
tree9ad1767fad656d26471a81af6bac8400a1c75218 /dev-python/pypy3_9-exe
parente3f21c8aff8a76afe3423721c437a088e9232840 (diff)
gentoo auto-resync : 24:04:2024 - 23:59:27
Diffstat (limited to 'dev-python/pypy3_9-exe')
-rw-r--r--dev-python/pypy3_9-exe/Manifest3
-rw-r--r--dev-python/pypy3_9-exe/pypy3_9-exe-7.3.16.ebuild132
2 files changed, 135 insertions, 0 deletions
diff --git a/dev-python/pypy3_9-exe/Manifest b/dev-python/pypy3_9-exe/Manifest
index 74b8517a4337..bd2324b80a33 100644
--- a/dev-python/pypy3_9-exe/Manifest
+++ b/dev-python/pypy3_9-exe/Manifest
@@ -1,4 +1,7 @@
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
EBUILD pypy3_9-exe-7.3.15.ebuild 2751 BLAKE2B da9b92b12a8996c96c9c5e42c996863477899b5d94e4b68f9e36e3fe37ca82310caed49b12b30c872855398e49df5543457c481bd81371813aefe56674654c9a SHA512 ea1d2c71d44f0e106d23fb373b5da06e4300eca019f8144870a75e3418cc88162f9ec22bdbe34c5151b205420c7730fcac4c0fc46972edd521c0b734ced7caca
+EBUILD pypy3_9-exe-7.3.16.ebuild 2753 BLAKE2B 5ef69ce34eaa48bac63432e27e9aa0151de51665b0a84bac2e99f7a846b8fabe25af02767b6829bfb7d4e5c6402e23388bf632d98aaf0749942a6ee2c94aa185 SHA512 625f24f53feec128f921082ffcbb0d1dc496548d87e895be301531ab07603bfd351cd4a6349e7e62f283c8b493df723c4abdac6f73d146a852238d58ee39ced6
MISC metadata.xml 572 BLAKE2B cfcd1422ec312338fd876bc4747a962ac3c4bd06e28a3891489b065fba4c7be2daa6955f51e8136d9b8cf7b68bb7eb887b6f419ee9fd626ebd6db204acb7995d SHA512 c79250d47e3d5c99c2c903bfc185449cc41f88e2b923b8eae1401e83c0f23fa1a12ad85f50b6e25844e805e543ae897ccf43185a1bdf9f992dff765249e55bc1
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}"
+}