1 |
commit: dffd3e2b4294ebe8e817d89c6c1a0f7820ab5065 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 30 10:56:50 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 30 15:13:03 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dffd3e2b |
7 |
|
8 |
dev-python/pypy3-exe: Bump to 7.3.9 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pypy3-exe/Manifest | 2 + |
13 |
dev-python/pypy3-exe/pypy3-exe-7.3.9.ebuild | 172 ++++++++++++++++++++++++++++ |
14 |
2 files changed, 174 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/pypy3-exe/Manifest b/dev-python/pypy3-exe/Manifest |
17 |
index 782c1546b167..270cb1c9ee60 100644 |
18 |
--- a/dev-python/pypy3-exe/Manifest |
19 |
+++ b/dev-python/pypy3-exe/Manifest |
20 |
@@ -1,4 +1,6 @@ |
21 |
DIST pypy3.8-gentoo-patches-7.3.7.tar.xz 4396 BLAKE2B adc33a02ada4d22eae0484292ec6cc295805d9f254b7a9110c622628aa40011621a1833ca62d3251e4e5056c406f648e7ad0439bd60e77c38808dd9df46973a5 SHA512 1cda8467de2d749d98fa20d7d200b5f96dae0ca68cf44a054d03f3f148bc3946ba1f1c474ac0336560f79c78b3eddcd4ba24386e83de283c83475b8e4b75bdf8 |
22 |
DIST pypy3.8-v7.3.7-src.tar.bz2 24375444 BLAKE2B 44fe19ee63d95243c499ecb0b84e77873c73da93320b1e028a5c6c4b167441d223812dc66b16e070308cba48c4d8774738f827319cce9d1769b3f4346e15487c SHA512 9e6701cc441d5535968656cfb0cfa9076c364f9ba32bc6f0ef64f06ab343281e2458dbe88791c0e02401457fbf80d367f397fc904f6146bff68e04a15e05fda2 |
23 |
DIST pypy3.9-gentoo-patches-7.3.8.tar.xz 1568 BLAKE2B 0011188de7b5757964bd13c49d5995a656a721acd54e1d77f7e77fac7420a2a56ca75eb42709e2304a771fa69c982fc6901e9fc9580ab8e8b35e7bb8b0cc83a6 SHA512 1064e987b7233fc55f94bd49aeeab9a9fd9322e90798439ad9a4c35020ca923fe0670e47406ab180a6f8e7afd65d03be23427d4fa43befa3c0ce172028e1a09f |
24 |
+DIST pypy3.9-gentoo-patches-7.3.9.tar.xz 1564 BLAKE2B fe0875ef002842a78fb31589f6d0b255c3dea10f2bd014231ae9b17641f65f810ac84fe7961de1a4614249b0166f2127c3aa37947f7d1d4c85860a31b89110f1 SHA512 a1dc3ee36e908e29b2bbbb100a97b7910bd4325c5dc55c0455cdca450d6b272d1463708b383e0607e9499b1932da4442f97d2da57e47ed3a4ff8fd3c78a54732 |
25 |
DIST pypy3.9-v7.3.8-src.tar.bz2 26277823 BLAKE2B 343fa4a57b69936a586acb036506e25c8de3a9761eb6622ef7266c136a1dc977cabc23969917bc2369fd73b1ae6fef731d81536179107f2d731352e6f5387bf9 SHA512 aed018738af7a225f516ec37d059d539f486d9dd427fe000805147b197f496d5fcb0387e47008524753ad18224aebeb1e68f9e2093acbe37468e02bff92f7126 |
26 |
+DIST pypy3.9-v7.3.9-src.tar.bz2 26976726 BLAKE2B bf1ed21c575901abac020120aaff07ab57f1404713211b19cbd1eb4d6ffc675b7933be8c6fffc2b69ab467963d6598534cd5aa90c02feddad596611d2a6b6581 SHA512 83f8a6a2da351c190d2d224242cbc35e35529c7a8e8d842eaf5c945cbce2e172b02a340f32af3d49df8d5288370d794d5bc95fc12dd4a13d817c925abf06198a |
27 |
|
28 |
diff --git a/dev-python/pypy3-exe/pypy3-exe-7.3.9.ebuild b/dev-python/pypy3-exe/pypy3-exe-7.3.9.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000000..5f5426c6955a |
31 |
--- /dev/null |
32 |
+++ b/dev-python/pypy3-exe/pypy3-exe-7.3.9.ebuild |
33 |
@@ -0,0 +1,172 @@ |
34 |
+# Copyright 1999-2022 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=8 |
38 |
+ |
39 |
+# pypy3 needs to be built using python 2 |
40 |
+PYTHON_COMPAT=( python2_7 ) |
41 |
+inherit check-reqs pax-utils python-any-r1 toolchain-funcs |
42 |
+ |
43 |
+PYPY_PV=${PV%_p*} |
44 |
+MY_P=pypy3.9-v${PYPY_PV/_} |
45 |
+PATCHSET="pypy3.9-gentoo-patches-${PV/_}" |
46 |
+ |
47 |
+DESCRIPTION="PyPy3 executable (build from source)" |
48 |
+HOMEPAGE="https://www.pypy.org/" |
49 |
+SRC_URI=" |
50 |
+ https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2 |
51 |
+ https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz |
52 |
+" |
53 |
+S="${WORKDIR}/${MY_P}-src" |
54 |
+ |
55 |
+LICENSE="MIT" |
56 |
+SLOT="3.9-${PYPY_PV}" |
57 |
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
58 |
+IUSE="bzip2 +jit low-memory ncurses cpu_flags_x86_sse2" |
59 |
+ |
60 |
+RDEPEND=" |
61 |
+ >=sys-libs/zlib-1.1.3:0= |
62 |
+ dev-libs/libffi:0= |
63 |
+ virtual/libintl:0= |
64 |
+ dev-libs/expat:0= |
65 |
+ bzip2? ( app-arch/bzip2:0= ) |
66 |
+ ncurses? ( sys-libs/ncurses:0= ) |
67 |
+ !dev-python/pypy3-exe-bin:${PYPY_PV} |
68 |
+" |
69 |
+DEPEND=" |
70 |
+ ${RDEPEND} |
71 |
+" |
72 |
+BDEPEND=" |
73 |
+ low-memory? ( dev-python/pypy ) |
74 |
+ !low-memory? ( |
75 |
+ || ( |
76 |
+ dev-python/pypy |
77 |
+ dev-lang/python:2.7 |
78 |
+ ) |
79 |
+ ) |
80 |
+" |
81 |
+ |
82 |
+check_env() { |
83 |
+ if use low-memory; then |
84 |
+ CHECKREQS_MEMORY="1750M" |
85 |
+ use amd64 && CHECKREQS_MEMORY="3500M" |
86 |
+ else |
87 |
+ CHECKREQS_MEMORY="3G" |
88 |
+ use amd64 && CHECKREQS_MEMORY="6G" |
89 |
+ fi |
90 |
+ |
91 |
+ check-reqs_pkg_pretend |
92 |
+} |
93 |
+ |
94 |
+pkg_pretend() { |
95 |
+ [[ ${MERGE_TYPE} != binary ]] && check_env |
96 |
+} |
97 |
+ |
98 |
+pkg_setup() { |
99 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
100 |
+ check_env |
101 |
+ |
102 |
+ # unset to allow forcing pypy below :) |
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 PyPy to perform the translation." |
109 |
+ EPYTHON=pypy |
110 |
+ else |
111 |
+ einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream" |
112 |
+ einfo "recommends using PyPy for that. If you wish to do so, please install" |
113 |
+ einfo "dev-python/pypy and ensure that EPYTHON variable is unset." |
114 |
+ python-any-r1_pkg_setup |
115 |
+ fi |
116 |
+ fi |
117 |
+} |
118 |
+ |
119 |
+src_prepare() { |
120 |
+ local PATCHES=( |
121 |
+ "${WORKDIR}/${PATCHSET}" |
122 |
+ ) |
123 |
+ default |
124 |
+} |
125 |
+ |
126 |
+src_configure() { |
127 |
+ tc-export CC |
128 |
+ |
129 |
+ local jit_backend |
130 |
+ if use jit; then |
131 |
+ jit_backend='--jit-backend=' |
132 |
+ |
133 |
+ # We only need the explicit sse2 switch for x86. |
134 |
+ # On other arches we can rely on autodetection which uses |
135 |
+ # compiler macros. Plus, --jit-backend= doesn't accept all |
136 |
+ # the modern values... |
137 |
+ |
138 |
+ if use x86; then |
139 |
+ if use cpu_flags_x86_sse2; then |
140 |
+ jit_backend+=x86 |
141 |
+ else |
142 |
+ jit_backend+=x86-without-sse2 |
143 |
+ fi |
144 |
+ else |
145 |
+ jit_backend+=auto |
146 |
+ fi |
147 |
+ fi |
148 |
+ |
149 |
+ local args=( |
150 |
+ --no-shared |
151 |
+ $(usex jit -Ojit -O2) |
152 |
+ |
153 |
+ ${jit_backend} |
154 |
+ |
155 |
+ pypy/goal/targetpypystandalone |
156 |
+ ) |
157 |
+ |
158 |
+ # Avoid linking against libraries disabled by use flags |
159 |
+ local opts=( |
160 |
+ bzip2:bz2 |
161 |
+ ncurses:_minimal_curses |
162 |
+ ) |
163 |
+ |
164 |
+ local opt |
165 |
+ for opt in "${opts[@]}"; do |
166 |
+ local flag=${opt%:*} |
167 |
+ local mod=${opt#*:} |
168 |
+ |
169 |
+ args+=( |
170 |
+ $(usex ${flag} --withmod --withoutmod)-${mod} |
171 |
+ ) |
172 |
+ done |
173 |
+ |
174 |
+ local interp=( "${EPYTHON}" ) |
175 |
+ if use low-memory; then |
176 |
+ interp=( env PYPY_GC_MAX_DELTA=200MB |
177 |
+ "${EPYTHON}" --jit loop_longevity=300 ) |
178 |
+ fi |
179 |
+ |
180 |
+ if [[ ${EPYTHON} != pypy ]]; then |
181 |
+ # reuse bundled pycparser to avoid external dep |
182 |
+ mkdir -p "${T}"/pymod || die |
183 |
+ cp -r lib_pypy/cffi/_pycparser "${T}"/pymod/pycparser || die |
184 |
+ local -x PYTHONPATH=${T}/pymod:${PYTHONPATH} |
185 |
+ fi |
186 |
+ |
187 |
+ # translate into the C sources |
188 |
+ # we're going to build them ourselves since otherwise pypy does not |
189 |
+ # free up the unneeded memory before spawning the compiler |
190 |
+ set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" |
191 |
+ echo -e "\033[1m${@}\033[0m" |
192 |
+ "${@}" || die "translation failed" |
193 |
+} |
194 |
+ |
195 |
+src_compile() { |
196 |
+ emake -C "${T}"/usession*-0/testing_1 |
197 |
+} |
198 |
+ |
199 |
+src_install() { |
200 |
+ cd "${T}"/usession*-0 || die |
201 |
+ newbin testing_1/pypy3.9-c pypy3.9-c-${PYPY_PV} |
202 |
+ insinto /usr/include/pypy3.9/${PYPY_PV} |
203 |
+ doins *.h |
204 |
+ pax-mark m "${ED}/usr/bin/pypy3.9-c-${PYPY_PV}" |
205 |
+} |