diff options
author | Michał Górny <mgorny@gentoo.org> | 2014-06-30 10:30:59 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2014-06-30 10:30:59 +0200 |
commit | 7e36c68a53910f208788c822a1d12fa12582669f (patch) | |
tree | ec749c40d4b32accf1bf72ff52e5ce7f9e2fea0d /dev-python | |
parent | distcc symlinks should point to distcc, not gcc. (diff) | |
download | mgorny-7e36c68a53910f208788c822a1d12fa12582669f.tar.gz mgorny-7e36c68a53910f208788c822a1d12fa12582669f.tar.bz2 mgorny-7e36c68a53910f208788c822a1d12fa12582669f.zip |
dev-python/pypy-binpackage: bump.
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/pypy-binpackage/Manifest | 2 | ||||
-rw-r--r-- | dev-python/pypy-binpackage/files/2.3-21_all_distutils_c++.patch | 321 | ||||
-rw-r--r-- | dev-python/pypy-binpackage/pypy-binpackage-2.3.1.ebuild (renamed from dev-python/pypy-binpackage/pypy-binpackage-2.0.2.ebuild) | 40 |
3 files changed, 339 insertions, 24 deletions
diff --git a/dev-python/pypy-binpackage/Manifest b/dev-python/pypy-binpackage/Manifest index 876272d..4bea985 100644 --- a/dev-python/pypy-binpackage/Manifest +++ b/dev-python/pypy-binpackage/Manifest @@ -1,2 +1,2 @@ -DIST pypy-2.0.2-src.tar.bz2 14819848 SHA256 1991c90d6b98e2408b3790d4b57b71ec1c69346328b8321505ce8f6ab4544c3c SHA512 5b8b56194dff468dd249dea0014fadafb791eb69858ffae0b9c7638f087df277a84ddadc7d5b0fdb48a12ca8e6b70eb95cb5b7a5f56fe8fe3396820b814ecfd7 WHIRLPOOL bb1f71e0b2d3e145edcb1baa17b0a13c09f5229cf1b0532edbb3d0d5c87ef39543c0ef6b9dc7ce2778c4a3336d4a1580fce9cf960f82b72ddfed02e06d10d8af DIST pypy-2.2.1-src.tar.bz2 14439822 SHA256 252045187e443656a2beb412dadac9296e8fe8db0f75a66ed5265db58c35035f SHA512 68b52c5b1a9b96593aa1dd38ad0b1b7b282852008e3ae3c488a5e19ab2bede68e2b40afdb79d85a4ab21cb1da6647b8b958fcefe34c99a1f6cbc1a19d695d3b6 WHIRLPOOL 6eca63959d8ee5663f868daaaac32ad1180b07e2f8b63d839652902095a098ffbfa29c6f83451733270a4b2f73b65450cb3b80a878b9dd1ec71089bfff11e9f6 +DIST pypy-2.3.1-src.tar.bz2 15225332 SHA256 3fd10d97c0177c33ed358a78eb26f5bf1f91b266af853564b1a9d8c310a1e439 SHA512 86aab86c5f413cdd6a56680915605de5c1416255b43a8dce1b4dcf8f1febdb3275076a4a9c7de30002387d59e4171a52da2528436eb205d8d947de7edd049c65 WHIRLPOOL c78d41240f1803d9461f797fd0ef647a40a6990a4e3a504e80a0eaaf460d052bb60fe6240cacdb3ee8737500c9c7f418b1d55c619d01ac7b73aace3d82157aa6 diff --git a/dev-python/pypy-binpackage/files/2.3-21_all_distutils_c++.patch b/dev-python/pypy-binpackage/files/2.3-21_all_distutils_c++.patch new file mode 100644 index 0000000..2787360 --- /dev/null +++ b/dev-python/pypy-binpackage/files/2.3-21_all_distutils_c++.patch @@ -0,0 +1,321 @@ +http://bugs.python.org/issue1222585 + +--- Lib/distutils/cygwinccompiler.py ++++ Lib/distutils/cygwinccompiler.py +@@ -117,8 +117,10 @@ + # dllwrap 2.10.90 is buggy + if self.ld_version >= "2.10.90": + self.linker_dll = "gcc" ++ self.linker_dll_cxx = "g++" + else: + self.linker_dll = "dllwrap" ++ self.linker_dll_cxx = "dllwrap" + + # ld_version >= "2.13" support -shared so use it instead of + # -mdll -static +@@ -132,9 +134,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_cxx, shared_option))) + + # cygwin and mingw32 need different sets of libraries + if self.gcc_version == "2.91.57": +@@ -160,8 +166,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 + +@@ -327,9 +337,14 @@ + self.set_executables(compiler='gcc%s -O -Wall' % no_cygwin, + compiler_so='gcc%s -mdll -O -Wall' % no_cygwin, + compiler_cxx='g++%s -O -Wall' % no_cygwin, ++ compiler_so_cxx='g++%s -mdll -O -Wall' % no_cygwin, + linker_exe='gcc%s' % no_cygwin, + linker_so='%s%s %s %s' + % (self.linker_dll, no_cygwin, ++ shared_option, entry_point), ++ linker_exe_cxx='g++%s' % no_cygwin, ++ linker_so_cxx='%s%s %s %s' ++ % (self.linker_dll_cxx, no_cygwin, + shared_option, entry_point)) + # Maybe we should also append -mthreads, but then the finished + # dlls need another dll (mingwm10.dll see Mingw32 docs) +--- Lib/distutils/emxccompiler.py ++++ Lib/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/distutils/sysconfig_cpython.py ++++ Lib/distutils/sysconfig_cpython.py +@@ -170,10 +170,12 @@ + _osx_support.customize_compiler(_config_vars) + _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' + +- (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 = '' + + if 'CC' in os.environ: + newcc = os.environ['CC'] +@@ -188,19 +190,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: +@@ -209,13 +219,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 +--- Lib/distutils/unixccompiler.py ++++ Lib/distutils/unixccompiler.py +@@ -55,14 +55,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": +@@ -112,12 +115,19 @@ + + 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 = _osx_support.compiler_fixup(compiler_so, + cc_args + extra_postargs) ++ compiler_so_cxx = _osx_support.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 + +@@ -174,23 +184,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 = _osx_support.compiler_fixup(linker, ld_args) +--- Lib/_osx_support.py ++++ Lib/_osx_support.py +@@ -14,13 +14,13 @@ + # configuration variables that may contain universal build flags, + # like "-arch" or "-isdkroot", that may need customization for + # the user environment +-_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', +- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', +- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', +- 'PY_CORE_CFLAGS') ++_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', ++ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED', ++ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', ++ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS') + + # configuration variables that may contain compiler calls +-_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') ++_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX') + + # prefix added to original configuration variable names + _INITPRE = '_OSX_SUPPORT_INITIAL_' +--- a/distutils/sysconfig_pypy.py ++++ b/distutils/sysconfig_pypy.py +@@ -123,7 +123,55 @@ + 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 "CPPFLAGS" in os.environ: + cppflags = shlex.split(os.environ["CPPFLAGS"]) diff --git a/dev-python/pypy-binpackage/pypy-binpackage-2.0.2.ebuild b/dev-python/pypy-binpackage/pypy-binpackage-2.3.1.ebuild index 0e390b0..833c324 100644 --- a/dev-python/pypy-binpackage/pypy-binpackage-2.0.2.ebuild +++ b/dev-python/pypy-binpackage/pypy-binpackage-2.3.1.ebuild @@ -1,24 +1,22 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2014 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-2.2.1.ebuild,v 1.2 2014/03/12 09:14:21 mgorny Exp $ EAPI=5 -# pypy should be preferred, per upstream. -# that's the easiest way of forcing it. -PYTHON_COMPAT=( pypy{1_8,1_9,2_0} ) -inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator - +PYTHON_COMPAT=( python2_7 pypy2_0 ) +inherit check-reqs eutils multilib multiprocessing pax-utils \ + python-any-r1 toolchain-funcs versionator MY_P=pypy-${PV} DESCRIPTION="A fast, compliant alternative implementation of the Python language" HOMEPAGE="http://pypy.org/" -SRC_URI="mirror://bitbucket/pypy/pypy/downloads/${MY_P}-src.tar.bz2" +SRC_URI="https://bitbucket.org/${PN}/${PN}/get/release-${PV}.tar.bz2 -> ${MY_P}-src.tar.bz2" LICENSE="MIT" -SLOT=0 +SLOT="0/$(get_version_component_range 1-2 ${PV})" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="bzip2 +jit ncurses sandbox shadowstack sse2" +IUSE="bzip2 +jit ncurses sandbox shadowstack sqlite sse2" DEPEND=">=sys-libs/zlib-1.1.3 virtual/libffi @@ -33,19 +31,11 @@ DEPEND=">=sys-libs/zlib-1.1.3 S="${WORKDIR}/${MY_P}-src" pkg_pretend() { - if [[ ! ${PYPY_BINPKG_STORE} ]]; then - eerror "Please set PYPY_BINPKG_STORE to the location where built" - eerror "packages are to be stored." - - die "Set PYPY_BINPKG_STORE." - fi - 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 + + [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!' } pkg_setup() { @@ -78,7 +68,10 @@ 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" + + pushd lib-python/2.7 > /dev/null || die + epatch "${FILESDIR}/2.3-21_all_distutils_c++.patch" + popd > /dev/null || die epatch_user } @@ -107,6 +100,7 @@ src_compile() { fi local args=( + --shared $(usex jit -Ojit -O2) $(usex shadowstack --gcrootfinder=shadowstack '') $(usex sandbox --sandbox '') @@ -151,12 +145,12 @@ src_install() { einfo "Zipping PyPy ..." mkdir "${BIN_P}${suffix}"{,/include} || die - mv pypy-c "${BIN_P}${suffix}"/ || die + mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die mv include/pypy_* "${BIN_P}${suffix}"/include/ || die chmod +x "${BIN_P}${suffix}"/pypy-c || die tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die - xz -vz9 "${BIN_P}${suffix}.tar" || die + xz -vz9e "${BIN_P}${suffix}.tar" || die } # Yup, very hacky. |