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