diff options
author | Michał Górny <mgorny@gentoo.org> | 2016-03-02 21:42:23 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2016-03-02 21:55:52 +0100 |
commit | 9ca4ee47023ace23e15d4fe1341567cbbdf394c7 (patch) | |
tree | 20ecfaab9634dc95ab6d60e5be0dff94c518c9cf /dev-python/pypy-bin | |
parent | net-misc/gsutil: Drop residual SocksiPy-branch reference (diff) | |
download | gentoo-9ca4ee47023ace23e15d4fe1341567cbbdf394c7.tar.gz gentoo-9ca4ee47023ace23e15d4fe1341567cbbdf394c7.tar.bz2 gentoo-9ca4ee47023ace23e15d4fe1341567cbbdf394c7.zip |
dev-python/pypy-bin: Add nossl2 compatible with openssl-1.0.2g
Add a variant rebuilt using openssl-1.0.2g, that is without SSLv2
routines. This variant can be used both with new and old versions of
OpenSSL.
Diffstat (limited to 'dev-python/pypy-bin')
-rw-r--r-- | dev-python/pypy-bin/Manifest | 7 | ||||
-rw-r--r-- | dev-python/pypy-bin/pypy-bin-4.0.1-r1.ebuild | 202 |
2 files changed, 209 insertions, 0 deletions
diff --git a/dev-python/pypy-bin/Manifest b/dev-python/pypy-bin/Manifest index cbbf863b4b10..87ee409dfc8e 100644 --- a/dev-python/pypy-bin/Manifest +++ b/dev-python/pypy-bin/Manifest @@ -18,6 +18,13 @@ DIST pypy-bin-4.0.0-x86+bzip2+ncurses.tar.xz 5803376 SHA256 8f7a87c48801ecc5825a DIST pypy-bin-4.0.1-amd64+bzip2+jit+ncurses+shadowstack.tar.xz 13085168 SHA256 79ab082d2d61a46ef80759455e06afa340a8d31b3eeb5f88f47b7a1bc3370562 SHA512 dd2a0b53bd86511a5e6c8fe4cdc78cda34911082e185d5e5cbe29343132f4e3b7e86e8ed1d826c2937ae9c72aec9944ace8108d0739ad0a83b9869e61fc4e541 WHIRLPOOL b8c1282a408e60006ac8afe8aae1af89b6603ab38961dac188c3474df39db101f8c2b8c887eeca30b34f8f6a84b34161275b4433f380f463cb29d86d118c7ec0 DIST pypy-bin-4.0.1-amd64+bzip2+jit+ncurses.tar.xz 14142344 SHA256 8251d5ac21e7cf49866ee2dfb16656a2369dc23bc8c6f50ac2439631240dc60f SHA512 ba4e4d952e895d11f164a128943d048af880077ee6d5f77154ac9dad9f46188232ff4e33b3d07f67917abfcb79ec8a55e71c2c2d4c287c6616a9b48148615221 WHIRLPOOL 14e03438503e5d914b21d91eb706a58e4772372dce300f6b4aa9be54b86b84c79b7f437d19d010a32988d92fa3645f633f70c241c6a2d6f077c204185529d328 DIST pypy-bin-4.0.1-amd64+bzip2+ncurses.tar.xz 7524080 SHA256 0417f17763a683928534f9394c183742dca917b2ec5c06e8d241bc86deab0860 SHA512 3a048b8a1af3df6b4a3c7611e8fd4d7586805f1f6e56f7a414f7b4b2b2e84d68307f732491c6fe2d72991b4505b841de9870ac1207f9f0799d41a73c9fa69673 WHIRLPOOL fadd736ff0bd8e8a03755b5f8992e86ed14773bc566cadeae17ce326122d5d9ce422ac5b33b80105b0d0f786d03e1aacf714798ec665dd5acbcef87de3bb3266 +DIST pypy-bin-4.0.1-nossl2-amd64+bzip2+jit+ncurses+shadowstack.tar.lz 12866464 SHA256 e3570cc6936bbb2ac38eb93feaf0d2b8e0ad23e5dd03c252018094bd26236c83 SHA512 02d0471dfc64f93eb5ae1a1783673c383c09dc3d3e821c4b4b8755ec2d516e44fcf952b590032f5472425d41ae5854f3da7b0afad52f5149ea42c94f51f67c7a WHIRLPOOL 27d4e88e4935cecb28b4f608fb9f5081b56be99fb523a282ca8ca569d8a94a5f3d591aabffea27c3a7f521a93892de7ec16777ab93c0823912f13a30529bbf71 +DIST pypy-bin-4.0.1-nossl2-amd64+bzip2+jit+ncurses.tar.lz 13825775 SHA256 d92924a933d058d89d3d6a9feba51b8595a6143fd41be14bd39b6588d5501246 SHA512 206b2fc285ef9f41905e947caf27afe8ba20a85724a2ec4b11f06d69f3a091732c5e5c80825afadea447c9babcf9ecf7a95197e410b725a35717bd687fe91387 WHIRLPOOL 30262866b2ceb6cc03cbc035402b1a182535291ca50ac5416cd9e53195017ea7278928fffc30f99c1726f764093e00671e1e8c766a4ebf541f695c45378fcc85 +DIST pypy-bin-4.0.1-nossl2-amd64+bzip2+ncurses.tar.lz 7379496 SHA256 68918d38ef314fed1d2cb81c9f8ed2a3d3736d935ebf90f8367154d0504830e1 SHA512 f7b2454124278cad9157797eeee90ddbd54257f9e1eb746729b9c5ee20a18b0cd0191f60a686e7a24c6929cff3efd79d221eccc6b09a999f4815771ad7f30c41 WHIRLPOOL 2b8718a930d363d7dba395a32dd20c493ffc45ca11273b005d6020110e597d56720cf066b6d0b6a07ad0c311748d9facb20b2de3ec5c6408d0f37a13485d411a +DIST pypy-bin-4.0.1-nossl2-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz 10236548 SHA256 dbb57437ed135989934fb4582149b55c869da75c331a9b55481003c846d325b6 SHA512 257646eedde238060770ad6a446d67f8b1045c0166d6f8538d3ddd9aaf4c6c1856067c4a1d9785848e3ce10e2b246983850ffd3f5e3b090dd425b86c52cef5a9 WHIRLPOOL 0220b01661dd5701d9a3f73dea7029e1a82e635f88579ef4b28ebdbff511099b51003dfc821a490d3cd36592347d9fbf198cb2f3e88ba6ca6f057d258bd3ba44 +DIST pypy-bin-4.0.1-nossl2-x86+bzip2+jit+ncurses+sse2.tar.lz 11354814 SHA256 28a79c754c3da50de376ec957004236097855c3f5da942eb6f09e5a5d2492a58 SHA512 38a6381c08912dab200ea1925f3390b6a47f612b63ab7c2741ee4747ae3e7f2d60fb6832dab55796d0703d44a2d943e90fadcf120c4a1241150336c4b54f5c56 WHIRLPOOL 79db04119f34336a998f0aab6c1df4136bef358ad74e1d245c90334664c3ed413c496021cfcc1f027d157c26a621e3c12782673527bb659f377943ae36cf38e1 +DIST pypy-bin-4.0.1-nossl2-x86+bzip2+ncurses+sse2.tar.lz 6014446 SHA256 3c18d0e35f0baf2391156156a63e9e6af643445881641ab2a52e3169021cba61 SHA512 7b098dd7b6f099f775e7f582f67c9969ca16c8134abba37df2a395d22cc2ec7c25b5a1fcf069eababf4f719921814646b77eeceb7d222f8131f83a249cc6cf70 WHIRLPOOL 36e51b38d4be88b64de33c1ad760d9ee33259bba29ddfe8d134d0586a699ba7c3609b33b548a24ed895ab4e54885a6b41b7c6ef3d7266c569c4ce1d146a29cca +DIST pypy-bin-4.0.1-nossl2-x86+bzip2+ncurses.tar.lz 6018557 SHA256 dfb4f2631a3acb5b8dbdd83213cf5b010f59419380e0f1726f57cac3ef7297ca SHA512 7d5a6b225e11f2fdfcc010fd3b771a69a77bafb6eb91da7a1c4282eba39de5447525f5274975e8d849adc74126a31960c9cacdc6aa7a7c479cdb84ca3121973b WHIRLPOOL 3c7a05c8b053088e992f0599a8ac51c95774160a99a2520e136b98f69b984bd03536f9e0171e943655c759b37ca9f996358c353e0fc8255c2cc9f0b508e622a9 DIST pypy-bin-4.0.1-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.xz 9948032 SHA256 d77948a7fd055303fe261f3364128793e61aa49bbad06488f924331082eb9fe4 SHA512 c7269694195064ed7ca5464d79b2efd3ad0ae7d409e3694a6b1cb7c9fb99a460f55393f02db795875214243ba616de58ec321f39e97c1eb6fa1ba3365fb56dbf WHIRLPOOL 394176b7bbd4d8cefe44cb209a0479eddb588f31c429f4576bd3f6d9f8497ae0108567a8f3f9d5a272170f61197635abc589bbb32ba5b59687ead5d64736f69d DIST pypy-bin-4.0.1-x86+bzip2+jit+ncurses+sse2.tar.xz 11110500 SHA256 7cf8334c8f6fbdfbc4a08b8767e23bbe51f8082ad190c109b9e5d6fa7e1c5b77 SHA512 c5f9ee5997c84ea190d40ce0af052e6a401e4ad104ddc5bab69426913c29d0affe87a7fcb688fb7ad6862a7cd74ad4e8675ecdc8c0efe918cdef23f7516fabdb WHIRLPOOL 692ecfadda6020981510aa1ac85c4b8ff6ed6addf6b1f9fc2a7ca3a98e1630efd5fee917e3c6a25d7c7298ebbc9da7f4f9b628529896f0ca2de7149fc7496739 DIST pypy-bin-4.0.1-x86+bzip2+ncurses+sse2.tar.xz 5820624 SHA256 480b5fdfcc8757dfd44a3368627944c1234835ee01259572f94587fd134e74c4 SHA512 62f0b7c81fc7d3e71a4d43c81a8f212026d0390e52da2aa7ebb5f19d17bd1c8ce7c4760b9317e2782eba536e07f21afc19ab3a4c3bc04c5a28360a52ec7e1bb7 WHIRLPOOL af25d3b7903969a4488a5051b9dca8bea3987e6f4b16a8ff11e0d5089e3b788b9d2df4550f068ffb63d52f04f7f0ebb4f3ff9288d31b5f773b30cef90a80bafa diff --git a/dev-python/pypy-bin/pypy-bin-4.0.1-r1.ebuild b/dev-python/pypy-bin/pypy-bin-4.0.1-r1.ebuild new file mode 100644 index 000000000000..21a34e24284b --- /dev/null +++ b/dev-python/pypy-bin/pypy-bin-4.0.1-r1.ebuild @@ -0,0 +1,202 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 pypy ) +inherit eutils multilib pax-utils python-any-r1 unpacker versionator + +BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}-nossl2" +CPY_PATCHSET_VERSION="2.7.10-0" + +DESCRIPTION="Pre-built version of PyPy" +HOMEPAGE="http://pypy.org/" +SRC_URI="https://bitbucket.org/pypy/pypy/downloads/pypy-${PV}-src.tar.bz2 + https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz + amd64? ( + jit? ( shadowstack? ( + ${BINHOST}/${P}-nossl2-amd64+bzip2+jit+ncurses+shadowstack.tar.lz + ) ) + jit? ( !shadowstack? ( + ${BINHOST}/${P}-nossl2-amd64+bzip2+jit+ncurses.tar.lz + ) ) + !jit? ( !shadowstack? ( + ${BINHOST}/${P}-nossl2-amd64+bzip2+ncurses.tar.lz + ) ) + ) + x86? ( + cpu_flags_x86_sse2? ( + jit? ( shadowstack? ( + ${BINHOST}/${P}-nossl2-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz + ) ) + jit? ( !shadowstack? ( + ${BINHOST}/${P}-nossl2-x86+bzip2+jit+ncurses+sse2.tar.lz + ) ) + !jit? ( !shadowstack? ( + ${BINHOST}/${P}-nossl2-x86+bzip2+ncurses+sse2.tar.lz + ) ) + ) + !cpu_flags_x86_sse2? ( + !jit? ( !shadowstack? ( + ${BINHOST}/${P}-nossl2-x86+bzip2+ncurses.tar.lz + ) ) + ) + )" + +# Supported variants +REQUIRED_USE="!jit? ( !shadowstack ) + x86? ( !cpu_flags_x86_sse2? ( !jit !shadowstack ) )" + +LICENSE="MIT" +SLOT="0/$(get_version_component_range 1-2 ${PV})" +KEYWORDS="~amd64 ~x86" +IUSE="doc gdbm +jit +shadowstack sqlite cpu_flags_x86_sse2 test tk" + +# yep, world would be easier if people started filling subslots... +RDEPEND=" + app-arch/bzip2:0 + dev-libs/expat:0 + dev-libs/libffi:0 + dev-libs/openssl:0[-bindist] + sys-libs/glibc:2.2 + sys-libs/ncurses:0/6 + sys-libs/zlib:0 + gdbm? ( sys-libs/gdbm:0= ) + sqlite? ( dev-db/sqlite:3= ) + tk? ( + dev-lang/tk:0= + dev-tcltk/tix:0= + ) + !dev-python/pypy:0" +DEPEND="app-arch/lzip + app-arch/xz-utils + doc? ( ${PYTHON_DEPS} + dev-python/sphinx ) + test? ( ${RDEPEND} )" +PDEPEND="app-admin/python-updater" + +S=${WORKDIR}/pypy-${PV}-src + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]]; then + use doc && python-any-r1_pkg_setup + fi +} + +src_prepare() { + epatch "${FILESDIR}/4.0.0-gentoo-path.patch" \ + "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" + + sed -e "s^@EPREFIX@^${EPREFIX}^" \ + -e "s^@libdir@^$(get_libdir)^" \ + -i lib-python/2.7/distutils/command/install.py || die + + # apply CPython stdlib patches + pushd lib-python/2.7 > /dev/null || die + epatch "${FILESDIR}"/2.5.0_all_distutils_cxx.patch \ + "${WORKDIR}"/patches/22_all_turkish_locale.patch \ + "${WORKDIR}"/patches/62_all_xml.use_pyxml.patch + popd > /dev/null || die + + epatch_user +} + +src_compile() { + # Tadaam! PyPy compiled! + mv "${WORKDIR}"/${P}*/{libpypy-c.so,pypy-c} . || die + mv "${WORKDIR}"/${P}*/include/*.h include/ || die + mv pypy/module/cpyext/include/*.h include/ || die + mv pypy/module/cpyext/include/numpy include/ || die + + use doc && emake -C pypy/doc/ html + #needed even without jit :( also needed in both compile and install phases + pax-mark m pypy-c + + # ctypes config cache + # this one we need to do with python2 too... + ./pypy-c lib_pypy/ctypes_config_cache/rebuild.py \ + || die "Failed to rebuild ctypes config cache" +} + +src_test() { + # (unset) + local -x PYTHONDONTWRITEBYTECODE + + ./pypy-c ./pypy/test_all.py --pypy=./pypy-c lib-python || die +} + +src_install() { + einfo "Installing PyPy ..." + insinto "/usr/$(get_libdir)/pypy" + doins -r include lib_pypy lib-python pypy-c libpypy-c.so + fperms a+x ${INSDESTTREE}/pypy-c ${INSDESTTREE}/libpypy-c.so + pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" "${ED%/}${INSDESTTREE}/libpypy-c.so" + dosym ../$(get_libdir)/pypy/pypy-c /usr/bin/pypy + dodoc README.rst + + if ! use gdbm; then + rm -r "${ED%/}${INSDESTTREE}"/lib_pypy/gdbm.py \ + "${ED%/}${INSDESTTREE}"/lib-python/*2.7/test/test_gdbm.py || die + fi + if ! use sqlite; then + rm -r "${ED%/}${INSDESTTREE}"/lib-python/*2.7/sqlite3 \ + "${ED%/}${INSDESTTREE}"/lib_pypy/_sqlite3.py \ + "${ED%/}${INSDESTTREE}"/lib-python/*2.7/test/test_sqlite.py || die + fi + if ! use tk; then + rm -r "${ED%/}${INSDESTTREE}"/lib-python/*2.7/{idlelib,lib-tk} \ + "${ED%/}${INSDESTTREE}"/lib_pypy/_tkinter \ + "${ED%/}${INSDESTTREE}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die + fi + + # Install docs + use doc && dohtml -r pypy/doc/_build/html/ + + einfo "Generating caches and byte-compiling ..." + + local -x PYTHON=${ED%/}${INSDESTTREE}/pypy-c + local -x LD_LIBRARY_PATH="${ED%/}${INSDESTTREE}" + # we can't use eclass function since PyPy is dumb and always gives + # paths relative to the interpreter + local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy/site-packages + python_export pypy EPYTHON + + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + # Generate Grammar and PatternGrammar pickles. + "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ + || die "Generation of Grammar and PatternGrammar pickles failed" + + # Generate cffi modules + # Please keep in sync with pypy/tool/build_cffi_imports.py! +#cffi_build_scripts = { +# "sqlite3": "_sqlite3_build.py", +# "audioop": "_audioop_build.py", +# "tk": "_tkinter/tklib_build.py", +# "curses": "_curses_build.py" if sys.platform != "win32" else None, +# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, +# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, +# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, + cffi_targets=( audioop curses syslog gdbm pwdgrp ) + use gdbm && cffi_targets+=( gdbm ) + use sqlite && cffi_targets+=( sqlite3 ) + use tk && cffi_targets+=( tkinter/tklib ) + + local t + # all modules except tkinter output to . + # tkinter outputs to the correct dir ... + cd "${ED%/}${INSDESTTREE}"/lib_pypy || die + for t in "${cffi_targets[@]}"; do + # tkinter doesn't work via -m + "${PYTHON}" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" + done + + # Cleanup temporary objects + find "${ED%/}${INSDESTTREE}" -name "_cffi_*.[co]" -delete || die + find "${ED%/}${INSDESTTREE}" -type d -empty -delete || die + + # compile the installed modules + python_optimize "${ED%/}${INSDESTTREE}" +} |