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