1 |
commit: f62c2001fdcb5aa9aa123727a59080ad0ac4d0ad |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 25 08:01:30 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 25 12:13:31 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f62c2001 |
7 |
|
8 |
dev-python/pypy-exe: Bump to 7.3.2 final |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pypy-exe/Manifest | 1 + |
13 |
dev-python/pypy-exe/pypy-exe-7.3.2.ebuild | 162 ++++++++++++++++++++++++++++++ |
14 |
2 files changed, 163 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/pypy-exe/Manifest b/dev-python/pypy-exe/Manifest |
17 |
index 0fb812e22b2..40c79358ee1 100644 |
18 |
--- a/dev-python/pypy-exe/Manifest |
19 |
+++ b/dev-python/pypy-exe/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST pypy2.7-v7.3.1-src.tar.bz2 21053306 BLAKE2B 071d59b7978c98e9ed9243d9a64d93d21b524351cb9a45e0f7d48828f919c84585a1164e7c38739fdd8828ab4b1eedade96dff7d64d0d9cbfe00c74d88d532bb SHA512 1bec44fa0fc4b1186e25f69303f9e332df32184be990d86fba41c40152664a93bd65eabf4dded133371271402cea9b150b60c13bce89d1004b276f0908c0b8f1 |
22 |
+DIST pypy2.7-v7.3.2-src.tar.bz2 21142873 BLAKE2B e6bcd2dc28ef740962d053753ccd172e3895fc83fe23a319c003248e0986f9805839daddd13a0f480f1e9ee813979742699cb0bc8c42b6b05c193fedf67aea4f SHA512 b40d93d615a27e3a035007307a8ab2b49ff90f3047af914b268a80feb8219d372eca14c04a8b0dea91efb992653457b7c6d088c784de32c414cc48879f2d15fc |
23 |
DIST pypy2.7-v7.3.2rc2-src.tar.bz2 21145693 BLAKE2B e722111435f81d00ecb5cec83e78e17676a042703fe83c049456fa6e5debdb1c09cc3f1fd71bcd8a8469da373a7c8131c252b3f139959a442f4cfa2b7f202c6f SHA512 ba7cccdaff1616ad0090cb0942ad35eda025a758be4d6b4e978bce19fb8cb8840136297fb924127a7e99f02c09665bde7eaf714e1744b9b32612973355459ad4 |
24 |
|
25 |
diff --git a/dev-python/pypy-exe/pypy-exe-7.3.2.ebuild b/dev-python/pypy-exe/pypy-exe-7.3.2.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..73059311188 |
28 |
--- /dev/null |
29 |
+++ b/dev-python/pypy-exe/pypy-exe-7.3.2.ebuild |
30 |
@@ -0,0 +1,162 @@ |
31 |
+# Copyright 1999-2020 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+PYTHON_COMPAT=( python2_7 ) |
37 |
+inherit check-reqs pax-utils python-any-r1 toolchain-funcs |
38 |
+ |
39 |
+MY_P=pypy2.7-v${PV/_/} |
40 |
+DESCRIPTION="PyPy executable (build from source)" |
41 |
+HOMEPAGE="https://pypy.org/" |
42 |
+SRC_URI="https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2" |
43 |
+S="${WORKDIR}/${MY_P}-src" |
44 |
+ |
45 |
+LICENSE="MIT" |
46 |
+SLOT="${PV}" |
47 |
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
48 |
+IUSE="bzip2 +jit low-memory ncurses cpu_flags_x86_sse2" |
49 |
+ |
50 |
+RDEPEND=">=sys-libs/zlib-1.1.3:0= |
51 |
+ dev-libs/libffi:0= |
52 |
+ virtual/libintl:0= |
53 |
+ dev-libs/expat:0= |
54 |
+ bzip2? ( app-arch/bzip2:0= ) |
55 |
+ ncurses? ( sys-libs/ncurses:0= ) |
56 |
+ !dev-python/pypy-exe-bin:${PV}" |
57 |
+# don't enforce the dep on pypy with USE=low-memory since it's going |
58 |
+# to cause either collisions or circular dep on itself |
59 |
+DEPEND="${RDEPEND}" |
60 |
+BDEPEND=" |
61 |
+ !low-memory? ( |
62 |
+ || ( |
63 |
+ dev-python/pypy |
64 |
+ ( |
65 |
+ dev-lang/python:2.7 |
66 |
+ dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)] |
67 |
+ ) |
68 |
+ ) |
69 |
+ )" |
70 |
+ |
71 |
+check_env() { |
72 |
+ if use low-memory; then |
73 |
+ if ! has_version -b dev-python/pypy && |
74 |
+ ! has_version -b dev-python/pypy-bin |
75 |
+ then |
76 |
+ eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
77 |
+ eerror "being installed. Please install it using e.g.:" |
78 |
+ eerror |
79 |
+ eerror " $ emerge -1v dev-python/pypy dev-python/pypy-exe-bin" |
80 |
+ eerror |
81 |
+ eerror "before attempting to build dev-python/pypy-exe[low-memory]." |
82 |
+ die "dev-python/pypy needs to be installed for USE=low-memory" |
83 |
+ fi |
84 |
+ |
85 |
+ CHECKREQS_MEMORY="1750M" |
86 |
+ use amd64 && CHECKREQS_MEMORY="3500M" |
87 |
+ else |
88 |
+ CHECKREQS_MEMORY="3G" |
89 |
+ use amd64 && CHECKREQS_MEMORY="6G" |
90 |
+ fi |
91 |
+ |
92 |
+ check-reqs_pkg_pretend |
93 |
+} |
94 |
+ |
95 |
+pkg_pretend() { |
96 |
+ [[ ${MERGE_TYPE} != binary ]] && check_env |
97 |
+} |
98 |
+ |
99 |
+pkg_setup() { |
100 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
101 |
+ check_env |
102 |
+ |
103 |
+ use low-memory && EPYTHON= |
104 |
+ if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] && |
105 |
+ { has_version -b dev-python/pypy || |
106 |
+ has_version -b dev-python/pypy-bin; } |
107 |
+ then |
108 |
+ einfo "Using already-installed PyPy to perform the translation." |
109 |
+ EPYTHON=pypy |
110 |
+ else |
111 |
+ einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
112 |
+ einfo "recommends using PyPy for that. If you wish to do so, please unset" |
113 |
+ einfo "the EPYTHON variable." |
114 |
+ python-any-r1_pkg_setup |
115 |
+ fi |
116 |
+ fi |
117 |
+} |
118 |
+ |
119 |
+src_configure() { |
120 |
+ tc-export CC |
121 |
+ |
122 |
+ local jit_backend |
123 |
+ if use jit; then |
124 |
+ jit_backend='--jit-backend=' |
125 |
+ |
126 |
+ # We only need the explicit sse2 switch for x86. |
127 |
+ # On other arches we can rely on autodetection which uses |
128 |
+ # compiler macros. Plus, --jit-backend= doesn't accept all |
129 |
+ # the modern values... |
130 |
+ |
131 |
+ if use x86; then |
132 |
+ if use cpu_flags_x86_sse2; then |
133 |
+ jit_backend+=x86 |
134 |
+ else |
135 |
+ jit_backend+=x86-without-sse2 |
136 |
+ fi |
137 |
+ else |
138 |
+ jit_backend+=auto |
139 |
+ fi |
140 |
+ fi |
141 |
+ |
142 |
+ local args=( |
143 |
+ --no-shared |
144 |
+ $(usex jit -Ojit -O2) |
145 |
+ |
146 |
+ ${jit_backend} |
147 |
+ |
148 |
+ pypy/goal/targetpypystandalone |
149 |
+ ) |
150 |
+ |
151 |
+ # Avoid linking against libraries disabled by use flags |
152 |
+ local opts=( |
153 |
+ bzip2:bz2 |
154 |
+ ncurses:_minimal_curses |
155 |
+ ) |
156 |
+ |
157 |
+ local opt |
158 |
+ for opt in "${opts[@]}"; do |
159 |
+ local flag=${opt%:*} |
160 |
+ local mod=${opt#*:} |
161 |
+ |
162 |
+ args+=( |
163 |
+ $(usex ${flag} --withmod --withoutmod)-${mod} |
164 |
+ ) |
165 |
+ done |
166 |
+ |
167 |
+ local interp=( "${EPYTHON}" ) |
168 |
+ if use low-memory; then |
169 |
+ interp=( env PYPY_GC_MAX_DELTA=200MB |
170 |
+ "${EPYTHON}" --jit loop_longevity=300 ) |
171 |
+ fi |
172 |
+ |
173 |
+ # translate into the C sources |
174 |
+ # we're going to make them ourselves since otherwise pypy does not |
175 |
+ # free up the unneeded memory before spawning the compiler |
176 |
+ set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" |
177 |
+ echo -e "\033[1m${@}\033[0m" |
178 |
+ "${@}" || die "translation failed" |
179 |
+} |
180 |
+ |
181 |
+src_compile() { |
182 |
+ emake -C "${T}"/usession*-0/testing_1 |
183 |
+} |
184 |
+ |
185 |
+src_install() { |
186 |
+ local dest=/usr/lib/pypy2.7 |
187 |
+ exeinto "${dest}" |
188 |
+ newexe "${T}"/usession*-0/testing_1/pypy-c pypy-c-${PV} |
189 |
+ insinto "${dest}"/include/${PV} |
190 |
+ doins include/pypy_* |
191 |
+ pax-mark m "${ED}${dest}/pypy-c-${PV}" |
192 |
+} |