summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-07-27 11:19:22 +0000
committerMichał Górny <mgorny@gentoo.org>2013-07-27 11:19:22 +0000
commit742b54261637bfc39e21cfeec038781aa8e506ab (patch)
treeadf13fe5fc96d16a855861eda64c09e02080e603 /dev-python/pypy-bin
parentSwitch eclasses to use virtual/pypy (and therefore support pypy-bin). (diff)
downloadhistorical-742b54261637bfc39e21cfeec038781aa8e506ab.tar.gz
historical-742b54261637bfc39e21cfeec038781aa8e506ab.tar.bz2
historical-742b54261637bfc39e21cfeec038781aa8e506ab.zip
Initial versions of pypy binary packages.
Package-Manager: portage-2.2.0_alpha190/cvs/Linux x86_64 Manifest-Sign-Key: 0x9627F456F9DA7643!
Diffstat (limited to 'dev-python/pypy-bin')
-rw-r--r--dev-python/pypy-bin/ChangeLog23
-rw-r--r--dev-python/pypy-bin/Manifest57
-rw-r--r--dev-python/pypy-bin/files/1.9-distutils-fix_handling_of_executables_and_flags.patch391
-rw-r--r--dev-python/pypy-bin/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch11
-rw-r--r--dev-python/pypy-bin/files/1.9-get_python_lib_standard_lib-04ea518e5b71.patch24
-rw-r--r--dev-python/pypy-bin/files/1.9-getargs-freelist-c26dc70ee340.patch212
-rw-r--r--dev-python/pypy-bin/files/1.9-more-ignored-ops-146ddf82a279.patch25
-rw-r--r--dev-python/pypy-bin/files/1.9-more-ignored-ops-a9a8faa76bca.patch32
-rw-r--r--dev-python/pypy-bin/files/1.9-no-bytecode-4151f9c406b6.patch27
-rw-r--r--dev-python/pypy-bin/files/1.9-no-static-hack.patch30
-rw-r--r--dev-python/pypy-bin/files/1.9-pybuffer-release-double-decref-4ec2a5b49386.patch29
-rw-r--r--dev-python/pypy-bin/files/1.9-scripts-location.patch11
-rw-r--r--dev-python/pypy-bin/files/1.9-signal-a33052b17f4e.patch65
-rw-r--r--dev-python/pypy-bin/files/1.9-ssl-errors-25d3418150d2.patch34
-rw-r--r--dev-python/pypy-bin/files/1.9-ssl-threads-1-34b3b5aac082.patch143
-rw-r--r--dev-python/pypy-bin/files/1.9-ssl-threads-2-25cd11066d95.patch22
-rw-r--r--dev-python/pypy-bin/files/2.0.2-distutils-fix_handling_of_executables_and_flags.patch323
-rw-r--r--dev-python/pypy-bin/metadata.xml8
-rw-r--r--dev-python/pypy-bin/pypy-bin-1.9.ebuild155
-rw-r--r--dev-python/pypy-bin/pypy-bin-2.0.2.ebuild148
20 files changed, 1770 insertions, 0 deletions
diff --git a/dev-python/pypy-bin/ChangeLog b/dev-python/pypy-bin/ChangeLog
new file mode 100644
index 000000000000..d99aafadc26f
--- /dev/null
+++ b/dev-python/pypy-bin/ChangeLog
@@ -0,0 +1,23 @@
+# ChangeLog for dev-python/pypy-bin
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy-bin/ChangeLog,v 1.3 2013/07/27 11:19:19 mgorny Exp $
+
+*pypy-bin-1.9 (27 Jul 2013)
+*pypy-bin-2.0.2 (27 Jul 2013)
+
+ 27 Jul 2013; Michał Górny <mgorny@gentoo.org>
+ +files/1.9-distutils-fix_handling_of_executables_and_flags.patch, +files/1.9-d
+ istutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch,
+ +files/1.9-get_python_lib_standard_lib-04ea518e5b71.patch,
+ +files/1.9-getargs-freelist-c26dc70ee340.patch,
+ +files/1.9-more-ignored-ops-146ddf82a279.patch,
+ +files/1.9-more-ignored-ops-a9a8faa76bca.patch,
+ +files/1.9-no-bytecode-4151f9c406b6.patch, +files/1.9-no-static-hack.patch,
+ +files/1.9-pybuffer-release-double-decref-4ec2a5b49386.patch,
+ +files/1.9-scripts-location.patch, +files/1.9-signal-a33052b17f4e.patch,
+ +files/1.9-ssl-errors-25d3418150d2.patch,
+ +files/1.9-ssl-threads-1-34b3b5aac082.patch,
+ +files/1.9-ssl-threads-2-25cd11066d95.patch,
+ +files/2.0.2-distutils-fix_handling_of_executables_and_flags.patch,
+ +metadata.xml, +pypy-bin-1.9.ebuild, +pypy-bin-2.0.2.ebuild:
+ Initial versions of pypy binary packages.
diff --git a/dev-python/pypy-bin/Manifest b/dev-python/pypy-bin/Manifest
new file mode 100644
index 000000000000..098d5009b23e
--- /dev/null
+++ b/dev-python/pypy-bin/Manifest
@@ -0,0 +1,57 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX 1.9-distutils-fix_handling_of_executables_and_flags.patch 17956 SHA256 4ed9800fc851377a45ebf72c759322ebb005dd87100e2ebf634c11b418a56acf SHA512 9e4ee35c6c1286ec6a3748c747f68039d0da7b68cab6c21c6ee96caa38ef209fb31e0eec3978acb6e6c901b13aa781e8963045b86a7c00ab9668a73996317853 WHIRLPOOL df3a2b9b9e60ee06336c3ff4e469b1154a77855a0d57dfdbdab2e13719c710b93d5426bbe8e1e79c1f9934d726a0975eb1e6d108174f774c066aafdbe90f6101
+AUX 1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch 551 SHA256 dc17421bd12e4df5fed2fb1d113c9a8ca691b127631c48350aea1801c52360f1 SHA512 bdac189cbee2e4e91594bc8ea13f2477c3ab0dabec5a44bacf7a021f26d03ad5ceb813ffb38956b8a56e0791fc54c6396a909b9b40232476dd4cd6e0ee908bc0 WHIRLPOOL 035261b0659bdeeb24f6d45959dd1e218cde84dc6ded8d2ee8f9032b2311f7b5f32c6446f25aa81d6e80702d26ef8d4785e21e987282af737f6c9dfc57aa5bcf
+AUX 1.9-get_python_lib_standard_lib-04ea518e5b71.patch 943 SHA256 5be762e004de248c599191e8a896fd4f3a61f1ba86494d679bec31fe67b1da6c SHA512 c5a8a7bc618b03140d88e6c91b31eecd18572f6aa0c2c4c966a1073d90dabb4cc66529d86b965d93b4f88c64913e275b79156d1afc94129e900a72c2940a6f82 WHIRLPOOL dc0bd34b4920d9391e2d12c7dec3df78660ac46cb0194425cd6aa767c6fd9c57a4e47877029f146860a402ef21460afb8a4b52073e3a989889fbe0b9e6039948
+AUX 1.9-getargs-freelist-c26dc70ee340.patch 7143 SHA256 8a315b555324b4b7b23188e4ef6d81e14c279a3c133c7549b9b5b015e73ced63 SHA512 185d37d0918d414b540f8e72a4ddded7a6d5ab576460571de04a9eb5fc6231bdcf1337a1ef1a348c6f3b63e1f1203ec6f72199e2d31cd91b0f71c3cbd3b1f5bc WHIRLPOOL b808a09bf27c47933eeb4c13b2d6d90437ccb9968a763e4e7d86ede6b35226724da0601285db9921096db9209aea71ae76eee959155983fdb494bb25b5c3be9a
+AUX 1.9-more-ignored-ops-146ddf82a279.patch 1272 SHA256 62e1c74df6c4a0d927ebbe62fe0e4e0e26a7e844a8c4a19b964804a527cab3fe SHA512 16014c44e70300d709952130197573e169345f8e9b4dc95df1612ee55a3a4d7bd487e50c11a608aa788ff1566dc2ae5160168d36bb85505def935c5b6da6f6a9 WHIRLPOOL f02e34eca825c873a8a2250fa9f48c7818bc9bf48ee6b03065d864d927225981c29d8a95501de8720ec847ad673a497d160aa5d7ec84983a9db35d04146d8590
+AUX 1.9-more-ignored-ops-a9a8faa76bca.patch 1450 SHA256 a00b0769bd368f521adc41e2f8171902846f66afcd865e95e9b39674f58cfafe SHA512 a041a9be6cb4953445a0c928c774b48487b80b4dfb11adf778672a76aab18d1b26a9d5730d779304279d7c4accebbfaacad26667fb19e3dfde63d78d6311cf82 WHIRLPOOL 0e826326dc4356dca243b80643ed5e369080e7dd39445c05e6dda4be76772fa2edaa24a20c44284ee994ac420e8c772660b74feeaf3a488a34ea06dea0dd2c5e
+AUX 1.9-no-bytecode-4151f9c406b6.patch 1114 SHA256 6c76b9456ef1e8460b80a55f82c688704de73fe0ab027a127fae634a7b087880 SHA512 60f4d2a1915e07a035689e1a72efefb49a0f3f4b008a36559d22ca0046292b7b59240c2ae47aa9bdb92f926cdea079ec24f72ecb1a6fae4713927945d7f4d55f WHIRLPOOL 6d0cbf437bca5a9531949828afeec47f407dd2dbbcd17033dc3daee7c421d4c9e878b86110e9bf3e30b2027adbabc028723b1a4157213ec664e95f3c6844ce18
+AUX 1.9-no-static-hack.patch 1196 SHA256 820081dcd11cc829b39688eaaa95152263a360e3cdc2446e4377275e82e86117 SHA512 e77ac986aba124fe1b05a2cc2d691d00488eec7f491f60af7b9ac2a75fc9d9aaf19e3ba698ca1daaa24977890cc81d8b8c7b977a34a3d201d5e4cd5f945272c3 WHIRLPOOL 9e58202f5f8bfb0abd83ae8418c5da15ad05dff3c0cd7b26c5aa61dc50d41155310e0af3389c4bceb0ef58bbd7e13feaabafb697dac36cf9104a015880abe939
+AUX 1.9-pybuffer-release-double-decref-4ec2a5b49386.patch 1091 SHA256 1eebfb4770d20b744f831cb6f7de2675e212a758055da9c96daa2bf72c032ec1 SHA512 d822962195c4df6fc295dc5ca5d580f073df615eeb4ebb3e2837739e914676698fd5b72f8a9554633376b4f330133417e095cc30252526b24b70093a8c6a215f WHIRLPOOL 6182b1146efc96a9e32dcef44be7df66cb5b302169f0b7e47331da13e45fd88e6f52b91c9afe9e0a490d97664f73631c85b95f8478b71089de08268fda3dbe95
+AUX 1.9-scripts-location.patch 394 SHA256 d02ef738b6c82a7a671b50bdc5dc623887e97c3cb033c11ea997b88e6ccb8bdc SHA512 4566ff947ad79c1ab71fbe5999f262d045271e4ae30962ff93de0bf58d592b2d20b996ae6f6fea2139eeb2391fb33357ec9ecde2e600bad593901b391918d1f7 WHIRLPOOL 963306d68bb5d82d13da54452cbc824c82c1e45aa8eb9ff5dff8bc702b789dfbdb1f6b25daa2f40876a6dbf53a38dc61251dbb2386feb2abb38f64e6652aa239
+AUX 1.9-signal-a33052b17f4e.patch 2386 SHA256 3bbe684749f623005b9c5f6234d28924cc7cf97e147b739b3268e1e2d23b269c SHA512 9b0a856eb622b1264874a6ad4e181ea150deac181006c8d9689297fda641f5812cd509eab13a5becad93f55cd166073366922968ab312bba9dafb5f3cda257a3 WHIRLPOOL 5a454e4dc832c686b42f7a7775574a939113ef248ab4b68179ed9089ae27c92e7e8d7197c1eef936e615dd1befac01940cd518a9ce3fef301c0732406548ed58
+AUX 1.9-ssl-errors-25d3418150d2.patch 1480 SHA256 b108e679545b81ca87c391a92b9cc6a5cbf24997d6b6d543574c3fdf8916772a SHA512 db47856b499d6416f5502bcaa13b9e7120ac9e9181ff1df74a07977a6187e7f0521a78da32ffcdf4acd21ca7b120f674a69caa487de5775db0c6a03fd40cdd93 WHIRLPOOL 8e310889ffe6efb126a8f83c7310ff53da2199334d534933b7f16fd73cf7c28219c5d9a997d03274554423739d6a874c1deda7eb57ea2c49388a25f49efbf00b
+AUX 1.9-ssl-threads-1-34b3b5aac082.patch 5068 SHA256 02a8d9d5bd0e9c09ae545cf58c85e59d035d208d739adb84d778e8997d75a1d5 SHA512 1a55b72d62fc74e7d2fa4aa11294862782978d1a7f5ca6fb3f58deafb2d9aa4b54bd49a59334abb111543c798fcb817844ec19f70f88235b3046bea707bca077 WHIRLPOOL a5818b6711260a972b2af5d0cafebb47a2d887d207f25cf320ffc9488d2ea94b6ce5bbd6ae801c131ac83c0ee3cba26082e5300b8a50f36f0d0350668d1b718a
+AUX 1.9-ssl-threads-2-25cd11066d95.patch 648 SHA256 daf33460b2e7f17a45cf44331e00df84c2651a8446299700320fc75e53392f6d SHA512 cb489a6fd6b805f251b2139420992cdf7b7aec2425c6f5acd3be7d0dba7d85eae689073cd29b083685bef5696ea6c237673876e3d01f5b6b955ce8c3f3764173 WHIRLPOOL 97c6fc342b8eef9388b6df7b0a2dcceba73c7dc667e06ccb227017fb85feec1cc5e4e236f50e61a72573493daa4fb4b16d8ec2907f0f507a2364690b1afc883e
+AUX 2.0.2-distutils-fix_handling_of_executables_and_flags.patch 15206 SHA256 0e0c1ad3971abf7318c6add811caff2b755ea0e42397cfd92611d47668cf82b4 SHA512 965a10eb8de03d78d4a0b2a0dc23a5f8b9dd54ce42ef0f975cb26ef3de8c07b92f4ca1f415d41156aae3b9d0ce97b27912f7d10b06c24d2f44b371df66613fde WHIRLPOOL b830af87d2881dbf23df89980b3aed0089a4ffa38ebd99b1d93608cf5482377a7d6680a3b446227bae9f9357bbd8c814f4d083f0a057de98faf81522c3dcf15e
+DIST pypy-1.9.tar.bz2 13466551 SHA256 9fd599acade49ef98017bbce4f179f19cf2680489ff15235d3bad5b20bde0d68 SHA512 1e02f1f1ac493be35272212f2be62db17a01a95c56ffbd8c00a043587e38131e779928fef1383c61575ecb48bf4dc407b62726d30d5b5728221a612fe67ec8c3 WHIRLPOOL 5b601f31f695623c2e5f6d48ae902e07c5cdccafe415ae89878e5cf71408b31fc44fb1c173a93e66d81188503651000de219533e69071495b87d80a8d217274f
+DIST pypy-2.0.2-src.tar.bz2 14819848 SHA256 1991c90d6b98e2408b3790d4b57b71ec1c69346328b8321505ce8f6ab4544c3c SHA512 5b8b56194dff468dd249dea0014fadafb791eb69858ffae0b9c7638f087df277a84ddadc7d5b0fdb48a12ca8e6b70eb95cb5b7a5f56fe8fe3396820b814ecfd7 WHIRLPOOL bb1f71e0b2d3e145edcb1baa17b0a13c09f5229cf1b0532edbb3d0d5c87ef39543c0ef6b9dc7ce2778c4a3336d4a1580fce9cf960f82b72ddfed02e06d10d8af
+DIST pypy-bin-1.9-amd64+bzip2+jit+ncurses+shadowstack.tar.xz 9839084 SHA256 ec267c4a14739fcd86ee02c67693835b1baf46f3558ca7d8312168b90f07223f SHA512 2b90a9ea4940cbdc6d7fcc0559911c1f6c4fe76cbb716e4c68d93f80952913eb332b428e9d59f68ed1bc060ee82a3c04f71964e8ee96a17962302ffc9456929e WHIRLPOOL 78380dd825a3177bf645e663b230e07729b59c27041e3dbe1f3e337cc41888f05b2fa986746ea5f423a5d268bdca2e1abbc199ba34cf21719538dd05a780b3df
+DIST pypy-bin-1.9-amd64+bzip2+jit+ncurses.tar.xz 11523396 SHA256 c4bf8a532ca222566185d8667c317975513d2bd670219f92569f93f12c0495f2 SHA512 806a9d492ad2e8d8f2d8d26a6bb61022860585fc4a01abefcd34c32b653578ffa209220ba1ea9a355e4caedf01fb639125ece0f3c0c1e8f5e5830b901193818f WHIRLPOOL cb291165b3fcc48f639f76adeac19b9ff904fa7008c0ad49f731ea0c3cd531de97962a5f8e911746dd8139ffc0e388616f542a499f9b857ebf5b831de4cd1ca6
+DIST pypy-bin-1.9-amd64+bzip2+ncurses.tar.xz 6655300 SHA256 f41798b5ccb15a989fa48ea87c26b2119b558deba257d77e4b1b7db00692e5be SHA512 85d05e76eb551bddc37635b0c6db1272f64af77389e3670d001540cd44db9f13b425f68e2fc9cb78108838cf2465ae7793b20963581f068000be956652eb4dfd WHIRLPOOL 0cbd0f7c606f491cf7d9d012a217f8af8f6e12b744c44d3f9c1c3955b9988f99a1c8e42ad74c7eca281aa40bc2b0aff27b5c9befcf9c038bb34ef80043713788
+DIST pypy-bin-1.9-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.xz 8768436 SHA256 8a1ec5e609a1404d147720bea5ce66e3971c380fd66d754281334333fea695c5 SHA512 f360ed405b570545abd813d7b1dd037da41d6fa0a382998528ab282959e5c933bf91d4b0a536b264de97368c41df2ce3edc5e7626d5c9d4971b3f927a235d4b4 WHIRLPOOL 2e02059eae784f12eab7abe6f31bdaaf643f9dfa06cca3d86e35867eadbdf34f5a63f9cb6d416c72a38ca83998d3d3c2fee70b629c9328b5042b506e63b265c5
+DIST pypy-bin-1.9-x86+bzip2+jit+ncurses+sse2.tar.xz 11135960 SHA256 31c8e3ba0e90ee88e968d63f893edd2e7c75d0e646106a256d0bf092cbffdc4f SHA512 38a9c44cae77303ad7da064011e9f927dcdd95b54e5fd5c7828b4275f8aa7101686fd393ce1620ebf26e1c44cc8c503cb6a2b2821f105e151997cf6e9c38638b WHIRLPOOL 3afcd044851a19d3970d070b44314e375e47ed325c0170fe1387b4b3bdb7f366217282981aff001f8bfbed3be14f81d5a7a5ec64db48f259f753f7a9fc2420cb
+DIST pypy-bin-1.9-x86+bzip2+ncurses+sse2.tar.xz 5697252 SHA256 7ef4069cfdc315ec1d7168860d4275ce27dc833882c745c1b7387ea5af2b4f96 SHA512 20cad1c014d35a48835164ac4c46472efd1e13b2c00110fc32bba196c176e668a4dd688d3adba82e1853acbf63684d54a4d8d109add3084fd8ec30a8123e6a79 WHIRLPOOL 6625aade9a3a494605792a42920e80e4e6370911d04a9ccc386c90ecaab171f88f8ba02144765d49dfea0097af19f0719525d3cfdd212e6a2ca60c658c6229fa
+DIST pypy-bin-1.9-x86+bzip2+ncurses.tar.xz 5709220 SHA256 e9a9e1a19afd972d16c72e87518d269ae52b6ac80733c0a5afc58b95b18f0496 SHA512 bc651f4077e9c8481b0d8b618e9d274a0742d8be3d4ab7a26310c5c0101d5e28c7738182d3e47814f396ef36094b70cbb0f5e055e8ef130fe3d8e287dccba555 WHIRLPOOL 30c76a264725d8626ce6ff1d0dab6b10f52eff0970735b0fa43351c872bf9e33e84a7d420b127708fd523b444cfc6a9e2f88d3539bd41806d84482a92ca10b63
+DIST pypy-bin-2.0.2-amd64+bzip2+jit+ncurses+shadowstack.tar.xz 9652340 SHA256 100c1119fe08c47d1a15ca6c98b91c510f41c670d87526fb392e3b292d791ac3 SHA512 ac8d91e740fc8a49860ec47717b160a59ac68807aabd8ddc3a578682d6d75d3ddd47bc5e8b7db6e2be0af5f9414596831372225ab657194ba72d22c2360f98c0 WHIRLPOOL 5dc07128fc8db9df062053803a2792eb6f3795cf2cdef5d011a594c73a158bb4061fcd862c39eb074805f0b4e46d0846708f3fd0fdf3464b02cbe8efa406bb1f
+DIST pypy-bin-2.0.2-amd64+bzip2+jit+ncurses.tar.xz 10469416 SHA256 4f8a64d8cc679b8ba6751fc47307df679bca2658848d009c8c724682c76fbf0a SHA512 1d1bedc80d12982074a09516674bee71e57bac9b2b9dac1d9834295edb3b8fb79c0e93de708eef0dbf232dd198a4a728b09a9f86ab5dabad8a293072446b2a2b WHIRLPOOL 08753da5e1e6361bd21b03813cb4482164cc2933d8bf2a2d7443379b1be1b6ac0b87fde571af8519e7fa9e14893bb570799ad6dae02ba42a936dc4d964b0e821
+DIST pypy-bin-2.0.2-amd64+bzip2+ncurses.tar.xz 6527192 SHA256 ff2ac88da94978388b20d54b0a2add839facc5e605c54cc7bfd96faa088ec266 SHA512 58b9e6acc9038b4aeccadf0f1dd257b320cca8e536edd2835c0d9b95f27268b3b71e3af59daa4033580f2fc43f590205e1ed6de2fe475c60cf00c1a781ad1f86 WHIRLPOOL b5410e2b7a0816dffb64b32169be82193820c345d5b4000dc3fd8f827ce82a783fe62605efc0be7794d38dbdeb59d68cf0ac46c62f24f4a8025a2506739db4d1
+DIST pypy-bin-2.0.2-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.xz 7754056 SHA256 b10da2cede4c04299730ac3e001b269b81c42584b8b09bff78098fe94218a78c SHA512 b512b67a4de9bdacb1f4e13888fefd4ed2ca4bb9ca3ffecafa825e6ddc36bb62cd4eff34e23c8f9a4baf9f601544cdb59d5249a240932109d98dba532e2915d1 WHIRLPOOL 187cbe9e2778243ff7c82ca4fa25705ff78be216dc66547a4f4f4b78eba4854ce11b843170b76cb17ea34d85647dfbdb664b4394c3641ffe364e2f91eb21e9aa
+DIST pypy-bin-2.0.2-x86+bzip2+jit+ncurses+sse2.tar.xz 9000040 SHA256 cc27253d53cca461e4d4aa8ca3943cae783d4d6389b99d3b7f9f88055d3cf6bf SHA512 90fa4762933a3cbed297a5eb8f1e95fbc70ba02286fc66beb012f27dde1cd06c8eeff0fa2d4a32586d84acbda2608530880d3cc14ea099e3debd239d3c154780 WHIRLPOOL e5a241d3b15aff2bda92f578c2aed7ccc9fbb68f45baaad75eb7229a30dcaabefd6d81cb883f4de7122459a91c521a8c1e6f332500a3f73fa546a42a2e60cfde
+DIST pypy-bin-2.0.2-x86+bzip2+ncurses+sse2.tar.xz 5132392 SHA256 8d434ca55cf969016e0c739b4671b97981f9af36b3937c4f4c1acba4d54df8fc SHA512 cb7ba91f1bb6b67f540e5b573bcc27ae92741407e44e204fb401a6ac38653ecdd2a3084b53216f3ed209279a3d01725d2b7d174e6f7d1038da80d448d40b00f1 WHIRLPOOL d171742333d7209ce2dcd50b0ab8bd2e6382c8bb9f0d7a5d69d2268217afdd155abf5c41a96f9bad18c2606b2f554b7a8ef2f1e943ae41412270582b476cd345
+DIST pypy-bin-2.0.2-x86+bzip2+ncurses.tar.xz 5137536 SHA256 c34e60673346b59022560608f633962dee47d79b96e4015677e86f507ad61248 SHA512 0d737a7d5018d6a4d70d3c0921ed4d8882bce4e6f9ff2b9742ab1763cc760a4ed22fcf683e4e7a1693f35897fa4d20500e6d5a31803e34b15175f4081a2ec6d8 WHIRLPOOL 04de2b1aa32f1a098d38b2b0512822c24385bed9db94f0cad03611a45e189812654f2f33ea6dad1a71a77bab878a8109ddf9c8873dc127a49352adac2a8ff7df
+EBUILD pypy-bin-1.9.ebuild 4740 SHA256 1b9f748cb74d52337cdc3f175d045c96fa47200325ec848307a2859bee1a94f4 SHA512 c0d74959c4008639e5d888d636ab4d13fd0442e526e52f26df48ab9bccb6a921c3537ac568e33e77dd4d57f05406cd95db8a9e6856cfdda2311a05a4482f188f WHIRLPOOL 2e61b5f4f61d1468a6f8fb02c7aabbb83b8c6016a93132fe73e1e1882b7044678db42d68fb36e4b11b26c0a4b7810705b10073436d719d78f56fa0fb33ddf825
+EBUILD pypy-bin-2.0.2.ebuild 4176 SHA256 704e70f8f86dd4225e4814b6f49378b07a6978dee76d921356c1cc672138373c SHA512 f41e4c64975f4886fa7271573bf8eb07083aac6ebafeb9e8e8cb4b8e4c361fa4c0f459b3d6bd2a61d9961ba3fb63108439f1dc2105ce5c5324f6efac62c7073f WHIRLPOOL 45f3a6dc96044bfecbdb06122b5324645e85fc564b92afef21f16afa6edf1ac7d325d62c8213d3b3a2516b58fd7e20e818d465b90ad7bc744bc523245dc5d0df
+MISC ChangeLog 1217 SHA256 6dc81ab3c0a4d3879a6d81f9d5ef6ce5a86a11eba7c14cba03b81a0d60227394 SHA512 c2aab99c4c6f4369993281861eaec51fc71053859fab14a58713ca24a08cc446ae13e8a4353a6b587ad52fdd1519931df60b1e61800895388b428c2fe76805df WHIRLPOOL 4bce110756dde4c1922021cba9f1307d288c434db2117725ee9ed79face3e6f601fec8264c947d9914f31193a0f1cbcfe0b996e6a0f46a00a3d58d7d7348f567
+MISC metadata.xml 249 SHA256 a2c50ffd8096682a92b858f54a0aa46ac29ff426f1ef11057fedf3054060e1f1 SHA512 2d38cb5eccf89da9c9e75e7c779395965d7b43aa4981743bdef00fd6f03bd853e4f309ed7f7add533c0104e2d9f93f135ca3b78d90c1ba10d2a251cc64a33278 WHIRLPOOL 9c8004d9523e09bbda0a71dfe7df416f891e08f35fd2d5b8218709a2a110303f15c9d5e37c5d0fd45df5e95b8032da315a40c7af5967ab4acf03f0d8ce3c170f
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.20 (GNU/Linux)
+
+iQJ8BAEBCABmBQJR86zOXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRGRDhEM0MyMERDMzNBMkYzQzJFRTI3QjE5
+NjI3RjQ1NkY5REE3NjQzAAoJEJYn9Fb52nZD6EUP+wb2ZgDm/GqvUJFG8+3EE9GN
+Izf4SDCXGIh4ELH4FowwTia/ZiE/NVG5/humsNYQv8K5h/53VC8eODgBuYrB5bHd
+Mg6aM5FJE31jC1lnpjK3rgYUMbWTr25s+HVvSmz8EN+VnwuZAEq694iAN6N/ebyX
+r0lIkGW3EqvqaRMNpcTfQszLbqUzuYqQ07zmEUcJOIiS45eO8IiUlTAEsBNRYRSA
+c6cCQnD+s1ifKhp1O9EvmaQTDKh48o958IqWDL+udzcVGszRPywUwF4reZFk/ApQ
+WIv5Ah4+9xpMfDseowGYJNxEGcxPAaN6L3K2lXb8mAI9IA1SOafvw1vEXTZ9EYTF
+w4jWo7Y1EGGyOc6ie3YJTfK3fwLAR/z8JJdX/+/wer82AX7xDI3P5hEl7cw53DiV
+MPujfYfnuabyhBYp/5aWUuXdxCTR0Wnm9L018X3wYnw1U2j9o6lx4ONunGhxGUhX
+0Fdh5QagCF7ovUt8rA5MUgfS1xmAHwLoU52u4Mgq6lyN/SSk7X2Dy+vufCgMPOKc
+oqdkhP7mXCGmsNELR9TxS+FwS/oOJ+yjY1n3hMZOwGF3MZE2jKoOlHZqNhlviNcV
+QZK0gt3cIykzOnigvXpvD1Te3Oh6h4Bw3y2jccw7QGvgdO6J+WXlSbkPM35yyPq1
+pByt5Uz3LBVEkR5Cw8Ny
+=apRy
+-----END PGP SIGNATURE-----
diff --git a/dev-python/pypy-bin/files/1.9-distutils-fix_handling_of_executables_and_flags.patch b/dev-python/pypy-bin/files/1.9-distutils-fix_handling_of_executables_and_flags.patch
new file mode 100644
index 000000000000..4a35ea8cb3c7
--- /dev/null
+++ b/dev-python/pypy-bin/files/1.9-distutils-fix_handling_of_executables_and_flags.patch
@@ -0,0 +1,391 @@
+--- lib-python/2.7/distutils/ccompiler.py
++++ lib-python/2.7/distutils/ccompiler.py
+@@ -27,10 +27,16 @@
+ varies across Unices and is stored in Python's Makefile.
+ """
+ if compiler.compiler_type == "unix":
+- (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
+- _sysconfig.get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
+- 'CCSHARED', 'LDSHARED', 'SO', 'AR',
+- 'ARFLAGS')
++ cc = ' '.join(compiler.compiler)
++ cxx = ' '.join(compiler.compiler_cxx)
++ ldshared = ' '.join(compiler.linker_so)
++ ldcxxshared = ' '.join(compiler.linker_so_cxx)
++ ar = compiler.archiver[0]
++
++ cflags = ''
++ cxxflags = ''
++ ccshared = '-fPIC'
++ ar_flags = compiler.archiver[1]
+
+ if 'CC' in os.environ:
+ cc = os.environ['CC']
+@@ -38,19 +44,27 @@
+ cxx = os.environ['CXX']
+ if 'LDSHARED' in os.environ:
+ ldshared = os.environ['LDSHARED']
++ if 'LDCXXSHARED' in os.environ:
++ ldcxxshared = os.environ['LDCXXSHARED']
+ if 'CPP' in os.environ:
+ cpp = os.environ['CPP']
+ else:
+ cpp = cc + " -E" # not always
+ if 'LDFLAGS' in os.environ:
+ ldshared = ldshared + ' ' + os.environ['LDFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
+ if 'CFLAGS' in os.environ:
+- cflags = opt + ' ' + os.environ['CFLAGS']
++ cflags = os.environ['CFLAGS']
+ ldshared = ldshared + ' ' + os.environ['CFLAGS']
++ if 'CXXFLAGS' in os.environ:
++ cxxflags = os.environ['CXXFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
+ if 'CPPFLAGS' in os.environ:
+ cpp = cpp + ' ' + os.environ['CPPFLAGS']
+ cflags = cflags + ' ' + os.environ['CPPFLAGS']
++ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
+ ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
+ if 'AR' in os.environ:
+ ar = os.environ['AR']
+ if 'ARFLAGS' in os.environ:
+@@ -59,17 +73,19 @@
+ archiver = ar + ' ' + ar_flags
+
+ cc_cmd = cc + ' ' + cflags
++ cxx_cmd = cxx + ' ' + cxxflags
+ compiler.set_executables(
+ preprocessor=cpp,
+ compiler=cc_cmd,
+ compiler_so=cc_cmd + ' ' + ccshared,
+- compiler_cxx=cxx,
++ compiler_cxx=cxx_cmd,
++ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
+ linker_so=ldshared,
+ linker_exe=cc,
++ linker_so_cxx=ldcxxshared,
++ linker_exe_cxx=cxx,
+ archiver=archiver)
+
+- compiler.shared_lib_extension = so_ext
+-
+ class CCompiler:
+ """Abstract base class to define the interface that must be implemented
+ by real compiler classes. Also has some utility methods used by
+--- lib-python/2.7/distutils/cygwinccompiler.py
++++ lib-python/2.7/distutils/cygwinccompiler.py
+@@ -135,9 +135,13 @@
+ self.set_executables(compiler='gcc -mcygwin -O -Wall',
+ compiler_so='gcc -mcygwin -mdll -O -Wall',
+ compiler_cxx='g++ -mcygwin -O -Wall',
++ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
+ linker_exe='gcc -mcygwin',
+ linker_so=('%s -mcygwin %s' %
+- (self.linker_dll, shared_option)))
++ (self.linker_dll, shared_option)),
++ linker_exe_cxx='g++ -mcygwin',
++ linker_so_cxx=('%s -mcygwin %s' %
++ (self.linker_dll, shared_option)))
+
+ # cygwin and mingw32 need different sets of libraries
+ if self.gcc_version == "2.91.57":
+@@ -163,8 +167,12 @@
+ raise CompileError, msg
+ else: # for other files use the C-compiler
+ try:
+- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
+- extra_postargs)
++ if self.detect_language(src) == 'c++':
++ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
++ extra_postargs)
++ else:
++ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
++ extra_postargs)
+ except DistutilsExecError, msg:
+ raise CompileError, msg
+
+@@ -325,10 +333,15 @@
+ self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
+ compiler_so='gcc -mno-cygwin -mdll -O -Wall',
+ compiler_cxx='g++ -mno-cygwin -O -Wall',
++ compiler_so_cxx='g++ -mno-cygwin -mdll -O -Wall',
+ linker_exe='gcc -mno-cygwin',
+ linker_so='%s -mno-cygwin %s %s'
+ % (self.linker_dll, shared_option,
+- entry_point))
++ entry_point),
++ linker_exe_cxx='g++ -mno-cygwin',
++ linker_so_cxx='%s -mno-cygwin %s %s'
++ % (self.linker_dll, shared_option,
++ entry_point))
+ # Maybe we should also append -mthreads, but then the finished
+ # dlls need another dll (mingwm10.dll see Mingw32 docs)
+ # (-mthreads: Support thread-safe exception handling on `Mingw32')
+--- lib-python/2.7/distutils/emxccompiler.py
++++ lib-python/2.7/distutils/emxccompiler.py
+@@ -65,8 +65,12 @@
+ # XXX optimization, warnings etc. should be customizable.
+ self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
+ compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
++ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
++ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
+ linker_exe='gcc -Zomf -Zmt -Zcrtdll',
+- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
++ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll',
++ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll',
++ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll')
+
+ # want the gcc library statically linked (so that we don't have
+ # to distribute a version dependent on the compiler we have)
+@@ -83,8 +87,12 @@
+ raise CompileError, msg
+ else: # for other files use the C-compiler
+ try:
+- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
+- extra_postargs)
++ if self.detect_language(src) == 'c++':
++ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
++ extra_postargs)
++ else:
++ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
++ extra_postargs)
+ except DistutilsExecError, msg:
+ raise CompileError, msg
+
+--- lib-python/2.7/distutils/sysconfig_cpython.py
++++ lib-python/2.7/distutils/sysconfig_cpython.py
+@@ -149,9 +149,12 @@
+ varies across Unices and is stored in Python's Makefile.
+ """
+ if compiler.compiler_type == "unix":
+- (cc, cxx, opt, cflags, ccshared, ldshared, so_ext) = \
+- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
+- 'CCSHARED', 'LDSHARED', 'SO')
++ (cc, cxx, ccshared, ldshared, ldcxxshared, so_ext) = \
++ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED',
++ 'LDCXXSHARED', 'SO')
++
++ cflags = ''
++ cxxflags = ''
+
+ if 'CC' in os.environ:
+ cc = os.environ['CC']
+@@ -159,28 +162,40 @@
+ cxx = os.environ['CXX']
+ if 'LDSHARED' in os.environ:
+ ldshared = os.environ['LDSHARED']
++ if 'LDCXXSHARED' in os.environ:
++ ldcxxshared = os.environ['LDCXXSHARED']
+ if 'CPP' in os.environ:
+ cpp = os.environ['CPP']
+ else:
+ cpp = cc + " -E" # not always
+ if 'LDFLAGS' in os.environ:
+ ldshared = ldshared + ' ' + os.environ['LDFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
+ if 'CFLAGS' in os.environ:
+- cflags = opt + ' ' + os.environ['CFLAGS']
++ cflags = os.environ['CFLAGS']
+ ldshared = ldshared + ' ' + os.environ['CFLAGS']
++ if 'CXXFLAGS' in os.environ:
++ cxxflags = os.environ['CXXFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
+ if 'CPPFLAGS' in os.environ:
+ cpp = cpp + ' ' + os.environ['CPPFLAGS']
+ cflags = cflags + ' ' + os.environ['CPPFLAGS']
++ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
+ ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
+
+ cc_cmd = cc + ' ' + cflags
++ cxx_cmd = cxx + ' ' + cxxflags
+ compiler.set_executables(
+ preprocessor=cpp,
+ compiler=cc_cmd,
+ compiler_so=cc_cmd + ' ' + ccshared,
+- compiler_cxx=cxx,
++ compiler_cxx=cxx_cmd,
++ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
+ linker_so=ldshared,
+- linker_exe=cc)
++ linker_exe=cc,
++ linker_so_cxx=ldcxxshared,
++ linker_exe_cxx=cxx)
+
+ compiler.shared_lib_extension = so_ext
+
+@@ -506,7 +521,7 @@
+ for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
+ # a number of derived variables. These need to be
+ # patched up as well.
+- 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
++ 'CFLAGS', 'CXXFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
+ flags = _config_vars[key]
+ flags = re.sub('-arch\s+\w+\s', ' ', flags)
+ flags = re.sub('-isysroot [^ \t]*', ' ', flags)
+@@ -525,7 +540,7 @@
+ for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
+ # a number of derived variables. These need to be
+ # patched up as well.
+- 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
++ 'CFLAGS', 'CXXFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
+
+ flags = _config_vars[key]
+ flags = re.sub('-arch\s+\w+\s', ' ', flags)
+@@ -549,7 +564,7 @@
+ for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
+ # a number of derived variables. These need to be
+ # patched up as well.
+- 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
++ 'CFLAGS', 'CXXFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
+
+ flags = _config_vars[key]
+ flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags)
+--- lib-python/2.7/distutils/sysconfig_pypy.py
++++ lib-python/2.7/distutils/sysconfig_pypy.py
+@@ -114,13 +114,56 @@
+ optional C speedup components.
+ """
+ if compiler.compiler_type == "unix":
+- compiler.compiler_so.extend(['-fPIC', '-Wimplicit'])
++ cc = ' '.join(compiler.compiler)
++ cxx = ' '.join(compiler.compiler_cxx)
++ ldshared = ' '.join(compiler.linker_so)
++ ldcxxshared = ' '.join(compiler.linker_so_cxx)
++
++ cflags = ''
++ cxxflags = ''
++ ccshared = '-fPIC'
++
++ if 'CC' in os.environ:
++ cc = os.environ['CC']
++ if 'CXX' in os.environ:
++ cxx = os.environ['CXX']
++ if 'LDSHARED' in os.environ:
++ ldshared = os.environ['LDSHARED']
++ if 'LDCXXSHARED' in os.environ:
++ ldcxxshared = os.environ['LDCXXSHARED']
++ if 'CPP' in os.environ:
++ cpp = os.environ['CPP']
++ else:
++ cpp = cc + " -E" # not always
++ if 'LDFLAGS' in os.environ:
++ ldshared = ldshared + ' ' + os.environ['LDFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
++ if 'CFLAGS' in os.environ:
++ cflags = os.environ['CFLAGS']
++ ldshared = ldshared + ' ' + os.environ['CFLAGS']
++ if 'CXXFLAGS' in os.environ:
++ cxxflags = os.environ['CXXFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
++ if 'CPPFLAGS' in os.environ:
++ cpp = cpp + ' ' + os.environ['CPPFLAGS']
++ cflags = cflags + ' ' + os.environ['CPPFLAGS']
++ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
++ ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
++
++ cc_cmd = cc + ' ' + cflags
++ cxx_cmd = cxx + ' ' + cxxflags
++ compiler.set_executables(
++ preprocessor=cpp,
++ compiler=cc_cmd,
++ compiler_so=cc_cmd + ' ' + ccshared,
++ compiler_cxx=cxx_cmd,
++ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
++ linker_so=ldshared,
++ linker_exe=cc,
++ linker_so_cxx=ldcxxshared,
++ linker_exe_cxx=cxx)
+ compiler.shared_lib_extension = get_config_var('SO')
+- if "CFLAGS" in os.environ:
+- cflags = os.environ["CFLAGS"]
+- compiler.compiler.append(cflags)
+- compiler.compiler_so.append(cflags)
+- compiler.linker_so.append(cflags)
+
+
+ from sysconfig_cpython import (
+--- lib-python/2.7/distutils/unixccompiler.py
++++ lib-python/2.7/distutils/unixccompiler.py
+@@ -114,14 +114,17 @@
+ # are pretty generic; they will probably have to be set by an outsider
+ # (eg. using information discovered by the sysconfig about building
+ # Python extensions).
+- executables = {'preprocessor' : None,
+- 'compiler' : ["cc"],
+- 'compiler_so' : ["cc"],
+- 'compiler_cxx' : ["cc"],
+- 'linker_so' : ["cc", "-shared"],
+- 'linker_exe' : ["cc"],
+- 'archiver' : ["ar", "-cr"],
+- 'ranlib' : None,
++ executables = {'preprocessor' : None,
++ 'compiler' : ["cc"],
++ 'compiler_so' : ["cc"],
++ 'compiler_cxx' : ["c++"],
++ 'compiler_so_cxx' : ["c++"],
++ 'linker_so' : ["cc", "-shared"],
++ 'linker_exe' : ["cc"],
++ 'linker_so_cxx' : ["c++", "-shared"],
++ 'linker_exe_cxx' : ["c++"],
++ 'archiver' : ["ar", "-cr"],
++ 'ranlib' : None,
+ }
+
+ if sys.platform[:6] == "darwin":
+@@ -186,11 +189,18 @@
+
+ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
+ compiler_so = self.compiler_so
++ compiler_so_cxx = self.compiler_so_cxx
+ if sys.platform == 'darwin':
+ compiler_so = _darwin_compiler_fixup(compiler_so, cc_args + extra_postargs)
++ compiler_so_cxx = _darwin_compiler_fixup(compiler_so_cxx, cc_args +
++ extra_postargs)
+ try:
+- self.spawn(compiler_so + cc_args + [src, '-o', obj] +
+- extra_postargs)
++ if self.detect_language(src) == 'c++':
++ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
++ extra_postargs)
++ else:
++ self.spawn(compiler_so + cc_args + [src, '-o', obj] +
++ extra_postargs)
+ except DistutilsExecError, msg:
+ raise CompileError, msg
+
+@@ -247,23 +257,16 @@
+ ld_args.extend(extra_postargs)
+ self.mkpath(os.path.dirname(output_filename))
+ try:
+- if target_desc == CCompiler.EXECUTABLE:
+- linker = self.linker_exe[:]
++ if target_lang == "c++":
++ if target_desc == CCompiler.EXECUTABLE:
++ linker = self.linker_exe_cxx[:]
++ else:
++ linker = self.linker_so_cxx[:]
+ else:
+- linker = self.linker_so[:]
+- if target_lang == "c++" and self.compiler_cxx:
+- # skip over environment variable settings if /usr/bin/env
+- # is used to set up the linker's environment.
+- # This is needed on OSX. Note: this assumes that the
+- # normal and C++ compiler have the same environment
+- # settings.
+- i = 0
+- if os.path.basename(linker[0]) == "env":
+- i = 1
+- while '=' in linker[i]:
+- i = i + 1
+-
+- linker[i] = self.compiler_cxx[i]
++ if target_desc == CCompiler.EXECUTABLE:
++ linker = self.linker_exe[:]
++ else:
++ linker = self.linker_so[:]
+
+ if sys.platform == 'darwin':
+ linker = _darwin_compiler_fixup(linker, ld_args)
diff --git a/dev-python/pypy-bin/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch b/dev-python/pypy-bin/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch
new file mode 100644
index 000000000000..b3d5235000d5
--- /dev/null
+++ b/dev-python/pypy-bin/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch
@@ -0,0 +1,11 @@
+--- lib-python/2.7/distutils/unixccompiler.py
++++ lib-python/2.7/distutils/unixccompiler.py
+@@ -297,7 +297,7 @@
+ # this time, there's no way to determine this information from
+ # the configuration data stored in the Python installation, so
+ # we use this hack.
+- compiler = os.path.basename(sysconfig.get_config_var("CC"))
++ compiler = os.path.basename(self.compiler[0])
+ if sys.platform[:6] == "darwin":
+ # MacOSX's linker doesn't understand the -R flag at all
+ return "-L" + dir
diff --git a/dev-python/pypy-bin/files/1.9-get_python_lib_standard_lib-04ea518e5b71.patch b/dev-python/pypy-bin/files/1.9-get_python_lib_standard_lib-04ea518e5b71.patch
new file mode 100644
index 000000000000..e6c98a50b34e
--- /dev/null
+++ b/dev-python/pypy-bin/files/1.9-get_python_lib_standard_lib-04ea518e5b71.patch
@@ -0,0 +1,24 @@
+changeset: 55566:04ea518e5b71
+parent: 55554:fa1ecb3a52df
+user: Armin Rigo <arigo@tunes.org>
+date: Mon Jun 11 10:28:26 2012 +0200
+summary: issue1164: get_python_lib(standard_lib=1) should probably just
+
+diff -r fa1ecb3a52df -r 04ea518e5b71 lib-python/2.7/distutils/sysconfig_pypy.py
+--- a/lib-python/2.7/distutils/sysconfig_pypy.py Sun Jun 10 23:49:16 2012 +0300
++++ b/lib-python/2.7/distutils/sysconfig_pypy.py Mon Jun 11 10:28:26 2012 +0200
+@@ -39,11 +39,10 @@
+ If 'prefix' is supplied, use it instead of sys.prefix or
+ sys.exec_prefix -- i.e., ignore 'plat_specific'.
+ """
+- if standard_lib:
+- raise DistutilsPlatformError(
+- "calls to get_python_lib(standard_lib=1) cannot succeed")
+ if prefix is None:
+ prefix = PREFIX
++ if standard_lib:
++ return os.path.join(prefix, "lib-python", get_python_version())
+ return os.path.join(prefix, 'site-packages')
+
+
+
diff --git a/dev-python/pypy-bin/files/1.9-getargs-freelist-c26dc70ee340.patch b/dev-python/pypy-bin/files/1.9-getargs-freelist-c26dc70ee340.patch
new file mode 100644
index 000000000000..70619dce18f7
--- /dev/null
+++ b/dev-python/pypy-bin/files/1.9-getargs-freelist-c26dc70ee340.patch
@@ -0,0 +1,212 @@
+# HG changeset patch
+# User Armin Rigo <arigo@tunes.org>
+# Date 1339595299 -7200
+# Node ID c26dc70ee34018efeec8b789d40ec78478304bc0
+# Parent c7dff5469611f03946466caed17c567c4ea5d8d0
+Fix for the issue of abuse of PyCapsules, relying on immediate
+destruction, as CPython does. This problem was first described in
+https://bazaar.launchpad.net/~exarkun/pyopenssl/trunk/revision/166.
+The fix is rather obvious and consist in a *negative* total amount
+of lines :-/
+
+diff -r c7dff5469611f03946466caed17c567c4ea5d8d0 -r c26dc70ee34018efeec8b789d40ec78478304bc0 pypy/module/cpyext/src/getargs.c
+--- a/pypy/module/cpyext/src/getargs.c Wed Jun 13 13:19:05 2012 +0200
++++ b/pypy/module/cpyext/src/getargs.c Wed Jun 13 15:48:19 2012 +0200
+@@ -24,14 +24,15 @@
+
+
+ /* Forward */
++typedef struct freelist_s freelist_t;
+ static int vgetargs1(PyObject *, const char *, va_list *, int);
+ static void seterror(int, const char *, int *, const char *, const char *);
+ static char *convertitem(PyObject *, const char **, va_list *, int, int *,
+- char *, size_t, PyObject **);
++ char *, size_t, freelist_t **);
+ static char *converttuple(PyObject *, const char **, va_list *, int,
+- int *, char *, size_t, int, PyObject **);
++ int *, char *, size_t, int, freelist_t **);
+ static char *convertsimple(PyObject *, const char **, va_list *, int, char *,
+- size_t, PyObject **);
++ size_t, freelist_t **);
+ static Py_ssize_t convertbuffer(PyObject *, void **p, char **);
+ static int getbuffer(PyObject *, Py_buffer *, char**);
+
+@@ -128,72 +129,45 @@
+
+ /* Handle cleanup of allocated memory in case of exception */
+
+-#define GETARGS_CAPSULE_NAME_CLEANUP_PTR "getargs.cleanup_ptr"
+-#define GETARGS_CAPSULE_NAME_CLEANUP_BUFFER "getargs.cleanup_buffer"
++typedef void (*cleanup_fn)(void *);
+
+-static void
+-cleanup_ptr(PyObject *self)
+-{
+- void *ptr = PyCapsule_GetPointer(self, GETARGS_CAPSULE_NAME_CLEANUP_PTR);
+- if (ptr) {
+- PyMem_FREE(ptr);
+- }
+-}
++struct freelist_s {
++ void *ptr;
++ cleanup_fn destr;
++ struct freelist_s *next;
++};
+
+-static void
+-cleanup_buffer(PyObject *self)
+-{
+- Py_buffer *ptr = (Py_buffer *)PyCapsule_GetPointer(self, GETARGS_CAPSULE_NAME_CLEANUP_BUFFER);
+- if (ptr) {
+- PyBuffer_Release(ptr);
+- }
+-}
++#define cleanup_ptr ((cleanup_fn)PyMem_FREE)
++#define cleanup_buffer ((cleanup_fn)PyBuffer_Release)
+
+ static int
+-addcleanup(void *ptr, PyObject **freelist, PyCapsule_Destructor destr)
++addcleanup(void *ptr, freelist_t **freelist, cleanup_fn destr)
+ {
+- PyObject *cobj;
+- const char *name;
+-
+- if (!*freelist) {
+- *freelist = PyList_New(0);
+- if (!*freelist) {
+- destr(ptr);
+- return -1;
+- }
+- }
+-
+- if (destr == cleanup_ptr) {
+- name = GETARGS_CAPSULE_NAME_CLEANUP_PTR;
+- } else if (destr == cleanup_buffer) {
+- name = GETARGS_CAPSULE_NAME_CLEANUP_BUFFER;
+- } else {
+- return -1;
+- }
+- cobj = PyCapsule_New(ptr, name, destr);
+- if (!cobj) {
++ freelist_t *node = PyMem_MALLOC(sizeof(freelist_t));
++ if (!node) {
+ destr(ptr);
+ return -1;
+ }
+- if (PyList_Append(*freelist, cobj)) {
+- Py_DECREF(cobj);
+- return -1;
+- }
+- Py_DECREF(cobj);
++ node->ptr = ptr;
++ node->destr = destr;
++ node->next = *freelist;
++ *freelist = node;
+ return 0;
+ }
+
+ static int
+-cleanreturn(int retval, PyObject *freelist)
++cleanreturn(int retval, freelist_t *freelist)
+ {
+- if (freelist && retval != 0) {
+- /* We were successful, reset the destructors so that they
+- don't get called. */
+- Py_ssize_t len = PyList_GET_SIZE(freelist), i;
+- for (i = 0; i < len; i++)
+- PyCapsule_SetDestructor(PyList_GET_ITEM(freelist, i), NULL);
++ freelist_t *next;
++ while (freelist != NULL) {
++ if (retval == 0) {
++ /* Leaving with an error */
++ freelist->destr(freelist->ptr);
++ }
++ next = freelist->next;
++ PyMem_FREE(freelist);
++ freelist = next;
+ }
+- Py_XDECREF(freelist);
+ return retval;
+ }
+
+@@ -212,7 +186,7 @@
+ const char *formatsave = format;
+ Py_ssize_t i, len;
+ char *msg;
+- PyObject *freelist = NULL;
++ freelist_t *freelist = NULL;
+ int compat = flags & FLAG_COMPAT;
+
+ assert(compat || (args != (PyObject*)NULL));
+@@ -412,7 +386,7 @@
+ static char *
+ converttuple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
+ int *levels, char *msgbuf, size_t bufsize, int toplevel,
+- PyObject **freelist)
++ freelist_t **freelist)
+ {
+ int level = 0;
+ int n = 0;
+@@ -488,7 +462,7 @@
+
+ static char *
+ convertitem(PyObject *arg, const char **p_format, va_list *p_va, int flags,
+- int *levels, char *msgbuf, size_t bufsize, PyObject **freelist)
++ int *levels, char *msgbuf, size_t bufsize, freelist_t **freelist)
+ {
+ char *msg;
+ const char *format = *p_format;
+@@ -569,7 +543,7 @@
+
+ static char *
+ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
+- char *msgbuf, size_t bufsize, PyObject **freelist)
++ char *msgbuf, size_t bufsize, freelist_t **freelist)
+ {
+ /* For # codes */
+ #define FETCH_SIZE int *q=NULL;Py_ssize_t *q2=NULL;\
+@@ -1534,7 +1508,8 @@
+ const char *fname, *msg, *custom_msg, *keyword;
+ int min = INT_MAX;
+ int i, len, nargs, nkeywords;
+- PyObject *freelist = NULL, *current_arg;
++ freelist_t *freelist = NULL;
++ PyObject *current_arg;
+
+ assert(args != NULL && PyTuple_Check(args));
+ assert(keywords == NULL || PyDict_Check(keywords));
+diff -r c7dff5469611f03946466caed17c567c4ea5d8d0 -r c26dc70ee34018efeec8b789d40ec78478304bc0 pypy/module/cpyext/test/test_getargs.py
+--- a/pypy/module/cpyext/test/test_getargs.py Wed Jun 13 13:19:05 2012 +0200
++++ b/pypy/module/cpyext/test/test_getargs.py Wed Jun 13 15:48:19 2012 +0200
+@@ -144,6 +144,31 @@
+ assert 'foo\0bar\0baz' == pybuffer(buffer('foo\0bar\0baz'))
+
+
++ def test_pyarg_parse_string_fails(self):
++ """
++ Test the failing case of PyArg_ParseTuple(): it must not keep
++ a reference on the PyObject passed in.
++ """
++ pybuffer = self.import_parser(
++ '''
++ Py_buffer buf1, buf2, buf3;
++ PyObject *result;
++ if (!PyArg_ParseTuple(args, "s*s*s*", &buf1, &buf2, &buf3)) {
++ return NULL;
++ }
++ Py_FatalError("should not get there");
++ return NULL;
++ ''')
++ freed = []
++ class freestring(str):
++ def __del__(self):
++ freed.append('x')
++ raises(TypeError, pybuffer,
++ freestring("string"), freestring("other string"), 42)
++ import gc; gc.collect()
++ assert freed == ['x', 'x']
++
++
+ def test_pyarg_parse_charbuf_and_length(self):
+ """
+ The `t#` format specifier can be used to parse a read-only 8-bit
diff --git a/dev-python/pypy-bin/files/1.9-more-ignored-ops-146ddf82a279.patch b/dev-python/pypy-bin/files/1.9-more-ignored-ops-146ddf82a279.patch
new file mode 100644
index 000000000000..146399d0e3ce
--- /dev/null
+++ b/dev-python/pypy-bin/files/1.9-more-ignored-ops-146ddf82a279.patch
@@ -0,0 +1,25 @@
+changeset: 55567:146ddf82a279
+user: Armin Rigo <arigo@tunes.org>
+date: Mon Jun 11 10:33:19 2012 +0200
+summary: More ignored ops
+
+diff -r 04ea518e5b71 -r 146ddf82a279 pypy/translator/c/gcc/trackgcroot.py
+--- a/pypy/translator/c/gcc/trackgcroot.py Mon Jun 11 10:28:26 2012 +0200
++++ b/pypy/translator/c/gcc/trackgcroot.py Mon Jun 11 10:33:19 2012 +0200
+@@ -476,13 +476,13 @@
+ # floating-point operations cannot produce GC pointers
+ 'f',
+ 'cvt', 'ucomi', 'comi', 'subs', 'subp' , 'adds', 'addp', 'xorp',
+- 'movap', 'movd', 'movlp', 'sqrtsd', 'movhpd',
++ 'movap', 'movd', 'movlp', 'sqrt', 'rsqrt', 'movhpd',
+ 'mins', 'minp', 'maxs', 'maxp', 'unpck', 'pxor', 'por', # sse2
+ 'shufps', 'shufpd',
+ # arithmetic operations should not produce GC pointers
+ 'inc', 'dec', 'not', 'neg', 'or', 'and', 'sbb', 'adc',
+ 'shl', 'shr', 'sal', 'sar', 'rol', 'ror', 'mul', 'imul', 'div', 'idiv',
+- 'bswap', 'bt', 'rdtsc',
++ 'bswap', 'bt', 'rdtsc', 'rounds',
+ 'pabs', 'pack', 'padd', 'palign', 'pand', 'pavg', 'pcmp', 'pextr',
+ 'phadd', 'phsub', 'pinsr', 'pmadd', 'pmax', 'pmin', 'pmovmsk',
+ 'pmul', 'por', 'psadb', 'pshuf', 'psign', 'psll', 'psra', 'psrl',
+
diff --git a/dev-python/pypy-bin/files/1.9-more-ignored-ops-a9a8faa76bca.patch b/dev-python/pypy-bin/files/1.9-more-ignored-ops-a9a8faa76bca.patch
new file mode 100644
index 000000000000..51a53ca06cff
--- /dev/null
+++ b/dev-python/pypy-bin/files/1.9-more-ignored-ops-a9a8faa76bca.patch
@@ -0,0 +1,32 @@
+changeset: 55523:a9a8faa76bca
+parent: 55518:f0daafccddc5
+user: Armin Rigo <arigo@tunes.org>
+date: Fri Jun 08 19:55:01 2012 +0200
+summary: Add more instructions to ignore by copying from Intel docs.
+
+diff -r f0daafccddc5 -r a9a8faa76bca pypy/translator/c/gcc/trackgcroot.py
+--- a/pypy/translator/c/gcc/trackgcroot.py Fri Jun 08 18:30:54 2012 +0200
++++ b/pypy/translator/c/gcc/trackgcroot.py Fri Jun 08 19:55:01 2012 +0200
+@@ -483,8 +483,10 @@
+ 'inc', 'dec', 'not', 'neg', 'or', 'and', 'sbb', 'adc',
+ 'shl', 'shr', 'sal', 'sar', 'rol', 'ror', 'mul', 'imul', 'div', 'idiv',
+ 'bswap', 'bt', 'rdtsc',
+- 'punpck', 'pshufd', 'pcmp', 'pand', 'psllw', 'pslld', 'psllq',
+- 'paddq', 'pinsr', 'pmul', 'psrl',
++ 'pabs', 'pack', 'padd', 'palign', 'pand', 'pavg', 'pcmp', 'pextr',
++ 'phadd', 'phsub', 'pinsr', 'pmadd', 'pmax', 'pmin', 'pmovmsk',
++ 'pmul', 'por', 'psadb', 'pshuf', 'psign', 'psll', 'psra', 'psrl',
++ 'psub', 'punpck', 'pxor',
+ # all vectors don't produce pointers
+ 'v',
+ # sign-extending moves should not produce GC pointers
+@@ -492,7 +494,7 @@
+ # zero-extending moves should not produce GC pointers
+ 'movz',
+ # locked operations should not move GC pointers, at least so far
+- 'lock',
++ 'lock', 'pause',
+ ])
+
+ # a partial list is hopefully good enough for now; it's all to support
+
diff --git a/dev-python/pypy-bin/files/1.9-no-bytecode-4151f9c406b6.patch b/dev-python/pypy-bin/files/1.9-no-bytecode-4151f9c406b6.patch
new file mode 100644
index 000000000000..5fab3a50ddad
--- /dev/null
+++ b/dev-python/pypy-bin/files/1.9-no-bytecode-4151f9c406b6.patch
@@ -0,0 +1,27 @@
+# HG changeset patch
+# User Armin Rigo <arigo@tunes.org>
+# Date 1339165065 -7200
+# Node ID 4151f9c406b62f6c4a1fdd669389eb46eb90f9cb
+# Parent 68f8d7152a45fa7856a2a013799874614fcd9c33
+issue1043 3rd issue fixed
+
+diff -r 68f8d7152a45fa7856a2a013799874614fcd9c33 -r 4151f9c406b62f6c4a1fdd669389eb46eb90f9cb pypy/translator/goal/app_main.py
+--- a/pypy/translator/goal/app_main.py Fri Jun 08 16:06:33 2012 +0200
++++ b/pypy/translator/goal/app_main.py Fri Jun 08 16:17:45 2012 +0200
+@@ -457,13 +457,13 @@
+
+ if PYTHON26 and not options["ignore_environment"]:
+ if os.getenv('PYTHONNOUSERSITE'):
+- options["no_user_site"] = True
++ options["no_user_site"] = 1
+ if os.getenv('PYTHONDONTWRITEBYTECODE'):
+- options["dont_write_bytecode"] = True
++ options["dont_write_bytecode"] = 1
+
+ if (options["interactive"] or
+ (not options["ignore_environment"] and os.getenv('PYTHONINSPECT'))):
+- options["inspect"] = True
++ options["inspect"] = 1
+
+ if PYTHON26 and we_are_translated():
+ flags = [options[flag] for flag in sys_flags]
diff --git a/dev-python/pypy-bin/files/1.9-no-static-hack.patch b/dev-python/pypy-bin/files/1.9-no-static-hack.patch
new file mode 100644
index 000000000000..fe75ac296000
--- /dev/null
+++ b/dev-python/pypy-bin/files/1.9-no-static-hack.patch
@@ -0,0 +1,30 @@
+Remove logic that links to libssl and libcrypto statically if
+possible. Just always link dynamically: Gentoo is expected to have
+sane dynamic libraries for us to use, and our users are not expected
+to copy their pypy binary to a system with an incompatible
+libssl/libcrypto and expect it to work.
+
+Patch contributed by XU Benda <heroxbd@gentoo.org>.
+
+--- pypy/rlib/ropenssl.py 2012-06-07 21:24:48.000000000 +0900
++++ pypy/rlib/ropenssl.py.new 2012-06-10 17:28:29.000000000 +0900
+@@ -19,18 +19,8 @@ if sys.platform == 'win32' and platform.
+ # so that openssl/ssl.h can repair this nonsense.
+ 'wincrypt.h']
+ else:
+- libraries = ['z']
++ libraries = ['z', 'ssl', 'crypto']
+ includes = []
+- if (sys.platform.startswith('linux') and
+- os.path.exists('/usr/lib/libssl.a') and
+- os.path.exists('/usr/lib/libcrypto.a')):
+- # use static linking to avoid the infinite
+- # amount of troubles due to symbol versions
+- # and 0.9.8/1.0.0
+- link_files += ['/usr/lib/libssl.a', '/usr/lib/libcrypto.a']
+- testonly_libraries += ['ssl', 'crypto']
+- else:
+- libraries += ['ssl', 'crypto']
+
+ includes += [
+ 'openssl/ssl.h',
diff --git a/dev-python/pypy-bin/files/1.9-pybuffer-release-double-decref-4ec2a5b49386.patch b/dev-python/pypy-bin/files/1.9-pybuffer-release-double-decref-4ec2a5b49386.patch
new file mode 100644
index 000000000000..58c301e4d04f
--- /dev/null
+++ b/dev-python/pypy-bin/files/1.9-pybuffer-release-double-decref-4ec2a5b49386.patch
@@ -0,0 +1,29 @@
+changeset: 55598:4ec2a5b49386
+tag: tip
+user: Armin Rigo <arigo@tunes.org>
+date: Mon Jun 11 19:54:04 2012 +0200
+summary: Test and fix (thanks marienz)
+
+diff -r cdb2d1b3d0da -r 4ec2a5b49386 pypy/module/cpyext/object.py
+--- a/pypy/module/cpyext/object.py Mon Jun 11 19:41:35 2012 +0200
++++ b/pypy/module/cpyext/object.py Mon Jun 11 19:54:04 2012 +0200
+@@ -489,3 +489,4 @@
+ provides a subset of CPython's behavior.
+ """
+ Py_DecRef(space, view.c_obj)
++ view.c_obj = lltype.nullptr(PyObject.TO)
+diff -r cdb2d1b3d0da -r 4ec2a5b49386 pypy/module/cpyext/test/test_object.py
+--- a/pypy/module/cpyext/test/test_object.py Mon Jun 11 19:41:35 2012 +0200
++++ b/pypy/module/cpyext/test/test_object.py Mon Jun 11 19:54:04 2012 +0200
+@@ -363,6 +363,10 @@
+ * Py_buffer and the string should be released as well.
+ */
+ PyBuffer_Release(&buf);
++ assert(!buf.obj);
++ PyBuffer_Release(&buf); /* call again, should not have any more effect */
++ PyBuffer_Release(&buf);
++ PyBuffer_Release(&buf);
+
+ Py_RETURN_NONE;
+ """)])
+
diff --git a/dev-python/pypy-bin/files/1.9-scripts-location.patch b/dev-python/pypy-bin/files/1.9-scripts-location.patch
new file mode 100644
index 000000000000..5f0190d9a20f
--- /dev/null
+++ b/dev-python/pypy-bin/files/1.9-scripts-location.patch
@@ -0,0 +1,11 @@
+--- pypy-pypy-release-1.7/lib-python/2.7/distutils/command/install.py
++++ pypy-pypy-release-1.7/lib-python/2.7/distutils/command/install.py
+@@ -87,7 +87,7 @@
+ 'purelib': '$base/site-packages',
+ 'platlib': '$base/site-packages',
+ 'headers': '$base/include',
+- 'scripts': '$base/bin',
++ 'scripts': '/usr/bin',
+ 'data' : '$base',
+ },
+ }
diff --git a/dev-python/pypy-bin/files/1.9-signal-a33052b17f4e.patch b/dev-python/pypy-bin/files/1.9-signal-a33052b17f4e.patch
new file mode 100644
index 000000000000..6087122a4a69
--- /dev/null
+++ b/dev-python/pypy-bin/files/1.9-signal-a33052b17f4e.patch
@@ -0,0 +1,65 @@
+changeset: 55595:a33052b17f4e
+parent: 55589:4f58f2db96c0
+user: Armin Rigo <arigo@tunes.org>
+date: Mon Jun 11 18:06:35 2012 +0200
+summary: issue1167: changed the test (according to py.test -A on Linux), and fix
+
+diff -r 4f58f2db96c0 -r a33052b17f4e pypy/module/signal/interp_signal.py
+--- a/pypy/module/signal/interp_signal.py Mon Jun 11 17:05:01 2012 +0200
++++ b/pypy/module/signal/interp_signal.py Mon Jun 11 18:06:35 2012 +0200
+@@ -227,7 +227,7 @@
+ None -- if an unknown handler is in effect (XXX UNIMPLEMENTED)
+ anything else -- the callable Python object used as a handler
+ """
+- check_signum(space, signum)
++ check_signum_in_range(space, signum)
+ action = space.check_signal_action
+ if signum in action.handlers_w:
+ return action.handlers_w[signum]
+@@ -253,12 +253,18 @@
+ c_pause()
+ return space.w_None
+
+-def check_signum(space, signum):
++def check_signum_exists(space, signum):
+ if signum in signal_values:
+ return
+ raise OperationError(space.w_ValueError,
+ space.wrap("invalid signal value"))
+
++def check_signum_in_range(space, signum):
++ if 1 <= signum < NSIG:
++ return
++ raise OperationError(space.w_ValueError,
++ space.wrap("signal number out of range"))
++
+
+ @jit.dont_look_inside
+ @unwrap_spec(signum=int)
+@@ -319,7 +325,7 @@
+
+ @unwrap_spec(signum=int, flag=int)
+ def siginterrupt(space, signum, flag):
+- check_signum(space, signum)
++ check_signum_exists(space, signum)
+ if rffi.cast(lltype.Signed, c_siginterrupt(signum, flag)) < 0:
+ errno = rposix.get_errno()
+ raise OperationError(space.w_RuntimeError, space.wrap(errno))
+diff -r 4f58f2db96c0 -r a33052b17f4e pypy/module/signal/test/test_signal.py
+--- a/pypy/module/signal/test/test_signal.py Mon Jun 11 17:05:01 2012 +0200
++++ b/pypy/module/signal/test/test_signal.py Mon Jun 11 18:06:35 2012 +0200
+@@ -154,7 +154,12 @@
+
+ raises(ValueError, getsignal, 4444)
+ raises(ValueError, signal, 4444, lambda *args: None)
+- raises(ValueError, signal, 42, lambda *args: None)
++ import sys
++ if sys.platform == 'win32':
++ raises(ValueError, signal, 42, lambda *args: None)
++ else:
++ signal(42, lambda *args: None)
++ signal(42, SIG_DFL)
+
+ def test_alarm(self):
+ try:
+
diff --git a/dev-python/pypy-bin/files/1.9-ssl-errors-25d3418150d2.patch b/dev-python/pypy-bin/files/1.9-ssl-errors-25d3418150d2.patch
new file mode 100644
index 000000000000..78affe9d3815
--- /dev/null
+++ b/dev-python/pypy-bin/files/1.9-ssl-errors-25d3418150d2.patch
@@ -0,0 +1,34 @@
+# HG changeset patch
+# User Amaury Forgeot d'Arc <amauryfa@gmail.com>
+# Date 1339449304 -7200
+# Node ID 25d3418150d2e2820913043432f568e31bf3a19a
+# Parent 33c305197a3d05217be023fa39a692ad89802317
+issue1169: _ssl errors outside any SSL context should use ERR_peek_last_error()
+
+diff -r 33c305197a3d05217be023fa39a692ad89802317 -r 25d3418150d2e2820913043432f568e31bf3a19a pypy/module/_ssl/interp_ssl.py
+--- a/pypy/module/_ssl/interp_ssl.py Mon Jun 11 23:01:31 2012 +0200
++++ b/pypy/module/_ssl/interp_ssl.py Mon Jun 11 23:15:04 2012 +0200
+@@ -789,7 +789,11 @@
+ def _ssl_seterror(space, ss, ret):
+ assert ret <= 0
+
+- if ss and ss.ssl:
++ if ss is None:
++ errval = libssl_ERR_peek_last_error()
++ errstr = rffi.charp2str(libssl_ERR_error_string(errval, None))
++ return ssl_error(space, errstr, errval)
++ elif ss.ssl:
+ err = libssl_SSL_get_error(ss.ssl, ret)
+ else:
+ err = SSL_ERROR_SSL
+diff -r 33c305197a3d05217be023fa39a692ad89802317 -r 25d3418150d2e2820913043432f568e31bf3a19a pypy/rlib/ropenssl.py
+--- a/pypy/rlib/ropenssl.py Mon Jun 11 23:01:31 2012 +0200
++++ b/pypy/rlib/ropenssl.py Mon Jun 11 23:15:04 2012 +0200
+@@ -259,6 +259,7 @@
+ ssl_external('SSL_CIPHER_get_bits', [SSL_CIPHER, rffi.INTP], rffi.INT)
+
+ ssl_external('ERR_get_error', [], rffi.INT)
++ssl_external('ERR_peek_last_error', [], rffi.INT)
+ ssl_external('ERR_error_string', [rffi.ULONG, rffi.CCHARP], rffi.CCHARP)
+
+ ssl_external('SSL_free', [SSL], lltype.Void)
diff --git a/dev-python/pypy-bin/files/1.9-ssl-threads-1-34b3b5aac082.patch b/dev-python/pypy-bin/files/1.9-ssl-threads-1-34b3b5aac082.patch
new file mode 100644
index 000000000000..ac5d7ad50030
--- /dev/null
+++ b/dev-python/pypy-bin/files/1.9-ssl-threads-1-34b3b5aac082.patch
@@ -0,0 +1,143 @@
+changeset: 55575:34b3b5aac082
+parent: 55569:fa8262a5746a
+user: Armin Rigo <arigo@tunes.org>
+date: Mon Jun 11 14:38:35 2012 +0200
+summary: Move the callback logic to C code instead of using RPython code
+
+diff -r fa8262a5746a -r 34b3b5aac082 pypy/module/_ssl/__init__.py
+--- a/pypy/module/_ssl/__init__.py Mon Jun 11 11:04:53 2012 +0200
++++ b/pypy/module/_ssl/__init__.py Mon Jun 11 14:38:35 2012 +0200
+@@ -31,5 +31,6 @@
+ def startup(self, space):
+ from pypy.rlib.ropenssl import init_ssl
+ init_ssl()
+- from pypy.module._ssl.interp_ssl import setup_ssl_threads
+- setup_ssl_threads()
++ if space.config.objspace.usemodules.thread:
++ from pypy.module._ssl.thread_lock import setup_ssl_threads
++ setup_ssl_threads()
+diff -r fa8262a5746a -r 34b3b5aac082 pypy/module/_ssl/interp_ssl.py
+--- a/pypy/module/_ssl/interp_ssl.py Mon Jun 11 11:04:53 2012 +0200
++++ b/pypy/module/_ssl/interp_ssl.py Mon Jun 11 14:38:35 2012 +0200
+@@ -880,38 +880,3 @@
+ libssl_X509_free(x)
+ finally:
+ libssl_BIO_free(cert)
+-
+-# this function is needed to perform locking on shared data
+-# structures. (Note that OpenSSL uses a number of global data
+-# structures that will be implicitly shared whenever multiple threads
+-# use OpenSSL.) Multi-threaded applications will crash at random if
+-# it is not set.
+-#
+-# locking_function() must be able to handle up to CRYPTO_num_locks()
+-# different mutex locks. It sets the n-th lock if mode & CRYPTO_LOCK, and
+-# releases it otherwise.
+-#
+-# filename and line are the file number of the function setting the
+-# lock. They can be useful for debugging.
+-_ssl_locks = []
+-
+-def _ssl_thread_locking_function(mode, n, filename, line):
+- n = intmask(n)
+- if n < 0 or n >= len(_ssl_locks):
+- return
+-
+- if intmask(mode) & CRYPTO_LOCK:
+- _ssl_locks[n].acquire(True)
+- else:
+- _ssl_locks[n].release()
+-
+-def _ssl_thread_id_function():
+- from pypy.module.thread import ll_thread
+- return rffi.cast(rffi.LONG, ll_thread.get_ident())
+-
+-def setup_ssl_threads():
+- from pypy.module.thread import ll_thread
+- for i in range(libssl_CRYPTO_num_locks()):
+- _ssl_locks.append(ll_thread.allocate_lock())
+- libssl_CRYPTO_set_locking_callback(_ssl_thread_locking_function)
+- libssl_CRYPTO_set_id_callback(_ssl_thread_id_function)
+diff -r fa8262a5746a -r 34b3b5aac082 pypy/module/_ssl/thread_lock.py
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/pypy/module/_ssl/thread_lock.py Mon Jun 11 14:38:35 2012 +0200
+@@ -0,0 +1,78 @@
++from pypy.rlib.ropenssl import *
++from pypy.rpython.lltypesystem import lltype, rffi
++from pypy.translator.tool.cbuild import ExternalCompilationInfo
++
++# CRYPTO_set_locking_callback:
++#
++# this function is needed to perform locking on shared data
++# structures. (Note that OpenSSL uses a number of global data
++# structures that will be implicitly shared whenever multiple threads
++# use OpenSSL.) Multi-threaded applications will crash at random if
++# it is not set.
++#
++# locking_function() must be able to handle up to CRYPTO_num_locks()
++# different mutex locks. It sets the n-th lock if mode & CRYPTO_LOCK, and
++# releases it otherwise.
++#
++# filename and line are the file number of the function setting the
++# lock. They can be useful for debugging.
++
++
++# This logic is moved to C code so that the callbacks can be invoked
++# without caring about the GIL.
++
++separate_module_source = """
++
++#include <openssl/crypto.h>
++
++static unsigned int _ssl_locks_count = 0;
++static struct RPyOpaque_ThreadLock *_ssl_locks;
++
++static unsigned long _ssl_thread_id_function(void) {
++ return RPyThreadGetIdent();
++}
++
++static void _ssl_thread_locking_function(int mode, int n, const char *file,
++ int line) {
++ if ((_ssl_locks == NULL) ||
++ (n < 0) || ((unsigned)n >= _ssl_locks_count))
++ return;
++
++ if (mode & CRYPTO_LOCK) {
++ RPyThreadAcquireLock(_ssl_locks[n], 1);
++ } else {
++ RPyThreadReleaseLock(_ssl_locks[n]);
++ }
++}
++
++int _PyPy_SSL_SetupThreads(void)
++{
++ unsigned int i;
++ _ssl_locks_count = CRYPTO_num_locks();
++ _ssl_locks = calloc(_ssl_locks_count, sizeof(struct RPyOpaque_ThreadLock));
++ if (_ssl_locks == NULL)
++ return 0;
++ for (i=0; i<_ssl_locks_count; i++) {
++ if (RPyThreadLockInit(_ssl_locks + i) == 0)
++ return 0;
++ }
++ CRYPTO_set_locking_callback(_ssl_thread_locking_function);
++ CRYPTO_set_id_callback(_ssl_thread_id_function);
++ return 1;
++}
++"""
++
++
++eci = ExternalCompilationInfo(
++ separate_module_sources=[separate_module_source],
++ export_symbols=['_PyPy_SSL_SetupThreads'],
++)
++
++_PyPy_SSL_SetupThreads = rffi.llexternal('_PyPy_SSL_SetupThreads',
++ [], rffi.INT,
++ compilation_info=eci)
++
++def setup_ssl_threads():
++ result = _PyPy_SSL_SetupThreads()
++ if rffi.cast(lltype.Signed, result) == 0:
++ raise MemoryError
+
diff --git a/dev-python/pypy-bin/files/1.9-ssl-threads-2-25cd11066d95.patch b/dev-python/pypy-bin/files/1.9-ssl-threads-2-25cd11066d95.patch
new file mode 100644
index 000000000000..a1878f3565c2
--- /dev/null
+++ b/dev-python/pypy-bin/files/1.9-ssl-threads-2-25cd11066d95.patch
@@ -0,0 +1,22 @@
+changeset: 55578:25cd11066d95
+tag: tip
+user: Armin Rigo <arigo@tunes.org>
+date: Mon Jun 11 15:19:38 2012 +0200
+summary: Fix.
+
+diff -r e701bca5f3b9 -r 25cd11066d95 pypy/module/_ssl/thread_lock.py
+--- a/pypy/module/_ssl/thread_lock.py Mon Jun 11 15:01:00 2012 +0200
++++ b/pypy/module/_ssl/thread_lock.py Mon Jun 11 15:19:38 2012 +0200
+@@ -39,9 +39,9 @@
+ return;
+
+ if (mode & CRYPTO_LOCK) {
+- RPyThreadAcquireLock(_ssl_locks[n], 1);
++ RPyThreadAcquireLock(_ssl_locks + n, 1);
+ } else {
+- RPyThreadReleaseLock(_ssl_locks[n]);
++ RPyThreadReleaseLock(_ssl_locks + n);
+ }
+ }
+
+
diff --git a/dev-python/pypy-bin/files/2.0.2-distutils-fix_handling_of_executables_and_flags.patch b/dev-python/pypy-bin/files/2.0.2-distutils-fix_handling_of_executables_and_flags.patch
new file mode 100644
index 000000000000..db7db3bad7fe
--- /dev/null
+++ b/dev-python/pypy-bin/files/2.0.2-distutils-fix_handling_of_executables_and_flags.patch
@@ -0,0 +1,323 @@
+http://bugs.python.org/issue1222585
+
+--- lib-python/2.7/distutils/cygwinccompiler.py
++++ lib-python/2.7/distutils/cygwinccompiler.py
+@@ -132,9 +132,13 @@
+ self.set_executables(compiler='gcc -mcygwin -O -Wall',
+ compiler_so='gcc -mcygwin -mdll -O -Wall',
+ compiler_cxx='g++ -mcygwin -O -Wall',
++ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
+ linker_exe='gcc -mcygwin',
+ linker_so=('%s -mcygwin %s' %
+- (self.linker_dll, shared_option)))
++ (self.linker_dll, shared_option)),
++ linker_exe_cxx='g++ -mcygwin',
++ linker_so_cxx=('%s -mcygwin %s' %
++ (self.linker_dll, shared_option)))
+
+ # cygwin and mingw32 need different sets of libraries
+ if self.gcc_version == "2.91.57":
+@@ -160,8 +164,12 @@
+ raise CompileError, msg
+ else: # for other files use the C-compiler
+ try:
+- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
+- extra_postargs)
++ if self.detect_language(src) == 'c++':
++ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
++ extra_postargs)
++ else:
++ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
++ extra_postargs)
+ except DistutilsExecError, msg:
+ raise CompileError, msg
+
+@@ -322,10 +330,15 @@
+ self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
+ compiler_so='gcc -mno-cygwin -mdll -O -Wall',
+ compiler_cxx='g++ -mno-cygwin -O -Wall',
++ compiler_so_cxx='g++ -mno-cygwin -mdll -O -Wall',
+ linker_exe='gcc -mno-cygwin',
+ linker_so='%s -mno-cygwin %s %s'
+ % (self.linker_dll, shared_option,
+- entry_point))
++ entry_point),
++ linker_exe_cxx='g++ -mno-cygwin',
++ linker_so_cxx='%s -mno-cygwin %s %s'
++ % (self.linker_dll, shared_option,
++ entry_point))
+ # Maybe we should also append -mthreads, but then the finished
+ # dlls need another dll (mingwm10.dll see Mingw32 docs)
+ # (-mthreads: Support thread-safe exception handling on `Mingw32')
+--- lib-python/2.7/distutils/emxccompiler.py
++++ lib-python/2.7/distutils/emxccompiler.py
+@@ -65,8 +65,12 @@
+ # XXX optimization, warnings etc. should be customizable.
+ self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
+ compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
++ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
++ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
+ linker_exe='gcc -Zomf -Zmt -Zcrtdll',
+- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
++ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll',
++ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll',
++ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll')
+
+ # want the gcc library statically linked (so that we don't have
+ # to distribute a version dependent on the compiler we have)
+@@ -83,8 +87,12 @@
+ raise CompileError, msg
+ else: # for other files use the C-compiler
+ try:
+- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
+- extra_postargs)
++ if self.detect_language(src) == 'c++':
++ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
++ extra_postargs)
++ else:
++ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
++ extra_postargs)
+ except DistutilsExecError, msg:
+ raise CompileError, msg
+
+--- lib-python/2.7/distutils/sysconfig_cpython.py
++++ lib-python/2.7/distutils/sysconfig_cpython.py
+@@ -150,10 +150,12 @@
+ varies across Unices and is stored in Python's Makefile.
+ """
+ if compiler.compiler_type == "unix":
+- (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
+- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
+- 'CCSHARED', 'LDSHARED', 'SO', 'AR',
+- 'ARFLAGS')
++ (cc, cxx, ccshared, ldshared, ldcxxshared, so_ext, ar, ar_flags) = \
++ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
++ 'SO', 'AR', 'ARFLAGS')
++
++ cflags = ''
++ cxxflags = ''
+
+ newcc = None
+ if 'CC' in os.environ:
+@@ -191,19 +193,27 @@
+ cxx = os.environ['CXX']
+ if 'LDSHARED' in os.environ:
+ ldshared = os.environ['LDSHARED']
++ if 'LDCXXSHARED' in os.environ:
++ ldcxxshared = os.environ['LDCXXSHARED']
+ if 'CPP' in os.environ:
+ cpp = os.environ['CPP']
+ else:
+ cpp = cc + " -E" # not always
+ if 'LDFLAGS' in os.environ:
+ ldshared = ldshared + ' ' + os.environ['LDFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
+ if 'CFLAGS' in os.environ:
+- cflags = opt + ' ' + os.environ['CFLAGS']
++ cflags = os.environ['CFLAGS']
+ ldshared = ldshared + ' ' + os.environ['CFLAGS']
++ if 'CXXFLAGS' in os.environ:
++ cxxflags = os.environ['CXXFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
+ if 'CPPFLAGS' in os.environ:
+ cpp = cpp + ' ' + os.environ['CPPFLAGS']
+ cflags = cflags + ' ' + os.environ['CPPFLAGS']
++ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
+ ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
+ if 'AR' in os.environ:
+ ar = os.environ['AR']
+ if 'ARFLAGS' in os.environ:
+@@ -212,13 +222,17 @@
+ archiver = ar + ' ' + ar_flags
+
+ cc_cmd = cc + ' ' + cflags
++ cxx_cmd = cxx + ' ' + cxxflags
+ compiler.set_executables(
+ preprocessor=cpp,
+ compiler=cc_cmd,
+ compiler_so=cc_cmd + ' ' + ccshared,
+- compiler_cxx=cxx,
++ compiler_cxx=cxx_cmd,
++ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
+ linker_so=ldshared,
+ linker_exe=cc,
++ linker_so_cxx=ldcxxshared,
++ linker_exe_cxx=cxx,
+ archiver=archiver)
+
+ compiler.shared_lib_extension = so_ext
+@@ -530,7 +544,7 @@
+ for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
+ # a number of derived variables. These need to be
+ # patched up as well.
+- 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
++ 'CFLAGS', 'CXXFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
+ flags = _config_vars[key]
+ flags = re.sub('-arch\s+\w+\s', ' ', flags)
+ flags = re.sub('-isysroot [^ \t]*', ' ', flags)
+@@ -549,7 +563,7 @@
+ for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
+ # a number of derived variables. These need to be
+ # patched up as well.
+- 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
++ 'CFLAGS', 'CXXFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
+
+ flags = _config_vars[key]
+ flags = re.sub('-arch\s+\w+\s', ' ', flags)
+@@ -573,7 +587,7 @@
+ for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
+ # a number of derived variables. These need to be
+ # patched up as well.
+- 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
++ 'CFLAGS', 'CXXFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
+
+ flags = _config_vars[key]
+ flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags)
+--- lib-python/2.7/distutils/sysconfig_pypy.py
++++ lib-python/2.7/distutils/sysconfig_pypy.py
+@@ -114,13 +114,56 @@
+ optional C speedup components.
+ """
+ if compiler.compiler_type == "unix":
+- compiler.compiler_so.extend(['-O2', '-fPIC', '-Wimplicit'])
++ cc = ' '.join(compiler.compiler)
++ cxx = ' '.join(compiler.compiler_cxx)
++ ldshared = ' '.join(compiler.linker_so)
++ ldcxxshared = ' '.join(compiler.linker_so_cxx)
++
++ cflags = ''
++ cxxflags = ''
++ ccshared = '-fPIC'
++
++ if 'CC' in os.environ:
++ cc = os.environ['CC']
++ if 'CXX' in os.environ:
++ cxx = os.environ['CXX']
++ if 'LDSHARED' in os.environ:
++ ldshared = os.environ['LDSHARED']
++ if 'LDCXXSHARED' in os.environ:
++ ldcxxshared = os.environ['LDCXXSHARED']
++ if 'CPP' in os.environ:
++ cpp = os.environ['CPP']
++ else:
++ cpp = cc + " -E" # not always
++ if 'LDFLAGS' in os.environ:
++ ldshared = ldshared + ' ' + os.environ['LDFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
++ if 'CFLAGS' in os.environ:
++ cflags = os.environ['CFLAGS']
++ ldshared = ldshared + ' ' + os.environ['CFLAGS']
++ if 'CXXFLAGS' in os.environ:
++ cxxflags = os.environ['CXXFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
++ if 'CPPFLAGS' in os.environ:
++ cpp = cpp + ' ' + os.environ['CPPFLAGS']
++ cflags = cflags + ' ' + os.environ['CPPFLAGS']
++ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
++ ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
++
++ cc_cmd = cc + ' ' + cflags
++ cxx_cmd = cxx + ' ' + cxxflags
++ compiler.set_executables(
++ preprocessor=cpp,
++ compiler=cc_cmd,
++ compiler_so=cc_cmd + ' ' + ccshared,
++ compiler_cxx=cxx_cmd,
++ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
++ linker_so=ldshared,
++ linker_exe=cc,
++ linker_so_cxx=ldcxxshared,
++ linker_exe_cxx=cxx)
+ compiler.shared_lib_extension = get_config_var('SO')
+- if "CFLAGS" in os.environ:
+- cflags = os.environ["CFLAGS"]
+- compiler.compiler.append(cflags)
+- compiler.compiler_so.append(cflags)
+- compiler.linker_so.append(cflags)
+
+
+ from sysconfig_cpython import (
+--- lib-python/2.7/distutils/unixccompiler.py
++++ lib-python/2.7/distutils/unixccompiler.py
+@@ -114,14 +114,17 @@
+ # are pretty generic; they will probably have to be set by an outsider
+ # (eg. using information discovered by the sysconfig about building
+ # Python extensions).
+- executables = {'preprocessor' : None,
+- 'compiler' : ["cc"],
+- 'compiler_so' : ["cc"],
+- 'compiler_cxx' : ["cc"],
+- 'linker_so' : ["cc", "-shared"],
+- 'linker_exe' : ["cc"],
+- 'archiver' : ["ar", "-cr"],
+- 'ranlib' : None,
++ executables = {'preprocessor' : None,
++ 'compiler' : ["cc"],
++ 'compiler_so' : ["cc"],
++ 'compiler_cxx' : ["c++"],
++ 'compiler_so_cxx' : ["c++"],
++ 'linker_so' : ["cc", "-shared"],
++ 'linker_exe' : ["cc"],
++ 'linker_so_cxx' : ["c++", "-shared"],
++ 'linker_exe_cxx' : ["c++"],
++ 'archiver' : ["ar", "-cr"],
++ 'ranlib' : None,
+ }
+
+ if sys.platform[:6] == "darwin":
+@@ -171,11 +174,18 @@
+
+ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
+ compiler_so = self.compiler_so
++ compiler_so_cxx = self.compiler_so_cxx
+ if sys.platform == 'darwin':
+ compiler_so = _darwin_compiler_fixup(compiler_so, cc_args + extra_postargs)
++ compiler_so_cxx = _darwin_compiler_fixup(compiler_so_cxx, cc_args +
++ extra_postargs)
+ try:
+- self.spawn(compiler_so + cc_args + [src, '-o', obj] +
+- extra_postargs)
++ if self.detect_language(src) == 'c++':
++ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
++ extra_postargs)
++ else:
++ self.spawn(compiler_so + cc_args + [src, '-o', obj] +
++ extra_postargs)
+ except DistutilsExecError, msg:
+ raise CompileError, msg
+
+@@ -232,23 +242,16 @@
+ ld_args.extend(extra_postargs)
+ self.mkpath(os.path.dirname(output_filename))
+ try:
+- if target_desc == CCompiler.EXECUTABLE:
+- linker = self.linker_exe[:]
++ if target_lang == "c++":
++ if target_desc == CCompiler.EXECUTABLE:
++ linker = self.linker_exe_cxx[:]
++ else:
++ linker = self.linker_so_cxx[:]
+ else:
+- linker = self.linker_so[:]
+- if target_lang == "c++" and self.compiler_cxx:
+- # skip over environment variable settings if /usr/bin/env
+- # is used to set up the linker's environment.
+- # This is needed on OSX. Note: this assumes that the
+- # normal and C++ compiler have the same environment
+- # settings.
+- i = 0
+- if os.path.basename(linker[0]) == "env":
+- i = 1
+- while '=' in linker[i]:
+- i = i + 1
+-
+- linker[i] = self.compiler_cxx[i]
++ if target_desc == CCompiler.EXECUTABLE:
++ linker = self.linker_exe[:]
++ else:
++ linker = self.linker_so[:]
+
+ if sys.platform == 'darwin':
+ linker = _darwin_compiler_fixup(linker, ld_args)
diff --git a/dev-python/pypy-bin/metadata.xml b/dev-python/pypy-bin/metadata.xml
new file mode 100644
index 000000000000..a644c3a74f86
--- /dev/null
+++ b/dev-python/pypy-bin/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+ <use>
+ <flag name="shadowstack">Use a shadow stack for finding GC roots</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-python/pypy-bin/pypy-bin-1.9.ebuild b/dev-python/pypy-bin/pypy-bin-1.9.ebuild
new file mode 100644
index 000000000000..46a09911a505
--- /dev/null
+++ b/dev-python/pypy-bin/pypy-bin-1.9.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy-bin/pypy-bin-1.9.ebuild,v 1.1 2013/07/27 11:19:19 mgorny Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 pypy{1_8,1_9,2_0} )
+inherit eutils multilib pax-utils python-any-r1 vcs-snapshot versionator
+
+BINHOST="http://dev.gentoo.org/~mgorny/dist/${PN}"
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python language (binary package)"
+HOMEPAGE="http://pypy.org/"
+SRC_URI="https://bitbucket.org/pypy/pypy/get/release-${PV}.tar.bz2 -> pypy-${PV}.tar.bz2
+ amd64? (
+ jit? ( shadowstack? (
+ ${BINHOST}/${P}-amd64+bzip2+jit+ncurses+shadowstack.tar.xz
+ ) )
+ jit? ( !shadowstack? (
+ ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.xz
+ ) )
+ !jit? ( !shadowstack? (
+ ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.xz
+ ) )
+ )
+ x86? (
+ sse2? (
+ jit? ( shadowstack? (
+ ${BINHOST}/${P}-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.xz
+ ) )
+ jit? ( !shadowstack? (
+ ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.xz
+ ) )
+ !jit? ( !shadowstack? (
+ ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.xz
+ ) )
+ )
+ !sse2? (
+ !jit? ( !shadowstack? (
+ ${BINHOST}/${P}-x86+bzip2+ncurses.tar.xz
+ ) )
+ )
+ )"
+
+# Supported variants
+REQUIRED_USE="!jit? ( !shadowstack )
+ x86? ( !sse2? ( !jit !shadowstack ) )"
+
+LICENSE="MIT"
+SLOT=$(get_version_component_range 1-2 ${PV})
+KEYWORDS="~amd64 ~x86"
+IUSE="doc +jit shadowstack sqlite sse2 test"
+
+RDEPEND="
+ ~app-arch/bzip2-1.0.6
+ ~dev-libs/expat-2.1.0
+ || ( ~dev-libs/libffi-3.0.13
+ ~dev-libs/libffi-3.0.12
+ ~dev-libs/libffi-3.0.11 )
+ || ( ~dev-libs/openssl-1.0.1e
+ ~dev-libs/openssl-1.0.1d
+ ~dev-libs/openssl-1.0.1c )
+ || ( ~sys-libs/glibc-2.17
+ ~sys-libs/glibc-2.16.0
+ ~sys-libs/glibc-2.15 )
+ ~sys-libs/ncurses-5.9
+ || ( ~sys-libs/zlib-1.2.8
+ ~sys-libs/zlib-1.2.7 )
+ sqlite? ( dev-db/sqlite:3 )
+ !dev-python/pypy:${SLOT}"
+DEPEND="doc? ( dev-python/sphinx )
+ test? ( ${RDEPEND} )"
+PDEPEND="app-admin/python-updater"
+
+S=${WORKDIR}/pypy-${PV}
+
+pkg_setup() {
+ use doc && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-no-bytecode-4151f9c406b6.patch"
+ epatch "${FILESDIR}/${PV}-scripts-location.patch"
+ epatch "${FILESDIR}/${PV}-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
+ epatch "${FILESDIR}/${PV}-distutils-fix_handling_of_executables_and_flags.patch"
+ epatch "${FILESDIR}/${PV}-ssl-threads-1-34b3b5aac082.patch"
+ epatch "${FILESDIR}/${PV}-ssl-threads-2-25cd11066d95.patch"
+ epatch "${FILESDIR}/${PV}-get_python_lib_standard_lib-04ea518e5b71.patch"
+ epatch "${FILESDIR}/${PV}-more-ignored-ops-a9a8faa76bca.patch"
+ epatch "${FILESDIR}/${PV}-more-ignored-ops-146ddf82a279.patch"
+ epatch "${FILESDIR}/${PV}-pybuffer-release-double-decref-4ec2a5b49386.patch"
+ epatch "${FILESDIR}/${PV}-signal-a33052b17f4e.patch"
+ epatch "${FILESDIR}/${PV}-getargs-freelist-c26dc70ee340.patch"
+ epatch "${FILESDIR}/${PV}-ssl-errors-25d3418150d2.patch"
+
+ # The following is Gentoo-specific.
+ epatch "${FILESDIR}/${PV}-no-static-hack.patch"
+
+ epatch_user
+}
+
+src_compile() {
+ # Tadaam! PyPy compiled!
+ mv "${WORKDIR}"/${P}*/pypy-c . || die
+ mv "${WORKDIR}"/${P}*/include/*.h include/ || die
+ mv pypy/module/cpyext/include/*.h include/ || die
+
+ use doc && emake -C pypy/doc/ html
+}
+
+src_test() {
+ # (unset)
+ local -x PYTHONDONTWRITEBYTECODE
+
+ ./pypy-c ./pypy/test_all.py --pypy=./pypy-c lib-python || die
+}
+
+src_install() {
+ einfo "Installing PyPy ..."
+ insinto "/usr/$(get_libdir)/pypy${SLOT}"
+ doins -r include lib_pypy lib-python pypy-c
+ fperms a+x ${INSDESTTREE}/pypy-c
+ use jit && pax-mark m "${ED%/}${INSDESTTREE}/pypy-c"
+ dosym ../$(get_libdir)/pypy${SLOT}/pypy-c /usr/bin/pypy-c${SLOT}
+ dosym ../$(get_libdir)/pypy${SLOT}/include /usr/include/pypy${SLOT}
+ dodoc README
+
+ if ! use sqlite; then
+ rm -r "${ED%/}${INSDESTTREE}"/lib-python/*2.7/sqlite3 || die
+ rm "${ED%/}${INSDESTTREE}"/lib_pypy/_sqlite3.py || die
+ fi
+
+ # Install docs
+ use doc && dohtml -r pypy/doc/_build/html/
+
+ einfo "Generating caches and byte-compiling ..."
+
+ python_export pypy-c${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
+ local PYTHON=${ED%/}${INSDESTTREE}/pypy-c
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py
+ python_domodule epython.py
+
+ # Note: call portage helpers before this line.
+ # PYTHONPATH confuses them and will result in random failures.
+
+ local -x PYTHONPATH="${ED%/}${INSDESTTREE}/lib_pypy:${ED%/}${INSDESTTREE}/lib-python/2.7"
+
+ # Generate Grammar and PatternGrammar pickles.
+ "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
+ || die "Generation of Grammar and PatternGrammar pickles failed"
+
+ # compile the installed modules
+ python_optimize "${ED%/}${INSDESTTREE}"
+}
diff --git a/dev-python/pypy-bin/pypy-bin-2.0.2.ebuild b/dev-python/pypy-bin/pypy-bin-2.0.2.ebuild
new file mode 100644
index 000000000000..a58dd5dfed08
--- /dev/null
+++ b/dev-python/pypy-bin/pypy-bin-2.0.2.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy-bin/pypy-bin-2.0.2.ebuild,v 1.3 2013/07/27 11:19:19 mgorny Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 pypy{1_8,1_9,2_0} )
+inherit eutils multilib pax-utils python-any-r1 versionator
+
+BINHOST="http://dev.gentoo.org/~mgorny/dist/${PN}"
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python language (binary package)"
+HOMEPAGE="http://pypy.org/"
+SRC_URI="mirror://bitbucket/pypy/pypy/downloads/pypy-${PV}-src.tar.bz2
+ amd64? (
+ jit? ( shadowstack? (
+ ${BINHOST}/${P}-amd64+bzip2+jit+ncurses+shadowstack.tar.xz
+ ) )
+ jit? ( !shadowstack? (
+ ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.xz
+ ) )
+ !jit? ( !shadowstack? (
+ ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.xz
+ ) )
+ )
+ x86? (
+ sse2? (
+ jit? ( shadowstack? (
+ ${BINHOST}/${P}-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.xz
+ ) )
+ jit? ( !shadowstack? (
+ ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.xz
+ ) )
+ !jit? ( !shadowstack? (
+ ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.xz
+ ) )
+ )
+ !sse2? (
+ !jit? ( !shadowstack? (
+ ${BINHOST}/${P}-x86+bzip2+ncurses.tar.xz
+ ) )
+ )
+ )"
+
+# Supported variants
+REQUIRED_USE="!jit? ( !shadowstack )
+ x86? ( !sse2? ( !jit !shadowstack ) )"
+
+LICENSE="MIT"
+SLOT=$(get_version_component_range 1-2 ${PV})
+KEYWORDS="~amd64 ~x86"
+IUSE="doc +jit shadowstack sqlite sse2 test"
+
+RDEPEND="
+ ~app-arch/bzip2-1.0.6
+ ~dev-libs/expat-2.1.0
+ || ( ~dev-libs/libffi-3.0.13
+ ~dev-libs/libffi-3.0.12
+ ~dev-libs/libffi-3.0.11 )
+ || ( ~dev-libs/openssl-1.0.1e
+ ~dev-libs/openssl-1.0.1d
+ ~dev-libs/openssl-1.0.1c )
+ || ( ~sys-libs/glibc-2.17
+ ~sys-libs/glibc-2.16.0
+ ~sys-libs/glibc-2.15 )
+ ~sys-libs/ncurses-5.9
+ || ( ~sys-libs/zlib-1.2.8
+ ~sys-libs/zlib-1.2.7 )
+ sqlite? ( dev-db/sqlite:3 )
+ !dev-python/pypy:${SLOT}"
+DEPEND="doc? ( dev-python/sphinx )
+ test? ( ${RDEPEND} )"
+PDEPEND="app-admin/python-updater"
+
+S=${WORKDIR}/pypy-${PV}-src
+
+pkg_setup() {
+ use doc && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/1.9-scripts-location.patch"
+ epatch "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
+ epatch "${FILESDIR}/2.0.2-distutils-fix_handling_of_executables_and_flags.patch"
+
+ epatch_user
+}
+
+src_compile() {
+ # Tadaam! PyPy compiled!
+ mv "${WORKDIR}"/${P}*/pypy-c . || die
+ mv "${WORKDIR}"/${P}*/include/*.h include/ || die
+ mv pypy/module/cpyext/include/*.h include/ || die
+
+ use doc && emake -C pypy/doc/ html
+}
+
+src_test() {
+ # (unset)
+ local -x PYTHONDONTWRITEBYTECODE
+
+ ./pypy-c ./pypy/test_all.py --pypy=./pypy-c lib-python || die
+}
+
+src_install() {
+ einfo "Installing PyPy ..."
+ insinto "/usr/$(get_libdir)/pypy${SLOT}"
+ doins -r include lib_pypy lib-python pypy-c
+ fperms a+x ${INSDESTTREE}/pypy-c
+ use jit && pax-mark m "${ED%/}${INSDESTTREE}/pypy-c"
+ dosym ../$(get_libdir)/pypy${SLOT}/pypy-c /usr/bin/pypy-c${SLOT}
+ dosym ../$(get_libdir)/pypy${SLOT}/include /usr/include/pypy${SLOT}
+ dodoc README.rst
+
+ if ! use sqlite; then
+ rm -r "${ED%/}${INSDESTTREE}"/lib-python/*2.7/sqlite3 || die
+ rm "${ED%/}${INSDESTTREE}"/lib_pypy/_sqlite3.py || die
+ fi
+
+ # Install docs
+ use doc && dohtml -r pypy/doc/_build/html/
+
+ einfo "Generating caches and byte-compiling ..."
+
+ python_export pypy-c${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
+ local PYTHON=${ED%/}${INSDESTTREE}/pypy-c
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py
+ python_domodule epython.py
+
+ # Note: call portage helpers before this line.
+ # PYTHONPATH confuses them and will result in random failures.
+
+ local -x PYTHONPATH="${ED%/}${INSDESTTREE}/lib_pypy:${ED%/}${INSDESTTREE}/lib-python/2.7"
+
+ # Generate Grammar and PatternGrammar pickles.
+ "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
+ || die "Generation of Grammar and PatternGrammar pickles failed"
+
+ # Generate cffi cache
+ "${PYTHON}" -c "import _curses" || die "Failed to import _curses"
+ if use sqlite; then
+ "${PYTHON}" -c "import _sqlite3" || die "Failed to import _sqlite3"
+ fi
+
+ # compile the installed modules
+ python_optimize "${ED%/}${INSDESTTREE}"
+}