diff options
author | Mike Gilbert <floppym@gentoo.org> | 2013-05-26 01:48:51 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2013-05-26 01:48:51 +0000 |
commit | b3592b4a81cf4203506c907c67adb4472b6661b5 (patch) | |
tree | 1bab8456f15780386ed4e10630c7d8040163bd0f /dev-python/pypy | |
parent | disable-dependency-tracking is passed by default with eapi5 (diff) | |
download | historical-b3592b4a81cf4203506c907c67adb4472b6661b5.tar.gz historical-b3592b4a81cf4203506c907c67adb4472b6661b5.tar.bz2 historical-b3592b4a81cf4203506c907c67adb4472b6661b5.zip |
Version bump.
Package-Manager: portage-2.2.0_alpha177/cvs/Linux x86_64
Manifest-Sign-Key: 0x0BBEEA1FEA4843A4
Diffstat (limited to 'dev-python/pypy')
-rw-r--r-- | dev-python/pypy/ChangeLog | 9 | ||||
-rw-r--r-- | dev-python/pypy/Manifest | 11 | ||||
-rw-r--r-- | dev-python/pypy/files/2.0.2-distutils-fix_handling_of_executables_and_flags.patch | 323 | ||||
-rw-r--r-- | dev-python/pypy/pypy-2.0.2.ebuild | 133 |
4 files changed, 471 insertions, 5 deletions
diff --git a/dev-python/pypy/ChangeLog b/dev-python/pypy/ChangeLog index 8e20048117dc..e4b81d1036e1 100644 --- a/dev-python/pypy/ChangeLog +++ b/dev-python/pypy/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-python/pypy # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/ChangeLog,v 1.41 2013/05/14 14:27:38 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/ChangeLog,v 1.42 2013/05/26 01:48:49 floppym Exp $ + +*pypy-2.0.2 (26 May 2013) + + 26 May 2013; Mike Gilbert <floppym@gentoo.org> + +files/2.0.2-distutils-fix_handling_of_executables_and_flags.patch, + +pypy-2.0.2.ebuild: + Version bump. 14 May 2013; Mike Gilbert <floppym@gentoo.org> pypy-2.0_beta2.ebuild: Fix typo in gcc-version, bug 469832 by MiPnamic. diff --git a/dev-python/pypy/Manifest b/dev-python/pypy/Manifest index 438d9d36801e..ed9c18f0ef06 100644 --- a/dev-python/pypy/Manifest +++ b/dev-python/pypy/Manifest @@ -19,22 +19,25 @@ AUX 2.0-distutils-fix_handling_of_executables_and_flags.patch 15198 SHA256 9b2f9 AUX 2.0-encoder-3655afd07f2f.patch 13820 SHA256 2161f34b6ec716737b0fbf7701ba96e1b40c3ff3d7246d5468e4132a94b692d0 SHA512 64a898bd68d99dda98df614791cfbb2bec102bcfe784de7b312caac956d47ed1210c338f9d8ab618b5b099b9e9f5ac6fa03b47e3c6167e52e72e1b24cf78631c WHIRLPOOL 970eb2db9e7bb699864e2984924a04763b328ee4704c8e6b223c05951ad71ed6a7ffdd7cbb1c8ceb2c00927a30194ba6f75a55ef24f8e8e09fb796255e5b0958 AUX 2.0-no-static-hack-r1.patch 1552 SHA256 6132297862c04e890d8c6da55b17836004c83a084d2db7b23e970d26fb3a0435 SHA512 a92bee4a5434f9b653b9f180d9ddc451c4b258a5bd99f894dc3084bdcb7c25fc2ad4944818c9cc5887d069061a2643f74521a7482ddaea39bf0fc32e6840e79d WHIRLPOOL ebfc52da8ce8798fd6c72873e9865374fee7920eb961da3a2dd309f9f8f73063b0bce591d2903731ddcf561c28ee653190a1e609a942b7cda615433cc602b056 AUX 2.0-no-static-hack.patch 1542 SHA256 75a92094d5f6c6bc2411a40f7432108c07c542e4b96de2b873a42fabf0f768eb SHA512 50c1087eae07fcef306de83ccde7edacea552e498f7dab3fa43626d05c38c9eaabf7a45780b8315b8b9d841da6086ee23cde1e51bf4796ac397e9b8d94bc316b WHIRLPOOL 97ca09dcf34602cce274611d607c0a1356f760a6e5d6b62010cec1fd33d677853b6cdab41fd52aedf0c5e506c331f80c37ec4547fae34ae9fc041fb14e9707ce +AUX 2.0.2-distutils-fix_handling_of_executables_and_flags.patch 15206 SHA256 0e0c1ad3971abf7318c6add811caff2b755ea0e42397cfd92611d47668cf82b4 SHA512 965a10eb8de03d78d4a0b2a0dc23a5f8b9dd54ce42ef0f975cb26ef3de8c07b92f4ca1f415d41156aae3b9d0ce97b27912f7d10b06c24d2f44b371df66613fde WHIRLPOOL b830af87d2881dbf23df89980b3aed0089a4ffa38ebd99b1d93608cf5482377a7d6680a3b446227bae9f9357bbd8c814f4d083f0a057de98faf81522c3dcf15e AUX pypy-1.7-distutils-fix_handling_of_executables_and_flags.patch 18064 SHA256 43cbabdf5f7b094eb969c754bb6513fa324b1fadb40b37d78bd1ad47194d787a SHA512 eb6c70b84d204aca9975efd99ae66f8a629f275173a4551e99250e989fbfb1bc6d8696fa46e4a320425084540f845b6dd9068ebf6f7b17d99351c4d324b64049 WHIRLPOOL ba514f2b4f5746b90d380843bc09974fa3cd0657a8af9da12e4a780d03cd1213b022e92b5d6d0256b204084952f372a4af0f7de3a2a5c0baa7252957334c7546 AUX pypy-1.7-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch 569 SHA256 55ea809a5f3e264b1905b06aa3af78aae149451e7d74a98d11e87629ab69493e SHA512 d4627a762a5cbc45ea3f03686249b6fc206346d0514ecbb4e41c3c20f480c6fd9e689ec156a94dd8f88f4318fb48dc4a7b556e586e9f175627b6177391f64ca3 WHIRLPOOL 4f1b8e235851a52fc63c2022f98fdaa426d49f65a7e01e51625adc54efb0b17081a342db330ad269b8dbd4597db214c9b2cb32195048302addf1926ffb0e2464 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-2.0_beta1.tar.bz2 13654084 SHA256 492fcdd8f37990e7364eb5f2c4b5c2b0f61b44b2603207b200fc2d4e44b413ce SHA512 50b8a26433fc04bb35c9a0669f7da94621eddb3e303c6eaf624b663e7b2f3656a80b238227204938fc22ef3c15fbabf1d04e09d3ddc0377be008f7f40d4c0721 WHIRLPOOL 07e2e430a1d01401a0bfbddb775652acaf09ab05d8d038a644454c9802a463cdb83287620ac8bb3af6f235d21228d1e462e3a041e5770773cb50786740ae259f DIST pypy-2.0_beta2.tar.bz2 14608838 SHA256 f8cdb5b1402dbedd329650cd54925a9c72f2e3140742f289bfa919bf1e190853 SHA512 bcbfa1c0f4f710d3846a1700569cb2aa5e00b5b2cc0a16ae7f2ba6a922e35b22e790984fa9c161939f24b3917fed779c1b29ade5163231cffcbb1763a69053c4 WHIRLPOOL 5615194d0cb8056a2c63d339ad6a53d4ea4c4657e47d3095fbd4b99d003f29d37ad88838c9ea071bf3fb375a1f51b762a77242ff2c91c5abb92d69f47473ea34 EBUILD pypy-1.9-r1.ebuild 3824 SHA256 28babbcc17d1b081558493c8b0bbf568b98367d301ef8afaf060a584eefa6919 SHA512 2ee0246a13e399c7842e445062883c57525ea24314c1cfb43d10e4bb67607560a015dc2ad2ed7a24994ff528a0ea782efbac142ada5ad0a9171ea490494a82dd WHIRLPOOL 4702569f02d402de5e45159df05a272e9e853442c114889c634f3f996770c1f4fe7e3c3d8e8d56765bb03a0ecfdaabfad045e50670bd6452825db06bfd303e9f EBUILD pypy-1.9-r2.ebuild 3897 SHA256 fa1f7192118019b73b6e1c399603cdc98fffc24e29018a9d2bbf2de6364761ca SHA512 920a6691835f8b7822e63b520f5b5d3ba367b55f56d61520552020154c3dd69c79d2b5fae155f3d29a99261f9643b5b12429d8fcf4c6e2f2d928d2f900652323 WHIRLPOOL a6552d90181c09eea456a37d9a253bbcdd29c96956d7113aaa38b5d050f03cc1068fbe2e8e72c6aa7468026ecf30abf6fd642a84d884c451339bb88b60dfab9e EBUILD pypy-1.9.ebuild 3075 SHA256 4c49bc7e33ea8eccc5552e30cd2dab691ed579a5686b71ec97bccfa9336cc798 SHA512 3758cb3f6b0f34e45318e31a5765dffe369f0b63dbed1471f46c2c0c1948359026c413c19c77a95da5e16ebf96034186fc02a6bcf15f62dea5a034f6ccf13468 WHIRLPOOL 544d46da00f3e17c607cd284ac0413ccd565428e1d7a0217d1f2fd1bbb927433a9147b57957b293976c9eb26507e0365fedb26b58af0ad6bfdf6c16b27dd691e +EBUILD pypy-2.0.2.ebuild 3627 SHA256 37dc983a7e9d42668f1de3986a6d1c733cb2b4fcbda611d5276555e029994cf1 SHA512 43cb2a85b7004ba47f676eec88b64f46b30fedd4dd9b3a487991689181e8eb3ce937e076f24b15fb9d7f8b8441d9bdd3fa0de4a094b87971f334a849c29f0180 WHIRLPOOL 1120e18cb759647e74e00152bf8d9561da3865fddbf9ab1e17cebd1d3982a3f4aa5c7cdd4bd90f654141e34fa40fac8e569f40f395af1a0e42b7b064d2ccbc87 EBUILD pypy-2.0_beta1.ebuild 3320 SHA256 6c0cf72ab9059a1d90b6c8eeda1d3c30e392f656fa1cf8616b32fce21f9d536b SHA512 54a68029d6fa41632597cfd402ce78cdde0906a3aba9ffbbe789fbf1b0196ac41cf391a3b7938edaf3a4c3c908047f6d642bb94c3812186849221204ea9b5715 WHIRLPOOL d6205a4cf9934415830a3f231ad9b12ff302cf8120092d62726367610fd94879b89d3ab7c40c4d9ba2418a80264ddc8e1c04ea0ee5836d141c5c154bb33a290c EBUILD pypy-2.0_beta2.ebuild 3871 SHA256 37a0b7aaeb1d1a113e00a11a851eb7fb4dc798349aa2ba7207164fd827efdd66 SHA512 bb4185c136cc35afb63db59c3f4a5ee75e09d35384731c3724cd7a8da7af62d19c98681f7191795a2b06a846ce1c3bde658ccd82411be108a9db7a36cbacc112 WHIRLPOOL e8988022b6d0e0036f19bd86e230db46b3764e48e197da8ff3a006de92651185f5792176186a9eaa7c19c35a97161fa46d15e65e268baf0fb4a8960a0b69e00f -MISC ChangeLog 7530 SHA256 39b4ef17696a66637c28035551576fdf4695adfa1735d2144e55471d533d419e SHA512 8445400fe8b419f5cbfe2411fb4016318a60e315ed5e2a84c25809e0840d6f487383581fda54da4c5ffdac4580dad4b85fb87189b4a45688ef888199cdb7ef01 WHIRLPOOL cf7787c740f8c8e672f01a548b68cbe416db404fd998f239d19966e5110819b5fe79dc4acca5777ff2af0fa1a25e74016c5f66d75bce7948eebbbc5ddbe6edda +MISC ChangeLog 7715 SHA256 683dd37666f463caf7c805d8df25b79b61f0aa9c75c99546e63e7f9a59c28061 SHA512 6743370e51a5c3faff7dce05132020d261424826b8b9a9bce7702bd887841c5fcdceee462ee4fb1906fbb639c34147299cda41de9f8ed1e59d7ab033b5d6d3af WHIRLPOOL 189bbbf8bbe866bf5f42eeb6a34819b3118ba8fc6dc6e2fd52eb2f44344de17de1a874d2fd8e057119ef069a1fa3b6543b4a54fe1af1b5c7e9577414ad2a73eb MISC metadata.xml 388 SHA256 7855e6ef0d921319b41f4f84efb0e68fb5be892d20a300ad2a2eef57a5bb3fd6 SHA512 d69bb950ffc8287d5ee81cd275607e8d77a28900563ecfe7d4f1f3facb5f3619f5a677a4d6244cb9cfd80737c9218058450891ca855b38813c6b59d410045108 WHIRLPOOL b05794c728b9cf9878fd6843275f35552326cba61461d22108f8e666dc4a70c25e08c5a95feffcebe853b3a8f2c3e2894cd4e3ce4003a14f471007fd525cf96f -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iF4EAREIAAYFAlGSSdsACgkQC77qH+pIQ6RA1wD/cvwjQMet35A9ndwcjfROCzDU -ChEB7eZUNYEmY684epwA/AlEw6NxBPTFo2vyzuy++CUtsbUG36KChRqj4AZeR/Hq -=TTl3 +iF4EAREIAAYFAlGhagIACgkQC77qH+pIQ6SYBgD+MLWUDAN40dyaHqU5oQU/32b/ +UAp2kKzNIPfVQfvxBr4A/2AVC2e99N48ac05Vr/LroKXM001obgowrrc06RcOOJn +=kLOt -----END PGP SIGNATURE----- diff --git a/dev-python/pypy/files/2.0.2-distutils-fix_handling_of_executables_and_flags.patch b/dev-python/pypy/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/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/pypy-2.0.2.ebuild b/dev-python/pypy/pypy-2.0.2.ebuild new file mode 100644 index 000000000000..a9528ec096db --- /dev/null +++ b/dev-python/pypy/pypy-2.0.2.ebuild @@ -0,0 +1,133 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/pypy-2.0.2.ebuild,v 1.1 2013/05/26 01:48:49 floppym Exp $ + +EAPI=5 + +# XXX: test other implementations +PYTHON_COMPAT=( python2_7 pypy{1_8,1_9,2_0} ) +inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator + +DESCRIPTION="A fast, compliant alternative implementation of the Python language" +HOMEPAGE="http://pypy.org/" +SRC_URI="mirror://bitbucket/pypy/pypy/downloads/${P}-src.tar.bz2" + +LICENSE="MIT" +SLOT=$(get_version_component_range 1-2 ${PV}) +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="bzip2 doc examples +jit ncurses sandbox shadowstack sqlite ssl +xml" + +RDEPEND=">=sys-libs/zlib-1.1.3 + virtual/libffi + virtual/libintl + dev-libs/expat + bzip2? ( app-arch/bzip2 ) + ncurses? ( sys-libs/ncurses ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( dev-libs/openssl )" +DEPEND="${RDEPEND} + ${PYTHON_DEPS}" +PDEPEND="app-admin/python-updater" + +S="${WORKDIR}/${P}-src" + +pkg_pretend() { + CHECKREQS_MEMORY="2G" + use amd64 && CHECKREQS_MEMORY="4G" + check-reqs_pkg_pretend +# if [[ ${MERGE_TYPE} != binary && "$(gcc-version)" == "4.8" ]]; then +# die "PyPy does not build correctly with GCC 4.8" +# fi +} + +pkg_setup() { + pkg_pretend + 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" +} + +src_compile() { + tc-export CC + + local args=( + $(usex jit -Ojit -O2) + $(usex shadowstack --gcrootfinder=shadowstack '') + $(usex sandbox --sandbox '') + + --make-jobs=$(makeopts_jobs) + + pypy/goal/targetpypystandalone + ) + + # Avoid linking against libraries disabled by use flags + local opts=( + bzip2:bz2 + ncurses:_minimal_curses + ssl:_ssl + ) + + local opt + for opt in "${opts[@]}"; do + local flag=${opt%:*} + local mod=${opt#*:} + + args+=( + $(usex ${flag} --withmod --withoutmod)-${mod} + ) + done + + set -- "${PYTHON}" rpython/bin/rpython --batch "${args[@]}" + echo -e "\033[1m${@}\033[0m" + "${@}" || die "compile error" +} + +src_test() { + PYTHONDONTWRITEBYTECODE="" "${PYTHON}" ./pypy/test_all.py --pypy=./pypy-c lib-python || die +} + +src_install() { + 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} + dodoc README.rst + + if ! use sqlite; then + rm -fr "${ED%/}${INSDESTTREE}"/lib-python/{2.7,modified-2.7}/sqlite3 + rm -f "${ED%/}${INSDESTTREE}"/lib_pypy/_sqlite3.py + fi + + python_export pypy-c${SLOT} EPYTHON PYTHON PYTHON_SITEDIR + + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local PYTHON=${ED%/}${INSDESTTREE}/pypy-c + fi + + runpython() { + PYTHONPATH="${ED%/}${INSDESTTREE}/lib_pypy:${ED%/}${INSDESTTREE}/lib-python/2.7" \ + "${PYTHON}" "$@" + } + + # Generate Grammar and PatternGrammar pickles. + runpython -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ + || die "Generation of Grammar and PatternGrammar pickles failed" + + # Generate cffi cache + runpython -c "import _curses" || die "Failed to import _curses" + if use sqlite; then + runpython -c "import _sqlite3" || die "Failed to import _sqlite3" + fi + + # compile the installed modules + python_optimize "${ED%/}${INSDESTTREE}" + + echo "EPYTHON='${EPYTHON}'" > epython.py + python_domodule epython.py +} |