From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3BBFF138350 for ; Sat, 11 Apr 2020 07:49:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4DD71E0950; Sat, 11 Apr 2020 07:49:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 206F0E0950 for ; Sat, 11 Apr 2020 07:49:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9DBDF34EFB7 for ; Sat, 11 Apr 2020 07:49:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 09BFC1CD for ; Sat, 11 Apr 2020 07:49:28 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1586591340.5cd6beaee3b89dc3ec40bd144a2824eb4706d2f8.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3-exe/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pypy3-exe/Manifest dev-python/pypy3-exe/pypy3-exe-7.3.1.ebuild X-VCS-Directories: dev-python/pypy3-exe/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 5cd6beaee3b89dc3ec40bd144a2824eb4706d2f8 X-VCS-Branch: master Date: Sat, 11 Apr 2020 07:49:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a05d4ccd-cee5-4108-8cd0-d038162dca67 X-Archives-Hash: 16d0dafb113b1db65c6fe693381ccccf commit: 5cd6beaee3b89dc3ec40bd144a2824eb4706d2f8 Author: Michał Górny gentoo org> AuthorDate: Fri Apr 10 17:45:26 2020 +0000 Commit: Michał Górny gentoo org> CommitDate: Sat Apr 11 07:49:00 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5cd6beae dev-python/pypy3-exe: Bump to 7.3.1 Signed-off-by: Michał Górny gentoo.org> dev-python/pypy3-exe/Manifest | 1 + dev-python/pypy3-exe/pypy3-exe-7.3.1.ebuild | 151 ++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+) diff --git a/dev-python/pypy3-exe/Manifest b/dev-python/pypy3-exe/Manifest index ba24d510819..c119fbd7162 100644 --- a/dev-python/pypy3-exe/Manifest +++ b/dev-python/pypy3-exe/Manifest @@ -1 +1,2 @@ DIST pypy3.6-v7.3.0-src.tar.bz2 21937786 BLAKE2B c53ac32a9cca1c4624160eae9f11b5705a59613f1e5100fbb0ee86118de5a7845b8fa5087165d7f5a077d20337dfca14a1c7eadbe768995e20e249ec271ac10d SHA512 313a4254262dd8d8b995a50bddbc360cfb67add0818e51a3e9ce25bda6a9b639e9fea8efe7da6adda76dff0a86a364544a13faa516e51b9ea6c25ec99223b435 +DIST pypy3.6-v7.3.1-src.tar.bz2 22712809 BLAKE2B 4250b3fe98c611b9635319c106b80e88ab469eab5f883babb738e175e7b7adc22c85f8ef3fdce1cdc127b521beef8d6c7862e188d8c8889c39f90136d6bbe374 SHA512 f8e32aae7f01225e0e4d6763eaac40fc02dffc3d0b6a30f22d422147f9be4f3290ea78160a912ffae311dea3d503eb31a7a4f3999d3b541fbccd93d1cef4ca56 diff --git a/dev-python/pypy3-exe/pypy3-exe-7.3.1.ebuild b/dev-python/pypy3-exe/pypy3-exe-7.3.1.ebuild new file mode 100644 index 00000000000..0a9bf2e35e8 --- /dev/null +++ b/dev-python/pypy3-exe/pypy3-exe-7.3.1.ebuild @@ -0,0 +1,151 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# pypy3 needs to be built using python 2 +PYTHON_COMPAT=( python2_7 ) +inherit check-reqs pax-utils python-any-r1 toolchain-funcs + +MY_P=pypy3.6-v${PV/_/} +DESCRIPTION="PyPy3 executable (build from source)" +HOMEPAGE="https://pypy.org/" +SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2" +S="${WORKDIR}/${MY_P}-src" + +LICENSE="MIT" +SLOT="${PV}" +KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="bzip2 +jit low-memory ncurses cpu_flags_x86_sse2" + +RDEPEND=">=sys-libs/zlib-1.1.3:0= + virtual/libffi:0= + virtual/libintl:0= + dev-libs/expat:0= + bzip2? ( app-arch/bzip2:0= ) + ncurses? ( sys-libs/ncurses:0= ) + !dev-python/pypy3-exe-bin:${PV}" +DEPEND="${RDEPEND}" +BDEPEND=" + low-memory? ( dev-python/pypy ) + !low-memory? ( + || ( + dev-python/pypy + ( + dev-lang/python:2.7 + dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)] + ) + ) + )" + +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() { + if [[ ${MERGE_TYPE} != binary ]]; then + check_env + + # unset to allow forcing pypy below :) + use low-memory && EPYTHON= + if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] && + { has_version -b dev-python/pypy || + has_version -b dev-python/pypy-bin; } + then + einfo "Using PyPy to perform the translation." + EPYTHON=pypy + else + einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream" + einfo "recommends using PyPy for that. If you wish to do so, please install" + einfo "dev-python/pypy and ensure that EPYTHON variable is unset." + python-any-r1_pkg_setup + fi + fi +} + +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 + ) + + # Avoid linking against libraries disabled by use flags + local opts=( + bzip2:bz2 + ncurses:_minimal_curses + ) + + local opt + for opt in "${opts[@]}"; do + local flag=${opt%:*} + local mod=${opt#*:} + + args+=( + $(usex ${flag} --withmod --withoutmod)-${mod} + ) + done + + local interp=( "${EPYTHON}" ) + if use low-memory; then + interp=( env PYPY_GC_MAX_DELTA=200MB + "${EPYTHON}" --jit loop_longevity=300 ) + fi + + # translate into the C sources + # we're going to make 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() { + local dest=/usr/lib/pypy3.6 + exeinto "${dest}" + newexe "${T}"/usession*-0/testing_1/pypy3-c pypy3-c-${PV} + insinto "${dest}"/include/${PV} + doins include/pypy_* + pax-mark m "${ED}${dest}/pypy3-c-${PV}" +}