* [gentoo-commits] dev/mgorny:master commit in: dev-python/pypy-bin/, dev-python/pypy-bin/files/
@ 2013-07-25 9:27 Michał Górny
0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2013-07-25 9:27 UTC (permalink / raw
To: gentoo-commits
commit: 3b80094eb69cd295c93b8a628f97a6e6a5b9efee
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 25 09:27:14 2013 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jul 25 09:27:14 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=3b80094e
dev-python/pypy-bin: Add 1.9 binpackages by hasufell & xmw.
Package-Manager: portage-2.2.0_alpha188
---
dev-python/pypy-bin/Manifest | 8 +
...ils-fix_handling_of_executables_and_flags.patch | 391 +++++++++++++++++++++
...-get_python_lib_standard_lib-04ea518e5b71.patch | 24 ++
.../files/1.9-getargs-freelist-c26dc70ee340.patch | 212 +++++++++++
.../files/1.9-more-ignored-ops-146ddf82a279.patch | 25 ++
.../files/1.9-more-ignored-ops-a9a8faa76bca.patch | 32 ++
.../files/1.9-no-bytecode-4151f9c406b6.patch | 27 ++
dev-python/pypy-bin/files/1.9-no-static-hack.patch | 30 ++
...buffer-release-double-decref-4ec2a5b49386.patch | 29 ++
.../pypy-bin/files/1.9-signal-a33052b17f4e.patch | 65 ++++
.../files/1.9-ssl-errors-25d3418150d2.patch | 34 ++
.../files/1.9-ssl-threads-1-34b3b5aac082.patch | 143 ++++++++
.../files/1.9-ssl-threads-2-25cd11066d95.patch | 22 ++
.../{pypy-bin-2.0.2.ebuild => pypy-bin-1.9.ebuild} | 38 +-
dev-python/pypy-bin/pypy-bin-2.0.2.ebuild | 3 +-
15 files changed, 1065 insertions(+), 18 deletions(-)
diff --git a/dev-python/pypy-bin/Manifest b/dev-python/pypy-bin/Manifest
index c3f7a42..48ca61c 100644
--- a/dev-python/pypy-bin/Manifest
+++ b/dev-python/pypy-bin/Manifest
@@ -1,4 +1,12 @@
+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
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 0000000..4a35ea8
--- /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-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 0000000..e6c98a5
--- /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 0000000..70619dc
--- /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 0000000..146399d
--- /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 0000000..51a53ca
--- /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 0000000..5fab3a5
--- /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 0000000..fe75ac2
--- /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 0000000..58c301e
--- /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-signal-a33052b17f4e.patch b/dev-python/pypy-bin/files/1.9-signal-a33052b17f4e.patch
new file mode 100644
index 0000000..6087122
--- /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 0000000..78affe9
--- /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 0000000..ac5d7ad
--- /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 0000000..a1878f3
--- /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/pypy-bin-2.0.2.ebuild b/dev-python/pypy-bin/pypy-bin-1.9.ebuild
similarity index 73%
copy from dev-python/pypy-bin/pypy-bin-2.0.2.ebuild
copy to dev-python/pypy-bin/pypy-bin-1.9.ebuild
index effbbd0..292bb6a 100644
--- a/dev-python/pypy-bin/pypy-bin-2.0.2.ebuild
+++ b/dev-python/pypy-bin/pypy-bin-1.9.ebuild
@@ -1,18 +1,17 @@
# 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.3 2013/06/18 10:41:29 idella4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/pypy-1.9-r2.ebuild,v 1.5 2013/07/22 06:54:59 mgorny Exp $
EAPI=5
-# XXX: test other implementations
PYTHON_COMPAT=( python2_7 pypy{1_8,1_9,2_0} )
-inherit eutils multilib pax-utils python-any-r1 versionator
+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="mirror://bitbucket/pypy/pypy/downloads/pypy-${PV}-src.tar.bz2
+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
@@ -49,7 +48,7 @@ REQUIRED_USE="!jit? ( !shadowstack )
LICENSE="MIT"
SLOT=$(get_version_component_range 1-2 ${PV})
-KEYWORDS="~amd64"
+KEYWORDS="~amd64 ~x86"
IUSE="doc +jit shadowstack sqlite sse2 test"
RDEPEND="
@@ -73,16 +72,29 @@ DEPEND="doc? ( dev-python/sphinx )
test? ( ${RDEPEND} )"
PDEPEND="app-admin/python-updater"
-S=${WORKDIR}/pypy-${PV}-src
+S=${WORKDIR}/pypy-${PV}
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 "${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
}
@@ -111,7 +123,7 @@ src_install() {
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
+ dodoc README
if ! use sqlite; then
rm -r "${ED%/}${INSDESTTREE}"/lib-python/*2.7/sqlite3 || die
@@ -138,12 +150,6 @@ src_install() {
"${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}"
}
diff --git a/dev-python/pypy-bin/pypy-bin-2.0.2.ebuild b/dev-python/pypy-bin/pypy-bin-2.0.2.ebuild
index effbbd0..b4d1794 100644
--- a/dev-python/pypy-bin/pypy-bin-2.0.2.ebuild
+++ b/dev-python/pypy-bin/pypy-bin-2.0.2.ebuild
@@ -4,7 +4,6 @@
EAPI=5
-# XXX: test other implementations
PYTHON_COMPAT=( python2_7 pypy{1_8,1_9,2_0} )
inherit eutils multilib pax-utils python-any-r1 versionator
@@ -49,7 +48,7 @@ REQUIRED_USE="!jit? ( !shadowstack )
LICENSE="MIT"
SLOT=$(get_version_component_range 1-2 ${PV})
-KEYWORDS="~amd64"
+KEYWORDS="~amd64 ~x86"
IUSE="doc +jit shadowstack sqlite sse2 test"
RDEPEND="
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-25 9:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-25 9:27 [gentoo-commits] dev/mgorny:master commit in: dev-python/pypy-bin/, dev-python/pypy-bin/files/ Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox