1 |
commit: ebb18909a95dda88d61726da98ace90c01b9f311 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 15 04:26:26 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 15 04:35:18 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/dev/mgorny.git/commit/?id=ebb18909 |
7 |
|
8 |
dev-binpkg/pypy: Drop old |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-binpkg/pypy/Manifest | 17 --- |
13 |
dev-binpkg/pypy/files/2.5.0-shared-lib.patch | 12 -- |
14 |
dev-binpkg/pypy/files/5.7.1-kill-flto.patch | 27 ---- |
15 |
dev-binpkg/pypy/metadata.xml | 4 +- |
16 |
dev-binpkg/pypy/pypy-2.6.0.ebuild | 193 ------------------------- |
17 |
dev-binpkg/pypy/pypy-4.0.0.ebuild | 193 ------------------------- |
18 |
dev-binpkg/pypy/pypy-4.0.1.ebuild | 193 ------------------------- |
19 |
dev-binpkg/pypy/pypy-5.0.0.ebuild | 193 ------------------------- |
20 |
dev-binpkg/pypy/pypy-5.1.1.ebuild | 191 ------------------------ |
21 |
dev-binpkg/pypy/pypy-5.10.0.ebuild | 208 -------------------------- |
22 |
dev-binpkg/pypy/pypy-5.3.0.ebuild | 193 ------------------------- |
23 |
dev-binpkg/pypy/pypy-5.3.1.ebuild | 193 ------------------------- |
24 |
dev-binpkg/pypy/pypy-5.4.0.ebuild | 193 ------------------------- |
25 |
dev-binpkg/pypy/pypy-5.4.1.ebuild | 193 ------------------------- |
26 |
dev-binpkg/pypy/pypy-5.7.1.ebuild | 209 --------------------------- |
27 |
dev-binpkg/pypy/pypy-5.8.0.ebuild | 207 -------------------------- |
28 |
dev-binpkg/pypy/pypy-5.9.0.ebuild | 208 -------------------------- |
29 |
dev-binpkg/pypy/pypy-6.0.0.ebuild | 208 -------------------------- |
30 |
dev-binpkg/pypy/pypy-7.0.0.ebuild | 208 -------------------------- |
31 |
dev-binpkg/pypy/pypy-7.1.0.ebuild | 208 -------------------------- |
32 |
dev-binpkg/pypy/pypy-7.1.1.ebuild | 208 -------------------------- |
33 |
21 files changed, 1 insertion(+), 3458 deletions(-) |
34 |
|
35 |
diff --git a/dev-binpkg/pypy/Manifest b/dev-binpkg/pypy/Manifest |
36 |
index 9e35763..79befee 100644 |
37 |
--- a/dev-binpkg/pypy/Manifest |
38 |
+++ b/dev-binpkg/pypy/Manifest |
39 |
@@ -1,18 +1 @@ |
40 |
-DIST pypy-2.6.0-src.tar.bz2 16858400 BLAKE2B 124dde8ae40341647f65995d240468da7b44fce709569080b30b00c2d6104eac4840d7531d81cd43ff9ffe43e25391a20aa9c05009cd06038edcdf3fcd6451b2 SHA512 82a6a44c0c551a1291215394610e5331cf83216b38ac9f1a79a3eab53ba2933b121c3154b58cead814c73a1da1fc95d895324bb0c43e8e0429438b0dea527cc4 |
41 |
-DIST pypy-4.0.0-src.tar.bz2 17244624 BLAKE2B d0b27b30ae5ff7b1deae343d3ea075079f68663941f67a5635b5688a27e4482ed4ced1382b2d91d8d52fc32a9bc0306cc793ae5ceba0a09f9a78430b7aec9b4f SHA512 2bbdc2536a32b0aa28f7b12ec3d879ed28afe984fad38635bc3e1d950a9fe198cfbaf9b554f0fa245e7fd512ec7a76297f05a1d3e17f73fb49e8506561190f5b |
42 |
-DIST pypy-4.0.1-src.tar.bz2 17172844 BLAKE2B 66ef2543941460d0b267729332cbc4d4b28d3e3f5657bbd6fc48266b971d9655ecac4f36f7e7ce95d4f9c18ebcc75681596e7732136e381c39dbc35dfe7d5339 SHA512 66358cc3fe9ccb402b717379c48731aca8f9f85a1a754a54e3a060113398955b87a3f3048ba731a93be4b49c0f5c7e3bac49dc4523263e1bf4f4b5149d5db5c4 |
43 |
-DIST pypy-5.0.0-src.tar.bz2 17223494 BLAKE2B 72ad0e035f4d5cb7950b62481d044421280889d252e2e920f54a33c802ece20d3a5ef1ad9bdd68243a0c8c78b83a39e4a1c6f2300cf8f40b369dc429e5a97a9f SHA512 2af686cdad13a1083114a03a7361f58c4dd482e3a83a63b43f8d40922a11120383f91deb6f1607510c4bbd22fd8c59dcf1b58406c2e5cf5548a48542e1b20f89 |
44 |
-DIST pypy-5.1.1-src.tar.bz2 17328934 BLAKE2B 4e5fdb2703bcc50ab0a0e122f897c79e5e1b53b2f4e617a3764b492d8c4f38a4dd0f36f85c9320d0283d3583a4e4e8cd16fc5b95f1dd0ad2cba04b734079b0bd SHA512 2d81b62747ac02980c275fe24fff689e93b4b352e6279c55ca570fd76b8477a55f819e81fab4c6ffdb6991f29536c606d75e238d5bbe04518357509020f23ca9 |
45 |
-DIST pypy2-v5.10.0-src.tar.bz2 19181430 BLAKE2B 4a0808c74fb167a7e98625f1d5b8559bb3a0383445387a0c48f951d75d009c57806eb600a141a84a7cb800e2f53fe091367cbb0b23192bc52b995cb65246c076 SHA512 11892418d753ddc59e928a5f59b3406b7c22b8689ad6995eeb183182dbb5184117e68bb567c770ffa60a14d6763550d658e260584e65da5025ed481f48501379 |
46 |
-DIST pypy2-v5.3.0-src.tar.bz2 17361429 BLAKE2B 8a041c551225ff15011d766ecd62f83f7241f2bbb74033fb2ae380c32721762eebb60e3178c7cb02ad003a31a67d95db1cc0a907caada0618f0eed891877431f SHA512 6387987b93bebf8ca6d820bde6c42c1a7427a778ff01cf93766df34be792cb1a8d927b3e402f90159df75f68aa1c913a28e9d453e3b13b28489cb68670ef121d |
47 |
-DIST pypy2-v5.3.1-src.tar.bz2 17361760 BLAKE2B 59ba7b95e851332cd235880c47f98701241741c011a7da2c4ca41ea60201adea9114de44845cf5a9129dde397df5cd411f98e5c71ec24519d3e3055f2c9b3f2d SHA512 3138dde3cb1a155e389a2be615601e22f468d2bc77dd219a35b310052fa06f68f80c3ff62fa4d0a9179eae014ace18620d0a076a0528cb155b1c33cc94d6b397 |
48 |
-DIST pypy2-v5.4.0-src.tar.bz2 17414795 BLAKE2B b9d9d953b1eaa37b1d78b18cc7a858b1fe853ca83e7a0ec8345c675fd86ce98b4d36364b3967bd92c821f998e8d185d906b61141129a4b5be1c3cd70316759c1 SHA512 a989393f75ff45d6a8b8b2597c0a208559b3188ffdf65205ad491332f1836a86bbb419a3dfba67f80e5ab8d075aa97f44c63316f805a51d7ce1481e81b461373 |
49 |
-DIST pypy2-v5.4.1-src.tar.bz2 17412285 BLAKE2B f7653d2ec8c9b4bed8447f93ba4de70ef2e5868b9f0b01f403903922a79bfefb653b69b4322fb620e8b4277b73d5b9c6d07a887f95e2ec3dc4ddfff9c2755f27 SHA512 a366457f5d1fc06dfb256256350b5f2e8e107fe9bc587acc291500ae8b03083788128681ebd5ae272a87b5b7c95abda0210ed7b5594e15f8f0a96a9ff4953375 |
50 |
-DIST pypy2-v5.7.1-src.tar.bz2 18940413 BLAKE2B 391af7816e48b481e6c93b55415f391140eadb144f1424834d64a763bf95be51cbb0e270f782c8f3fd373f538fe3b860ed6ebff56366d960b0648d91e94025d2 SHA512 1ad2dddb40c28d2d3e95a9f0730e765d981dee6e2d0664cf1274eb7c1021690a848c3485c846eac8a8b64425b44946b5b2d223058ec4699155a2122ee7d38b75 |
51 |
-DIST pypy2-v5.8.0-src.tar.bz2 19163498 BLAKE2B 377971cf9e9a5ea75966937e9f22fe24d149af28678947d33356333fe67c8295cf07bf2dac3e7b45d265fef6126d8ebb23aee132e3b43d872bd61ec1ddf17a2c SHA512 222c6ce11b00830e310b766df4c145b7f554f23b87fc6146f214d758d7a6159c5c00af475aa7fa630ef4c37b52cdf2fd73049b6ec3610715b6abc0a925fe1365 |
52 |
-DIST pypy2-v5.9.0-src.tar.bz2 19175394 BLAKE2B 0d5fa0d013d8cdb9765bf0f535877894d7a3544c19481973f788187251d1bd2ba11f88950430e85c7608ea394cc952ae7dd7275b9843397ab098e153cf96ec7f SHA512 3170747e81088043c6a4885bd0bc92e911556420b6c2539a4ed7e62956f1c741651f772def0fb00d8826a1bef9d6f4e79a13682a4456a31d987f7c9bd8608a4d |
53 |
-DIST pypy2-v6.0.0-src.tar.bz2 19741694 BLAKE2B 55f5000e590613b516b12c3682a658fe6a17fbe264be3d61a81698cdf098b39177cf4355eb3f28980209c7a0e005498201cbad8884e3aa02cc86a228d1552046 SHA512 d3bdcd65fc83f2fda3203a604733fe6765049a17cca2715cd6045dc302a6159b4741a821c53fa4c97acf7297cef4c62e941a6a6eb7f8a253a93a28dcf2aa2ca0 |
54 |
-DIST pypy2.7-v7.0.0-src.tar.bz2 19811330 BLAKE2B 38089896934d79d2b3f5813cc9dae23b0534d9d312871b22336a277d5a15b82d748f66f896558cfdb45a23004944a648436e89ae36fadc107930e7b99963e12b SHA512 7fb5682ee4226af51008f50a81c922e44c231410fe36b7656efa20f22c855ba30a01bc96ee897b4c7a02941d37a405c922b09855977313878e34aaad6bf023dc |
55 |
-DIST pypy2.7-v7.1.0-src.tar.bz2 20032490 BLAKE2B e916d63d7915959c87830509630d8b2ab993d012d314e88c7cc84bed4c595957c3fc575f7b57fac7c24aaf1492797ca43b146e457357b6e73d9772724461de66 SHA512 fa7c1a6669686dbd9c0da627dc2a06ad696f20274218af9602f91d73f3ebe0ede380c6e1a50534f53dee8f075eaef5a403c7c5b5bdbfff25e679ba30522391bb |
56 |
-DIST pypy2.7-v7.1.1-src.tar.bz2 20027876 BLAKE2B a411d7312ed3b9be9297e7ff4cc569530529272156117ca037bbe29ad477e7ce3b8903d13c6a5a35e9867a8ccbfaa418061a7b37317b4b713508c429a41ffe9a SHA512 f998931ecf4f9aeee24f0fed95589716175971816c00e50bc53de6de0cfe2a8537b89c1aee636d15faecf91df8c29943295485686185f5247a3e0913fa514f48 |
57 |
DIST pypy2.7-v7.2.0-src.tar.bz2 20219532 BLAKE2B 225e2cebdfa3ceb310f2a047b1d9e1d375b181c10707822890f39fc0a5ec9e6ddd7a8cf6e073074067960b766a0a813294042513a08b8e7e02b011f612e17917 SHA512 8f724490f9fa06686c8e25ddd3592b260bbffae460395de4c7d29d983780ce9b8925fa87434aac6446aac2034381cc1a13074faf252f5d1ac466a252f219f1ae |
58 |
|
59 |
diff --git a/dev-binpkg/pypy/files/2.5.0-shared-lib.patch b/dev-binpkg/pypy/files/2.5.0-shared-lib.patch |
60 |
deleted file mode 100644 |
61 |
index b5c877b..0000000 |
62 |
--- a/dev-binpkg/pypy/files/2.5.0-shared-lib.patch |
63 |
+++ /dev/null |
64 |
@@ -1,12 +0,0 @@ |
65 |
-diff -ur pypy-2.5.0-src.orig/rpython/translator/platform/posix.py pypy-2.5.0-src/rpython/translator/platform/posix.py |
66 |
---- a/rpython/translator/platform/posix.py 2015-02-03 05:12:49.000000000 +0800 |
67 |
-+++ b/rpython/translator/platform/posix.py 2015-03-22 07:36:01.420116684 +0800 |
68 |
-@@ -183,7 +183,7 @@ |
69 |
- 'int main(int argc, char* argv[]) ' |
70 |
- '{ return $(PYPY_MAIN_FUNCTION)(argc, argv); }" > $@') |
71 |
- m.rule('$(DEFAULT_TARGET)', ['$(TARGET)', 'main.o'], |
72 |
-- '$(CC_LINK) $(LDFLAGS_LINK) main.o -L. -l$(SHARED_IMPORT_LIB) -o $@ $(RPATH_FLAGS)') |
73 |
-+ '$(CC_LINK) $(LDFLAGS_LINK) main.o -L. -l$(SHARED_IMPORT_LIB) \'-Wl,-rpath,$$ORIGIN\' -o $@') |
74 |
- |
75 |
- return m |
76 |
- |
77 |
|
78 |
diff --git a/dev-binpkg/pypy/files/5.7.1-kill-flto.patch b/dev-binpkg/pypy/files/5.7.1-kill-flto.patch |
79 |
deleted file mode 100644 |
80 |
index 92395bd..0000000 |
81 |
--- a/dev-binpkg/pypy/files/5.7.1-kill-flto.patch |
82 |
+++ /dev/null |
83 |
@@ -1,27 +0,0 @@ |
84 |
-From 261f9280d9736965a8626c2d6a6fadd4254b2b89 Mon Sep 17 00:00:00 2001 |
85 |
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
86 |
-Date: Tue, 25 Apr 2017 17:03:46 +0200 |
87 |
-Subject: [PATCH] Kill -flto |
88 |
- |
89 |
---- |
90 |
- rpython/translator/platform/posix.py | 4 ---- |
91 |
- 1 file changed, 4 deletions(-) |
92 |
- |
93 |
-diff --git a/rpython/translator/platform/posix.py b/rpython/translator/platform/posix.py |
94 |
-index a8d4768..20a2934 100644 |
95 |
---- a/rpython/translator/platform/posix.py |
96 |
-+++ b/rpython/translator/platform/posix.py |
97 |
-@@ -130,10 +130,6 @@ class BasePosix(Platform): |
98 |
- else: |
99 |
- cflags = tuple(self.cflags) + tuple(self.standalone_only) |
100 |
- |
101 |
-- # xxx check which compilers accept this option or not |
102 |
-- if not config or config.translation.gcrootfinder != 'asmgcc': |
103 |
-- cflags = ('-flto',) + cflags |
104 |
-- |
105 |
- m = GnuMakefile(path) |
106 |
- m.exe_name = path.join(exe_name.basename) |
107 |
- m.eci = eci |
108 |
--- |
109 |
-2.12.2 |
110 |
- |
111 |
|
112 |
diff --git a/dev-binpkg/pypy/metadata.xml b/dev-binpkg/pypy/metadata.xml |
113 |
index 675ce03..5915221 100644 |
114 |
--- a/dev-binpkg/pypy/metadata.xml |
115 |
+++ b/dev-binpkg/pypy/metadata.xml |
116 |
@@ -1,14 +1,12 @@ |
117 |
<?xml version="1.0" encoding="UTF-8"?> |
118 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
119 |
<pkgmetadata> |
120 |
- <herd>python</herd> |
121 |
- <maintainer> |
122 |
+ <maintainer type="person"> |
123 |
<email>mgorny@g.o</email> |
124 |
<name>Michał Górny</name> |
125 |
</maintainer> |
126 |
<use> |
127 |
<flag name="low-memory">Build using PyPy with the engine configured towards low memory footprint. This makes it possible to build PyPy using ~3.5G of RAM on amd64 and ~half of that on x86, at the cost of lengthened build time. Please note that you will need an extra ~1G of extra RAM or swap since the translation memory (unused at the time) is not freed when the C compiler is spawned.</flag> |
128 |
<flag name="sandbox">Enable sandboxing functionality</flag> |
129 |
- <flag name="shadowstack">Use a shadow stack for finding GC roots</flag> |
130 |
</use> |
131 |
</pkgmetadata> |
132 |
|
133 |
diff --git a/dev-binpkg/pypy/pypy-2.6.0.ebuild b/dev-binpkg/pypy/pypy-2.6.0.ebuild |
134 |
deleted file mode 100644 |
135 |
index 82aaf94..0000000 |
136 |
--- a/dev-binpkg/pypy/pypy-2.6.0.ebuild |
137 |
+++ /dev/null |
138 |
@@ -1,193 +0,0 @@ |
139 |
-# Copyright 1999-2015 Gentoo Foundation |
140 |
-# Distributed under the terms of the GNU General Public License v2 |
141 |
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/pypy-2.6.0.ebuild,v 1.1 2015/06/04 18:46:39 mgorny Exp $ |
142 |
- |
143 |
-EAPI=5 |
144 |
- |
145 |
-PYTHON_COMPAT=( python2_7 pypy ) |
146 |
-inherit check-reqs eutils multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator |
147 |
- |
148 |
-CPY_PATCHSET_VERSION="2.7.10-0" |
149 |
- |
150 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
151 |
-HOMEPAGE="http://pypy.org/" |
152 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${P}-src.tar.bz2" |
153 |
- |
154 |
-LICENSE="MIT" |
155 |
-SLOT="0/$(get_version_component_range 1-2 ${PV})" |
156 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
157 |
-IUSE="bzip2 +jit low-memory ncurses sandbox shadowstack sqlite cpu_flags_x86_sse2" |
158 |
- |
159 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
160 |
- virtual/libffi:0= |
161 |
- virtual/libintl:0= |
162 |
- dev-libs/expat:0= |
163 |
- dev-libs/openssl:0=[-bindist] |
164 |
- bzip2? ( app-arch/bzip2:0= ) |
165 |
- ncurses? ( sys-libs/ncurses:0= ) |
166 |
- app-arch/lzip |
167 |
- ${PYTHON_DEPS}" |
168 |
- |
169 |
-S="${WORKDIR}/${P}-src" |
170 |
- |
171 |
-pkg_pretend() { |
172 |
- if use low-memory; then |
173 |
- if ! python_is_installed pypy; then |
174 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
175 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
176 |
- eerror |
177 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
178 |
- eerror |
179 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
180 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
181 |
- fi |
182 |
- |
183 |
- CHECKREQS_MEMORY="1750M" |
184 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
185 |
- else |
186 |
- CHECKREQS_MEMORY="3G" |
187 |
- use amd64 && CHECKREQS_MEMORY="6G" |
188 |
- fi |
189 |
- |
190 |
- check-reqs_pkg_pretend |
191 |
- |
192 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
193 |
-} |
194 |
- |
195 |
-pkg_setup() { |
196 |
- pkg_pretend |
197 |
- |
198 |
- if python_is_installed pypy; then |
199 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
200 |
- einfo "Using already-installed PyPy to perform the translation." |
201 |
- local EPYTHON=pypy |
202 |
- else |
203 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
204 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
205 |
- einfo "the EPYTHON variable." |
206 |
- fi |
207 |
- fi |
208 |
- |
209 |
- python-any-r1_pkg_setup |
210 |
- |
211 |
- local cpu |
212 |
- if use amd64; then |
213 |
- # common denominator between Intel & AMD |
214 |
- cpu='x86-64' |
215 |
- elif use x86; then |
216 |
- if use cpu_flags_x86_sse2; then |
217 |
- # lowest with SSE2 |
218 |
- cpu='pentium-m' |
219 |
- else |
220 |
- # lowest with SSE, compat. with athlon-xp |
221 |
- # TODO: do we want to support something older? |
222 |
- cpu='pentium3' |
223 |
- fi |
224 |
- else |
225 |
- die "Unsupported arch ${ARCH}" |
226 |
- fi |
227 |
- |
228 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
229 |
- export CXXFLAGS=${CFLAGS} |
230 |
- |
231 |
- elog "CFLAGS: ${CFLAGS}" |
232 |
-} |
233 |
- |
234 |
-src_prepare() { |
235 |
- epatch "${FILESDIR}"/2.5.0-shared-lib.patch # 517002 |
236 |
- |
237 |
- epatch_user |
238 |
-} |
239 |
- |
240 |
-src_compile() { |
241 |
- tc-export CC |
242 |
- |
243 |
- local jit_backend |
244 |
- if use jit; then |
245 |
- jit_backend='--jit-backend=' |
246 |
- |
247 |
- # We only need the explicit sse2 switch for x86. |
248 |
- # On other arches we can rely on autodetection which uses |
249 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
250 |
- # the modern values... |
251 |
- |
252 |
- if use x86; then |
253 |
- if use cpu_flags_x86_sse2; then |
254 |
- jit_backend+=x86 |
255 |
- else |
256 |
- jit_backend+=x86-without-sse2 |
257 |
- fi |
258 |
- else |
259 |
- jit_backend+=auto |
260 |
- fi |
261 |
- fi |
262 |
- |
263 |
- local args=( |
264 |
- --shared |
265 |
- $(usex jit -Ojit -O2) |
266 |
- $(usex shadowstack --gcrootfinder=shadowstack '') |
267 |
- $(usex sandbox --sandbox '') |
268 |
- |
269 |
- ${jit_backend} |
270 |
- --make-jobs=$(makeopts_jobs) |
271 |
- |
272 |
- pypy/goal/targetpypystandalone |
273 |
- ) |
274 |
- |
275 |
- # Avoid linking against libraries disabled by use flags |
276 |
- local opts=( |
277 |
- bzip2:bz2 |
278 |
- ncurses:_minimal_curses |
279 |
- ) |
280 |
- |
281 |
- local opt |
282 |
- for opt in "${opts[@]}"; do |
283 |
- local flag=${opt%:*} |
284 |
- local mod=${opt#*:} |
285 |
- |
286 |
- args+=( |
287 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
288 |
- ) |
289 |
- done |
290 |
- |
291 |
- local interp=( "${PYTHON}" ) |
292 |
- if use low-memory; then |
293 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
294 |
- "${PYTHON}" --jit loop_longevity=300 ) |
295 |
- fi |
296 |
- |
297 |
- set -- "${interp[@]}" rpython/bin/rpython --batch "${args[@]}" |
298 |
- echo -e "\033[1m${@}\033[0m" |
299 |
- "${@}" || die "compile error" |
300 |
- |
301 |
- pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" |
302 |
-} |
303 |
- |
304 |
-src_install() { |
305 |
- local flags=( bzip2 jit ncurses sandbox shadowstack ) |
306 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
307 |
- local f suffix="-${ARCH}" |
308 |
- |
309 |
- for f in ${flags[@]}; do |
310 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
311 |
- done |
312 |
- |
313 |
- local BIN_P=pypy-bin-${PV} |
314 |
- |
315 |
- einfo "Zipping PyPy ..." |
316 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
317 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
318 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
319 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
320 |
- |
321 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
322 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
323 |
-} |
324 |
- |
325 |
-# Yup, very hacky. |
326 |
-pkg_preinst() { |
327 |
- # integrity check. |
328 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
329 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
330 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
331 |
-} |
332 |
|
333 |
diff --git a/dev-binpkg/pypy/pypy-4.0.0.ebuild b/dev-binpkg/pypy/pypy-4.0.0.ebuild |
334 |
deleted file mode 100644 |
335 |
index 82aaf94..0000000 |
336 |
--- a/dev-binpkg/pypy/pypy-4.0.0.ebuild |
337 |
+++ /dev/null |
338 |
@@ -1,193 +0,0 @@ |
339 |
-# Copyright 1999-2015 Gentoo Foundation |
340 |
-# Distributed under the terms of the GNU General Public License v2 |
341 |
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/pypy-2.6.0.ebuild,v 1.1 2015/06/04 18:46:39 mgorny Exp $ |
342 |
- |
343 |
-EAPI=5 |
344 |
- |
345 |
-PYTHON_COMPAT=( python2_7 pypy ) |
346 |
-inherit check-reqs eutils multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator |
347 |
- |
348 |
-CPY_PATCHSET_VERSION="2.7.10-0" |
349 |
- |
350 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
351 |
-HOMEPAGE="http://pypy.org/" |
352 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${P}-src.tar.bz2" |
353 |
- |
354 |
-LICENSE="MIT" |
355 |
-SLOT="0/$(get_version_component_range 1-2 ${PV})" |
356 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
357 |
-IUSE="bzip2 +jit low-memory ncurses sandbox shadowstack sqlite cpu_flags_x86_sse2" |
358 |
- |
359 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
360 |
- virtual/libffi:0= |
361 |
- virtual/libintl:0= |
362 |
- dev-libs/expat:0= |
363 |
- dev-libs/openssl:0=[-bindist] |
364 |
- bzip2? ( app-arch/bzip2:0= ) |
365 |
- ncurses? ( sys-libs/ncurses:0= ) |
366 |
- app-arch/lzip |
367 |
- ${PYTHON_DEPS}" |
368 |
- |
369 |
-S="${WORKDIR}/${P}-src" |
370 |
- |
371 |
-pkg_pretend() { |
372 |
- if use low-memory; then |
373 |
- if ! python_is_installed pypy; then |
374 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
375 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
376 |
- eerror |
377 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
378 |
- eerror |
379 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
380 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
381 |
- fi |
382 |
- |
383 |
- CHECKREQS_MEMORY="1750M" |
384 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
385 |
- else |
386 |
- CHECKREQS_MEMORY="3G" |
387 |
- use amd64 && CHECKREQS_MEMORY="6G" |
388 |
- fi |
389 |
- |
390 |
- check-reqs_pkg_pretend |
391 |
- |
392 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
393 |
-} |
394 |
- |
395 |
-pkg_setup() { |
396 |
- pkg_pretend |
397 |
- |
398 |
- if python_is_installed pypy; then |
399 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
400 |
- einfo "Using already-installed PyPy to perform the translation." |
401 |
- local EPYTHON=pypy |
402 |
- else |
403 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
404 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
405 |
- einfo "the EPYTHON variable." |
406 |
- fi |
407 |
- fi |
408 |
- |
409 |
- python-any-r1_pkg_setup |
410 |
- |
411 |
- local cpu |
412 |
- if use amd64; then |
413 |
- # common denominator between Intel & AMD |
414 |
- cpu='x86-64' |
415 |
- elif use x86; then |
416 |
- if use cpu_flags_x86_sse2; then |
417 |
- # lowest with SSE2 |
418 |
- cpu='pentium-m' |
419 |
- else |
420 |
- # lowest with SSE, compat. with athlon-xp |
421 |
- # TODO: do we want to support something older? |
422 |
- cpu='pentium3' |
423 |
- fi |
424 |
- else |
425 |
- die "Unsupported arch ${ARCH}" |
426 |
- fi |
427 |
- |
428 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
429 |
- export CXXFLAGS=${CFLAGS} |
430 |
- |
431 |
- elog "CFLAGS: ${CFLAGS}" |
432 |
-} |
433 |
- |
434 |
-src_prepare() { |
435 |
- epatch "${FILESDIR}"/2.5.0-shared-lib.patch # 517002 |
436 |
- |
437 |
- epatch_user |
438 |
-} |
439 |
- |
440 |
-src_compile() { |
441 |
- tc-export CC |
442 |
- |
443 |
- local jit_backend |
444 |
- if use jit; then |
445 |
- jit_backend='--jit-backend=' |
446 |
- |
447 |
- # We only need the explicit sse2 switch for x86. |
448 |
- # On other arches we can rely on autodetection which uses |
449 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
450 |
- # the modern values... |
451 |
- |
452 |
- if use x86; then |
453 |
- if use cpu_flags_x86_sse2; then |
454 |
- jit_backend+=x86 |
455 |
- else |
456 |
- jit_backend+=x86-without-sse2 |
457 |
- fi |
458 |
- else |
459 |
- jit_backend+=auto |
460 |
- fi |
461 |
- fi |
462 |
- |
463 |
- local args=( |
464 |
- --shared |
465 |
- $(usex jit -Ojit -O2) |
466 |
- $(usex shadowstack --gcrootfinder=shadowstack '') |
467 |
- $(usex sandbox --sandbox '') |
468 |
- |
469 |
- ${jit_backend} |
470 |
- --make-jobs=$(makeopts_jobs) |
471 |
- |
472 |
- pypy/goal/targetpypystandalone |
473 |
- ) |
474 |
- |
475 |
- # Avoid linking against libraries disabled by use flags |
476 |
- local opts=( |
477 |
- bzip2:bz2 |
478 |
- ncurses:_minimal_curses |
479 |
- ) |
480 |
- |
481 |
- local opt |
482 |
- for opt in "${opts[@]}"; do |
483 |
- local flag=${opt%:*} |
484 |
- local mod=${opt#*:} |
485 |
- |
486 |
- args+=( |
487 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
488 |
- ) |
489 |
- done |
490 |
- |
491 |
- local interp=( "${PYTHON}" ) |
492 |
- if use low-memory; then |
493 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
494 |
- "${PYTHON}" --jit loop_longevity=300 ) |
495 |
- fi |
496 |
- |
497 |
- set -- "${interp[@]}" rpython/bin/rpython --batch "${args[@]}" |
498 |
- echo -e "\033[1m${@}\033[0m" |
499 |
- "${@}" || die "compile error" |
500 |
- |
501 |
- pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" |
502 |
-} |
503 |
- |
504 |
-src_install() { |
505 |
- local flags=( bzip2 jit ncurses sandbox shadowstack ) |
506 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
507 |
- local f suffix="-${ARCH}" |
508 |
- |
509 |
- for f in ${flags[@]}; do |
510 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
511 |
- done |
512 |
- |
513 |
- local BIN_P=pypy-bin-${PV} |
514 |
- |
515 |
- einfo "Zipping PyPy ..." |
516 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
517 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
518 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
519 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
520 |
- |
521 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
522 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
523 |
-} |
524 |
- |
525 |
-# Yup, very hacky. |
526 |
-pkg_preinst() { |
527 |
- # integrity check. |
528 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
529 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
530 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
531 |
-} |
532 |
|
533 |
diff --git a/dev-binpkg/pypy/pypy-4.0.1.ebuild b/dev-binpkg/pypy/pypy-4.0.1.ebuild |
534 |
deleted file mode 100644 |
535 |
index 82aaf94..0000000 |
536 |
--- a/dev-binpkg/pypy/pypy-4.0.1.ebuild |
537 |
+++ /dev/null |
538 |
@@ -1,193 +0,0 @@ |
539 |
-# Copyright 1999-2015 Gentoo Foundation |
540 |
-# Distributed under the terms of the GNU General Public License v2 |
541 |
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/pypy-2.6.0.ebuild,v 1.1 2015/06/04 18:46:39 mgorny Exp $ |
542 |
- |
543 |
-EAPI=5 |
544 |
- |
545 |
-PYTHON_COMPAT=( python2_7 pypy ) |
546 |
-inherit check-reqs eutils multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator |
547 |
- |
548 |
-CPY_PATCHSET_VERSION="2.7.10-0" |
549 |
- |
550 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
551 |
-HOMEPAGE="http://pypy.org/" |
552 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${P}-src.tar.bz2" |
553 |
- |
554 |
-LICENSE="MIT" |
555 |
-SLOT="0/$(get_version_component_range 1-2 ${PV})" |
556 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
557 |
-IUSE="bzip2 +jit low-memory ncurses sandbox shadowstack sqlite cpu_flags_x86_sse2" |
558 |
- |
559 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
560 |
- virtual/libffi:0= |
561 |
- virtual/libintl:0= |
562 |
- dev-libs/expat:0= |
563 |
- dev-libs/openssl:0=[-bindist] |
564 |
- bzip2? ( app-arch/bzip2:0= ) |
565 |
- ncurses? ( sys-libs/ncurses:0= ) |
566 |
- app-arch/lzip |
567 |
- ${PYTHON_DEPS}" |
568 |
- |
569 |
-S="${WORKDIR}/${P}-src" |
570 |
- |
571 |
-pkg_pretend() { |
572 |
- if use low-memory; then |
573 |
- if ! python_is_installed pypy; then |
574 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
575 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
576 |
- eerror |
577 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
578 |
- eerror |
579 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
580 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
581 |
- fi |
582 |
- |
583 |
- CHECKREQS_MEMORY="1750M" |
584 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
585 |
- else |
586 |
- CHECKREQS_MEMORY="3G" |
587 |
- use amd64 && CHECKREQS_MEMORY="6G" |
588 |
- fi |
589 |
- |
590 |
- check-reqs_pkg_pretend |
591 |
- |
592 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
593 |
-} |
594 |
- |
595 |
-pkg_setup() { |
596 |
- pkg_pretend |
597 |
- |
598 |
- if python_is_installed pypy; then |
599 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
600 |
- einfo "Using already-installed PyPy to perform the translation." |
601 |
- local EPYTHON=pypy |
602 |
- else |
603 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
604 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
605 |
- einfo "the EPYTHON variable." |
606 |
- fi |
607 |
- fi |
608 |
- |
609 |
- python-any-r1_pkg_setup |
610 |
- |
611 |
- local cpu |
612 |
- if use amd64; then |
613 |
- # common denominator between Intel & AMD |
614 |
- cpu='x86-64' |
615 |
- elif use x86; then |
616 |
- if use cpu_flags_x86_sse2; then |
617 |
- # lowest with SSE2 |
618 |
- cpu='pentium-m' |
619 |
- else |
620 |
- # lowest with SSE, compat. with athlon-xp |
621 |
- # TODO: do we want to support something older? |
622 |
- cpu='pentium3' |
623 |
- fi |
624 |
- else |
625 |
- die "Unsupported arch ${ARCH}" |
626 |
- fi |
627 |
- |
628 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
629 |
- export CXXFLAGS=${CFLAGS} |
630 |
- |
631 |
- elog "CFLAGS: ${CFLAGS}" |
632 |
-} |
633 |
- |
634 |
-src_prepare() { |
635 |
- epatch "${FILESDIR}"/2.5.0-shared-lib.patch # 517002 |
636 |
- |
637 |
- epatch_user |
638 |
-} |
639 |
- |
640 |
-src_compile() { |
641 |
- tc-export CC |
642 |
- |
643 |
- local jit_backend |
644 |
- if use jit; then |
645 |
- jit_backend='--jit-backend=' |
646 |
- |
647 |
- # We only need the explicit sse2 switch for x86. |
648 |
- # On other arches we can rely on autodetection which uses |
649 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
650 |
- # the modern values... |
651 |
- |
652 |
- if use x86; then |
653 |
- if use cpu_flags_x86_sse2; then |
654 |
- jit_backend+=x86 |
655 |
- else |
656 |
- jit_backend+=x86-without-sse2 |
657 |
- fi |
658 |
- else |
659 |
- jit_backend+=auto |
660 |
- fi |
661 |
- fi |
662 |
- |
663 |
- local args=( |
664 |
- --shared |
665 |
- $(usex jit -Ojit -O2) |
666 |
- $(usex shadowstack --gcrootfinder=shadowstack '') |
667 |
- $(usex sandbox --sandbox '') |
668 |
- |
669 |
- ${jit_backend} |
670 |
- --make-jobs=$(makeopts_jobs) |
671 |
- |
672 |
- pypy/goal/targetpypystandalone |
673 |
- ) |
674 |
- |
675 |
- # Avoid linking against libraries disabled by use flags |
676 |
- local opts=( |
677 |
- bzip2:bz2 |
678 |
- ncurses:_minimal_curses |
679 |
- ) |
680 |
- |
681 |
- local opt |
682 |
- for opt in "${opts[@]}"; do |
683 |
- local flag=${opt%:*} |
684 |
- local mod=${opt#*:} |
685 |
- |
686 |
- args+=( |
687 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
688 |
- ) |
689 |
- done |
690 |
- |
691 |
- local interp=( "${PYTHON}" ) |
692 |
- if use low-memory; then |
693 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
694 |
- "${PYTHON}" --jit loop_longevity=300 ) |
695 |
- fi |
696 |
- |
697 |
- set -- "${interp[@]}" rpython/bin/rpython --batch "${args[@]}" |
698 |
- echo -e "\033[1m${@}\033[0m" |
699 |
- "${@}" || die "compile error" |
700 |
- |
701 |
- pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" |
702 |
-} |
703 |
- |
704 |
-src_install() { |
705 |
- local flags=( bzip2 jit ncurses sandbox shadowstack ) |
706 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
707 |
- local f suffix="-${ARCH}" |
708 |
- |
709 |
- for f in ${flags[@]}; do |
710 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
711 |
- done |
712 |
- |
713 |
- local BIN_P=pypy-bin-${PV} |
714 |
- |
715 |
- einfo "Zipping PyPy ..." |
716 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
717 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
718 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
719 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
720 |
- |
721 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
722 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
723 |
-} |
724 |
- |
725 |
-# Yup, very hacky. |
726 |
-pkg_preinst() { |
727 |
- # integrity check. |
728 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
729 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
730 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
731 |
-} |
732 |
|
733 |
diff --git a/dev-binpkg/pypy/pypy-5.0.0.ebuild b/dev-binpkg/pypy/pypy-5.0.0.ebuild |
734 |
deleted file mode 100644 |
735 |
index 82aaf94..0000000 |
736 |
--- a/dev-binpkg/pypy/pypy-5.0.0.ebuild |
737 |
+++ /dev/null |
738 |
@@ -1,193 +0,0 @@ |
739 |
-# Copyright 1999-2015 Gentoo Foundation |
740 |
-# Distributed under the terms of the GNU General Public License v2 |
741 |
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/pypy-2.6.0.ebuild,v 1.1 2015/06/04 18:46:39 mgorny Exp $ |
742 |
- |
743 |
-EAPI=5 |
744 |
- |
745 |
-PYTHON_COMPAT=( python2_7 pypy ) |
746 |
-inherit check-reqs eutils multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator |
747 |
- |
748 |
-CPY_PATCHSET_VERSION="2.7.10-0" |
749 |
- |
750 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
751 |
-HOMEPAGE="http://pypy.org/" |
752 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${P}-src.tar.bz2" |
753 |
- |
754 |
-LICENSE="MIT" |
755 |
-SLOT="0/$(get_version_component_range 1-2 ${PV})" |
756 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
757 |
-IUSE="bzip2 +jit low-memory ncurses sandbox shadowstack sqlite cpu_flags_x86_sse2" |
758 |
- |
759 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
760 |
- virtual/libffi:0= |
761 |
- virtual/libintl:0= |
762 |
- dev-libs/expat:0= |
763 |
- dev-libs/openssl:0=[-bindist] |
764 |
- bzip2? ( app-arch/bzip2:0= ) |
765 |
- ncurses? ( sys-libs/ncurses:0= ) |
766 |
- app-arch/lzip |
767 |
- ${PYTHON_DEPS}" |
768 |
- |
769 |
-S="${WORKDIR}/${P}-src" |
770 |
- |
771 |
-pkg_pretend() { |
772 |
- if use low-memory; then |
773 |
- if ! python_is_installed pypy; then |
774 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
775 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
776 |
- eerror |
777 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
778 |
- eerror |
779 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
780 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
781 |
- fi |
782 |
- |
783 |
- CHECKREQS_MEMORY="1750M" |
784 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
785 |
- else |
786 |
- CHECKREQS_MEMORY="3G" |
787 |
- use amd64 && CHECKREQS_MEMORY="6G" |
788 |
- fi |
789 |
- |
790 |
- check-reqs_pkg_pretend |
791 |
- |
792 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
793 |
-} |
794 |
- |
795 |
-pkg_setup() { |
796 |
- pkg_pretend |
797 |
- |
798 |
- if python_is_installed pypy; then |
799 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
800 |
- einfo "Using already-installed PyPy to perform the translation." |
801 |
- local EPYTHON=pypy |
802 |
- else |
803 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
804 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
805 |
- einfo "the EPYTHON variable." |
806 |
- fi |
807 |
- fi |
808 |
- |
809 |
- python-any-r1_pkg_setup |
810 |
- |
811 |
- local cpu |
812 |
- if use amd64; then |
813 |
- # common denominator between Intel & AMD |
814 |
- cpu='x86-64' |
815 |
- elif use x86; then |
816 |
- if use cpu_flags_x86_sse2; then |
817 |
- # lowest with SSE2 |
818 |
- cpu='pentium-m' |
819 |
- else |
820 |
- # lowest with SSE, compat. with athlon-xp |
821 |
- # TODO: do we want to support something older? |
822 |
- cpu='pentium3' |
823 |
- fi |
824 |
- else |
825 |
- die "Unsupported arch ${ARCH}" |
826 |
- fi |
827 |
- |
828 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
829 |
- export CXXFLAGS=${CFLAGS} |
830 |
- |
831 |
- elog "CFLAGS: ${CFLAGS}" |
832 |
-} |
833 |
- |
834 |
-src_prepare() { |
835 |
- epatch "${FILESDIR}"/2.5.0-shared-lib.patch # 517002 |
836 |
- |
837 |
- epatch_user |
838 |
-} |
839 |
- |
840 |
-src_compile() { |
841 |
- tc-export CC |
842 |
- |
843 |
- local jit_backend |
844 |
- if use jit; then |
845 |
- jit_backend='--jit-backend=' |
846 |
- |
847 |
- # We only need the explicit sse2 switch for x86. |
848 |
- # On other arches we can rely on autodetection which uses |
849 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
850 |
- # the modern values... |
851 |
- |
852 |
- if use x86; then |
853 |
- if use cpu_flags_x86_sse2; then |
854 |
- jit_backend+=x86 |
855 |
- else |
856 |
- jit_backend+=x86-without-sse2 |
857 |
- fi |
858 |
- else |
859 |
- jit_backend+=auto |
860 |
- fi |
861 |
- fi |
862 |
- |
863 |
- local args=( |
864 |
- --shared |
865 |
- $(usex jit -Ojit -O2) |
866 |
- $(usex shadowstack --gcrootfinder=shadowstack '') |
867 |
- $(usex sandbox --sandbox '') |
868 |
- |
869 |
- ${jit_backend} |
870 |
- --make-jobs=$(makeopts_jobs) |
871 |
- |
872 |
- pypy/goal/targetpypystandalone |
873 |
- ) |
874 |
- |
875 |
- # Avoid linking against libraries disabled by use flags |
876 |
- local opts=( |
877 |
- bzip2:bz2 |
878 |
- ncurses:_minimal_curses |
879 |
- ) |
880 |
- |
881 |
- local opt |
882 |
- for opt in "${opts[@]}"; do |
883 |
- local flag=${opt%:*} |
884 |
- local mod=${opt#*:} |
885 |
- |
886 |
- args+=( |
887 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
888 |
- ) |
889 |
- done |
890 |
- |
891 |
- local interp=( "${PYTHON}" ) |
892 |
- if use low-memory; then |
893 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
894 |
- "${PYTHON}" --jit loop_longevity=300 ) |
895 |
- fi |
896 |
- |
897 |
- set -- "${interp[@]}" rpython/bin/rpython --batch "${args[@]}" |
898 |
- echo -e "\033[1m${@}\033[0m" |
899 |
- "${@}" || die "compile error" |
900 |
- |
901 |
- pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" |
902 |
-} |
903 |
- |
904 |
-src_install() { |
905 |
- local flags=( bzip2 jit ncurses sandbox shadowstack ) |
906 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
907 |
- local f suffix="-${ARCH}" |
908 |
- |
909 |
- for f in ${flags[@]}; do |
910 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
911 |
- done |
912 |
- |
913 |
- local BIN_P=pypy-bin-${PV} |
914 |
- |
915 |
- einfo "Zipping PyPy ..." |
916 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
917 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
918 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
919 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
920 |
- |
921 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
922 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
923 |
-} |
924 |
- |
925 |
-# Yup, very hacky. |
926 |
-pkg_preinst() { |
927 |
- # integrity check. |
928 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
929 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
930 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
931 |
-} |
932 |
|
933 |
diff --git a/dev-binpkg/pypy/pypy-5.1.1.ebuild b/dev-binpkg/pypy/pypy-5.1.1.ebuild |
934 |
deleted file mode 100644 |
935 |
index a45d69e..0000000 |
936 |
--- a/dev-binpkg/pypy/pypy-5.1.1.ebuild |
937 |
+++ /dev/null |
938 |
@@ -1,191 +0,0 @@ |
939 |
-# Copyright 1999-2016 Gentoo Foundation |
940 |
-# Distributed under the terms of the GNU General Public License v2 |
941 |
-# $Id$ |
942 |
- |
943 |
-EAPI=5 |
944 |
- |
945 |
-PYTHON_COMPAT=( python2_7 pypy ) |
946 |
-inherit check-reqs eutils multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator |
947 |
- |
948 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
949 |
-HOMEPAGE="http://pypy.org/" |
950 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${P}-src.tar.bz2" |
951 |
- |
952 |
-LICENSE="MIT" |
953 |
-SLOT="0/$(get_version_component_range 1-2 ${PV})" |
954 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
955 |
-IUSE="bzip2 +jit low-memory ncurses sandbox shadowstack sqlite cpu_flags_x86_sse2" |
956 |
- |
957 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
958 |
- virtual/libffi:0= |
959 |
- virtual/libintl:0= |
960 |
- dev-libs/expat:0= |
961 |
- dev-libs/openssl:0=[-bindist] |
962 |
- bzip2? ( app-arch/bzip2:0= ) |
963 |
- ncurses? ( sys-libs/ncurses:0= ) |
964 |
- app-arch/lzip |
965 |
- ${PYTHON_DEPS}" |
966 |
- |
967 |
-S="${WORKDIR}/${P}-src" |
968 |
- |
969 |
-pkg_pretend() { |
970 |
- if use low-memory; then |
971 |
- if ! python_is_installed pypy; then |
972 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
973 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
974 |
- eerror |
975 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
976 |
- eerror |
977 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
978 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
979 |
- fi |
980 |
- |
981 |
- CHECKREQS_MEMORY="1750M" |
982 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
983 |
- else |
984 |
- CHECKREQS_MEMORY="3G" |
985 |
- use amd64 && CHECKREQS_MEMORY="6G" |
986 |
- fi |
987 |
- |
988 |
- check-reqs_pkg_pretend |
989 |
- |
990 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
991 |
-} |
992 |
- |
993 |
-pkg_setup() { |
994 |
- pkg_pretend |
995 |
- |
996 |
- if python_is_installed pypy; then |
997 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
998 |
- einfo "Using already-installed PyPy to perform the translation." |
999 |
- local EPYTHON=pypy |
1000 |
- else |
1001 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
1002 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
1003 |
- einfo "the EPYTHON variable." |
1004 |
- fi |
1005 |
- fi |
1006 |
- |
1007 |
- python-any-r1_pkg_setup |
1008 |
- |
1009 |
- local cpu |
1010 |
- if use amd64; then |
1011 |
- # common denominator between Intel & AMD |
1012 |
- cpu='x86-64' |
1013 |
- elif use x86; then |
1014 |
- if use cpu_flags_x86_sse2; then |
1015 |
- # lowest with SSE2 |
1016 |
- cpu='pentium-m' |
1017 |
- else |
1018 |
- # lowest with SSE, compat. with athlon-xp |
1019 |
- # TODO: do we want to support something older? |
1020 |
- cpu='pentium3' |
1021 |
- fi |
1022 |
- else |
1023 |
- die "Unsupported arch ${ARCH}" |
1024 |
- fi |
1025 |
- |
1026 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
1027 |
- export CXXFLAGS=${CFLAGS} |
1028 |
- |
1029 |
- elog "CFLAGS: ${CFLAGS}" |
1030 |
-} |
1031 |
- |
1032 |
-src_prepare() { |
1033 |
- epatch "${FILESDIR}"/2.5.0-shared-lib.patch # 517002 |
1034 |
- |
1035 |
- epatch_user |
1036 |
-} |
1037 |
- |
1038 |
-src_compile() { |
1039 |
- tc-export CC |
1040 |
- |
1041 |
- local jit_backend |
1042 |
- if use jit; then |
1043 |
- jit_backend='--jit-backend=' |
1044 |
- |
1045 |
- # We only need the explicit sse2 switch for x86. |
1046 |
- # On other arches we can rely on autodetection which uses |
1047 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
1048 |
- # the modern values... |
1049 |
- |
1050 |
- if use x86; then |
1051 |
- if use cpu_flags_x86_sse2; then |
1052 |
- jit_backend+=x86 |
1053 |
- else |
1054 |
- jit_backend+=x86-without-sse2 |
1055 |
- fi |
1056 |
- else |
1057 |
- jit_backend+=auto |
1058 |
- fi |
1059 |
- fi |
1060 |
- |
1061 |
- local args=( |
1062 |
- --shared |
1063 |
- $(usex jit -Ojit -O2) |
1064 |
- $(usex shadowstack --gcrootfinder=shadowstack '') |
1065 |
- $(usex sandbox --sandbox '') |
1066 |
- |
1067 |
- ${jit_backend} |
1068 |
- --make-jobs=$(makeopts_jobs) |
1069 |
- |
1070 |
- pypy/goal/targetpypystandalone |
1071 |
- ) |
1072 |
- |
1073 |
- # Avoid linking against libraries disabled by use flags |
1074 |
- local opts=( |
1075 |
- bzip2:bz2 |
1076 |
- ncurses:_minimal_curses |
1077 |
- ) |
1078 |
- |
1079 |
- local opt |
1080 |
- for opt in "${opts[@]}"; do |
1081 |
- local flag=${opt%:*} |
1082 |
- local mod=${opt#*:} |
1083 |
- |
1084 |
- args+=( |
1085 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
1086 |
- ) |
1087 |
- done |
1088 |
- |
1089 |
- local interp=( "${PYTHON}" ) |
1090 |
- if use low-memory; then |
1091 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
1092 |
- "${PYTHON}" --jit loop_longevity=300 ) |
1093 |
- fi |
1094 |
- |
1095 |
- set -- "${interp[@]}" rpython/bin/rpython --batch "${args[@]}" |
1096 |
- echo -e "\033[1m${@}\033[0m" |
1097 |
- "${@}" || die "compile error" |
1098 |
- |
1099 |
- pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" |
1100 |
-} |
1101 |
- |
1102 |
-src_install() { |
1103 |
- local flags=( bzip2 jit ncurses sandbox shadowstack ) |
1104 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
1105 |
- local f suffix="-${ARCH}" |
1106 |
- |
1107 |
- for f in ${flags[@]}; do |
1108 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
1109 |
- done |
1110 |
- |
1111 |
- local BIN_P=pypy-bin-${PV} |
1112 |
- |
1113 |
- einfo "Zipping PyPy ..." |
1114 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
1115 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
1116 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
1117 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
1118 |
- |
1119 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
1120 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
1121 |
-} |
1122 |
- |
1123 |
-# Yup, very hacky. |
1124 |
-pkg_preinst() { |
1125 |
- # integrity check. |
1126 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
1127 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
1128 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
1129 |
-} |
1130 |
|
1131 |
diff --git a/dev-binpkg/pypy/pypy-5.10.0.ebuild b/dev-binpkg/pypy/pypy-5.10.0.ebuild |
1132 |
deleted file mode 100644 |
1133 |
index 0425266..0000000 |
1134 |
--- a/dev-binpkg/pypy/pypy-5.10.0.ebuild |
1135 |
+++ /dev/null |
1136 |
@@ -1,208 +0,0 @@ |
1137 |
-# Copyright 1999-2017 Gentoo Foundation |
1138 |
-# Distributed under the terms of the GNU General Public License v2 |
1139 |
- |
1140 |
-EAPI=6 |
1141 |
- |
1142 |
-PYTHON_COMPAT=( python2_7 pypy ) |
1143 |
-inherit check-reqs multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator |
1144 |
- |
1145 |
-# note: remember to update this to newest dev-lang/python:2.7 on bump |
1146 |
-CPY_PATCHSET_VERSION="2.7.13-0" |
1147 |
-MY_P=pypy2-v${PV} |
1148 |
- |
1149 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
1150 |
-HOMEPAGE="http://pypy.org/" |
1151 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2" |
1152 |
- |
1153 |
-LICENSE="MIT" |
1154 |
-# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
1155 |
-SLOT="0/41" |
1156 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
1157 |
-IUSE="bzip2 +jit libressl low-memory ncurses sandbox cpu_flags_x86_sse2 test" |
1158 |
- |
1159 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
1160 |
- virtual/libffi:0= |
1161 |
- virtual/libintl:0= |
1162 |
- dev-libs/expat:0= |
1163 |
- bzip2? ( app-arch/bzip2:0= ) |
1164 |
- !libressl? ( dev-libs/openssl:0=[-bindist] ) |
1165 |
- libressl? ( dev-libs/libressl:0= ) |
1166 |
- ncurses? ( sys-libs/ncurses:0= ) |
1167 |
- app-arch/lzip |
1168 |
- ${PYTHON_DEPS}" |
1169 |
- |
1170 |
-S="${WORKDIR}/${MY_P}-src" |
1171 |
- |
1172 |
-pkg_pretend() { |
1173 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
1174 |
- if use low-memory; then |
1175 |
- if ! python_is_installed pypy; then |
1176 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
1177 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
1178 |
- eerror |
1179 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
1180 |
- eerror |
1181 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
1182 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
1183 |
- fi |
1184 |
- |
1185 |
- CHECKREQS_MEMORY="1750M" |
1186 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
1187 |
- else |
1188 |
- CHECKREQS_MEMORY="3G" |
1189 |
- use amd64 && CHECKREQS_MEMORY="6G" |
1190 |
- fi |
1191 |
- |
1192 |
- check-reqs_pkg_pretend |
1193 |
- fi |
1194 |
- |
1195 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
1196 |
-} |
1197 |
- |
1198 |
-pkg_setup() { |
1199 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
1200 |
- pkg_pretend |
1201 |
- |
1202 |
- if python_is_installed pypy; then |
1203 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
1204 |
- einfo "Using already-installed PyPy to perform the translation." |
1205 |
- local EPYTHON=pypy |
1206 |
- else |
1207 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
1208 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
1209 |
- einfo "the EPYTHON variable." |
1210 |
- fi |
1211 |
- fi |
1212 |
- |
1213 |
- python-any-r1_pkg_setup |
1214 |
- |
1215 |
- local cpu |
1216 |
- if use amd64; then |
1217 |
- # common denominator between Intel & AMD |
1218 |
- cpu='x86-64' |
1219 |
- elif use x86; then |
1220 |
- if use cpu_flags_x86_sse2; then |
1221 |
- # lowest with SSE2 |
1222 |
- cpu='pentium-m' |
1223 |
- else |
1224 |
- # lowest with SSE, compat. with athlon-xp |
1225 |
- # TODO: do we want to support something older? |
1226 |
- cpu='pentium3' |
1227 |
- fi |
1228 |
- else |
1229 |
- die "Unsupported arch ${ARCH}" |
1230 |
- fi |
1231 |
- |
1232 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
1233 |
- export CXXFLAGS=${CFLAGS} |
1234 |
- |
1235 |
- elog "CFLAGS: ${CFLAGS}" |
1236 |
- fi |
1237 |
-} |
1238 |
- |
1239 |
-src_prepare() { |
1240 |
- eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002 |
1241 |
- |
1242 |
- eapply_user |
1243 |
-} |
1244 |
- |
1245 |
-src_configure() { |
1246 |
- tc-export CC |
1247 |
- |
1248 |
- local jit_backend |
1249 |
- if use jit; then |
1250 |
- jit_backend='--jit-backend=' |
1251 |
- |
1252 |
- # We only need the explicit sse2 switch for x86. |
1253 |
- # On other arches we can rely on autodetection which uses |
1254 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
1255 |
- # the modern values... |
1256 |
- |
1257 |
- if use x86; then |
1258 |
- if use cpu_flags_x86_sse2; then |
1259 |
- jit_backend+=x86 |
1260 |
- else |
1261 |
- jit_backend+=x86-without-sse2 |
1262 |
- fi |
1263 |
- else |
1264 |
- jit_backend+=auto |
1265 |
- fi |
1266 |
- fi |
1267 |
- |
1268 |
- local args=( |
1269 |
- --shared |
1270 |
- $(usex jit -Ojit -O2) |
1271 |
- $(usex sandbox --sandbox '') |
1272 |
- |
1273 |
- ${jit_backend} |
1274 |
- --make-jobs=$(makeopts_jobs) |
1275 |
- |
1276 |
- pypy/goal/targetpypystandalone |
1277 |
- ) |
1278 |
- |
1279 |
- # Avoid linking against libraries disabled by use flags |
1280 |
- local opts=( |
1281 |
- bzip2:bz2 |
1282 |
- ncurses:_minimal_curses |
1283 |
- ) |
1284 |
- |
1285 |
- local opt |
1286 |
- for opt in "${opts[@]}"; do |
1287 |
- local flag=${opt%:*} |
1288 |
- local mod=${opt#*:} |
1289 |
- |
1290 |
- args+=( |
1291 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
1292 |
- ) |
1293 |
- done |
1294 |
- |
1295 |
- local interp=( "${PYTHON}" ) |
1296 |
- if use low-memory; then |
1297 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
1298 |
- "${PYTHON}" --jit loop_longevity=300 ) |
1299 |
- fi |
1300 |
- |
1301 |
- # translate into the C sources |
1302 |
- # we're going to make them ourselves since otherwise pypy does not |
1303 |
- # free up the unneeded memory before spawning the compiler |
1304 |
- set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" |
1305 |
- echo -e "\033[1m${@}\033[0m" |
1306 |
- "${@}" || die "translation failed" |
1307 |
-} |
1308 |
- |
1309 |
-src_compile() { |
1310 |
- emake -C "${T}"/usession*-0/testing_1 |
1311 |
- |
1312 |
- # copy back to make sys.prefix happy |
1313 |
- cp -p "${T}"/usession*-0/testing_1/{pypy-c,libpypy-c.so} . || die |
1314 |
- pax-mark m pypy-c libpypy-c.so |
1315 |
-} |
1316 |
- |
1317 |
-src_install() { |
1318 |
- local flags=( bzip2 jit libressl ncurses sandbox ) |
1319 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
1320 |
- local f suffix="-${ARCH}" |
1321 |
- |
1322 |
- for f in ${flags[@]}; do |
1323 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
1324 |
- done |
1325 |
- |
1326 |
- local BIN_P=pypy-bin-${PV} |
1327 |
- |
1328 |
- einfo "Zipping PyPy ..." |
1329 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
1330 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
1331 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
1332 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
1333 |
- |
1334 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
1335 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
1336 |
-} |
1337 |
- |
1338 |
-# Yup, very hacky. |
1339 |
-pkg_preinst() { |
1340 |
- # integrity check. |
1341 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
1342 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
1343 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
1344 |
-} |
1345 |
|
1346 |
diff --git a/dev-binpkg/pypy/pypy-5.3.0.ebuild b/dev-binpkg/pypy/pypy-5.3.0.ebuild |
1347 |
deleted file mode 100644 |
1348 |
index 63dc8fe..0000000 |
1349 |
--- a/dev-binpkg/pypy/pypy-5.3.0.ebuild |
1350 |
+++ /dev/null |
1351 |
@@ -1,193 +0,0 @@ |
1352 |
-# Copyright 1999-2016 Gentoo Foundation |
1353 |
-# Distributed under the terms of the GNU General Public License v2 |
1354 |
-# $Id$ |
1355 |
- |
1356 |
-EAPI=5 |
1357 |
- |
1358 |
-PYTHON_COMPAT=( python2_7 pypy ) |
1359 |
-inherit check-reqs eutils multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator |
1360 |
- |
1361 |
-MY_P=pypy2-v${PV} |
1362 |
- |
1363 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
1364 |
-HOMEPAGE="http://pypy.org/" |
1365 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2" |
1366 |
- |
1367 |
-LICENSE="MIT" |
1368 |
-SLOT="0/$(get_version_component_range 1-2 ${PV})" |
1369 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
1370 |
-IUSE="bzip2 +jit low-memory ncurses sandbox shadowstack sqlite cpu_flags_x86_sse2" |
1371 |
- |
1372 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
1373 |
- virtual/libffi:0= |
1374 |
- virtual/libintl:0= |
1375 |
- dev-libs/expat:0= |
1376 |
- dev-libs/openssl:0=[-bindist] |
1377 |
- bzip2? ( app-arch/bzip2:0= ) |
1378 |
- ncurses? ( sys-libs/ncurses:0= ) |
1379 |
- app-arch/lzip |
1380 |
- ${PYTHON_DEPS}" |
1381 |
- |
1382 |
-S="${WORKDIR}/${MY_P}-src" |
1383 |
- |
1384 |
-pkg_pretend() { |
1385 |
- if use low-memory; then |
1386 |
- if ! python_is_installed pypy; then |
1387 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
1388 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
1389 |
- eerror |
1390 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
1391 |
- eerror |
1392 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
1393 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
1394 |
- fi |
1395 |
- |
1396 |
- CHECKREQS_MEMORY="1750M" |
1397 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
1398 |
- else |
1399 |
- CHECKREQS_MEMORY="3G" |
1400 |
- use amd64 && CHECKREQS_MEMORY="6G" |
1401 |
- fi |
1402 |
- |
1403 |
- check-reqs_pkg_pretend |
1404 |
- |
1405 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
1406 |
-} |
1407 |
- |
1408 |
-pkg_setup() { |
1409 |
- pkg_pretend |
1410 |
- |
1411 |
- if python_is_installed pypy; then |
1412 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
1413 |
- einfo "Using already-installed PyPy to perform the translation." |
1414 |
- local EPYTHON=pypy |
1415 |
- else |
1416 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
1417 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
1418 |
- einfo "the EPYTHON variable." |
1419 |
- fi |
1420 |
- fi |
1421 |
- |
1422 |
- python-any-r1_pkg_setup |
1423 |
- |
1424 |
- local cpu |
1425 |
- if use amd64; then |
1426 |
- # common denominator between Intel & AMD |
1427 |
- cpu='x86-64' |
1428 |
- elif use x86; then |
1429 |
- if use cpu_flags_x86_sse2; then |
1430 |
- # lowest with SSE2 |
1431 |
- cpu='pentium-m' |
1432 |
- else |
1433 |
- # lowest with SSE, compat. with athlon-xp |
1434 |
- # TODO: do we want to support something older? |
1435 |
- cpu='pentium3' |
1436 |
- fi |
1437 |
- else |
1438 |
- die "Unsupported arch ${ARCH}" |
1439 |
- fi |
1440 |
- |
1441 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
1442 |
- export CXXFLAGS=${CFLAGS} |
1443 |
- |
1444 |
- elog "CFLAGS: ${CFLAGS}" |
1445 |
-} |
1446 |
- |
1447 |
-src_prepare() { |
1448 |
- epatch "${FILESDIR}"/2.5.0-shared-lib.patch # 517002 |
1449 |
- |
1450 |
- epatch_user |
1451 |
-} |
1452 |
- |
1453 |
-src_compile() { |
1454 |
- tc-export CC |
1455 |
- |
1456 |
- local jit_backend |
1457 |
- if use jit; then |
1458 |
- jit_backend='--jit-backend=' |
1459 |
- |
1460 |
- # We only need the explicit sse2 switch for x86. |
1461 |
- # On other arches we can rely on autodetection which uses |
1462 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
1463 |
- # the modern values... |
1464 |
- |
1465 |
- if use x86; then |
1466 |
- if use cpu_flags_x86_sse2; then |
1467 |
- jit_backend+=x86 |
1468 |
- else |
1469 |
- jit_backend+=x86-without-sse2 |
1470 |
- fi |
1471 |
- else |
1472 |
- jit_backend+=auto |
1473 |
- fi |
1474 |
- fi |
1475 |
- |
1476 |
- local args=( |
1477 |
- --shared |
1478 |
- $(usex jit -Ojit -O2) |
1479 |
- $(usex shadowstack --gcrootfinder=shadowstack '') |
1480 |
- $(usex sandbox --sandbox '') |
1481 |
- |
1482 |
- ${jit_backend} |
1483 |
- --make-jobs=$(makeopts_jobs) |
1484 |
- |
1485 |
- pypy/goal/targetpypystandalone |
1486 |
- ) |
1487 |
- |
1488 |
- # Avoid linking against libraries disabled by use flags |
1489 |
- local opts=( |
1490 |
- bzip2:bz2 |
1491 |
- ncurses:_minimal_curses |
1492 |
- ) |
1493 |
- |
1494 |
- local opt |
1495 |
- for opt in "${opts[@]}"; do |
1496 |
- local flag=${opt%:*} |
1497 |
- local mod=${opt#*:} |
1498 |
- |
1499 |
- args+=( |
1500 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
1501 |
- ) |
1502 |
- done |
1503 |
- |
1504 |
- local interp=( "${PYTHON}" ) |
1505 |
- if use low-memory; then |
1506 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
1507 |
- "${PYTHON}" --jit loop_longevity=300 ) |
1508 |
- fi |
1509 |
- |
1510 |
- set -- "${interp[@]}" rpython/bin/rpython --batch "${args[@]}" |
1511 |
- echo -e "\033[1m${@}\033[0m" |
1512 |
- "${@}" || die "compile error" |
1513 |
- |
1514 |
- pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" |
1515 |
-} |
1516 |
- |
1517 |
-src_install() { |
1518 |
- local flags=( bzip2 jit ncurses sandbox shadowstack ) |
1519 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
1520 |
- local f suffix="-${ARCH}" |
1521 |
- |
1522 |
- for f in ${flags[@]}; do |
1523 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
1524 |
- done |
1525 |
- |
1526 |
- local BIN_P=pypy-bin-${PV} |
1527 |
- |
1528 |
- einfo "Zipping PyPy ..." |
1529 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
1530 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
1531 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
1532 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
1533 |
- |
1534 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
1535 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
1536 |
-} |
1537 |
- |
1538 |
-# Yup, very hacky. |
1539 |
-pkg_preinst() { |
1540 |
- # integrity check. |
1541 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
1542 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
1543 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
1544 |
-} |
1545 |
|
1546 |
diff --git a/dev-binpkg/pypy/pypy-5.3.1.ebuild b/dev-binpkg/pypy/pypy-5.3.1.ebuild |
1547 |
deleted file mode 100644 |
1548 |
index 63dc8fe..0000000 |
1549 |
--- a/dev-binpkg/pypy/pypy-5.3.1.ebuild |
1550 |
+++ /dev/null |
1551 |
@@ -1,193 +0,0 @@ |
1552 |
-# Copyright 1999-2016 Gentoo Foundation |
1553 |
-# Distributed under the terms of the GNU General Public License v2 |
1554 |
-# $Id$ |
1555 |
- |
1556 |
-EAPI=5 |
1557 |
- |
1558 |
-PYTHON_COMPAT=( python2_7 pypy ) |
1559 |
-inherit check-reqs eutils multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator |
1560 |
- |
1561 |
-MY_P=pypy2-v${PV} |
1562 |
- |
1563 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
1564 |
-HOMEPAGE="http://pypy.org/" |
1565 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2" |
1566 |
- |
1567 |
-LICENSE="MIT" |
1568 |
-SLOT="0/$(get_version_component_range 1-2 ${PV})" |
1569 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
1570 |
-IUSE="bzip2 +jit low-memory ncurses sandbox shadowstack sqlite cpu_flags_x86_sse2" |
1571 |
- |
1572 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
1573 |
- virtual/libffi:0= |
1574 |
- virtual/libintl:0= |
1575 |
- dev-libs/expat:0= |
1576 |
- dev-libs/openssl:0=[-bindist] |
1577 |
- bzip2? ( app-arch/bzip2:0= ) |
1578 |
- ncurses? ( sys-libs/ncurses:0= ) |
1579 |
- app-arch/lzip |
1580 |
- ${PYTHON_DEPS}" |
1581 |
- |
1582 |
-S="${WORKDIR}/${MY_P}-src" |
1583 |
- |
1584 |
-pkg_pretend() { |
1585 |
- if use low-memory; then |
1586 |
- if ! python_is_installed pypy; then |
1587 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
1588 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
1589 |
- eerror |
1590 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
1591 |
- eerror |
1592 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
1593 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
1594 |
- fi |
1595 |
- |
1596 |
- CHECKREQS_MEMORY="1750M" |
1597 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
1598 |
- else |
1599 |
- CHECKREQS_MEMORY="3G" |
1600 |
- use amd64 && CHECKREQS_MEMORY="6G" |
1601 |
- fi |
1602 |
- |
1603 |
- check-reqs_pkg_pretend |
1604 |
- |
1605 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
1606 |
-} |
1607 |
- |
1608 |
-pkg_setup() { |
1609 |
- pkg_pretend |
1610 |
- |
1611 |
- if python_is_installed pypy; then |
1612 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
1613 |
- einfo "Using already-installed PyPy to perform the translation." |
1614 |
- local EPYTHON=pypy |
1615 |
- else |
1616 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
1617 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
1618 |
- einfo "the EPYTHON variable." |
1619 |
- fi |
1620 |
- fi |
1621 |
- |
1622 |
- python-any-r1_pkg_setup |
1623 |
- |
1624 |
- local cpu |
1625 |
- if use amd64; then |
1626 |
- # common denominator between Intel & AMD |
1627 |
- cpu='x86-64' |
1628 |
- elif use x86; then |
1629 |
- if use cpu_flags_x86_sse2; then |
1630 |
- # lowest with SSE2 |
1631 |
- cpu='pentium-m' |
1632 |
- else |
1633 |
- # lowest with SSE, compat. with athlon-xp |
1634 |
- # TODO: do we want to support something older? |
1635 |
- cpu='pentium3' |
1636 |
- fi |
1637 |
- else |
1638 |
- die "Unsupported arch ${ARCH}" |
1639 |
- fi |
1640 |
- |
1641 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
1642 |
- export CXXFLAGS=${CFLAGS} |
1643 |
- |
1644 |
- elog "CFLAGS: ${CFLAGS}" |
1645 |
-} |
1646 |
- |
1647 |
-src_prepare() { |
1648 |
- epatch "${FILESDIR}"/2.5.0-shared-lib.patch # 517002 |
1649 |
- |
1650 |
- epatch_user |
1651 |
-} |
1652 |
- |
1653 |
-src_compile() { |
1654 |
- tc-export CC |
1655 |
- |
1656 |
- local jit_backend |
1657 |
- if use jit; then |
1658 |
- jit_backend='--jit-backend=' |
1659 |
- |
1660 |
- # We only need the explicit sse2 switch for x86. |
1661 |
- # On other arches we can rely on autodetection which uses |
1662 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
1663 |
- # the modern values... |
1664 |
- |
1665 |
- if use x86; then |
1666 |
- if use cpu_flags_x86_sse2; then |
1667 |
- jit_backend+=x86 |
1668 |
- else |
1669 |
- jit_backend+=x86-without-sse2 |
1670 |
- fi |
1671 |
- else |
1672 |
- jit_backend+=auto |
1673 |
- fi |
1674 |
- fi |
1675 |
- |
1676 |
- local args=( |
1677 |
- --shared |
1678 |
- $(usex jit -Ojit -O2) |
1679 |
- $(usex shadowstack --gcrootfinder=shadowstack '') |
1680 |
- $(usex sandbox --sandbox '') |
1681 |
- |
1682 |
- ${jit_backend} |
1683 |
- --make-jobs=$(makeopts_jobs) |
1684 |
- |
1685 |
- pypy/goal/targetpypystandalone |
1686 |
- ) |
1687 |
- |
1688 |
- # Avoid linking against libraries disabled by use flags |
1689 |
- local opts=( |
1690 |
- bzip2:bz2 |
1691 |
- ncurses:_minimal_curses |
1692 |
- ) |
1693 |
- |
1694 |
- local opt |
1695 |
- for opt in "${opts[@]}"; do |
1696 |
- local flag=${opt%:*} |
1697 |
- local mod=${opt#*:} |
1698 |
- |
1699 |
- args+=( |
1700 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
1701 |
- ) |
1702 |
- done |
1703 |
- |
1704 |
- local interp=( "${PYTHON}" ) |
1705 |
- if use low-memory; then |
1706 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
1707 |
- "${PYTHON}" --jit loop_longevity=300 ) |
1708 |
- fi |
1709 |
- |
1710 |
- set -- "${interp[@]}" rpython/bin/rpython --batch "${args[@]}" |
1711 |
- echo -e "\033[1m${@}\033[0m" |
1712 |
- "${@}" || die "compile error" |
1713 |
- |
1714 |
- pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" |
1715 |
-} |
1716 |
- |
1717 |
-src_install() { |
1718 |
- local flags=( bzip2 jit ncurses sandbox shadowstack ) |
1719 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
1720 |
- local f suffix="-${ARCH}" |
1721 |
- |
1722 |
- for f in ${flags[@]}; do |
1723 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
1724 |
- done |
1725 |
- |
1726 |
- local BIN_P=pypy-bin-${PV} |
1727 |
- |
1728 |
- einfo "Zipping PyPy ..." |
1729 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
1730 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
1731 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
1732 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
1733 |
- |
1734 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
1735 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
1736 |
-} |
1737 |
- |
1738 |
-# Yup, very hacky. |
1739 |
-pkg_preinst() { |
1740 |
- # integrity check. |
1741 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
1742 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
1743 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
1744 |
-} |
1745 |
|
1746 |
diff --git a/dev-binpkg/pypy/pypy-5.4.0.ebuild b/dev-binpkg/pypy/pypy-5.4.0.ebuild |
1747 |
deleted file mode 100644 |
1748 |
index 63dc8fe..0000000 |
1749 |
--- a/dev-binpkg/pypy/pypy-5.4.0.ebuild |
1750 |
+++ /dev/null |
1751 |
@@ -1,193 +0,0 @@ |
1752 |
-# Copyright 1999-2016 Gentoo Foundation |
1753 |
-# Distributed under the terms of the GNU General Public License v2 |
1754 |
-# $Id$ |
1755 |
- |
1756 |
-EAPI=5 |
1757 |
- |
1758 |
-PYTHON_COMPAT=( python2_7 pypy ) |
1759 |
-inherit check-reqs eutils multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator |
1760 |
- |
1761 |
-MY_P=pypy2-v${PV} |
1762 |
- |
1763 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
1764 |
-HOMEPAGE="http://pypy.org/" |
1765 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2" |
1766 |
- |
1767 |
-LICENSE="MIT" |
1768 |
-SLOT="0/$(get_version_component_range 1-2 ${PV})" |
1769 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
1770 |
-IUSE="bzip2 +jit low-memory ncurses sandbox shadowstack sqlite cpu_flags_x86_sse2" |
1771 |
- |
1772 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
1773 |
- virtual/libffi:0= |
1774 |
- virtual/libintl:0= |
1775 |
- dev-libs/expat:0= |
1776 |
- dev-libs/openssl:0=[-bindist] |
1777 |
- bzip2? ( app-arch/bzip2:0= ) |
1778 |
- ncurses? ( sys-libs/ncurses:0= ) |
1779 |
- app-arch/lzip |
1780 |
- ${PYTHON_DEPS}" |
1781 |
- |
1782 |
-S="${WORKDIR}/${MY_P}-src" |
1783 |
- |
1784 |
-pkg_pretend() { |
1785 |
- if use low-memory; then |
1786 |
- if ! python_is_installed pypy; then |
1787 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
1788 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
1789 |
- eerror |
1790 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
1791 |
- eerror |
1792 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
1793 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
1794 |
- fi |
1795 |
- |
1796 |
- CHECKREQS_MEMORY="1750M" |
1797 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
1798 |
- else |
1799 |
- CHECKREQS_MEMORY="3G" |
1800 |
- use amd64 && CHECKREQS_MEMORY="6G" |
1801 |
- fi |
1802 |
- |
1803 |
- check-reqs_pkg_pretend |
1804 |
- |
1805 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
1806 |
-} |
1807 |
- |
1808 |
-pkg_setup() { |
1809 |
- pkg_pretend |
1810 |
- |
1811 |
- if python_is_installed pypy; then |
1812 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
1813 |
- einfo "Using already-installed PyPy to perform the translation." |
1814 |
- local EPYTHON=pypy |
1815 |
- else |
1816 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
1817 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
1818 |
- einfo "the EPYTHON variable." |
1819 |
- fi |
1820 |
- fi |
1821 |
- |
1822 |
- python-any-r1_pkg_setup |
1823 |
- |
1824 |
- local cpu |
1825 |
- if use amd64; then |
1826 |
- # common denominator between Intel & AMD |
1827 |
- cpu='x86-64' |
1828 |
- elif use x86; then |
1829 |
- if use cpu_flags_x86_sse2; then |
1830 |
- # lowest with SSE2 |
1831 |
- cpu='pentium-m' |
1832 |
- else |
1833 |
- # lowest with SSE, compat. with athlon-xp |
1834 |
- # TODO: do we want to support something older? |
1835 |
- cpu='pentium3' |
1836 |
- fi |
1837 |
- else |
1838 |
- die "Unsupported arch ${ARCH}" |
1839 |
- fi |
1840 |
- |
1841 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
1842 |
- export CXXFLAGS=${CFLAGS} |
1843 |
- |
1844 |
- elog "CFLAGS: ${CFLAGS}" |
1845 |
-} |
1846 |
- |
1847 |
-src_prepare() { |
1848 |
- epatch "${FILESDIR}"/2.5.0-shared-lib.patch # 517002 |
1849 |
- |
1850 |
- epatch_user |
1851 |
-} |
1852 |
- |
1853 |
-src_compile() { |
1854 |
- tc-export CC |
1855 |
- |
1856 |
- local jit_backend |
1857 |
- if use jit; then |
1858 |
- jit_backend='--jit-backend=' |
1859 |
- |
1860 |
- # We only need the explicit sse2 switch for x86. |
1861 |
- # On other arches we can rely on autodetection which uses |
1862 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
1863 |
- # the modern values... |
1864 |
- |
1865 |
- if use x86; then |
1866 |
- if use cpu_flags_x86_sse2; then |
1867 |
- jit_backend+=x86 |
1868 |
- else |
1869 |
- jit_backend+=x86-without-sse2 |
1870 |
- fi |
1871 |
- else |
1872 |
- jit_backend+=auto |
1873 |
- fi |
1874 |
- fi |
1875 |
- |
1876 |
- local args=( |
1877 |
- --shared |
1878 |
- $(usex jit -Ojit -O2) |
1879 |
- $(usex shadowstack --gcrootfinder=shadowstack '') |
1880 |
- $(usex sandbox --sandbox '') |
1881 |
- |
1882 |
- ${jit_backend} |
1883 |
- --make-jobs=$(makeopts_jobs) |
1884 |
- |
1885 |
- pypy/goal/targetpypystandalone |
1886 |
- ) |
1887 |
- |
1888 |
- # Avoid linking against libraries disabled by use flags |
1889 |
- local opts=( |
1890 |
- bzip2:bz2 |
1891 |
- ncurses:_minimal_curses |
1892 |
- ) |
1893 |
- |
1894 |
- local opt |
1895 |
- for opt in "${opts[@]}"; do |
1896 |
- local flag=${opt%:*} |
1897 |
- local mod=${opt#*:} |
1898 |
- |
1899 |
- args+=( |
1900 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
1901 |
- ) |
1902 |
- done |
1903 |
- |
1904 |
- local interp=( "${PYTHON}" ) |
1905 |
- if use low-memory; then |
1906 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
1907 |
- "${PYTHON}" --jit loop_longevity=300 ) |
1908 |
- fi |
1909 |
- |
1910 |
- set -- "${interp[@]}" rpython/bin/rpython --batch "${args[@]}" |
1911 |
- echo -e "\033[1m${@}\033[0m" |
1912 |
- "${@}" || die "compile error" |
1913 |
- |
1914 |
- pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" |
1915 |
-} |
1916 |
- |
1917 |
-src_install() { |
1918 |
- local flags=( bzip2 jit ncurses sandbox shadowstack ) |
1919 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
1920 |
- local f suffix="-${ARCH}" |
1921 |
- |
1922 |
- for f in ${flags[@]}; do |
1923 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
1924 |
- done |
1925 |
- |
1926 |
- local BIN_P=pypy-bin-${PV} |
1927 |
- |
1928 |
- einfo "Zipping PyPy ..." |
1929 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
1930 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
1931 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
1932 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
1933 |
- |
1934 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
1935 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
1936 |
-} |
1937 |
- |
1938 |
-# Yup, very hacky. |
1939 |
-pkg_preinst() { |
1940 |
- # integrity check. |
1941 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
1942 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
1943 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
1944 |
-} |
1945 |
|
1946 |
diff --git a/dev-binpkg/pypy/pypy-5.4.1.ebuild b/dev-binpkg/pypy/pypy-5.4.1.ebuild |
1947 |
deleted file mode 100644 |
1948 |
index 63dc8fe..0000000 |
1949 |
--- a/dev-binpkg/pypy/pypy-5.4.1.ebuild |
1950 |
+++ /dev/null |
1951 |
@@ -1,193 +0,0 @@ |
1952 |
-# Copyright 1999-2016 Gentoo Foundation |
1953 |
-# Distributed under the terms of the GNU General Public License v2 |
1954 |
-# $Id$ |
1955 |
- |
1956 |
-EAPI=5 |
1957 |
- |
1958 |
-PYTHON_COMPAT=( python2_7 pypy ) |
1959 |
-inherit check-reqs eutils multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator |
1960 |
- |
1961 |
-MY_P=pypy2-v${PV} |
1962 |
- |
1963 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
1964 |
-HOMEPAGE="http://pypy.org/" |
1965 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2" |
1966 |
- |
1967 |
-LICENSE="MIT" |
1968 |
-SLOT="0/$(get_version_component_range 1-2 ${PV})" |
1969 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
1970 |
-IUSE="bzip2 +jit low-memory ncurses sandbox shadowstack sqlite cpu_flags_x86_sse2" |
1971 |
- |
1972 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
1973 |
- virtual/libffi:0= |
1974 |
- virtual/libintl:0= |
1975 |
- dev-libs/expat:0= |
1976 |
- dev-libs/openssl:0=[-bindist] |
1977 |
- bzip2? ( app-arch/bzip2:0= ) |
1978 |
- ncurses? ( sys-libs/ncurses:0= ) |
1979 |
- app-arch/lzip |
1980 |
- ${PYTHON_DEPS}" |
1981 |
- |
1982 |
-S="${WORKDIR}/${MY_P}-src" |
1983 |
- |
1984 |
-pkg_pretend() { |
1985 |
- if use low-memory; then |
1986 |
- if ! python_is_installed pypy; then |
1987 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
1988 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
1989 |
- eerror |
1990 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
1991 |
- eerror |
1992 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
1993 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
1994 |
- fi |
1995 |
- |
1996 |
- CHECKREQS_MEMORY="1750M" |
1997 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
1998 |
- else |
1999 |
- CHECKREQS_MEMORY="3G" |
2000 |
- use amd64 && CHECKREQS_MEMORY="6G" |
2001 |
- fi |
2002 |
- |
2003 |
- check-reqs_pkg_pretend |
2004 |
- |
2005 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
2006 |
-} |
2007 |
- |
2008 |
-pkg_setup() { |
2009 |
- pkg_pretend |
2010 |
- |
2011 |
- if python_is_installed pypy; then |
2012 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
2013 |
- einfo "Using already-installed PyPy to perform the translation." |
2014 |
- local EPYTHON=pypy |
2015 |
- else |
2016 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
2017 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
2018 |
- einfo "the EPYTHON variable." |
2019 |
- fi |
2020 |
- fi |
2021 |
- |
2022 |
- python-any-r1_pkg_setup |
2023 |
- |
2024 |
- local cpu |
2025 |
- if use amd64; then |
2026 |
- # common denominator between Intel & AMD |
2027 |
- cpu='x86-64' |
2028 |
- elif use x86; then |
2029 |
- if use cpu_flags_x86_sse2; then |
2030 |
- # lowest with SSE2 |
2031 |
- cpu='pentium-m' |
2032 |
- else |
2033 |
- # lowest with SSE, compat. with athlon-xp |
2034 |
- # TODO: do we want to support something older? |
2035 |
- cpu='pentium3' |
2036 |
- fi |
2037 |
- else |
2038 |
- die "Unsupported arch ${ARCH}" |
2039 |
- fi |
2040 |
- |
2041 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
2042 |
- export CXXFLAGS=${CFLAGS} |
2043 |
- |
2044 |
- elog "CFLAGS: ${CFLAGS}" |
2045 |
-} |
2046 |
- |
2047 |
-src_prepare() { |
2048 |
- epatch "${FILESDIR}"/2.5.0-shared-lib.patch # 517002 |
2049 |
- |
2050 |
- epatch_user |
2051 |
-} |
2052 |
- |
2053 |
-src_compile() { |
2054 |
- tc-export CC |
2055 |
- |
2056 |
- local jit_backend |
2057 |
- if use jit; then |
2058 |
- jit_backend='--jit-backend=' |
2059 |
- |
2060 |
- # We only need the explicit sse2 switch for x86. |
2061 |
- # On other arches we can rely on autodetection which uses |
2062 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
2063 |
- # the modern values... |
2064 |
- |
2065 |
- if use x86; then |
2066 |
- if use cpu_flags_x86_sse2; then |
2067 |
- jit_backend+=x86 |
2068 |
- else |
2069 |
- jit_backend+=x86-without-sse2 |
2070 |
- fi |
2071 |
- else |
2072 |
- jit_backend+=auto |
2073 |
- fi |
2074 |
- fi |
2075 |
- |
2076 |
- local args=( |
2077 |
- --shared |
2078 |
- $(usex jit -Ojit -O2) |
2079 |
- $(usex shadowstack --gcrootfinder=shadowstack '') |
2080 |
- $(usex sandbox --sandbox '') |
2081 |
- |
2082 |
- ${jit_backend} |
2083 |
- --make-jobs=$(makeopts_jobs) |
2084 |
- |
2085 |
- pypy/goal/targetpypystandalone |
2086 |
- ) |
2087 |
- |
2088 |
- # Avoid linking against libraries disabled by use flags |
2089 |
- local opts=( |
2090 |
- bzip2:bz2 |
2091 |
- ncurses:_minimal_curses |
2092 |
- ) |
2093 |
- |
2094 |
- local opt |
2095 |
- for opt in "${opts[@]}"; do |
2096 |
- local flag=${opt%:*} |
2097 |
- local mod=${opt#*:} |
2098 |
- |
2099 |
- args+=( |
2100 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
2101 |
- ) |
2102 |
- done |
2103 |
- |
2104 |
- local interp=( "${PYTHON}" ) |
2105 |
- if use low-memory; then |
2106 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
2107 |
- "${PYTHON}" --jit loop_longevity=300 ) |
2108 |
- fi |
2109 |
- |
2110 |
- set -- "${interp[@]}" rpython/bin/rpython --batch "${args[@]}" |
2111 |
- echo -e "\033[1m${@}\033[0m" |
2112 |
- "${@}" || die "compile error" |
2113 |
- |
2114 |
- pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" |
2115 |
-} |
2116 |
- |
2117 |
-src_install() { |
2118 |
- local flags=( bzip2 jit ncurses sandbox shadowstack ) |
2119 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
2120 |
- local f suffix="-${ARCH}" |
2121 |
- |
2122 |
- for f in ${flags[@]}; do |
2123 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
2124 |
- done |
2125 |
- |
2126 |
- local BIN_P=pypy-bin-${PV} |
2127 |
- |
2128 |
- einfo "Zipping PyPy ..." |
2129 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
2130 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
2131 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
2132 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
2133 |
- |
2134 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
2135 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
2136 |
-} |
2137 |
- |
2138 |
-# Yup, very hacky. |
2139 |
-pkg_preinst() { |
2140 |
- # integrity check. |
2141 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
2142 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
2143 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
2144 |
-} |
2145 |
|
2146 |
diff --git a/dev-binpkg/pypy/pypy-5.7.1.ebuild b/dev-binpkg/pypy/pypy-5.7.1.ebuild |
2147 |
deleted file mode 100644 |
2148 |
index 8f5994b..0000000 |
2149 |
--- a/dev-binpkg/pypy/pypy-5.7.1.ebuild |
2150 |
+++ /dev/null |
2151 |
@@ -1,209 +0,0 @@ |
2152 |
-# Copyright 1999-2017 Gentoo Foundation |
2153 |
-# Distributed under the terms of the GNU General Public License v2 |
2154 |
- |
2155 |
-EAPI=6 |
2156 |
- |
2157 |
-PYTHON_COMPAT=( python2_7 pypy ) |
2158 |
-inherit check-reqs multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator |
2159 |
- |
2160 |
-# note: remember to update this to newest dev-lang/python:2.7 on bump |
2161 |
-CPY_PATCHSET_VERSION="2.7.13-0" |
2162 |
-MY_P=pypy2-v${PV} |
2163 |
- |
2164 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
2165 |
-HOMEPAGE="http://pypy.org/" |
2166 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2" |
2167 |
- |
2168 |
-LICENSE="MIT" |
2169 |
-# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
2170 |
-SLOT="0/41" |
2171 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
2172 |
-IUSE="bzip2 +jit low-memory ncurses sandbox cpu_flags_x86_sse2 test" |
2173 |
- |
2174 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
2175 |
- virtual/libffi:0= |
2176 |
- virtual/libintl:0= |
2177 |
- dev-libs/expat:0= |
2178 |
- dev-libs/openssl:0=[-bindist] |
2179 |
- bzip2? ( app-arch/bzip2:0= ) |
2180 |
- ncurses? ( sys-libs/ncurses:0= ) |
2181 |
- app-arch/lzip |
2182 |
- ${PYTHON_DEPS}" |
2183 |
- |
2184 |
-S="${WORKDIR}/${MY_P}-src" |
2185 |
- |
2186 |
-pkg_pretend() { |
2187 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
2188 |
- if use low-memory; then |
2189 |
- if ! python_is_installed pypy; then |
2190 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
2191 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
2192 |
- eerror |
2193 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
2194 |
- eerror |
2195 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
2196 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
2197 |
- fi |
2198 |
- |
2199 |
- CHECKREQS_MEMORY="1750M" |
2200 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
2201 |
- else |
2202 |
- CHECKREQS_MEMORY="3G" |
2203 |
- use amd64 && CHECKREQS_MEMORY="6G" |
2204 |
- fi |
2205 |
- |
2206 |
- check-reqs_pkg_pretend |
2207 |
- fi |
2208 |
- |
2209 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
2210 |
-} |
2211 |
- |
2212 |
-pkg_setup() { |
2213 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
2214 |
- pkg_pretend |
2215 |
- |
2216 |
- if python_is_installed pypy; then |
2217 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
2218 |
- einfo "Using already-installed PyPy to perform the translation." |
2219 |
- local EPYTHON=pypy |
2220 |
- else |
2221 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
2222 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
2223 |
- einfo "the EPYTHON variable." |
2224 |
- fi |
2225 |
- fi |
2226 |
- |
2227 |
- python-any-r1_pkg_setup |
2228 |
- |
2229 |
- local cpu |
2230 |
- if use amd64; then |
2231 |
- # common denominator between Intel & AMD |
2232 |
- cpu='x86-64' |
2233 |
- elif use x86; then |
2234 |
- if use cpu_flags_x86_sse2; then |
2235 |
- # lowest with SSE2 |
2236 |
- cpu='pentium-m' |
2237 |
- else |
2238 |
- # lowest with SSE, compat. with athlon-xp |
2239 |
- # TODO: do we want to support something older? |
2240 |
- cpu='pentium3' |
2241 |
- fi |
2242 |
- else |
2243 |
- die "Unsupported arch ${ARCH}" |
2244 |
- fi |
2245 |
- |
2246 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
2247 |
- export CXXFLAGS=${CFLAGS} |
2248 |
- |
2249 |
- elog "CFLAGS: ${CFLAGS}" |
2250 |
- fi |
2251 |
-} |
2252 |
- |
2253 |
-src_prepare() { |
2254 |
- eapply "${FILESDIR}"/2.5.0-shared-lib.patch # 517002 |
2255 |
- # disarm implicit -flto |
2256 |
- eapply "${FILESDIR}"/5.7.1-kill-flto.patch |
2257 |
- |
2258 |
- eapply_user |
2259 |
-} |
2260 |
- |
2261 |
-src_configure() { |
2262 |
- tc-export CC |
2263 |
- |
2264 |
- local jit_backend |
2265 |
- if use jit; then |
2266 |
- jit_backend='--jit-backend=' |
2267 |
- |
2268 |
- # We only need the explicit sse2 switch for x86. |
2269 |
- # On other arches we can rely on autodetection which uses |
2270 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
2271 |
- # the modern values... |
2272 |
- |
2273 |
- if use x86; then |
2274 |
- if use cpu_flags_x86_sse2; then |
2275 |
- jit_backend+=x86 |
2276 |
- else |
2277 |
- jit_backend+=x86-without-sse2 |
2278 |
- fi |
2279 |
- else |
2280 |
- jit_backend+=auto |
2281 |
- fi |
2282 |
- fi |
2283 |
- |
2284 |
- local args=( |
2285 |
- --shared |
2286 |
- $(usex jit -Ojit -O2) |
2287 |
- $(usex sandbox --sandbox '') |
2288 |
- |
2289 |
- ${jit_backend} |
2290 |
- --make-jobs=$(makeopts_jobs) |
2291 |
- |
2292 |
- pypy/goal/targetpypystandalone |
2293 |
- ) |
2294 |
- |
2295 |
- # Avoid linking against libraries disabled by use flags |
2296 |
- local opts=( |
2297 |
- bzip2:bz2 |
2298 |
- ncurses:_minimal_curses |
2299 |
- ) |
2300 |
- |
2301 |
- local opt |
2302 |
- for opt in "${opts[@]}"; do |
2303 |
- local flag=${opt%:*} |
2304 |
- local mod=${opt#*:} |
2305 |
- |
2306 |
- args+=( |
2307 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
2308 |
- ) |
2309 |
- done |
2310 |
- |
2311 |
- local interp=( "${PYTHON}" ) |
2312 |
- if use low-memory; then |
2313 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
2314 |
- "${PYTHON}" --jit loop_longevity=300 ) |
2315 |
- fi |
2316 |
- |
2317 |
- # translate into the C sources |
2318 |
- # we're going to make them ourselves since otherwise pypy does not |
2319 |
- # free up the unneeded memory before spawning the compiler |
2320 |
- set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" |
2321 |
- echo -e "\033[1m${@}\033[0m" |
2322 |
- "${@}" || die "translation failed" |
2323 |
-} |
2324 |
- |
2325 |
-src_compile() { |
2326 |
- emake -C "${T}"/usession*-0/testing_1 |
2327 |
- |
2328 |
- # copy back to make sys.prefix happy |
2329 |
- cp -p "${T}"/usession*-0/testing_1/{pypy-c,libpypy-c.so} . || die |
2330 |
- pax-mark m pypy-c libpypy-c.so |
2331 |
-} |
2332 |
- |
2333 |
-src_install() { |
2334 |
- local flags=( bzip2 jit ncurses sandbox ) |
2335 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
2336 |
- local f suffix="-${ARCH}" |
2337 |
- |
2338 |
- for f in ${flags[@]}; do |
2339 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
2340 |
- done |
2341 |
- |
2342 |
- local BIN_P=pypy-bin-${PV} |
2343 |
- |
2344 |
- einfo "Zipping PyPy ..." |
2345 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
2346 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
2347 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
2348 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
2349 |
- |
2350 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
2351 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
2352 |
-} |
2353 |
- |
2354 |
-# Yup, very hacky. |
2355 |
-pkg_preinst() { |
2356 |
- # integrity check. |
2357 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
2358 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
2359 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
2360 |
-} |
2361 |
|
2362 |
diff --git a/dev-binpkg/pypy/pypy-5.8.0.ebuild b/dev-binpkg/pypy/pypy-5.8.0.ebuild |
2363 |
deleted file mode 100644 |
2364 |
index 0c66185..0000000 |
2365 |
--- a/dev-binpkg/pypy/pypy-5.8.0.ebuild |
2366 |
+++ /dev/null |
2367 |
@@ -1,207 +0,0 @@ |
2368 |
-# Copyright 1999-2017 Gentoo Foundation |
2369 |
-# Distributed under the terms of the GNU General Public License v2 |
2370 |
- |
2371 |
-EAPI=6 |
2372 |
- |
2373 |
-PYTHON_COMPAT=( python2_7 pypy ) |
2374 |
-inherit check-reqs multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator |
2375 |
- |
2376 |
-# note: remember to update this to newest dev-lang/python:2.7 on bump |
2377 |
-CPY_PATCHSET_VERSION="2.7.13-0" |
2378 |
-MY_P=pypy2-v${PV} |
2379 |
- |
2380 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
2381 |
-HOMEPAGE="http://pypy.org/" |
2382 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2" |
2383 |
- |
2384 |
-LICENSE="MIT" |
2385 |
-# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
2386 |
-SLOT="0/41" |
2387 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
2388 |
-IUSE="bzip2 +jit low-memory ncurses sandbox cpu_flags_x86_sse2 test" |
2389 |
- |
2390 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
2391 |
- virtual/libffi:0= |
2392 |
- virtual/libintl:0= |
2393 |
- dev-libs/expat:0= |
2394 |
- dev-libs/openssl:0=[-bindist] |
2395 |
- bzip2? ( app-arch/bzip2:0= ) |
2396 |
- ncurses? ( sys-libs/ncurses:0= ) |
2397 |
- app-arch/lzip |
2398 |
- ${PYTHON_DEPS}" |
2399 |
- |
2400 |
-S="${WORKDIR}/${MY_P}-src" |
2401 |
- |
2402 |
-pkg_pretend() { |
2403 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
2404 |
- if use low-memory; then |
2405 |
- if ! python_is_installed pypy; then |
2406 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
2407 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
2408 |
- eerror |
2409 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
2410 |
- eerror |
2411 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
2412 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
2413 |
- fi |
2414 |
- |
2415 |
- CHECKREQS_MEMORY="1750M" |
2416 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
2417 |
- else |
2418 |
- CHECKREQS_MEMORY="3G" |
2419 |
- use amd64 && CHECKREQS_MEMORY="6G" |
2420 |
- fi |
2421 |
- |
2422 |
- check-reqs_pkg_pretend |
2423 |
- fi |
2424 |
- |
2425 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
2426 |
-} |
2427 |
- |
2428 |
-pkg_setup() { |
2429 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
2430 |
- pkg_pretend |
2431 |
- |
2432 |
- if python_is_installed pypy; then |
2433 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
2434 |
- einfo "Using already-installed PyPy to perform the translation." |
2435 |
- local EPYTHON=pypy |
2436 |
- else |
2437 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
2438 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
2439 |
- einfo "the EPYTHON variable." |
2440 |
- fi |
2441 |
- fi |
2442 |
- |
2443 |
- python-any-r1_pkg_setup |
2444 |
- |
2445 |
- local cpu |
2446 |
- if use amd64; then |
2447 |
- # common denominator between Intel & AMD |
2448 |
- cpu='x86-64' |
2449 |
- elif use x86; then |
2450 |
- if use cpu_flags_x86_sse2; then |
2451 |
- # lowest with SSE2 |
2452 |
- cpu='pentium-m' |
2453 |
- else |
2454 |
- # lowest with SSE, compat. with athlon-xp |
2455 |
- # TODO: do we want to support something older? |
2456 |
- cpu='pentium3' |
2457 |
- fi |
2458 |
- else |
2459 |
- die "Unsupported arch ${ARCH}" |
2460 |
- fi |
2461 |
- |
2462 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
2463 |
- export CXXFLAGS=${CFLAGS} |
2464 |
- |
2465 |
- elog "CFLAGS: ${CFLAGS}" |
2466 |
- fi |
2467 |
-} |
2468 |
- |
2469 |
-src_prepare() { |
2470 |
- eapply "${FILESDIR}"/2.5.0-shared-lib.patch # 517002 |
2471 |
- |
2472 |
- eapply_user |
2473 |
-} |
2474 |
- |
2475 |
-src_configure() { |
2476 |
- tc-export CC |
2477 |
- |
2478 |
- local jit_backend |
2479 |
- if use jit; then |
2480 |
- jit_backend='--jit-backend=' |
2481 |
- |
2482 |
- # We only need the explicit sse2 switch for x86. |
2483 |
- # On other arches we can rely on autodetection which uses |
2484 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
2485 |
- # the modern values... |
2486 |
- |
2487 |
- if use x86; then |
2488 |
- if use cpu_flags_x86_sse2; then |
2489 |
- jit_backend+=x86 |
2490 |
- else |
2491 |
- jit_backend+=x86-without-sse2 |
2492 |
- fi |
2493 |
- else |
2494 |
- jit_backend+=auto |
2495 |
- fi |
2496 |
- fi |
2497 |
- |
2498 |
- local args=( |
2499 |
- --shared |
2500 |
- $(usex jit -Ojit -O2) |
2501 |
- $(usex sandbox --sandbox '') |
2502 |
- |
2503 |
- ${jit_backend} |
2504 |
- --make-jobs=$(makeopts_jobs) |
2505 |
- |
2506 |
- pypy/goal/targetpypystandalone |
2507 |
- ) |
2508 |
- |
2509 |
- # Avoid linking against libraries disabled by use flags |
2510 |
- local opts=( |
2511 |
- bzip2:bz2 |
2512 |
- ncurses:_minimal_curses |
2513 |
- ) |
2514 |
- |
2515 |
- local opt |
2516 |
- for opt in "${opts[@]}"; do |
2517 |
- local flag=${opt%:*} |
2518 |
- local mod=${opt#*:} |
2519 |
- |
2520 |
- args+=( |
2521 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
2522 |
- ) |
2523 |
- done |
2524 |
- |
2525 |
- local interp=( "${PYTHON}" ) |
2526 |
- if use low-memory; then |
2527 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
2528 |
- "${PYTHON}" --jit loop_longevity=300 ) |
2529 |
- fi |
2530 |
- |
2531 |
- # translate into the C sources |
2532 |
- # we're going to make them ourselves since otherwise pypy does not |
2533 |
- # free up the unneeded memory before spawning the compiler |
2534 |
- set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" |
2535 |
- echo -e "\033[1m${@}\033[0m" |
2536 |
- "${@}" || die "translation failed" |
2537 |
-} |
2538 |
- |
2539 |
-src_compile() { |
2540 |
- emake -C "${T}"/usession*-0/testing_1 |
2541 |
- |
2542 |
- # copy back to make sys.prefix happy |
2543 |
- cp -p "${T}"/usession*-0/testing_1/{pypy-c,libpypy-c.so} . || die |
2544 |
- pax-mark m pypy-c libpypy-c.so |
2545 |
-} |
2546 |
- |
2547 |
-src_install() { |
2548 |
- local flags=( bzip2 jit ncurses sandbox ) |
2549 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
2550 |
- local f suffix="-${ARCH}" |
2551 |
- |
2552 |
- for f in ${flags[@]}; do |
2553 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
2554 |
- done |
2555 |
- |
2556 |
- local BIN_P=pypy-bin-${PV} |
2557 |
- |
2558 |
- einfo "Zipping PyPy ..." |
2559 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
2560 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
2561 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
2562 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
2563 |
- |
2564 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
2565 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
2566 |
-} |
2567 |
- |
2568 |
-# Yup, very hacky. |
2569 |
-pkg_preinst() { |
2570 |
- # integrity check. |
2571 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
2572 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
2573 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
2574 |
-} |
2575 |
|
2576 |
diff --git a/dev-binpkg/pypy/pypy-5.9.0.ebuild b/dev-binpkg/pypy/pypy-5.9.0.ebuild |
2577 |
deleted file mode 100644 |
2578 |
index 0425266..0000000 |
2579 |
--- a/dev-binpkg/pypy/pypy-5.9.0.ebuild |
2580 |
+++ /dev/null |
2581 |
@@ -1,208 +0,0 @@ |
2582 |
-# Copyright 1999-2017 Gentoo Foundation |
2583 |
-# Distributed under the terms of the GNU General Public License v2 |
2584 |
- |
2585 |
-EAPI=6 |
2586 |
- |
2587 |
-PYTHON_COMPAT=( python2_7 pypy ) |
2588 |
-inherit check-reqs multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator |
2589 |
- |
2590 |
-# note: remember to update this to newest dev-lang/python:2.7 on bump |
2591 |
-CPY_PATCHSET_VERSION="2.7.13-0" |
2592 |
-MY_P=pypy2-v${PV} |
2593 |
- |
2594 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
2595 |
-HOMEPAGE="http://pypy.org/" |
2596 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2" |
2597 |
- |
2598 |
-LICENSE="MIT" |
2599 |
-# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
2600 |
-SLOT="0/41" |
2601 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
2602 |
-IUSE="bzip2 +jit libressl low-memory ncurses sandbox cpu_flags_x86_sse2 test" |
2603 |
- |
2604 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
2605 |
- virtual/libffi:0= |
2606 |
- virtual/libintl:0= |
2607 |
- dev-libs/expat:0= |
2608 |
- bzip2? ( app-arch/bzip2:0= ) |
2609 |
- !libressl? ( dev-libs/openssl:0=[-bindist] ) |
2610 |
- libressl? ( dev-libs/libressl:0= ) |
2611 |
- ncurses? ( sys-libs/ncurses:0= ) |
2612 |
- app-arch/lzip |
2613 |
- ${PYTHON_DEPS}" |
2614 |
- |
2615 |
-S="${WORKDIR}/${MY_P}-src" |
2616 |
- |
2617 |
-pkg_pretend() { |
2618 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
2619 |
- if use low-memory; then |
2620 |
- if ! python_is_installed pypy; then |
2621 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
2622 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
2623 |
- eerror |
2624 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
2625 |
- eerror |
2626 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
2627 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
2628 |
- fi |
2629 |
- |
2630 |
- CHECKREQS_MEMORY="1750M" |
2631 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
2632 |
- else |
2633 |
- CHECKREQS_MEMORY="3G" |
2634 |
- use amd64 && CHECKREQS_MEMORY="6G" |
2635 |
- fi |
2636 |
- |
2637 |
- check-reqs_pkg_pretend |
2638 |
- fi |
2639 |
- |
2640 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
2641 |
-} |
2642 |
- |
2643 |
-pkg_setup() { |
2644 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
2645 |
- pkg_pretend |
2646 |
- |
2647 |
- if python_is_installed pypy; then |
2648 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
2649 |
- einfo "Using already-installed PyPy to perform the translation." |
2650 |
- local EPYTHON=pypy |
2651 |
- else |
2652 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
2653 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
2654 |
- einfo "the EPYTHON variable." |
2655 |
- fi |
2656 |
- fi |
2657 |
- |
2658 |
- python-any-r1_pkg_setup |
2659 |
- |
2660 |
- local cpu |
2661 |
- if use amd64; then |
2662 |
- # common denominator between Intel & AMD |
2663 |
- cpu='x86-64' |
2664 |
- elif use x86; then |
2665 |
- if use cpu_flags_x86_sse2; then |
2666 |
- # lowest with SSE2 |
2667 |
- cpu='pentium-m' |
2668 |
- else |
2669 |
- # lowest with SSE, compat. with athlon-xp |
2670 |
- # TODO: do we want to support something older? |
2671 |
- cpu='pentium3' |
2672 |
- fi |
2673 |
- else |
2674 |
- die "Unsupported arch ${ARCH}" |
2675 |
- fi |
2676 |
- |
2677 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
2678 |
- export CXXFLAGS=${CFLAGS} |
2679 |
- |
2680 |
- elog "CFLAGS: ${CFLAGS}" |
2681 |
- fi |
2682 |
-} |
2683 |
- |
2684 |
-src_prepare() { |
2685 |
- eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002 |
2686 |
- |
2687 |
- eapply_user |
2688 |
-} |
2689 |
- |
2690 |
-src_configure() { |
2691 |
- tc-export CC |
2692 |
- |
2693 |
- local jit_backend |
2694 |
- if use jit; then |
2695 |
- jit_backend='--jit-backend=' |
2696 |
- |
2697 |
- # We only need the explicit sse2 switch for x86. |
2698 |
- # On other arches we can rely on autodetection which uses |
2699 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
2700 |
- # the modern values... |
2701 |
- |
2702 |
- if use x86; then |
2703 |
- if use cpu_flags_x86_sse2; then |
2704 |
- jit_backend+=x86 |
2705 |
- else |
2706 |
- jit_backend+=x86-without-sse2 |
2707 |
- fi |
2708 |
- else |
2709 |
- jit_backend+=auto |
2710 |
- fi |
2711 |
- fi |
2712 |
- |
2713 |
- local args=( |
2714 |
- --shared |
2715 |
- $(usex jit -Ojit -O2) |
2716 |
- $(usex sandbox --sandbox '') |
2717 |
- |
2718 |
- ${jit_backend} |
2719 |
- --make-jobs=$(makeopts_jobs) |
2720 |
- |
2721 |
- pypy/goal/targetpypystandalone |
2722 |
- ) |
2723 |
- |
2724 |
- # Avoid linking against libraries disabled by use flags |
2725 |
- local opts=( |
2726 |
- bzip2:bz2 |
2727 |
- ncurses:_minimal_curses |
2728 |
- ) |
2729 |
- |
2730 |
- local opt |
2731 |
- for opt in "${opts[@]}"; do |
2732 |
- local flag=${opt%:*} |
2733 |
- local mod=${opt#*:} |
2734 |
- |
2735 |
- args+=( |
2736 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
2737 |
- ) |
2738 |
- done |
2739 |
- |
2740 |
- local interp=( "${PYTHON}" ) |
2741 |
- if use low-memory; then |
2742 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
2743 |
- "${PYTHON}" --jit loop_longevity=300 ) |
2744 |
- fi |
2745 |
- |
2746 |
- # translate into the C sources |
2747 |
- # we're going to make them ourselves since otherwise pypy does not |
2748 |
- # free up the unneeded memory before spawning the compiler |
2749 |
- set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" |
2750 |
- echo -e "\033[1m${@}\033[0m" |
2751 |
- "${@}" || die "translation failed" |
2752 |
-} |
2753 |
- |
2754 |
-src_compile() { |
2755 |
- emake -C "${T}"/usession*-0/testing_1 |
2756 |
- |
2757 |
- # copy back to make sys.prefix happy |
2758 |
- cp -p "${T}"/usession*-0/testing_1/{pypy-c,libpypy-c.so} . || die |
2759 |
- pax-mark m pypy-c libpypy-c.so |
2760 |
-} |
2761 |
- |
2762 |
-src_install() { |
2763 |
- local flags=( bzip2 jit libressl ncurses sandbox ) |
2764 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
2765 |
- local f suffix="-${ARCH}" |
2766 |
- |
2767 |
- for f in ${flags[@]}; do |
2768 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
2769 |
- done |
2770 |
- |
2771 |
- local BIN_P=pypy-bin-${PV} |
2772 |
- |
2773 |
- einfo "Zipping PyPy ..." |
2774 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
2775 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
2776 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
2777 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
2778 |
- |
2779 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
2780 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
2781 |
-} |
2782 |
- |
2783 |
-# Yup, very hacky. |
2784 |
-pkg_preinst() { |
2785 |
- # integrity check. |
2786 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
2787 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
2788 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
2789 |
-} |
2790 |
|
2791 |
diff --git a/dev-binpkg/pypy/pypy-6.0.0.ebuild b/dev-binpkg/pypy/pypy-6.0.0.ebuild |
2792 |
deleted file mode 100644 |
2793 |
index 0425266..0000000 |
2794 |
--- a/dev-binpkg/pypy/pypy-6.0.0.ebuild |
2795 |
+++ /dev/null |
2796 |
@@ -1,208 +0,0 @@ |
2797 |
-# Copyright 1999-2017 Gentoo Foundation |
2798 |
-# Distributed under the terms of the GNU General Public License v2 |
2799 |
- |
2800 |
-EAPI=6 |
2801 |
- |
2802 |
-PYTHON_COMPAT=( python2_7 pypy ) |
2803 |
-inherit check-reqs multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator |
2804 |
- |
2805 |
-# note: remember to update this to newest dev-lang/python:2.7 on bump |
2806 |
-CPY_PATCHSET_VERSION="2.7.13-0" |
2807 |
-MY_P=pypy2-v${PV} |
2808 |
- |
2809 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
2810 |
-HOMEPAGE="http://pypy.org/" |
2811 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2" |
2812 |
- |
2813 |
-LICENSE="MIT" |
2814 |
-# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
2815 |
-SLOT="0/41" |
2816 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
2817 |
-IUSE="bzip2 +jit libressl low-memory ncurses sandbox cpu_flags_x86_sse2 test" |
2818 |
- |
2819 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
2820 |
- virtual/libffi:0= |
2821 |
- virtual/libintl:0= |
2822 |
- dev-libs/expat:0= |
2823 |
- bzip2? ( app-arch/bzip2:0= ) |
2824 |
- !libressl? ( dev-libs/openssl:0=[-bindist] ) |
2825 |
- libressl? ( dev-libs/libressl:0= ) |
2826 |
- ncurses? ( sys-libs/ncurses:0= ) |
2827 |
- app-arch/lzip |
2828 |
- ${PYTHON_DEPS}" |
2829 |
- |
2830 |
-S="${WORKDIR}/${MY_P}-src" |
2831 |
- |
2832 |
-pkg_pretend() { |
2833 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
2834 |
- if use low-memory; then |
2835 |
- if ! python_is_installed pypy; then |
2836 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
2837 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
2838 |
- eerror |
2839 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
2840 |
- eerror |
2841 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
2842 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
2843 |
- fi |
2844 |
- |
2845 |
- CHECKREQS_MEMORY="1750M" |
2846 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
2847 |
- else |
2848 |
- CHECKREQS_MEMORY="3G" |
2849 |
- use amd64 && CHECKREQS_MEMORY="6G" |
2850 |
- fi |
2851 |
- |
2852 |
- check-reqs_pkg_pretend |
2853 |
- fi |
2854 |
- |
2855 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
2856 |
-} |
2857 |
- |
2858 |
-pkg_setup() { |
2859 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
2860 |
- pkg_pretend |
2861 |
- |
2862 |
- if python_is_installed pypy; then |
2863 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
2864 |
- einfo "Using already-installed PyPy to perform the translation." |
2865 |
- local EPYTHON=pypy |
2866 |
- else |
2867 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
2868 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
2869 |
- einfo "the EPYTHON variable." |
2870 |
- fi |
2871 |
- fi |
2872 |
- |
2873 |
- python-any-r1_pkg_setup |
2874 |
- |
2875 |
- local cpu |
2876 |
- if use amd64; then |
2877 |
- # common denominator between Intel & AMD |
2878 |
- cpu='x86-64' |
2879 |
- elif use x86; then |
2880 |
- if use cpu_flags_x86_sse2; then |
2881 |
- # lowest with SSE2 |
2882 |
- cpu='pentium-m' |
2883 |
- else |
2884 |
- # lowest with SSE, compat. with athlon-xp |
2885 |
- # TODO: do we want to support something older? |
2886 |
- cpu='pentium3' |
2887 |
- fi |
2888 |
- else |
2889 |
- die "Unsupported arch ${ARCH}" |
2890 |
- fi |
2891 |
- |
2892 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
2893 |
- export CXXFLAGS=${CFLAGS} |
2894 |
- |
2895 |
- elog "CFLAGS: ${CFLAGS}" |
2896 |
- fi |
2897 |
-} |
2898 |
- |
2899 |
-src_prepare() { |
2900 |
- eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002 |
2901 |
- |
2902 |
- eapply_user |
2903 |
-} |
2904 |
- |
2905 |
-src_configure() { |
2906 |
- tc-export CC |
2907 |
- |
2908 |
- local jit_backend |
2909 |
- if use jit; then |
2910 |
- jit_backend='--jit-backend=' |
2911 |
- |
2912 |
- # We only need the explicit sse2 switch for x86. |
2913 |
- # On other arches we can rely on autodetection which uses |
2914 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
2915 |
- # the modern values... |
2916 |
- |
2917 |
- if use x86; then |
2918 |
- if use cpu_flags_x86_sse2; then |
2919 |
- jit_backend+=x86 |
2920 |
- else |
2921 |
- jit_backend+=x86-without-sse2 |
2922 |
- fi |
2923 |
- else |
2924 |
- jit_backend+=auto |
2925 |
- fi |
2926 |
- fi |
2927 |
- |
2928 |
- local args=( |
2929 |
- --shared |
2930 |
- $(usex jit -Ojit -O2) |
2931 |
- $(usex sandbox --sandbox '') |
2932 |
- |
2933 |
- ${jit_backend} |
2934 |
- --make-jobs=$(makeopts_jobs) |
2935 |
- |
2936 |
- pypy/goal/targetpypystandalone |
2937 |
- ) |
2938 |
- |
2939 |
- # Avoid linking against libraries disabled by use flags |
2940 |
- local opts=( |
2941 |
- bzip2:bz2 |
2942 |
- ncurses:_minimal_curses |
2943 |
- ) |
2944 |
- |
2945 |
- local opt |
2946 |
- for opt in "${opts[@]}"; do |
2947 |
- local flag=${opt%:*} |
2948 |
- local mod=${opt#*:} |
2949 |
- |
2950 |
- args+=( |
2951 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
2952 |
- ) |
2953 |
- done |
2954 |
- |
2955 |
- local interp=( "${PYTHON}" ) |
2956 |
- if use low-memory; then |
2957 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
2958 |
- "${PYTHON}" --jit loop_longevity=300 ) |
2959 |
- fi |
2960 |
- |
2961 |
- # translate into the C sources |
2962 |
- # we're going to make them ourselves since otherwise pypy does not |
2963 |
- # free up the unneeded memory before spawning the compiler |
2964 |
- set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" |
2965 |
- echo -e "\033[1m${@}\033[0m" |
2966 |
- "${@}" || die "translation failed" |
2967 |
-} |
2968 |
- |
2969 |
-src_compile() { |
2970 |
- emake -C "${T}"/usession*-0/testing_1 |
2971 |
- |
2972 |
- # copy back to make sys.prefix happy |
2973 |
- cp -p "${T}"/usession*-0/testing_1/{pypy-c,libpypy-c.so} . || die |
2974 |
- pax-mark m pypy-c libpypy-c.so |
2975 |
-} |
2976 |
- |
2977 |
-src_install() { |
2978 |
- local flags=( bzip2 jit libressl ncurses sandbox ) |
2979 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
2980 |
- local f suffix="-${ARCH}" |
2981 |
- |
2982 |
- for f in ${flags[@]}; do |
2983 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
2984 |
- done |
2985 |
- |
2986 |
- local BIN_P=pypy-bin-${PV} |
2987 |
- |
2988 |
- einfo "Zipping PyPy ..." |
2989 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
2990 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
2991 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
2992 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
2993 |
- |
2994 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
2995 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
2996 |
-} |
2997 |
- |
2998 |
-# Yup, very hacky. |
2999 |
-pkg_preinst() { |
3000 |
- # integrity check. |
3001 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
3002 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
3003 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
3004 |
-} |
3005 |
|
3006 |
diff --git a/dev-binpkg/pypy/pypy-7.0.0.ebuild b/dev-binpkg/pypy/pypy-7.0.0.ebuild |
3007 |
deleted file mode 100644 |
3008 |
index 1d8d127..0000000 |
3009 |
--- a/dev-binpkg/pypy/pypy-7.0.0.ebuild |
3010 |
+++ /dev/null |
3011 |
@@ -1,208 +0,0 @@ |
3012 |
-# Copyright 1999-2019 Gentoo Authors |
3013 |
-# Distributed under the terms of the GNU General Public License v2 |
3014 |
- |
3015 |
-EAPI=7 |
3016 |
- |
3017 |
-PYTHON_COMPAT=( python2_7 pypy ) |
3018 |
-inherit check-reqs pax-utils python-any-r1 toolchain-funcs |
3019 |
- |
3020 |
-# note: remember to update this to newest dev-lang/python:2.7 on bump |
3021 |
-CPY_PATCHSET_VERSION="2.7.15" |
3022 |
-MY_P=pypy2.7-v${PV} |
3023 |
- |
3024 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
3025 |
-HOMEPAGE="http://pypy.org/" |
3026 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2" |
3027 |
- |
3028 |
-LICENSE="MIT" |
3029 |
-# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
3030 |
-# pypy 7.0.0: install directory changed to 'pypy2.7' |
3031 |
-SLOT="0/41-py27" |
3032 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
3033 |
-IUSE="bzip2 +jit libressl low-memory ncurses sandbox cpu_flags_x86_sse2 test" |
3034 |
- |
3035 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
3036 |
- virtual/libffi:0= |
3037 |
- virtual/libintl:0= |
3038 |
- dev-libs/expat:0= |
3039 |
- bzip2? ( app-arch/bzip2:0= ) |
3040 |
- !libressl? ( dev-libs/openssl:0=[-bindist] ) |
3041 |
- libressl? ( dev-libs/libressl:0= ) |
3042 |
- ncurses? ( sys-libs/ncurses:0= ) |
3043 |
- app-arch/lzip |
3044 |
- ${PYTHON_DEPS}" |
3045 |
- |
3046 |
-S="${WORKDIR}/${MY_P}-src" |
3047 |
- |
3048 |
-pkg_pretend() { |
3049 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
3050 |
- if use low-memory; then |
3051 |
- if ! python_is_installed pypy; then |
3052 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
3053 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
3054 |
- eerror |
3055 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
3056 |
- eerror |
3057 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
3058 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
3059 |
- fi |
3060 |
- |
3061 |
- CHECKREQS_MEMORY="1750M" |
3062 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
3063 |
- else |
3064 |
- CHECKREQS_MEMORY="3G" |
3065 |
- use amd64 && CHECKREQS_MEMORY="6G" |
3066 |
- fi |
3067 |
- |
3068 |
- check-reqs_pkg_pretend |
3069 |
- fi |
3070 |
- |
3071 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
3072 |
-} |
3073 |
- |
3074 |
-pkg_setup() { |
3075 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
3076 |
- pkg_pretend |
3077 |
- |
3078 |
- if python_is_installed pypy; then |
3079 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
3080 |
- einfo "Using already-installed PyPy to perform the translation." |
3081 |
- local EPYTHON=pypy |
3082 |
- else |
3083 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
3084 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
3085 |
- einfo "the EPYTHON variable." |
3086 |
- fi |
3087 |
- fi |
3088 |
- |
3089 |
- python-any-r1_pkg_setup |
3090 |
- |
3091 |
- local cpu |
3092 |
- if use amd64; then |
3093 |
- # common denominator between Intel & AMD |
3094 |
- cpu='x86-64' |
3095 |
- elif use x86; then |
3096 |
- if use cpu_flags_x86_sse2; then |
3097 |
- # lowest with SSE2 |
3098 |
- cpu='pentium-m' |
3099 |
- else |
3100 |
- # lowest with SSE, compat. with athlon-xp |
3101 |
- # TODO: do we want to support something older? |
3102 |
- cpu='pentium3' |
3103 |
- fi |
3104 |
- else |
3105 |
- die "Unsupported arch ${ARCH}" |
3106 |
- fi |
3107 |
- |
3108 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
3109 |
- export CXXFLAGS=${CFLAGS} |
3110 |
- |
3111 |
- elog "CFLAGS: ${CFLAGS}" |
3112 |
- fi |
3113 |
-} |
3114 |
- |
3115 |
-src_prepare() { |
3116 |
- eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002 |
3117 |
- |
3118 |
- eapply_user |
3119 |
-} |
3120 |
- |
3121 |
-src_configure() { |
3122 |
- tc-export CC |
3123 |
- |
3124 |
- local jit_backend |
3125 |
- if use jit; then |
3126 |
- jit_backend='--jit-backend=' |
3127 |
- |
3128 |
- # We only need the explicit sse2 switch for x86. |
3129 |
- # On other arches we can rely on autodetection which uses |
3130 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
3131 |
- # the modern values... |
3132 |
- |
3133 |
- if use x86; then |
3134 |
- if use cpu_flags_x86_sse2; then |
3135 |
- jit_backend+=x86 |
3136 |
- else |
3137 |
- jit_backend+=x86-without-sse2 |
3138 |
- fi |
3139 |
- else |
3140 |
- jit_backend+=auto |
3141 |
- fi |
3142 |
- fi |
3143 |
- |
3144 |
- local args=( |
3145 |
- --shared |
3146 |
- $(usex jit -Ojit -O2) |
3147 |
- $(usex sandbox --sandbox '') |
3148 |
- |
3149 |
- ${jit_backend} |
3150 |
- |
3151 |
- pypy/goal/targetpypystandalone |
3152 |
- ) |
3153 |
- |
3154 |
- # Avoid linking against libraries disabled by use flags |
3155 |
- local opts=( |
3156 |
- bzip2:bz2 |
3157 |
- ncurses:_minimal_curses |
3158 |
- ) |
3159 |
- |
3160 |
- local opt |
3161 |
- for opt in "${opts[@]}"; do |
3162 |
- local flag=${opt%:*} |
3163 |
- local mod=${opt#*:} |
3164 |
- |
3165 |
- args+=( |
3166 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
3167 |
- ) |
3168 |
- done |
3169 |
- |
3170 |
- local interp=( "${PYTHON}" ) |
3171 |
- if use low-memory; then |
3172 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
3173 |
- "${PYTHON}" --jit loop_longevity=300 ) |
3174 |
- fi |
3175 |
- |
3176 |
- # translate into the C sources |
3177 |
- # we're going to make them ourselves since otherwise pypy does not |
3178 |
- # free up the unneeded memory before spawning the compiler |
3179 |
- set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" |
3180 |
- echo -e "\033[1m${@}\033[0m" |
3181 |
- "${@}" || die "translation failed" |
3182 |
-} |
3183 |
- |
3184 |
-src_compile() { |
3185 |
- emake -C "${T}"/usession*-0/testing_1 |
3186 |
- |
3187 |
- # copy back to make sys.prefix happy |
3188 |
- cp -p "${T}"/usession*-0/testing_1/{pypy-c,libpypy-c.so} . || die |
3189 |
- pax-mark m pypy-c libpypy-c.so |
3190 |
-} |
3191 |
- |
3192 |
-src_install() { |
3193 |
- local flags=( bzip2 jit libressl ncurses sandbox ) |
3194 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
3195 |
- local f suffix="-${ARCH}" |
3196 |
- |
3197 |
- for f in ${flags[@]}; do |
3198 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
3199 |
- done |
3200 |
- |
3201 |
- local BIN_P=pypy-bin-${PV} |
3202 |
- |
3203 |
- einfo "Zipping PyPy ..." |
3204 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
3205 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
3206 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
3207 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
3208 |
- |
3209 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
3210 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
3211 |
-} |
3212 |
- |
3213 |
-# Yup, very hacky. |
3214 |
-pkg_preinst() { |
3215 |
- # integrity check. |
3216 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
3217 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
3218 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
3219 |
-} |
3220 |
|
3221 |
diff --git a/dev-binpkg/pypy/pypy-7.1.0.ebuild b/dev-binpkg/pypy/pypy-7.1.0.ebuild |
3222 |
deleted file mode 100644 |
3223 |
index 1d8d127..0000000 |
3224 |
--- a/dev-binpkg/pypy/pypy-7.1.0.ebuild |
3225 |
+++ /dev/null |
3226 |
@@ -1,208 +0,0 @@ |
3227 |
-# Copyright 1999-2019 Gentoo Authors |
3228 |
-# Distributed under the terms of the GNU General Public License v2 |
3229 |
- |
3230 |
-EAPI=7 |
3231 |
- |
3232 |
-PYTHON_COMPAT=( python2_7 pypy ) |
3233 |
-inherit check-reqs pax-utils python-any-r1 toolchain-funcs |
3234 |
- |
3235 |
-# note: remember to update this to newest dev-lang/python:2.7 on bump |
3236 |
-CPY_PATCHSET_VERSION="2.7.15" |
3237 |
-MY_P=pypy2.7-v${PV} |
3238 |
- |
3239 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
3240 |
-HOMEPAGE="http://pypy.org/" |
3241 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2" |
3242 |
- |
3243 |
-LICENSE="MIT" |
3244 |
-# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
3245 |
-# pypy 7.0.0: install directory changed to 'pypy2.7' |
3246 |
-SLOT="0/41-py27" |
3247 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
3248 |
-IUSE="bzip2 +jit libressl low-memory ncurses sandbox cpu_flags_x86_sse2 test" |
3249 |
- |
3250 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
3251 |
- virtual/libffi:0= |
3252 |
- virtual/libintl:0= |
3253 |
- dev-libs/expat:0= |
3254 |
- bzip2? ( app-arch/bzip2:0= ) |
3255 |
- !libressl? ( dev-libs/openssl:0=[-bindist] ) |
3256 |
- libressl? ( dev-libs/libressl:0= ) |
3257 |
- ncurses? ( sys-libs/ncurses:0= ) |
3258 |
- app-arch/lzip |
3259 |
- ${PYTHON_DEPS}" |
3260 |
- |
3261 |
-S="${WORKDIR}/${MY_P}-src" |
3262 |
- |
3263 |
-pkg_pretend() { |
3264 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
3265 |
- if use low-memory; then |
3266 |
- if ! python_is_installed pypy; then |
3267 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
3268 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
3269 |
- eerror |
3270 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
3271 |
- eerror |
3272 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
3273 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
3274 |
- fi |
3275 |
- |
3276 |
- CHECKREQS_MEMORY="1750M" |
3277 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
3278 |
- else |
3279 |
- CHECKREQS_MEMORY="3G" |
3280 |
- use amd64 && CHECKREQS_MEMORY="6G" |
3281 |
- fi |
3282 |
- |
3283 |
- check-reqs_pkg_pretend |
3284 |
- fi |
3285 |
- |
3286 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
3287 |
-} |
3288 |
- |
3289 |
-pkg_setup() { |
3290 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
3291 |
- pkg_pretend |
3292 |
- |
3293 |
- if python_is_installed pypy; then |
3294 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
3295 |
- einfo "Using already-installed PyPy to perform the translation." |
3296 |
- local EPYTHON=pypy |
3297 |
- else |
3298 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
3299 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
3300 |
- einfo "the EPYTHON variable." |
3301 |
- fi |
3302 |
- fi |
3303 |
- |
3304 |
- python-any-r1_pkg_setup |
3305 |
- |
3306 |
- local cpu |
3307 |
- if use amd64; then |
3308 |
- # common denominator between Intel & AMD |
3309 |
- cpu='x86-64' |
3310 |
- elif use x86; then |
3311 |
- if use cpu_flags_x86_sse2; then |
3312 |
- # lowest with SSE2 |
3313 |
- cpu='pentium-m' |
3314 |
- else |
3315 |
- # lowest with SSE, compat. with athlon-xp |
3316 |
- # TODO: do we want to support something older? |
3317 |
- cpu='pentium3' |
3318 |
- fi |
3319 |
- else |
3320 |
- die "Unsupported arch ${ARCH}" |
3321 |
- fi |
3322 |
- |
3323 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
3324 |
- export CXXFLAGS=${CFLAGS} |
3325 |
- |
3326 |
- elog "CFLAGS: ${CFLAGS}" |
3327 |
- fi |
3328 |
-} |
3329 |
- |
3330 |
-src_prepare() { |
3331 |
- eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002 |
3332 |
- |
3333 |
- eapply_user |
3334 |
-} |
3335 |
- |
3336 |
-src_configure() { |
3337 |
- tc-export CC |
3338 |
- |
3339 |
- local jit_backend |
3340 |
- if use jit; then |
3341 |
- jit_backend='--jit-backend=' |
3342 |
- |
3343 |
- # We only need the explicit sse2 switch for x86. |
3344 |
- # On other arches we can rely on autodetection which uses |
3345 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
3346 |
- # the modern values... |
3347 |
- |
3348 |
- if use x86; then |
3349 |
- if use cpu_flags_x86_sse2; then |
3350 |
- jit_backend+=x86 |
3351 |
- else |
3352 |
- jit_backend+=x86-without-sse2 |
3353 |
- fi |
3354 |
- else |
3355 |
- jit_backend+=auto |
3356 |
- fi |
3357 |
- fi |
3358 |
- |
3359 |
- local args=( |
3360 |
- --shared |
3361 |
- $(usex jit -Ojit -O2) |
3362 |
- $(usex sandbox --sandbox '') |
3363 |
- |
3364 |
- ${jit_backend} |
3365 |
- |
3366 |
- pypy/goal/targetpypystandalone |
3367 |
- ) |
3368 |
- |
3369 |
- # Avoid linking against libraries disabled by use flags |
3370 |
- local opts=( |
3371 |
- bzip2:bz2 |
3372 |
- ncurses:_minimal_curses |
3373 |
- ) |
3374 |
- |
3375 |
- local opt |
3376 |
- for opt in "${opts[@]}"; do |
3377 |
- local flag=${opt%:*} |
3378 |
- local mod=${opt#*:} |
3379 |
- |
3380 |
- args+=( |
3381 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
3382 |
- ) |
3383 |
- done |
3384 |
- |
3385 |
- local interp=( "${PYTHON}" ) |
3386 |
- if use low-memory; then |
3387 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
3388 |
- "${PYTHON}" --jit loop_longevity=300 ) |
3389 |
- fi |
3390 |
- |
3391 |
- # translate into the C sources |
3392 |
- # we're going to make them ourselves since otherwise pypy does not |
3393 |
- # free up the unneeded memory before spawning the compiler |
3394 |
- set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" |
3395 |
- echo -e "\033[1m${@}\033[0m" |
3396 |
- "${@}" || die "translation failed" |
3397 |
-} |
3398 |
- |
3399 |
-src_compile() { |
3400 |
- emake -C "${T}"/usession*-0/testing_1 |
3401 |
- |
3402 |
- # copy back to make sys.prefix happy |
3403 |
- cp -p "${T}"/usession*-0/testing_1/{pypy-c,libpypy-c.so} . || die |
3404 |
- pax-mark m pypy-c libpypy-c.so |
3405 |
-} |
3406 |
- |
3407 |
-src_install() { |
3408 |
- local flags=( bzip2 jit libressl ncurses sandbox ) |
3409 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
3410 |
- local f suffix="-${ARCH}" |
3411 |
- |
3412 |
- for f in ${flags[@]}; do |
3413 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
3414 |
- done |
3415 |
- |
3416 |
- local BIN_P=pypy-bin-${PV} |
3417 |
- |
3418 |
- einfo "Zipping PyPy ..." |
3419 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
3420 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
3421 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
3422 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
3423 |
- |
3424 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
3425 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
3426 |
-} |
3427 |
- |
3428 |
-# Yup, very hacky. |
3429 |
-pkg_preinst() { |
3430 |
- # integrity check. |
3431 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
3432 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
3433 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
3434 |
-} |
3435 |
|
3436 |
diff --git a/dev-binpkg/pypy/pypy-7.1.1.ebuild b/dev-binpkg/pypy/pypy-7.1.1.ebuild |
3437 |
deleted file mode 100644 |
3438 |
index 1d8d127..0000000 |
3439 |
--- a/dev-binpkg/pypy/pypy-7.1.1.ebuild |
3440 |
+++ /dev/null |
3441 |
@@ -1,208 +0,0 @@ |
3442 |
-# Copyright 1999-2019 Gentoo Authors |
3443 |
-# Distributed under the terms of the GNU General Public License v2 |
3444 |
- |
3445 |
-EAPI=7 |
3446 |
- |
3447 |
-PYTHON_COMPAT=( python2_7 pypy ) |
3448 |
-inherit check-reqs pax-utils python-any-r1 toolchain-funcs |
3449 |
- |
3450 |
-# note: remember to update this to newest dev-lang/python:2.7 on bump |
3451 |
-CPY_PATCHSET_VERSION="2.7.15" |
3452 |
-MY_P=pypy2.7-v${PV} |
3453 |
- |
3454 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
3455 |
-HOMEPAGE="http://pypy.org/" |
3456 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2" |
3457 |
- |
3458 |
-LICENSE="MIT" |
3459 |
-# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
3460 |
-# pypy 7.0.0: install directory changed to 'pypy2.7' |
3461 |
-SLOT="0/41-py27" |
3462 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
3463 |
-IUSE="bzip2 +jit libressl low-memory ncurses sandbox cpu_flags_x86_sse2 test" |
3464 |
- |
3465 |
-DEPEND=">=sys-libs/zlib-1.1.3:0= |
3466 |
- virtual/libffi:0= |
3467 |
- virtual/libintl:0= |
3468 |
- dev-libs/expat:0= |
3469 |
- bzip2? ( app-arch/bzip2:0= ) |
3470 |
- !libressl? ( dev-libs/openssl:0=[-bindist] ) |
3471 |
- libressl? ( dev-libs/libressl:0= ) |
3472 |
- ncurses? ( sys-libs/ncurses:0= ) |
3473 |
- app-arch/lzip |
3474 |
- ${PYTHON_DEPS}" |
3475 |
- |
3476 |
-S="${WORKDIR}/${MY_P}-src" |
3477 |
- |
3478 |
-pkg_pretend() { |
3479 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
3480 |
- if use low-memory; then |
3481 |
- if ! python_is_installed pypy; then |
3482 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
3483 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
3484 |
- eerror |
3485 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
3486 |
- eerror |
3487 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
3488 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
3489 |
- fi |
3490 |
- |
3491 |
- CHECKREQS_MEMORY="1750M" |
3492 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
3493 |
- else |
3494 |
- CHECKREQS_MEMORY="3G" |
3495 |
- use amd64 && CHECKREQS_MEMORY="6G" |
3496 |
- fi |
3497 |
- |
3498 |
- check-reqs_pkg_pretend |
3499 |
- fi |
3500 |
- |
3501 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
3502 |
-} |
3503 |
- |
3504 |
-pkg_setup() { |
3505 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
3506 |
- pkg_pretend |
3507 |
- |
3508 |
- if python_is_installed pypy; then |
3509 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
3510 |
- einfo "Using already-installed PyPy to perform the translation." |
3511 |
- local EPYTHON=pypy |
3512 |
- else |
3513 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
3514 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
3515 |
- einfo "the EPYTHON variable." |
3516 |
- fi |
3517 |
- fi |
3518 |
- |
3519 |
- python-any-r1_pkg_setup |
3520 |
- |
3521 |
- local cpu |
3522 |
- if use amd64; then |
3523 |
- # common denominator between Intel & AMD |
3524 |
- cpu='x86-64' |
3525 |
- elif use x86; then |
3526 |
- if use cpu_flags_x86_sse2; then |
3527 |
- # lowest with SSE2 |
3528 |
- cpu='pentium-m' |
3529 |
- else |
3530 |
- # lowest with SSE, compat. with athlon-xp |
3531 |
- # TODO: do we want to support something older? |
3532 |
- cpu='pentium3' |
3533 |
- fi |
3534 |
- else |
3535 |
- die "Unsupported arch ${ARCH}" |
3536 |
- fi |
3537 |
- |
3538 |
- export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe" |
3539 |
- export CXXFLAGS=${CFLAGS} |
3540 |
- |
3541 |
- elog "CFLAGS: ${CFLAGS}" |
3542 |
- fi |
3543 |
-} |
3544 |
- |
3545 |
-src_prepare() { |
3546 |
- eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002 |
3547 |
- |
3548 |
- eapply_user |
3549 |
-} |
3550 |
- |
3551 |
-src_configure() { |
3552 |
- tc-export CC |
3553 |
- |
3554 |
- local jit_backend |
3555 |
- if use jit; then |
3556 |
- jit_backend='--jit-backend=' |
3557 |
- |
3558 |
- # We only need the explicit sse2 switch for x86. |
3559 |
- # On other arches we can rely on autodetection which uses |
3560 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
3561 |
- # the modern values... |
3562 |
- |
3563 |
- if use x86; then |
3564 |
- if use cpu_flags_x86_sse2; then |
3565 |
- jit_backend+=x86 |
3566 |
- else |
3567 |
- jit_backend+=x86-without-sse2 |
3568 |
- fi |
3569 |
- else |
3570 |
- jit_backend+=auto |
3571 |
- fi |
3572 |
- fi |
3573 |
- |
3574 |
- local args=( |
3575 |
- --shared |
3576 |
- $(usex jit -Ojit -O2) |
3577 |
- $(usex sandbox --sandbox '') |
3578 |
- |
3579 |
- ${jit_backend} |
3580 |
- |
3581 |
- pypy/goal/targetpypystandalone |
3582 |
- ) |
3583 |
- |
3584 |
- # Avoid linking against libraries disabled by use flags |
3585 |
- local opts=( |
3586 |
- bzip2:bz2 |
3587 |
- ncurses:_minimal_curses |
3588 |
- ) |
3589 |
- |
3590 |
- local opt |
3591 |
- for opt in "${opts[@]}"; do |
3592 |
- local flag=${opt%:*} |
3593 |
- local mod=${opt#*:} |
3594 |
- |
3595 |
- args+=( |
3596 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
3597 |
- ) |
3598 |
- done |
3599 |
- |
3600 |
- local interp=( "${PYTHON}" ) |
3601 |
- if use low-memory; then |
3602 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
3603 |
- "${PYTHON}" --jit loop_longevity=300 ) |
3604 |
- fi |
3605 |
- |
3606 |
- # translate into the C sources |
3607 |
- # we're going to make them ourselves since otherwise pypy does not |
3608 |
- # free up the unneeded memory before spawning the compiler |
3609 |
- set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" |
3610 |
- echo -e "\033[1m${@}\033[0m" |
3611 |
- "${@}" || die "translation failed" |
3612 |
-} |
3613 |
- |
3614 |
-src_compile() { |
3615 |
- emake -C "${T}"/usession*-0/testing_1 |
3616 |
- |
3617 |
- # copy back to make sys.prefix happy |
3618 |
- cp -p "${T}"/usession*-0/testing_1/{pypy-c,libpypy-c.so} . || die |
3619 |
- pax-mark m pypy-c libpypy-c.so |
3620 |
-} |
3621 |
- |
3622 |
-src_install() { |
3623 |
- local flags=( bzip2 jit libressl ncurses sandbox ) |
3624 |
- use x86 && flags+=( cpu_flags_x86_sse2 ) |
3625 |
- local f suffix="-${ARCH}" |
3626 |
- |
3627 |
- for f in ${flags[@]}; do |
3628 |
- use ${f} && suffix+="+${f#cpu_flags_x86_}" |
3629 |
- done |
3630 |
- |
3631 |
- local BIN_P=pypy-bin-${PV} |
3632 |
- |
3633 |
- einfo "Zipping PyPy ..." |
3634 |
- mkdir "${BIN_P}${suffix}"{,/include} || die |
3635 |
- mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die |
3636 |
- mv include/pypy_* "${BIN_P}${suffix}"/include/ || die |
3637 |
- chmod +x "${BIN_P}${suffix}"/pypy-c || die |
3638 |
- |
3639 |
- tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die |
3640 |
- lzip -v9 "${BIN_P}${suffix}.tar" || die |
3641 |
-} |
3642 |
- |
3643 |
-# Yup, very hacky. |
3644 |
-pkg_preinst() { |
3645 |
- # integrity check. |
3646 |
- [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' |
3647 |
- mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
3648 |
- mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die |
3649 |
-} |