summaryrefslogtreecommitdiff
path: root/dev-python/pypy3-exe
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-14 22:02:07 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-14 22:02:07 +0100
commit78db24b58a7f75bf18548cbf5c3b210f2f33f2f4 (patch)
tree53f180d30387a94fd028e0c5a10635621ebeb98f /dev-python/pypy3-exe
parent153fd195574cc30040446316bb666af0e58d985f (diff)
gentoo auto-resync : 14:05:2023 - 22:02:07
Diffstat (limited to 'dev-python/pypy3-exe')
-rw-r--r--dev-python/pypy3-exe/Manifest3
-rw-r--r--dev-python/pypy3-exe/pypy3-exe-7.3.12_rc1.ebuild127
2 files changed, 130 insertions, 0 deletions
diff --git a/dev-python/pypy3-exe/Manifest b/dev-python/pypy3-exe/Manifest
index 197ff4d857d2..5b2268efb39b 100644
--- a/dev-python/pypy3-exe/Manifest
+++ b/dev-python/pypy3-exe/Manifest
@@ -1,4 +1,7 @@
+DIST pypy3.10-gentoo-patches-7.3.12rc1.tar.xz 3416 BLAKE2B 1ad7e2f05fa26136f7a89fc36f9bba6247f5e7dab235798d47599d412783802e09fb98453386d546169010b944d6d564ac759eb3329da50c5401957d243a55d0 SHA512 93a7b1d1efcf88e5616f5b149e3b7c2c40c7a42d8b689f02f9ffa8e9d03356dbaba647181dc73c3cc41d0eb8b9a7a83301a9bb5d6224752a4c4d8e0afb4c2eab
+DIST pypy3.10-v7.3.12rc1-src.tar.bz2 22994145 BLAKE2B fff1a0c82f60db6abfa1db5b8fc833f62882f98965c3fb6131028e7ccc9f40475d375e7e0f7de564f91dc82840f5b263d097c6cab83458c82298c18498d55d8b SHA512 9f7eb625236d8a1740d80a02cd4e1bebd09ff4f3c5e117881b133c416c615b5a7ca5d5df2cfc42f5aa014905096005fc4ef328d05554d39ef00bae870e30b9c0
DIST pypy3.9-gentoo-patches-7.3.11.tar.xz 6444 BLAKE2B adcc1ae4c3ae2c5317a05d6de51785945625d8bcc7cb35bd6608fa80f09b37c483c95663eacb0353013a5abec308d25b12666699c65512f5f3a6d7345f2b5b18 SHA512 f2064ecffa09ba23f5f8c281ca4c8c0740cb6b57185d66c02eec2bcb77cfb566b1a2db4f52c472bcaf0d5fb759ee8003b27761af37785d12465c2010fd73c49d
DIST pypy3.9-v7.3.11-src.tar.bz2 23460769 BLAKE2B fa8a827c28813243926c8689addb008c0a43acdc3f81a18749a8f2c1926b6294f2c0c95a4c315e3b77ce84b4f337af7a0bce5daf8dcb60ead965532d4af183cb SHA512 33c978ffbeeb39453028d1d1646ccfdace062ce48a5d939245bea41643038dd3687e80e34f88fa0622bcb175d7dd78f75cbe36b24229c8052f09d2d17dcdfd8c
EBUILD pypy3-exe-7.3.11.ebuild 2595 BLAKE2B 8d9c7bca5a971c04cddf096e062ca0a9b5c7bd179ffaee342ae23b96fea45ffeb88a61a345dbfa83ead8dfed15b397a60a6f45ea36a510d1823e640b283fd7a0 SHA512 893caf597db4d5f36bad0b9329fb0b3aef510adf23b438540449540b8c37bb4f27152770f78bf9f85b694ba4ffd90740a5ba932f9fc509fdc43ff9c450a3e720
+EBUILD pypy3-exe-7.3.12_rc1.ebuild 2602 BLAKE2B f402bbb181bb8328993ecba4a32cb6b61785003ed153b324c59568f3e36e8c7daffcce5ccfca851d30bab072b2469714697712cadfb493252d715593580ab723 SHA512 d611aa8fcddcc2007e287d4ed02f9e6baf6b80985edd346a273c3d5727d714f6834040a0610eb8fe537343d375a143ffed08802a7089346959336f2d0e0cd3d5
MISC metadata.xml 498 BLAKE2B 8dbcdb7c3a4a2fa5d1a922fd5197fb5e3337adcaec1e7d382f25f8696c80726e5b79843477bf8e5ce131aecde6e2c4c283548c5b337e54cb58aaa066013c445a SHA512 8a9bb514bbf3bf328aa63734e1fdc106f6aaf5ccb88c29ad8a686ab2724f3d1f4727163500013dd16e7b34232b881cf47d2f174212b5428ee076af27cf43628d
diff --git a/dev-python/pypy3-exe/pypy3-exe-7.3.12_rc1.ebuild b/dev-python/pypy3-exe/pypy3-exe-7.3.12_rc1.ebuild
new file mode 100644
index 000000000000..4891a0cfa8db
--- /dev/null
+++ b/dev-python/pypy3-exe/pypy3-exe-7.3.12_rc1.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2023 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.10
+MY_P="pypy${PYVER}-v${PYPY_PV/_}"
+PATCHSET="pypy${PYVER}-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="${PYVER}-${PYPY_PV}"
+KEYWORDS=""
+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/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}"
+}