Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy-bin/, dev-python/pypy-bin/files/
Date: Sun, 15 Oct 2017 09:38:21
Message-Id: 1508060284.c149a8c3193611053c7dc620baf2d5dd250edf7c.mgorny@gentoo
1 commit: c149a8c3193611053c7dc620baf2d5dd250edf7c
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 15 09:23:42 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 15 09:38:04 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c149a8c3
7
8 dev-python/pypy-bin: Drop old
9
10 dev-python/pypy-bin/Manifest | 15 -
11 .../pypy-bin/files/5.6.0_all_distutils_cxx.patch | 340 ------------------
12 .../pypy-bin/files/5.7.1_all_distutils_cxx.patch | 388 ---------------------
13 dev-python/pypy-bin/metadata.xml | 3 -
14 dev-python/pypy-bin/pypy-bin-5.6.0.ebuild | 204 -----------
15 dev-python/pypy-bin/pypy-bin-5.7.1.ebuild | 189 ----------
16 6 files changed, 1139 deletions(-)
17
18 diff --git a/dev-python/pypy-bin/Manifest b/dev-python/pypy-bin/Manifest
19 index 7db387bfce1..35ba2f3b476 100644
20 --- a/dev-python/pypy-bin/Manifest
21 +++ b/dev-python/pypy-bin/Manifest
22 @@ -1,15 +1,3 @@
23 -DIST pypy-bin-5.6.0-amd64+bzip2+jit+ncurses+shadowstack.tar.lz 13093418 SHA256 5c8c78751a4afd89e98c5a644d4c1d5fa9b1c2dce9a6c6f8f1ad92068f4b26f5 SHA512 c9748eb5850f3948961451436e7d40eea3bb318a73626bcca0cf9bbd605a27de60383a11dcd8a6e9d93116cf811d5c541e4b8545adfe05ba3f56526cc698d114 WHIRLPOOL ba5fac6c6bc31461cbb83a1f68a780d7ce738bb3a9270385d1b35fe8859de7a4b029a8318f5ab90cca9e5f35e10b87a10211550d7685455bf24ef9e23a6806df
24 -DIST pypy-bin-5.6.0-amd64+bzip2+jit+ncurses.tar.lz 14167380 SHA256 7e8ea31eebcaf102b6c606400259da93a33bcc1a81f40c5c10070aff917e2ae3 SHA512 629bb65af656e1e16e2eb2f536015fa263f477e4a8744cad61b7f9bb65a17511944d09adbd9bef271f2b62445bf0e39405d88d60721d0c635a27d4a1a497d220 WHIRLPOOL 668ce5da583fc784de99d1aa0faa337ff8f769eb9b505d2d229e7c3c7e71a40c24c6437f25bf9e8f18fe2799ec605fb3f9cb745a8a6a646404119b526dfb02d7
25 -DIST pypy-bin-5.6.0-amd64+bzip2+ncurses.tar.lz 7337932 SHA256 d059ce9862a2cca587de08215caf2c6b814a5302087bc15c385f284b8d46e57a SHA512 7f168f4dc3dc3855dc27789682afbbef35dc8ebc04d1745f5ffeceed56918db3d3c16a5c90989daf3d00b48e994842f5712f77fdf9febdace2381d852336377f WHIRLPOOL 118fd413ac35ca6a77c9c4b3e6d9c8887c7b4880d8678d24606b2a72c4b05a0caa4a31913c0135623e65241b4fa572d6d7461750189b14b6dff5f194ff19beb8
26 -DIST pypy-bin-5.6.0-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz 10451373 SHA256 34ee937087e78f9d445ad080718f2306dd3540483e968db4102692f841809b66 SHA512 81c7c354e96e6997692e22a2dc51330cd31853df7b9bbd6a17b03874b022fec8cfbbc5afe6bc4f22fdc3f06b36d6dcf7f27f32c88f8022b5850edb92fe8a07ed WHIRLPOOL 98c4cb9aaca48e24c82d2db375744e08859b79d69cbd00b479d304efb8d51ea815756f1a8a0e0c2c5f71b806a7b52cc1378ceab7e2aacb2004e16e4fe5862017
27 -DIST pypy-bin-5.6.0-x86+bzip2+jit+ncurses+sse2.tar.lz 11678153 SHA256 3a1cafb572f3565862dce0e4a3386bcd63da26eb17a39301637e7751b827c2d4 SHA512 9608eed3c1583c09ce504b47a6efd82edaf27e83fc6471ee4e478a3167fcf38cae57470ba0246ef6e56398922ec270e81ceb75e7a6d0744a02f5bca454fa33cf WHIRLPOOL 24ad25b4cd686976de99494943135ad2fbb56898981f26e1ff339ea5b0d96171f0e65e24afa40374cfabcae75887ce4e59ab8a5f323bc4af41e1ccc38fc5d74c
28 -DIST pypy-bin-5.6.0-x86+bzip2+ncurses+sse2.tar.lz 6075399 SHA256 14e3dde904e6ee5b8d276f6785cf8a3339e3689f5d151d0b146f76cde77b7ca2 SHA512 b2c6ce1415b7c49be7c69a02c744884b03ccd17227d8c66c0b042f8b5421e006c3e81353f20d6c74bc886ff10927d2efaf0f4b938571e165678135e18870e06b WHIRLPOOL fc3c3e0554d96a52c0a9631080250a6fd825d3ccf5d3c31da172c6f820fea6106b7c4f1094ea2fe838deb786a6ce8b0e78a9a78b7864394c828db32d9c31adc1
29 -DIST pypy-bin-5.6.0-x86+bzip2+ncurses.tar.lz 6073628 SHA256 a667781d65abee8f535769a08cc9cf7e39ae2c12f6aa71cab32de53baf21ceb3 SHA512 adfe5c01c575378c537dc72eaa6cf98cf2f8f2642abeefcfde70f0930f26202b6c08bb715e0c6cf058495fcf1baa035f43e0452014e90e249a27118bcece4dda WHIRLPOOL 4b74440e22fc76c128d8330df57a54dd48a5d5b4fd390f6b912ace46a34d58b03f4a1f6990a274bd1ea8c88615e5f1d1fe56a124a25e1d6618798d7c3a00646a
30 -DIST pypy-bin-5.7.1-amd64+bzip2+jit+ncurses.tar.lz 12313034 SHA256 410f32b11f6d28ea4bdc59d6ee9de4239178b16834fcd35bf5e9f462e3a51ebd SHA512 e6a66b2aeb3b3d2fd8b99ef5d0fa49b9e99752f9baa996280d14d9031b4103795bd5f0180755e3a360889b808267e19939b32e504bd91811df3875c9ae634775 WHIRLPOOL 1ab24432bc071d2aea1c0023817a8ef89444b560f21276d7f66c4d5a3c72662eda4b2ec13b39a60920dade363b39051f610af8505f011b5cb626ff2cdebb65cb
31 -DIST pypy-bin-5.7.1-amd64+bzip2+ncurses.tar.lz 7104886 SHA256 76373ee444a173287d02dda552a07bf029ee7b3c1d5b94784cf13b53d0b12584 SHA512 fed7f2f3ae78f7e1723cb22cd2de1772b2afb633e84714335e06c91ef8062ba1216f3539b2f49e1570e174e823417c83d30d9cff852c6118241b8ff7fe16d627 WHIRLPOOL b661b9a6f4033e15a6d398f724455ad7b9c06bf5ab2a4a06656a4a0888adfee5abfcefe6c27e1d9e4c38c99d38d944523cf1afd2da1084e7fefc9a6c91c89e6a
32 -DIST pypy-bin-5.7.1-x86+bzip2+jit+ncurses+sse2.tar.lz 9956906 SHA256 25638e27a0939268014c35b94f4b5e9031d5f3a92cb51e96adbe4b59befbb579 SHA512 1ef83113f832a71ee4370381f21a07c24059a3b1bd2cad14846f06aa4d8319c14cb3633314f81f6ee898ecd9d2612bd03b72a3c1a87264ff34214f716e13bc4f WHIRLPOOL 8896245974d5a9b7b524edc888399c88e1dd651561017a8688405ad82d9906ff5c81e899cee57eb64506903af583439045dc5fe7f8f5592d071642fb8bb6d9e2
33 -DIST pypy-bin-5.7.1-x86+bzip2+ncurses+sse2.tar.lz 5958810 SHA256 05228eabb25b02aea0c80aca4902ee3d81c3767e64daae5662c4797b39ed6a07 SHA512 e27e84e4a060a7c20bcb862da7d0f32508f5588753b067d726d7cd43835307853a7409203c0bbb98844ac59affc03ea43dc650266d74c345a1afcb7e528f1a8f WHIRLPOOL 2169a6e306643669573434dc065235dc5272c8dffd34a09b136e5a23cd2b8bb70fef552cdf3d79018c7e3b3b1c4edb4d7dcde0a4feb550827dbeafea514742aa
34 -DIST pypy-bin-5.7.1-x86+bzip2+ncurses.tar.lz 5984920 SHA256 a1507fb0d55633b28fe6c249291f4dbf0097cfaf2e2a8d36f20636c5ccd34ea3 SHA512 769f62cb3768b762a09f83926ea695d2aea01f8bb3f33d921607f454a9f1d9ab30fc5400787274d1d94a8ca5b82027d737df4e5e693d639b6944c22eb69e75f8 WHIRLPOOL 825a531ae629015022ce1260e11258ee057535ae8e491f9f08fb90cc38a6eda4f02a5f9e32c8ecb85cdeb81c5de9f2353c415abd83d05e107ebce3669560b484
35 DIST pypy-bin-5.8.0-amd64+bzip2+jit+ncurses.tar.lz 13029615 SHA256 236b12d1abfea9bca81247be01d77b6e82ca9ce923f4e21cb1fceedf8b752675 SHA512 4234bb85c527999fc9ec91e7187d7b05e9aa5fa9965ac4a7fa7a652f678b1221cd04d119316073c5f8352d7bd533c4a7b1c79f5cafce6eb04f32b0a764fdf36d WHIRLPOOL 2b411e1eda2cb18c8a823bcc75de457d68eb9b6793431e3a3a2950bad0f8f5ba882f3cfc21064d0b3656b66bd7cb1389889cb70cb3c9181669286a1fbe0d229f
36 DIST pypy-bin-5.8.0-amd64+bzip2+ncurses.tar.lz 7617650 SHA256 3b8b42a1bc0ca612951452430fc078b8bf81a0dff42eb966fe0e7dc965401d5d SHA512 532d7fd9bdb92b1d5c8e8ebcf60c56fbe2a32b8b89f8650d91b6e0a7cfe6733e3e6b6b232f02a6f24bf9f30569dd8b9cce0b93268d0bb45cd808671ee41be3ae WHIRLPOOL c1a3051c91c747fe60d4bc080749d6b72c79825368da940c4a3ad701d62687ffa6ad81f2e1deb6d7113239443a1fb8e1d07d1e02563c9e59a82d8bc5da3b6ef1
37 DIST pypy-bin-5.8.0-x86+bzip2+jit+ncurses+sse2.tar.lz 10744836 SHA256 9d943e832695ec4d66b07ed9a6dc5e58885ea671d96ba7b728d03b18686111f7 SHA512 bd39bad8f292eabae37b384b9f9f36bc221606b1d2d4aa3df8a45fb1f7ad94755d5fe5dbb7983a49c4e44df87f745ce00691bcb3a5b6c197509c360d9b24d24c WHIRLPOOL b473572a5a84b1ab0510f7274038546836ef3f61ed3cea3260f7ee4e4086093555673064f9fd58c2510b2d80848ec276ca7069372826ef466408c6cabdc74424
38 @@ -20,10 +8,7 @@ DIST pypy-bin-5.9.0-amd64+bzip2+ncurses.tar.lz 7452420 SHA256 a7ffddd40bb61c18f0
39 DIST pypy-bin-5.9.0-x86+bzip2+jit+ncurses+sse2.tar.lz 10218708 SHA256 c3130b6d01b03521e0333a3d90be643b1ce16ebdd207122d959eeb146377d8de SHA512 b2a4169dc7ad8216f754d1245283024d0accc0543d86acf6452a19e67051482ac4cf5b3cf4ae20be7c865bfdb1515b75030a5d4a02b8965252e7810baaefcff8 WHIRLPOOL abf4276d93be4b8e9370969ca6d8a730a3337ace944fbe1eb75b54032fcf1e2bcbf081dd820918afaadd416ead8cd10797735606d948c17b4bb676adbf358e52
40 DIST pypy-bin-5.9.0-x86+bzip2+ncurses+sse2.tar.lz 6269532 SHA256 8d28e152919e01b6cce9aa9350107972307fc63918bec3d24408bfb1fa92f2ad SHA512 ee447e8b03733b41f92625a02653ed70a9f4cb3866a27bcbdbaf1383a00551c5f4617540eea227b120a7adab5cf87afddffde663c7cb79abde852e0bbf18d622 WHIRLPOOL 9b484c003485daa36a5ecfb5aade84b431d692aeaa73e604868934b27e7006b530f7d6661aa580aaceafd1e52ff5573627ed8dd6c3c18da001c20eded9af21dd
41 DIST pypy-bin-5.9.0-x86+bzip2+ncurses.tar.lz 6261498 SHA256 64207bf1703e3a3666c60effed55fa176e6be0282504db3271121616e81df8d8 SHA512 6151ed379dc3dd4d9eda892718a5cdeea55386251c27230cb4606fd0a16589035de332c549d108d699c506f8ff46bed3cec3edb960155550a9746ae2fc0d2349 WHIRLPOOL 5e84a4ab7cbe3efff867d9e11c758e4e0ea0d9585745966fb29fea399fff1dc0dfa5dc727a21e84b6100cc659b6bc658a4a574d4e7e89607e3fe8fc90f4873fb
42 -DIST pypy2-v5.6.0-src.tar.bz2 18388539 SHA256 7411448045f77eb9e087afdce66fe7eafda1876c9e17aad88cf891f762b608b0 SHA512 a92ef611ae2417aaa202b9f5c75dd86e82fc2549e53bab3164cccff37d131542bc71cbce6aaedf428d3dfc7d59a2d3b3a5ed03e3a3439628f29d43c4d30a64de WHIRLPOOL 896894225407f8cd462b094d77723880f6a423d60a79e5d3cf4e0804737fdd0337fc668b05573902fe81f826798b2046cb115c8d230f0810ec0ad2508590ee4a
43 -DIST pypy2-v5.7.1-src.tar.bz2 18940413 SHA256 d01bee43c6df79f7bbc1149bb3e85f489491fb2358a6a1f9a7f0d6e07715832f SHA512 1ad2dddb40c28d2d3e95a9f0730e765d981dee6e2d0664cf1274eb7c1021690a848c3485c846eac8a8b64425b44946b5b2d223058ec4699155a2122ee7d38b75 WHIRLPOOL e0223d889a26f8a5bc5097561dbe617ff9b11972590f3a8d717d572798a2d685540bc6059e4ce4ff73ce0db9d2476a4274f17dad1f825fb780726d6ecd78a4c8
44 DIST pypy2-v5.8.0-src.tar.bz2 19163498 SHA256 504c2d522595baf8775ae1045a217a2b120732537861d31b889d47c340b58bd5 SHA512 222c6ce11b00830e310b766df4c145b7f554f23b87fc6146f214d758d7a6159c5c00af475aa7fa630ef4c37b52cdf2fd73049b6ec3610715b6abc0a925fe1365 WHIRLPOOL 775fbe656996e80fce9cb9a4d4f44fe1b87f0b22f18f74940d5824143337773bb5e3a4d23564bfdc22d010693010f31689026432134a8a2e30ddee670dba1b6d
45 DIST pypy2-v5.9.0-src.tar.bz2 19175394 SHA256 de4bf05df47f1349dbac97233d9277bbaf1ef3331663ea2557fd5da3dbcfd0a7 SHA512 3170747e81088043c6a4885bd0bc92e911556420b6c2539a4ed7e62956f1c741651f772def0fb00d8826a1bef9d6f4e79a13682a4456a31d987f7c9bd8608a4d WHIRLPOOL 5cbfc6922469450fdd55cda79afbd41e5750446eb09396ea53a65d6fbe099905103f14ab08665ecd76bf4da44f11d2c4609d8df97999a41d03f2985d6fae32fa
46 -DIST python-gentoo-patches-2.7.11-0.tar.xz 12916 SHA256 e14b47bb1fd64d366d7dfb8339cc2cbf4a53fc288b11dd83f575eb36a8a6408d SHA512 f0447bb699a163afc08df39b111394377539935546ae23732d7239e78d2bff0c04bc94949f86aef0c1be83736127dbd25c2c531e49befed2d638c3cd4940ac52 WHIRLPOOL 305992849d9d244da1e308e739c9bf62a3ef5c74eb65c765bdc666fb5767eb16c7a609f7c442c17da17f76c3ab81e4b09fa8c21e43f89366539a6a9d656bea77
47 DIST python-gentoo-patches-2.7.13-0.tar.xz 13292 SHA256 271835eb36125d09cc5e904ef23a5263acd8e5f513202a8d4f8a9a0f64fc80a8 SHA512 d70f6baba1a465a752c515e33dfdee2a5cc75400fadfb8ea0bd1e82d50089abdf02d7726c697850dc47de2054aa494bbdc08de2673c260b54e609f29dab259ad WHIRLPOOL 6a6d8b099fa814839bf5b3455b3889205c649ef522b35c3a501831d63d0e916d7747b83ac9b8991f8f8c34b328478d84cf7a12a32161ce0fec37204f9c019e2d
48 DIST python-gentoo-patches-2.7.14-0.tar.xz 13428 SHA256 3567feeb8f0c66161efaea1922bbfe4e71f6051533ef5f54a74b6ccf9e0359b6 SHA512 6da5b52065752b54e9215d0f0809c75167dc3690d0e94fa21dd7595626925bc5c1dd065d31b3bd696d7087f3986de145d3a335a29eb7bd77442637a7ec2863c1 WHIRLPOOL ab77023ac66def132d1dce72f98add3108fd7be303ef5b167a2374df3a94949c75f089dcfdd84ed05a5eb813d6c22cfecd0de03b5819817a20b04f30030f5f6d
49
50 diff --git a/dev-python/pypy-bin/files/5.6.0_all_distutils_cxx.patch b/dev-python/pypy-bin/files/5.6.0_all_distutils_cxx.patch
51 deleted file mode 100644
52 index 5d9c2cd1a5a..00000000000
53 --- a/dev-python/pypy-bin/files/5.6.0_all_distutils_cxx.patch
54 +++ /dev/null
55 @@ -1,340 +0,0 @@
56 -http://bugs.python.org/issue1222585
57 -http://bugs.gentoo.org/show_bug.cgi?id=599918
58 -
59 -diff -Naur pypy2-v5.6.0-src/lib-python/2.7/_osx_support.py pypy2-v5.6.0-src-patched/lib-python/2.7/_osx_support.py
60 ---- pypy2-v5.6.0-src/lib-python/2.7/_osx_support.py 2016-11-08 09:52:16.000000000 +0100
61 -+++ pypy2-v5.6.0-src-patched/lib-python/2.7/_osx_support.py 2016-12-08 16:59:26.213690338 +0100
62 -@@ -14,13 +14,13 @@
63 - # configuration variables that may contain universal build flags,
64 - # like "-arch" or "-isdkroot", that may need customization for
65 - # the user environment
66 --_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
67 -- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
68 -- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
69 -- 'PY_CORE_CFLAGS')
70 -+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS',
71 -+ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED',
72 -+ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS',
73 -+ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS')
74 -
75 - # configuration variables that may contain compiler calls
76 --_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX')
77 -+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX')
78 -
79 - # prefix added to original configuration variable names
80 - _INITPRE = '_OSX_SUPPORT_INITIAL_'
81 -diff -Naur pypy2-v5.6.0-src/lib-python/2.7/distutils/sysconfig_pypy.py pypy2-v5.6.0-src-patched/lib-python/2.7/distutils/sysconfig_pypy.py
82 ---- pypy2-v5.6.0-src/lib-python/2.7/distutils/sysconfig_pypy.py 2016-11-08 09:52:16.000000000 +0100
83 -+++ pypy2-v5.6.0-src-patched/lib-python/2.7/distutils/sysconfig_pypy.py 2016-12-08 17:01:33.594553801 +0100
84 -@@ -126,19 +126,56 @@
85 - setattr(compiler, executable, command)
86 -
87 - if compiler.compiler_type == "unix":
88 -- compiler.compiler_so.extend(['-O2', '-fPIC', '-Wimplicit'])
89 -+ cc = ' '.join(compiler.compiler)
90 -+ cxx = ' '.join(compiler.compiler_cxx)
91 -+ ldshared = ' '.join(compiler.linker_so)
92 -+ ldcxxshared = ' '.join(compiler.linker_so_cxx)
93 -+
94 -+ cflags = ''
95 -+ cxxflags = ''
96 -+ ccshared = '-fPIC'
97 -+
98 -+ if 'CC' in os.environ:
99 -+ cc = os.environ['CC']
100 -+ if 'CXX' in os.environ:
101 -+ cxx = os.environ['CXX']
102 -+ if 'LDSHARED' in os.environ:
103 -+ ldshared = os.environ['LDSHARED']
104 -+ if 'LDCXXSHARED' in os.environ:
105 -+ ldcxxshared = os.environ['LDCXXSHARED']
106 -+ if 'CPP' in os.environ:
107 -+ cpp = os.environ['CPP']
108 -+ else:
109 -+ cpp = cc + " -E" # not always
110 -+ if 'CPPFLAGS' in os.environ:
111 -+ cpp = cpp + ' ' + os.environ['CPPFLAGS']
112 -+ cflags = cflags + ' ' + os.environ['CPPFLAGS']
113 -+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
114 -+ ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
115 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
116 -+ if 'CFLAGS' in os.environ:
117 -+ cflags = os.environ['CFLAGS']
118 -+ ldshared = ldshared + ' ' + os.environ['CFLAGS']
119 -+ if 'CXXFLAGS' in os.environ:
120 -+ cxxflags = os.environ['CXXFLAGS']
121 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
122 -+ if 'LDFLAGS' in os.environ:
123 -+ ldshared = ldshared + ' ' + os.environ['LDFLAGS']
124 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
125 -+
126 -+ cc_cmd = cc + ' ' + cflags
127 -+ cxx_cmd = cxx + ' ' + cxxflags
128 -+ compiler.set_executables(
129 -+ preprocessor=cpp,
130 -+ compiler=cc_cmd,
131 -+ compiler_so=cc_cmd + ' ' + ccshared,
132 -+ compiler_cxx=cxx_cmd,
133 -+ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
134 -+ linker_so=ldshared,
135 -+ linker_exe=cc,
136 -+ linker_so_cxx=ldcxxshared,
137 -+ linker_exe_cxx=cxx)
138 - compiler.shared_lib_extension = get_config_var('SO')
139 -- if "CPPFLAGS" in os.environ:
140 -- cppflags = shlex.split(os.environ["CPPFLAGS"])
141 -- for executable in ('compiler', 'compiler_so', 'linker_so'):
142 -- customize(executable, cppflags)
143 -- if "CFLAGS" in os.environ:
144 -- cflags = shlex.split(os.environ["CFLAGS"])
145 -- for executable in ('compiler', 'compiler_so', 'linker_so'):
146 -- customize(executable, cflags)
147 -- if "LDFLAGS" in os.environ:
148 -- ldflags = shlex.split(os.environ["LDFLAGS"])
149 -- customize('linker_so', ldflags)
150 -
151 -
152 - from sysconfig_cpython import (
153 -diff -Naur pypy2-v5.6.0-src/lib-python/2.7/distutils/cygwinccompiler.py pypy2-v5.6.0-src-patched/lib-python/2.7/distutils/cygwinccompiler.py
154 ---- pypy2-v5.6.0-src/lib-python/2.7/distutils/cygwinccompiler.py 2016-11-08 09:52:16.000000000 +0100
155 -+++ pypy2-v5.6.0-src-patched/lib-python/2.7/distutils/cygwinccompiler.py 2016-12-08 16:59:26.213690338 +0100
156 -@@ -120,8 +120,10 @@
157 - # dllwrap 2.10.90 is buggy
158 - if self.ld_version >= "2.10.90":
159 - self.linker_dll = "gcc"
160 -+ self.linker_dll_cxx = "g++"
161 - else:
162 - self.linker_dll = "dllwrap"
163 -+ self.linker_dll_cxx = "dllwrap"
164 -
165 - # ld_version >= "2.13" support -shared so use it instead of
166 - # -mdll -static
167 -@@ -135,9 +137,13 @@
168 - self.set_executables(compiler='gcc -mcygwin -O -Wall',
169 - compiler_so='gcc -mcygwin -mdll -O -Wall',
170 - compiler_cxx='g++ -mcygwin -O -Wall',
171 -+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
172 - linker_exe='gcc -mcygwin',
173 - linker_so=('%s -mcygwin %s' %
174 -- (self.linker_dll, shared_option)))
175 -+ (self.linker_dll, shared_option)),
176 -+ linker_exe_cxx='g++ -mcygwin',
177 -+ linker_so_cxx=('%s -mcygwin %s' %
178 -+ (self.linker_dll_cxx, shared_option)))
179 -
180 - # cygwin and mingw32 need different sets of libraries
181 - if self.gcc_version == "2.91.57":
182 -@@ -163,8 +169,12 @@
183 - raise CompileError, msg
184 - else: # for other files use the C-compiler
185 - try:
186 -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
187 -- extra_postargs)
188 -+ if self.detect_language(src) == 'c++':
189 -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
190 -+ extra_postargs)
191 -+ else:
192 -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
193 -+ extra_postargs)
194 - except DistutilsExecError, msg:
195 - raise CompileError, msg
196 -
197 -@@ -330,9 +340,14 @@
198 - self.set_executables(compiler='gcc%s -O -Wall' % no_cygwin,
199 - compiler_so='gcc%s -mdll -O -Wall' % no_cygwin,
200 - compiler_cxx='g++%s -O -Wall' % no_cygwin,
201 -+ compiler_so_cxx='g++%s -mdll -O -Wall' % no_cygwin,
202 - linker_exe='gcc%s' % no_cygwin,
203 - linker_so='%s%s %s %s'
204 - % (self.linker_dll, no_cygwin,
205 -+ shared_option, entry_point),
206 -+ linker_exe_cxx='g++%s' % no_cygwin,
207 -+ linker_so_cxx='%s%s %s %s'
208 -+ % (self.linker_dll_cxx, no_cygwin,
209 - shared_option, entry_point))
210 - # Maybe we should also append -mthreads, but then the finished
211 - # dlls need another dll (mingwm10.dll see Mingw32 docs)
212 -diff -Naur pypy2-v5.6.0-src/lib-python/2.7/distutils/emxccompiler.py pypy2-v5.6.0-src-patched/lib-python/2.7/distutils/emxccompiler.py
213 ---- pypy2-v5.6.0-src/lib-python/2.7/distutils/emxccompiler.py 2016-11-08 09:52:16.000000000 +0100
214 -+++ pypy2-v5.6.0-src-patched/lib-python/2.7/distutils/emxccompiler.py 2016-12-08 16:59:26.213690338 +0100
215 -@@ -65,8 +65,12 @@
216 - # XXX optimization, warnings etc. should be customizable.
217 - self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
218 - compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
219 -+ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
220 -+ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
221 - linker_exe='gcc -Zomf -Zmt -Zcrtdll',
222 -- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
223 -+ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll',
224 -+ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll',
225 -+ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll')
226 -
227 - # want the gcc library statically linked (so that we don't have
228 - # to distribute a version dependent on the compiler we have)
229 -@@ -83,8 +87,12 @@
230 - raise CompileError, msg
231 - else: # for other files use the C-compiler
232 - try:
233 -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
234 -- extra_postargs)
235 -+ if self.detect_language(src) == 'c++':
236 -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
237 -+ extra_postargs)
238 -+ else:
239 -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
240 -+ extra_postargs)
241 - except DistutilsExecError, msg:
242 - raise CompileError, msg
243 -
244 -diff -Naur pypy2-v5.6.0-src/lib-python/2.7/distutils/sysconfig_cpython.py pypy2-v5.6.0-src-patched/lib-python/2.7/distutils/sysconfig_cpython.py
245 ---- pypy2-v5.6.0-src/lib-python/2.7/distutils/sysconfig_cpython.py 2016-11-08 09:52:16.000000000 +0100
246 -+++ pypy2-v5.6.0-src-patched/lib-python/2.7/distutils/sysconfig_cpython.py 2016-12-08 16:59:26.213690338 +0100
247 -@@ -171,10 +171,12 @@
248 - _osx_support.customize_compiler(_config_vars)
249 - _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
250 -
251 -- (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
252 -- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
253 -- 'CCSHARED', 'LDSHARED', 'SO', 'AR',
254 -- 'ARFLAGS')
255 -+ (cc, cxx, ccshared, ldshared, ldcxxshared, so_ext, ar, ar_flags) = \
256 -+ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
257 -+ 'SO', 'AR', 'ARFLAGS')
258 -+
259 -+ cflags = ''
260 -+ cxxflags = ''
261 -
262 - if 'CC' in os.environ:
263 - newcc = os.environ['CC']
264 -@@ -189,19 +191,27 @@
265 - cxx = os.environ['CXX']
266 - if 'LDSHARED' in os.environ:
267 - ldshared = os.environ['LDSHARED']
268 -+ if 'LDCXXSHARED' in os.environ:
269 -+ ldcxxshared = os.environ['LDCXXSHARED']
270 - if 'CPP' in os.environ:
271 - cpp = os.environ['CPP']
272 - else:
273 - cpp = cc + " -E" # not always
274 - if 'LDFLAGS' in os.environ:
275 - ldshared = ldshared + ' ' + os.environ['LDFLAGS']
276 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
277 - if 'CFLAGS' in os.environ:
278 -- cflags = opt + ' ' + os.environ['CFLAGS']
279 -+ cflags = os.environ['CFLAGS']
280 - ldshared = ldshared + ' ' + os.environ['CFLAGS']
281 -+ if 'CXXFLAGS' in os.environ:
282 -+ cxxflags = os.environ['CXXFLAGS']
283 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
284 - if 'CPPFLAGS' in os.environ:
285 - cpp = cpp + ' ' + os.environ['CPPFLAGS']
286 - cflags = cflags + ' ' + os.environ['CPPFLAGS']
287 -+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
288 - ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
289 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
290 - if 'AR' in os.environ:
291 - ar = os.environ['AR']
292 - if 'ARFLAGS' in os.environ:
293 -@@ -210,13 +220,17 @@
294 - archiver = ar + ' ' + ar_flags
295 -
296 - cc_cmd = cc + ' ' + cflags
297 -+ cxx_cmd = cxx + ' ' + cxxflags
298 - compiler.set_executables(
299 - preprocessor=cpp,
300 - compiler=cc_cmd,
301 - compiler_so=cc_cmd + ' ' + ccshared,
302 -- compiler_cxx=cxx,
303 -+ compiler_cxx=cxx_cmd,
304 -+ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
305 - linker_so=ldshared,
306 - linker_exe=cc,
307 -+ linker_so_cxx=ldcxxshared,
308 -+ linker_exe_cxx=cxx,
309 - archiver=archiver)
310 -
311 - compiler.shared_lib_extension = so_ext
312 -diff -Naur pypy2-v5.6.0-src/lib-python/2.7/distutils/unixccompiler.py pypy2-v5.6.0-src-patched/lib-python/2.7/distutils/unixccompiler.py
313 ---- pypy2-v5.6.0-src/lib-python/2.7/distutils/unixccompiler.py 2016-11-08 09:52:16.000000000 +0100
314 -+++ pypy2-v5.6.0-src-patched/lib-python/2.7/distutils/unixccompiler.py 2016-12-08 16:59:26.213690338 +0100
315 -@@ -55,14 +55,17 @@
316 - # are pretty generic; they will probably have to be set by an outsider
317 - # (eg. using information discovered by the sysconfig about building
318 - # Python extensions).
319 -- executables = {'preprocessor' : None,
320 -- 'compiler' : ["cc"],
321 -- 'compiler_so' : ["cc"],
322 -- 'compiler_cxx' : ["c++"], # pypy: changed, 'cc' is bogus
323 -- 'linker_so' : ["cc", "-shared"],
324 -- 'linker_exe' : ["cc"],
325 -- 'archiver' : ["ar", "-cr"],
326 -- 'ranlib' : None,
327 -+ executables = {'preprocessor' : None,
328 -+ 'compiler' : ["cc"],
329 -+ 'compiler_so' : ["cc"],
330 -+ 'compiler_cxx' : ["c++"],
331 -+ 'compiler_so_cxx' : ["c++"],
332 -+ 'linker_so' : ["cc", "-shared"],
333 -+ 'linker_exe' : ["cc"],
334 -+ 'linker_so_cxx' : ["c++", "-shared"],
335 -+ 'linker_exe_cxx' : ["c++"],
336 -+ 'archiver' : ["ar", "-cr"],
337 -+ 'ranlib' : None,
338 - }
339 -
340 - if sys.platform[:6] == "darwin":
341 -@@ -129,12 +132,19 @@
342 -
343 - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
344 - compiler_so = self.compiler_so
345 -+ compiler_so_cxx = self.compiler_so_cxx
346 - if sys.platform == 'darwin':
347 - compiler_so = _osx_support.compiler_fixup(compiler_so,
348 - cc_args + extra_postargs)
349 -+ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
350 -+ cc_args + extra_postargs)
351 - try:
352 -- self.spawn(compiler_so + cc_args + [src, '-o', obj] +
353 -- extra_postargs)
354 -+ if self.detect_language(src) == 'c++':
355 -+ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
356 -+ extra_postargs)
357 -+ else:
358 -+ self.spawn(compiler_so + cc_args + [src, '-o', obj] +
359 -+ extra_postargs)
360 - except DistutilsExecError, msg:
361 - raise CompileError, msg
362 -
363 -@@ -191,23 +201,16 @@
364 - ld_args.extend(extra_postargs)
365 - self.mkpath(os.path.dirname(output_filename))
366 - try:
367 -- if target_desc == CCompiler.EXECUTABLE:
368 -- linker = self.linker_exe[:]
369 -+ if target_lang == "c++":
370 -+ if target_desc == CCompiler.EXECUTABLE:
371 -+ linker = self.linker_exe_cxx[:]
372 -+ else:
373 -+ linker = self.linker_so_cxx[:]
374 - else:
375 -- linker = self.linker_so[:]
376 -- if target_lang == "c++" and self.compiler_cxx:
377 -- # skip over environment variable settings if /usr/bin/env
378 -- # is used to set up the linker's environment.
379 -- # This is needed on OSX. Note: this assumes that the
380 -- # normal and C++ compiler have the same environment
381 -- # settings.
382 -- i = 0
383 -- if os.path.basename(linker[0]) == "env":
384 -- i = 1
385 -- while '=' in linker[i]:
386 -- i = i + 1
387 --
388 -- linker[i] = self.compiler_cxx[i]
389 -+ if target_desc == CCompiler.EXECUTABLE:
390 -+ linker = self.linker_exe[:]
391 -+ else:
392 -+ linker = self.linker_so[:]
393 -
394 - if sys.platform == 'darwin':
395 - linker = _osx_support.compiler_fixup(linker, ld_args)
396
397 diff --git a/dev-python/pypy-bin/files/5.7.1_all_distutils_cxx.patch b/dev-python/pypy-bin/files/5.7.1_all_distutils_cxx.patch
398 deleted file mode 100644
399 index 8249fbc91db..00000000000
400 --- a/dev-python/pypy-bin/files/5.7.1_all_distutils_cxx.patch
401 +++ /dev/null
402 @@ -1,388 +0,0 @@
403 -From 9bf4611231faa0dc9ae64c6a7a8b55a3290a3ca2 Mon Sep 17 00:00:00 2001
404 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
405 -Date: Tue, 25 Apr 2017 07:14:11 +0200
406 -Subject: [PATCH] Fancy patch for distutils C++ support, rebased for pypy5.7
407 -
408 -http://bugs.python.org/issue1222585
409 -http://bugs.gentoo.org/show_bug.cgi?id=599918
410 ----
411 - _osx_support.py | 10 ++---
412 - distutils/cygwinccompiler.py | 21 ++++++++--
413 - distutils/emxccompiler.py | 14 +++++--
414 - distutils/sysconfig_cpython.py | 26 ++++++++++---
415 - distutils/sysconfig_pypy.py | 37 ++++++++++++++----
416 - distutils/unixccompiler.py | 55 ++++++++++++++-------------
417 - 6 files changed, 112 insertions(+), 51 deletions(-)
418 -
419 -diff --git a/_osx_support.py b/_osx_support.py
420 -index d2aaae7..8bcdb05 100644
421 ---- a/_osx_support.py
422 -+++ b/_osx_support.py
423 -@@ -14,13 +14,13 @@ __all__ = [
424 - # configuration variables that may contain universal build flags,
425 - # like "-arch" or "-isdkroot", that may need customization for
426 - # the user environment
427 --_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
428 -- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
429 -- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
430 -- 'PY_CORE_CFLAGS')
431 -+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS',
432 -+ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED',
433 -+ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS',
434 -+ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS')
435 -
436 - # configuration variables that may contain compiler calls
437 --_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX')
438 -+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX')
439 -
440 - # prefix added to original configuration variable names
441 - _INITPRE = '_OSX_SUPPORT_INITIAL_'
442 -diff --git a/distutils/cygwinccompiler.py b/distutils/cygwinccompiler.py
443 -index 767400c..7133097 100644
444 ---- a/distutils/cygwinccompiler.py
445 -+++ b/distutils/cygwinccompiler.py
446 -@@ -120,8 +120,10 @@ class CygwinCCompiler (UnixCCompiler):
447 - # dllwrap 2.10.90 is buggy
448 - if self.ld_version >= "2.10.90":
449 - self.linker_dll = "gcc"
450 -+ self.linker_dll_cxx = "g++"
451 - else:
452 - self.linker_dll = "dllwrap"
453 -+ self.linker_dll_cxx = "dllwrap"
454 -
455 - # ld_version >= "2.13" support -shared so use it instead of
456 - # -mdll -static
457 -@@ -135,9 +137,13 @@ class CygwinCCompiler (UnixCCompiler):
458 - self.set_executables(compiler='gcc -mcygwin -O -Wall',
459 - compiler_so='gcc -mcygwin -mdll -O -Wall',
460 - compiler_cxx='g++ -mcygwin -O -Wall',
461 -+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
462 - linker_exe='gcc -mcygwin',
463 - linker_so=('%s -mcygwin %s' %
464 -- (self.linker_dll, shared_option)))
465 -+ (self.linker_dll, shared_option)),
466 -+ linker_exe_cxx='g++ -mcygwin',
467 -+ linker_so_cxx=('%s -mcygwin %s' %
468 -+ (self.linker_dll_cxx, shared_option)))
469 -
470 - # cygwin and mingw32 need different sets of libraries
471 - if self.gcc_version == "2.91.57":
472 -@@ -163,8 +169,12 @@ class CygwinCCompiler (UnixCCompiler):
473 - raise CompileError, msg
474 - else: # for other files use the C-compiler
475 - try:
476 -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
477 -- extra_postargs)
478 -+ if self.detect_language(src) == 'c++':
479 -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
480 -+ extra_postargs)
481 -+ else:
482 -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
483 -+ extra_postargs)
484 - except DistutilsExecError, msg:
485 - raise CompileError, msg
486 -
487 -@@ -330,9 +340,14 @@ class Mingw32CCompiler (CygwinCCompiler):
488 - self.set_executables(compiler='gcc%s -O -Wall' % no_cygwin,
489 - compiler_so='gcc%s -mdll -O -Wall' % no_cygwin,
490 - compiler_cxx='g++%s -O -Wall' % no_cygwin,
491 -+ compiler_so_cxx='g++%s -mdll -O -Wall' % no_cygwin,
492 - linker_exe='gcc%s' % no_cygwin,
493 - linker_so='%s%s %s %s'
494 - % (self.linker_dll, no_cygwin,
495 -+ shared_option, entry_point),
496 -+ linker_exe_cxx='g++%s' % no_cygwin,
497 -+ linker_so_cxx='%s%s %s %s'
498 -+ % (self.linker_dll_cxx, no_cygwin,
499 - shared_option, entry_point))
500 - # Maybe we should also append -mthreads, but then the finished
501 - # dlls need another dll (mingwm10.dll see Mingw32 docs)
502 -diff --git a/distutils/emxccompiler.py b/distutils/emxccompiler.py
503 -index a017205..bdc532c 100644
504 ---- a/distutils/emxccompiler.py
505 -+++ b/distutils/emxccompiler.py
506 -@@ -65,8 +65,12 @@ class EMXCCompiler (UnixCCompiler):
507 - # XXX optimization, warnings etc. should be customizable.
508 - self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
509 - compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
510 -+ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
511 -+ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
512 - linker_exe='gcc -Zomf -Zmt -Zcrtdll',
513 -- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
514 -+ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll',
515 -+ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll',
516 -+ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll')
517 -
518 - # want the gcc library statically linked (so that we don't have
519 - # to distribute a version dependent on the compiler we have)
520 -@@ -83,8 +87,12 @@ class EMXCCompiler (UnixCCompiler):
521 - raise CompileError, msg
522 - else: # for other files use the C-compiler
523 - try:
524 -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
525 -- extra_postargs)
526 -+ if self.detect_language(src) == 'c++':
527 -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
528 -+ extra_postargs)
529 -+ else:
530 -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
531 -+ extra_postargs)
532 - except DistutilsExecError, msg:
533 - raise CompileError, msg
534 -
535 -diff --git a/distutils/sysconfig_cpython.py b/distutils/sysconfig_cpython.py
536 -index 35f39e4..8dd032d 100644
537 ---- a/distutils/sysconfig_cpython.py
538 -+++ b/distutils/sysconfig_cpython.py
539 -@@ -171,10 +171,12 @@ def customize_compiler(compiler):
540 - _osx_support.customize_compiler(_config_vars)
541 - _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
542 -
543 -- (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
544 -- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
545 -- 'CCSHARED', 'LDSHARED', 'SO', 'AR',
546 -- 'ARFLAGS')
547 -+ (cc, cxx, ccshared, ldshared, ldcxxshared, so_ext, ar, ar_flags) = \
548 -+ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
549 -+ 'SO', 'AR', 'ARFLAGS')
550 -+
551 -+ cflags = ''
552 -+ cxxflags = ''
553 -
554 - if 'CC' in os.environ:
555 - newcc = os.environ['CC']
556 -@@ -189,19 +191,27 @@ def customize_compiler(compiler):
557 - cxx = os.environ['CXX']
558 - if 'LDSHARED' in os.environ:
559 - ldshared = os.environ['LDSHARED']
560 -+ if 'LDCXXSHARED' in os.environ:
561 -+ ldcxxshared = os.environ['LDCXXSHARED']
562 - if 'CPP' in os.environ:
563 - cpp = os.environ['CPP']
564 - else:
565 - cpp = cc + " -E" # not always
566 - if 'LDFLAGS' in os.environ:
567 - ldshared = ldshared + ' ' + os.environ['LDFLAGS']
568 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
569 - if 'CFLAGS' in os.environ:
570 -- cflags = opt + ' ' + os.environ['CFLAGS']
571 -+ cflags = os.environ['CFLAGS']
572 - ldshared = ldshared + ' ' + os.environ['CFLAGS']
573 -+ if 'CXXFLAGS' in os.environ:
574 -+ cxxflags = os.environ['CXXFLAGS']
575 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
576 - if 'CPPFLAGS' in os.environ:
577 - cpp = cpp + ' ' + os.environ['CPPFLAGS']
578 - cflags = cflags + ' ' + os.environ['CPPFLAGS']
579 -+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
580 - ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
581 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
582 - if 'AR' in os.environ:
583 - ar = os.environ['AR']
584 - if 'ARFLAGS' in os.environ:
585 -@@ -210,13 +220,17 @@ def customize_compiler(compiler):
586 - archiver = ar + ' ' + ar_flags
587 -
588 - cc_cmd = cc + ' ' + cflags
589 -+ cxx_cmd = cxx + ' ' + cxxflags
590 - compiler.set_executables(
591 - preprocessor=cpp,
592 - compiler=cc_cmd,
593 - compiler_so=cc_cmd + ' ' + ccshared,
594 -- compiler_cxx=cxx,
595 -+ compiler_cxx=cxx_cmd,
596 -+ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
597 - linker_so=ldshared,
598 - linker_exe=cc,
599 -+ linker_so_cxx=ldcxxshared,
600 -+ linker_exe_cxx=cxx,
601 - archiver=archiver)
602 -
603 - compiler.shared_lib_extension = so_ext
604 -diff --git a/distutils/sysconfig_pypy.py b/distutils/sysconfig_pypy.py
605 -index 368f232..4fe1f08 100644
606 ---- a/distutils/sysconfig_pypy.py
607 -+++ b/distutils/sysconfig_pypy.py
608 -@@ -67,6 +67,7 @@ def _init_posix():
609 - g['CFLAGS'] = "-DNDEBUG -O2"
610 - g['CCSHARED'] = "-fPIC"
611 - g['LDSHARED'] = "gcc -pthread -shared"
612 -+ g['LDCXXSHARED'] = "g++ -pthread -shared"
613 - g['SO'] = [s[0] for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION][0]
614 - g['AR'] = "ar"
615 - g['ARFLAGS'] = "rc"
616 -@@ -85,6 +86,7 @@ def _init_posix():
617 - # just a guess
618 - arch = platform.machine()
619 - g['LDSHARED'] += ' -undefined dynamic_lookup'
620 -+ g['LDCXXSHARED'] += ' -undefined dynamic_lookup'
621 - g['CC'] += ' -arch %s' % (arch,)
622 -
623 - global _config_vars
624 -@@ -168,37 +170,52 @@ def customize_compiler(compiler):
625 - _osx_support.customize_compiler(_config_vars)
626 - _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
627 -
628 -- (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
629 -- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
630 -- 'CCSHARED', 'LDSHARED', 'SO', 'AR',
631 -- 'ARFLAGS')
632 -+ (cc, cxx, ccshared, ldshared, ldcxxshared, so_ext, ar, ar_flags) = \
633 -+ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
634 -+ 'SO', 'AR', 'ARFLAGS')
635 -+
636 -+ cflags = ''
637 -+ cxxflags = ''
638 -
639 - if 'CC' in os.environ:
640 - newcc = os.environ['CC']
641 -- if (sys.platform == 'darwin'
642 -+ if (True
643 - and 'LDSHARED' not in os.environ
644 - and ldshared.startswith(cc)):
645 - # On OS X, if CC is overridden, use that as the default
646 - # command for LDSHARED as well
647 -+ # Gentoo: s/OS X/every system/
648 - ldshared = newcc + ldshared[len(cc):]
649 - cc = newcc
650 - if 'CXX' in os.environ:
651 -- cxx = os.environ['CXX']
652 -+ newcxx = os.environ['CXX']
653 -+ if ('LDCXXSHARED' not in os.environ
654 -+ and ldcxxshared.startswith(cxx)):
655 -+ ldcxxshared = newcxx + ldcxxshared[len(cxx):]
656 -+ cxx = newcxx
657 - if 'LDSHARED' in os.environ:
658 - ldshared = os.environ['LDSHARED']
659 -+ if 'LDCXXSHARED' in os.environ:
660 -+ ldcxxshared = os.environ['LDCXXSHARED']
661 - if 'CPP' in os.environ:
662 - cpp = os.environ['CPP']
663 - else:
664 - cpp = cc + " -E" # not always
665 - if 'LDFLAGS' in os.environ:
666 - ldshared = ldshared + ' ' + os.environ['LDFLAGS']
667 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
668 - if 'CFLAGS' in os.environ:
669 -- cflags = opt + ' ' + os.environ['CFLAGS']
670 -+ cflags = os.environ['CFLAGS']
671 - ldshared = ldshared + ' ' + os.environ['CFLAGS']
672 -+ if 'CXXFLAGS' in os.environ:
673 -+ cxxflags = os.environ['CXXFLAGS']
674 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
675 - if 'CPPFLAGS' in os.environ:
676 - cpp = cpp + ' ' + os.environ['CPPFLAGS']
677 - cflags = cflags + ' ' + os.environ['CPPFLAGS']
678 -+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
679 - ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
680 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
681 - if 'AR' in os.environ:
682 - ar = os.environ['AR']
683 - if 'ARFLAGS' in os.environ:
684 -@@ -207,13 +224,17 @@ def customize_compiler(compiler):
685 - archiver = ar + ' ' + ar_flags
686 -
687 - cc_cmd = cc + ' ' + cflags
688 -+ cxx_cmd = cxx + ' ' + cxxflags
689 - compiler.set_executables(
690 - preprocessor=cpp,
691 - compiler=cc_cmd,
692 - compiler_so=cc_cmd + ' ' + ccshared,
693 -- compiler_cxx=cxx,
694 -+ compiler_cxx=cxx_cmd,
695 -+ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
696 - linker_so=ldshared,
697 - linker_exe=cc,
698 -+ linker_so_cxx=ldcxxshared,
699 -+ linker_exe_cxx=cxx,
700 - archiver=archiver)
701 -
702 - compiler.shared_lib_extension = so_ext
703 -diff --git a/distutils/unixccompiler.py b/distutils/unixccompiler.py
704 -index dee88a5..558b568 100644
705 ---- a/distutils/unixccompiler.py
706 -+++ b/distutils/unixccompiler.py
707 -@@ -55,14 +55,17 @@ class UnixCCompiler(CCompiler):
708 - # are pretty generic; they will probably have to be set by an outsider
709 - # (eg. using information discovered by the sysconfig about building
710 - # Python extensions).
711 -- executables = {'preprocessor' : None,
712 -- 'compiler' : ["cc"],
713 -- 'compiler_so' : ["cc"],
714 -- 'compiler_cxx' : ["c++"], # pypy: changed, 'cc' is bogus
715 -- 'linker_so' : ["cc", "-shared"],
716 -- 'linker_exe' : ["cc"],
717 -- 'archiver' : ["ar", "-cr"],
718 -- 'ranlib' : None,
719 -+ executables = {'preprocessor' : None,
720 -+ 'compiler' : ["cc"],
721 -+ 'compiler_so' : ["cc"],
722 -+ 'compiler_cxx' : ["c++"],
723 -+ 'compiler_so_cxx' : ["c++"],
724 -+ 'linker_so' : ["cc", "-shared"],
725 -+ 'linker_exe' : ["cc"],
726 -+ 'linker_so_cxx' : ["c++", "-shared"],
727 -+ 'linker_exe_cxx' : ["c++"],
728 -+ 'archiver' : ["ar", "-cr"],
729 -+ 'ranlib' : None,
730 - }
731 -
732 - if sys.platform[:6] == "darwin":
733 -@@ -129,12 +132,19 @@ class UnixCCompiler(CCompiler):
734 -
735 - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
736 - compiler_so = self.compiler_so
737 -+ compiler_so_cxx = self.compiler_so_cxx
738 - if sys.platform == 'darwin':
739 - compiler_so = _osx_support.compiler_fixup(compiler_so,
740 - cc_args + extra_postargs)
741 -+ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
742 -+ cc_args + extra_postargs)
743 - try:
744 -- self.spawn(compiler_so + cc_args + [src, '-o', obj] +
745 -- extra_postargs)
746 -+ if self.detect_language(src) == 'c++':
747 -+ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
748 -+ extra_postargs)
749 -+ else:
750 -+ self.spawn(compiler_so + cc_args + [src, '-o', obj] +
751 -+ extra_postargs)
752 - except DistutilsExecError, msg:
753 - raise CompileError, msg
754 -
755 -@@ -191,23 +201,16 @@ class UnixCCompiler(CCompiler):
756 - ld_args.extend(extra_postargs)
757 - self.mkpath(os.path.dirname(output_filename))
758 - try:
759 -- if target_desc == CCompiler.EXECUTABLE:
760 -- linker = self.linker_exe[:]
761 -+ if target_lang == "c++":
762 -+ if target_desc == CCompiler.EXECUTABLE:
763 -+ linker = self.linker_exe_cxx[:]
764 -+ else:
765 -+ linker = self.linker_so_cxx[:]
766 - else:
767 -- linker = self.linker_so[:]
768 -- if target_lang == "c++" and self.compiler_cxx:
769 -- # skip over environment variable settings if /usr/bin/env
770 -- # is used to set up the linker's environment.
771 -- # This is needed on OSX. Note: this assumes that the
772 -- # normal and C++ compiler have the same environment
773 -- # settings.
774 -- i = 0
775 -- if os.path.basename(linker[0]) == "env":
776 -- i = 1
777 -- while '=' in linker[i]:
778 -- i = i + 1
779 --
780 -- linker[i] = self.compiler_cxx[i]
781 -+ if target_desc == CCompiler.EXECUTABLE:
782 -+ linker = self.linker_exe[:]
783 -+ else:
784 -+ linker = self.linker_so[:]
785 -
786 - if sys.platform == 'darwin':
787 - linker = _osx_support.compiler_fixup(linker, ld_args)
788 ---
789 -2.12.2
790 -
791
792 diff --git a/dev-python/pypy-bin/metadata.xml b/dev-python/pypy-bin/metadata.xml
793 index fd25587b849..ff5bc95069a 100644
794 --- a/dev-python/pypy-bin/metadata.xml
795 +++ b/dev-python/pypy-bin/metadata.xml
796 @@ -5,9 +5,6 @@
797 <email>python@g.o</email>
798 <name>Python</name>
799 </maintainer>
800 - <use>
801 - <flag name="shadowstack">Use a shadow stack for finding GC roots</flag>
802 - </use>
803 <upstream>
804 <remote-id type="bitbucket">pypy/pypy</remote-id>
805 </upstream>
806
807 diff --git a/dev-python/pypy-bin/pypy-bin-5.6.0.ebuild b/dev-python/pypy-bin/pypy-bin-5.6.0.ebuild
808 deleted file mode 100644
809 index e15879131bd..00000000000
810 --- a/dev-python/pypy-bin/pypy-bin-5.6.0.ebuild
811 +++ /dev/null
812 @@ -1,204 +0,0 @@
813 -# Copyright 1999-2016 Gentoo Foundation
814 -# Distributed under the terms of the GNU General Public License v2
815 -
816 -EAPI=5
817 -
818 -PYTHON_COMPAT=( python2_7 pypy )
819 -inherit eutils multilib pax-utils python-any-r1 unpacker versionator
820 -
821 -BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}"
822 -CPY_PATCHSET_VERSION="2.7.11-0"
823 -MY_P=pypy2-v${PV}
824 -
825 -DESCRIPTION="Pre-built version of PyPy"
826 -HOMEPAGE="http://pypy.org/"
827 -SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2
828 - https://dev.gentoo.org/~djc/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz
829 - amd64? (
830 - jit? ( shadowstack? (
831 - ${BINHOST}/${P}-amd64+bzip2+jit+ncurses+shadowstack.tar.lz
832 - ) )
833 - jit? ( !shadowstack? (
834 - ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz
835 - ) )
836 - !jit? ( !shadowstack? (
837 - ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz
838 - ) )
839 - )
840 - x86? (
841 - cpu_flags_x86_sse2? (
842 - jit? ( shadowstack? (
843 - ${BINHOST}/${P}-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz
844 - ) )
845 - jit? ( !shadowstack? (
846 - ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz
847 - ) )
848 - !jit? ( !shadowstack? (
849 - ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz
850 - ) )
851 - )
852 - !cpu_flags_x86_sse2? (
853 - !jit? ( !shadowstack? (
854 - ${BINHOST}/${P}-x86+bzip2+ncurses.tar.lz
855 - ) )
856 - )
857 - )"
858 -
859 -# Supported variants
860 -REQUIRED_USE="!jit? ( !shadowstack )
861 - x86? ( !cpu_flags_x86_sse2? ( !jit !shadowstack ) )"
862 -
863 -LICENSE="MIT"
864 -# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")'
865 -SLOT="0/41"
866 -KEYWORDS="~amd64 ~x86"
867 -IUSE="doc gdbm +jit +shadowstack sqlite cpu_flags_x86_sse2 test tk"
868 -
869 -# yep, world would be easier if people started filling subslots...
870 -RDEPEND="
871 - app-arch/bzip2:0=
872 - dev-libs/expat:0=
873 - dev-libs/libffi:0=
874 - dev-libs/openssl:0=[-bindist]
875 - sys-libs/glibc:2.2=
876 - sys-libs/ncurses:0/6
877 - sys-libs/zlib:0=
878 - gdbm? ( sys-libs/gdbm:0= )
879 - sqlite? ( dev-db/sqlite:3= )
880 - tk? (
881 - dev-lang/tk:0=
882 - dev-tcltk/tix:0=
883 - )
884 - !dev-python/pypy:0"
885 -DEPEND="${RDEPEND}
886 - app-arch/lzip
887 - app-arch/xz-utils
888 - doc? ( ${PYTHON_DEPS}
889 - dev-python/sphinx )"
890 -
891 -S=${WORKDIR}/${MY_P}-src
892 -
893 -QA_PREBUILT="
894 - usr/lib*/pypy/pypy-c
895 - usr/lib*/pypy/libpypy-c.so"
896 -
897 -pkg_setup() {
898 - if [[ ${MERGE_TYPE} != binary ]]; then
899 - use doc && python-any-r1_pkg_setup
900 - fi
901 -}
902 -
903 -src_prepare() {
904 - epatch "${FILESDIR}/4.0.0-gentoo-path.patch" \
905 - "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
906 -
907 - sed -e "s^@EPREFIX@^${EPREFIX}^" \
908 - -e "s^@libdir@^$(get_libdir)^" \
909 - -i lib-python/2.7/distutils/command/install.py || die
910 -
911 - # apply CPython stdlib patches
912 - pushd lib-python/2.7 > /dev/null || die
913 - epatch "${FILESDIR}"/5.6.0_all_distutils_cxx.patch \
914 - "${WORKDIR}"/patches/22_all_turkish_locale.patch \
915 - "${WORKDIR}"/patches/62_all_xml.use_pyxml.patch
916 - popd > /dev/null || die
917 -
918 - epatch_user
919 -}
920 -
921 -src_compile() {
922 - # Tadaam! PyPy compiled!
923 - mv "${WORKDIR}"/${P}*/{libpypy-c.so,pypy-c} . || die
924 - mv "${WORKDIR}"/${P}*/include/*.h include/ || die
925 - # (not installed by pypy)
926 - rm pypy/module/cpyext/include/_numpypy/numpy/README || die
927 - mv pypy/module/cpyext/include/* include/ || die
928 -
929 - use doc && emake -C pypy/doc/ html
930 - #needed even without jit :( also needed in both compile and install phases
931 - pax-mark m pypy-c libpypy-c.so
932 -}
933 -
934 -src_test() {
935 - # (unset)
936 - local -x PYTHONDONTWRITEBYTECODE
937 -
938 - ./pypy-c ./pypy/test_all.py --pypy=./pypy-c lib-python || die
939 -}
940 -
941 -src_install() {
942 - local dest=/usr/$(get_libdir)/pypy
943 - einfo "Installing PyPy ..."
944 - insinto "${dest}"
945 - doins -r include lib_pypy lib-python pypy-c libpypy-c.so
946 - fperms a+x ${dest}/pypy-c ${dest}/libpypy-c.so
947 - pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so"
948 - dosym ../$(get_libdir)/pypy/pypy-c /usr/bin/pypy
949 - dodoc README.rst
950 -
951 - if ! use gdbm; then
952 - rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \
953 - "${ED%/}${dest}"/lib-python/*2.7/test/test_gdbm.py || die
954 - fi
955 - if ! use sqlite; then
956 - rm -r "${ED%/}${dest}"/lib-python/*2.7/sqlite3 \
957 - "${ED%/}${dest}"/lib_pypy/_sqlite3.py \
958 - "${ED%/}${dest}"/lib-python/*2.7/test/test_sqlite.py || die
959 - fi
960 - if ! use tk; then
961 - rm -r "${ED%/}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \
962 - "${ED%/}${dest}"/lib_pypy/_tkinter \
963 - "${ED%/}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die
964 - fi
965 -
966 - # Install docs
967 - use doc && dohtml -r pypy/doc/_build/html/
968 -
969 - einfo "Generating caches and byte-compiling ..."
970 -
971 - local -x PYTHON=${ED%/}${dest}/pypy-c
972 - local -x LD_LIBRARY_PATH="${ED%/}${dest}"
973 - # we can't use eclass function since PyPy is dumb and always gives
974 - # paths relative to the interpreter
975 - local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy/site-packages
976 - python_export pypy EPYTHON
977 -
978 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
979 - python_domodule epython.py
980 -
981 - # Generate Grammar and PatternGrammar pickles.
982 - "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
983 - || die "Generation of Grammar and PatternGrammar pickles failed"
984 -
985 - # Generate cffi modules
986 - # Please keep in sync with pypy/tool/build_cffi_imports.py!
987 -#cffi_build_scripts = {
988 -# "sqlite3": "_sqlite3_build.py",
989 -# "audioop": "_audioop_build.py",
990 -# "tk": "_tkinter/tklib_build.py",
991 -# "curses": "_curses_build.py" if sys.platform != "win32" else None,
992 -# "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
993 -# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None,
994 -# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
995 -# "resource": "_resource_build.py" if sys.platform != "win32" else None,
996 - cffi_targets=( audioop curses syslog pwdgrp resource )
997 - use gdbm && cffi_targets+=( gdbm )
998 - use sqlite && cffi_targets+=( sqlite3 )
999 - use tk && cffi_targets+=( tkinter/tklib )
1000 -
1001 - local t
1002 - # all modules except tkinter output to .
1003 - # tkinter outputs to the correct dir ...
1004 - cd "${ED%/}${dest}"/lib_pypy || die
1005 - for t in "${cffi_targets[@]}"; do
1006 - # tkinter doesn't work via -m
1007 - "${PYTHON}" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
1008 - done
1009 -
1010 - # Cleanup temporary objects
1011 - find "${ED%/}${dest}" -name "_cffi_*.[co]" -delete || die
1012 - find "${ED%/}${dest}" -type d -empty -delete || die
1013 -
1014 - # compile the installed modules
1015 - python_optimize "${ED%/}${dest}"
1016 -}
1017
1018 diff --git a/dev-python/pypy-bin/pypy-bin-5.7.1.ebuild b/dev-python/pypy-bin/pypy-bin-5.7.1.ebuild
1019 deleted file mode 100644
1020 index aaa6411b77b..00000000000
1021 --- a/dev-python/pypy-bin/pypy-bin-5.7.1.ebuild
1022 +++ /dev/null
1023 @@ -1,189 +0,0 @@
1024 -# Copyright 1999-2017 Gentoo Foundation
1025 -# Distributed under the terms of the GNU General Public License v2
1026 -
1027 -EAPI=6
1028 -
1029 -PYTHON_COMPAT=( python2_7 pypy )
1030 -inherit pax-utils python-any-r1 unpacker versionator
1031 -
1032 -BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}"
1033 -CPY_PATCHSET_VERSION="2.7.13-0"
1034 -MY_P=pypy2-v${PV}
1035 -
1036 -DESCRIPTION="Pre-built version of PyPy"
1037 -HOMEPAGE="http://pypy.org/"
1038 -SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2
1039 - https://dev.gentoo.org/~floppym/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz
1040 - amd64? (
1041 - jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz )
1042 - !jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz )
1043 - )
1044 - x86? (
1045 - cpu_flags_x86_sse2? (
1046 - jit? ( ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz )
1047 - !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz )
1048 - )
1049 - !cpu_flags_x86_sse2? (
1050 - !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses.tar.lz )
1051 - )
1052 - )"
1053 -
1054 -# Supported variants
1055 -REQUIRED_USE="x86? ( !cpu_flags_x86_sse2? ( !jit ) )"
1056 -
1057 -LICENSE="MIT"
1058 -# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")'
1059 -SLOT="0/41"
1060 -KEYWORDS="~amd64 ~x86"
1061 -IUSE="doc gdbm +jit sqlite cpu_flags_x86_sse2 test tk"
1062 -
1063 -# yep, world would be easier if people started filling subslots...
1064 -RDEPEND="
1065 - app-arch/bzip2:0=
1066 - dev-libs/expat:0=
1067 - dev-libs/libffi:0=
1068 - dev-libs/openssl:0=[-bindist]
1069 - sys-libs/glibc:2.2=
1070 - sys-libs/ncurses:0/6
1071 - sys-libs/zlib:0=
1072 - gdbm? ( sys-libs/gdbm:0= )
1073 - sqlite? ( dev-db/sqlite:3= )
1074 - tk? (
1075 - dev-lang/tk:0=
1076 - dev-tcltk/tix:0=
1077 - )
1078 - !dev-python/pypy:0"
1079 -DEPEND="${RDEPEND}
1080 - app-arch/lzip
1081 - app-arch/xz-utils
1082 - doc? ( ${PYTHON_DEPS}
1083 - dev-python/sphinx )"
1084 -
1085 -S=${WORKDIR}/${MY_P}-src
1086 -
1087 -QA_PREBUILT="
1088 - usr/lib*/pypy/pypy-c
1089 - usr/lib*/pypy/libpypy-c.so"
1090 -
1091 -pkg_setup() {
1092 - if [[ ${MERGE_TYPE} != binary ]]; then
1093 - use doc && python-any-r1_pkg_setup
1094 - fi
1095 -}
1096 -
1097 -src_prepare() {
1098 - eapply "${FILESDIR}/4.0.0-gentoo-path.patch"
1099 - eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
1100 -
1101 - sed -e "s^@EPREFIX@^${EPREFIX}^" \
1102 - -e "s^@libdir@^$(get_libdir)^" \
1103 - -i lib-python/2.7/distutils/command/install.py || die
1104 -
1105 - # apply CPython stdlib patches
1106 - pushd lib-python/2.7 > /dev/null || die
1107 - # TODO: cpy turkish locale patch now fixes C code
1108 - # probably needs better port to pypy, if it is broken there
1109 - eapply "${FILESDIR}"/5.7.1_all_distutils_cxx.patch
1110 - eapply "${WORKDIR}"/patches/62_all_xml.use_pyxml.patch
1111 - popd > /dev/null || die
1112 -
1113 - eapply_user
1114 -}
1115 -
1116 -src_compile() {
1117 - # Tadaam! PyPy compiled!
1118 - mv "${WORKDIR}"/${P}*/{libpypy-c.so,pypy-c} . || die
1119 - mv "${WORKDIR}"/${P}*/include/*.h include/ || die
1120 - # (not installed by pypy)
1121 - rm pypy/module/cpyext/include/_numpypy/numpy/README || die
1122 - mv pypy/module/cpyext/include/* include/ || die
1123 - mv pypy/module/cpyext/parse/*.h include/ || die
1124 -
1125 - use doc && emake -C pypy/doc/ html
1126 - #needed even without jit :( also needed in both compile and install phases
1127 - pax-mark m pypy-c libpypy-c.so
1128 -}
1129 -
1130 -src_test() {
1131 - # (unset)
1132 - local -x PYTHONDONTWRITEBYTECODE
1133 -
1134 - ./pypy-c ./pypy/test_all.py --pypy=./pypy-c lib-python || die
1135 -}
1136 -
1137 -src_install() {
1138 - local dest=/usr/$(get_libdir)/pypy
1139 - einfo "Installing PyPy ..."
1140 - insinto "${dest}"
1141 - doins -r include lib_pypy lib-python pypy-c libpypy-c.so
1142 - fperms a+x ${dest}/pypy-c ${dest}/libpypy-c.so
1143 - pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so"
1144 - dosym ../$(get_libdir)/pypy/pypy-c /usr/bin/pypy
1145 - dodoc README.rst
1146 -
1147 - if ! use gdbm; then
1148 - rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \
1149 - "${ED%/}${dest}"/lib-python/*2.7/test/test_gdbm.py || die
1150 - fi
1151 - if ! use sqlite; then
1152 - rm -r "${ED%/}${dest}"/lib-python/*2.7/sqlite3 \
1153 - "${ED%/}${dest}"/lib_pypy/_sqlite3.py \
1154 - "${ED%/}${dest}"/lib-python/*2.7/test/test_sqlite.py || die
1155 - fi
1156 - if ! use tk; then
1157 - rm -r "${ED%/}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \
1158 - "${ED%/}${dest}"/lib_pypy/_tkinter \
1159 - "${ED%/}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die
1160 - fi
1161 -
1162 - # Install docs
1163 - use doc && dodoc -r pypy/doc/_build/html
1164 -
1165 - einfo "Generating caches and byte-compiling ..."
1166 -
1167 - local -x PYTHON=${ED%/}${dest}/pypy-c
1168 - local -x LD_LIBRARY_PATH="${ED%/}${dest}"
1169 - # we can't use eclass function since PyPy is dumb and always gives
1170 - # paths relative to the interpreter
1171 - local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy/site-packages
1172 - python_export pypy EPYTHON
1173 -
1174 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
1175 - python_domodule epython.py
1176 -
1177 - # Generate Grammar and PatternGrammar pickles.
1178 - "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
1179 - || die "Generation of Grammar and PatternGrammar pickles failed"
1180 -
1181 - # Generate cffi modules
1182 - # Please keep in sync with pypy/tool/build_cffi_imports.py!
1183 -#cffi_build_scripts = {
1184 -# "sqlite3": "_sqlite3_build.py",
1185 -# "audioop": "_audioop_build.py",
1186 -# "tk": "_tkinter/tklib_build.py",
1187 -# "curses": "_curses_build.py" if sys.platform != "win32" else None,
1188 -# "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
1189 -# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None,
1190 -# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
1191 -# "resource": "_resource_build.py" if sys.platform != "win32" else None,
1192 - cffi_targets=( audioop curses syslog pwdgrp resource )
1193 - use gdbm && cffi_targets+=( gdbm )
1194 - use sqlite && cffi_targets+=( sqlite3 )
1195 - use tk && cffi_targets+=( tkinter/tklib )
1196 -
1197 - local t
1198 - # all modules except tkinter output to .
1199 - # tkinter outputs to the correct dir ...
1200 - cd "${ED%/}${dest}"/lib_pypy || die
1201 - for t in "${cffi_targets[@]}"; do
1202 - # tkinter doesn't work via -m
1203 - "${PYTHON}" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
1204 - done
1205 -
1206 - # Cleanup temporary objects
1207 - find "${ED%/}${dest}" -name "_cffi_*.[co]" -delete || die
1208 - find "${ED%/}${dest}" -type d -empty -delete || die
1209 -
1210 - # compile the installed modules
1211 - python_optimize "${ED%/}${dest}"
1212 -}