diff options
-rw-r--r-- | dev-python/pypy-bin/Manifest | 9 | ||||
-rw-r--r-- | dev-python/pypy-bin/pypy-bin-5.1.1.ebuild | 203 |
2 files changed, 212 insertions, 0 deletions
diff --git a/dev-python/pypy-bin/Manifest b/dev-python/pypy-bin/Manifest index d16631d45e06..9429660f940c 100644 --- a/dev-python/pypy-bin/Manifest +++ b/dev-python/pypy-bin/Manifest @@ -1,5 +1,6 @@ DIST pypy-4.0.1-src.tar.bz2 17172844 SHA256 29f5aa6ba17b34fd980e85172dfeb4086fdc373ad392b1feff2677d2d8aea23c SHA512 66358cc3fe9ccb402b717379c48731aca8f9f85a1a754a54e3a060113398955b87a3f3048ba731a93be4b49c0f5c7e3bac49dc4523263e1bf4f4b5149d5db5c4 WHIRLPOOL 656a6c60aeb26cb6355db121a92bafcf2b744a7f09dccf21b4a16052c0117d239891ccf6762fcb4fee7f913862263c589becd5984498edc4a8b6d55784957994 DIST pypy-5.0.0-src.tar.bz2 17223494 SHA256 89027b1b33553b53ff7733dc4838f0a76af23552c0d915d9f6de5875b8d7d4ab SHA512 2af686cdad13a1083114a03a7361f58c4dd482e3a83a63b43f8d40922a11120383f91deb6f1607510c4bbd22fd8c59dcf1b58406c2e5cf5548a48542e1b20f89 WHIRLPOOL 61c9ada98e710019832cb6468e68c8b17e429e48f2ea0480371b2f04521bc77ab774a21dba2280bb40b97e528ad391a83d139bb839461899f9dc214d60683716 +DIST pypy-5.1.1-src.tar.bz2 17328934 SHA256 ca3d943d7fbd78bb957ee9e5833ada4bb8506ac99a41b7628790e286a65ed2be SHA512 2d81b62747ac02980c275fe24fff689e93b4b352e6279c55ca570fd76b8477a55f819e81fab4c6ffdb6991f29536c606d75e238d5bbe04518357509020f23ca9 WHIRLPOOL 17f78c8c7df9e07af3fce15392061652284606fbd872706888094ec01d222957c8ee43d2667369377ceb1a9720692d130e4a540bcaff269b4c7d8896b14d708d 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 @@ -14,4 +15,12 @@ DIST pypy-bin-5.0.0-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz 12236672 SHA25 DIST pypy-bin-5.0.0-x86+bzip2+jit+ncurses+sse2.tar.lz 13455503 SHA256 14b394128fabcad4f20ff8d2a7e7c10803df3a2848bf127e8f3a55842dafe4c5 SHA512 83feea832c2e14ea32b94be7b4e995d6bff58405b285558046f7ea61e7dd6b36b3773a82d3fde6ec7d40033fb3b22eac68613fa22c6bfd8bb5cd7fccb8a3d0fe WHIRLPOOL e62ae915afdec396fc282f498a903ed8a3c81bda89eadeae039ab3ce84289d694804716cfedba95581846b11e9aabe7a6cc17624d8c240561fe8f1f9519e800c DIST pypy-bin-5.0.0-x86+bzip2+ncurses+sse2.tar.lz 6663632 SHA256 7ed2967c00943778d5ee7c5402281758d507cf90b3f9ba42718f8b2246cd3886 SHA512 1fc1accf62e8938b83be2ff997dbb1a93d4909405e30a5c82b470d9f520dc43d20072e16bf52f3c6bde5ce6f1d4271f5b7c8a5dc779f89e9d6f9602c2becf1b8 WHIRLPOOL db058f915fea4665a47427d21bdee0fde7a38e11e006d7347c6262b9ea8c39190eff1881928710899fd3ffeb2aca2572c8aca876d17fce089f0c7c4be321f240 DIST pypy-bin-5.0.0-x86+bzip2+ncurses.tar.lz 6697972 SHA256 4af0a05172b06ef20031efcb996571ef5ab44a8655dd9c4e0887c0fbf1f8c8cd SHA512 c71e4bd604e921f64a1c7ef1f55f39c29e1a063974d15a0c345a3e99bd26ab187634f1724592ccb869b4252e3c76ff411a7b87c26d98613720da5841a82865ba WHIRLPOOL 22a11bb7e1c92e9c829f428d3f2db7778ecf6a23c0ff8859b1f7c01a6aec84e30e161bd2adcea0fc1e5ae77a38ae4b0d115f81240db51e6e186eef4ae296d52a +DIST pypy-bin-5.1.1-amd64+bzip2+jit+ncurses+shadowstack.tar.lz 13379736 SHA256 1e437284932dd019677a61b0595179c08e136f014bf3eddf2d401a050f91ae8b SHA512 5d535ada8684a201c5e1419ab062f56f68ef3126feaee75731d47e6d18722f5a662d6d8bc3501213788e91840291467ffd5397c977c001431a2ef86ef967d8de WHIRLPOOL 9814b7c3b27ff605413d24ed75d5cde69f91fd7a0685814e4310aa7c20b457a48a7fdbe4963f27ab7f0ff65c88a17f01a0d30a15857f702650ccdee45d5d1ce6 +DIST pypy-bin-5.1.1-amd64+bzip2+jit+ncurses.tar.lz 14365788 SHA256 8a7266fa0385fa7ce52de0fc5a32c6e3209356e345e28753cfd89201387f650b SHA512 5fb1ed357df7ca4aebfb4fbde829ed9883d1528971663a1fee8a017c0416ac2e4a44b794a8cd3a3471b659d296c7fc7fecf211243c688e3abf5dfda7a4d3c131 WHIRLPOOL 415ce7d65684a48b9ed31dddbfc3e6c27510610c3f03ee00fb4f64d2c868e35908935d071cff10bbd10a272c803756abc3a5cd4ddd383b0fedc26ddfe2b261e7 +DIST pypy-bin-5.1.1-amd64+bzip2+ncurses.tar.lz 7516589 SHA256 c48386cf009fe2ac5c8f8eb122b2b2267767efe4f5f0f14fa347e6a4b9e3d8a0 SHA512 c0ce885f62960e8a2edbd7ffaa6d5f5199af679cbb7ada34d2916849346c53f86e9e3f8490da2e9cb460c4b5716aa2d95568e75ddc36d8d482ec3ec8d518f448 WHIRLPOOL 33bf9ccd6a8df69fe16733f0c08716790cb89493f3285c0d7fd467e63432adf95a046dacc561deefe9c7752740e9921c0816c19b0e4553d517e17628c339184d +DIST pypy-bin-5.1.1-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz 10613022 SHA256 1157f3d189e7ce519fdf5312e9b71bae904dd0802289c932878c3e81dd781c7e SHA512 30aa2bd34ac5d7c43b062db2a4718d1266297f050297b7ade947c35c299c0317253cc98e592d586806dbcc9e142d59588595cb607e84fcb89556d071bd0b0869 WHIRLPOOL 09e39dbba60102561a1ac0e6ffedd65b76ad929f4e4e4855a700a1d014122069d0df3f3e7b94fcdc4c7f872dbefaba165814a8ddbc0572b2b487ec1ce00e9a15 +DIST pypy-bin-5.1.1-x86+bzip2+jit+ncurses+sse2.tar.lz 11767275 SHA256 5665cd4575747e079cb733d05f9b4756788105eb0234231b4257976148977be6 SHA512 51e726735e42584f64fd697a671636f6dfa0557fdc42cd0af9eb00f729d64a2b4fd6d67e1671ad17d74b46d5d08b7e140dd57f95849e72ce545bc8b27a40ba71 WHIRLPOOL ae8fca67661e0cea84166ec5f5fba30ed093e5a20a926e13f54007443627da6564172755a48d03d3a8f841457106ee7b5356b44965433c501ec4393c9dbd5921 +DIST pypy-bin-5.1.1-x86+bzip2+ncurses+sse2.tar.lz 6149022 SHA256 cf60d9da2c6b754bcfacecfb53ffa5c3829e0152c091e27bfba55d36eaa03fec SHA512 20c3b9b8256bdb5dbe891d12dbaaf1121df8e11f165b4f0a00f7098f476d9020482a920935742b40acf562205c307732b613ea3266ef454b169f711a0f4a9f0e WHIRLPOOL 894b2438dacb9b746df1e73eed4f0951e1333f0bd240fae189356e156a2de929f365332cb285c7abf840107b3f1e0d7e1dc494bf805beabe2569355a0e3c7493 +DIST pypy-bin-5.1.1-x86+bzip2+ncurses.tar.lz 6114358 SHA256 d1425ab926a6948ed089564ad137474ae9d75fa1aba11a7e8991ed81e581b804 SHA512 e5bf777bc23706d44798cd577b871e2be7c3f040ad399f8cc2650eea65d180ee9403d8976d5ea11bee2e417c4dc3a571cbcd31aa98de112fc252ab9c9bacbd75 WHIRLPOOL 9571abe31daa81b2f06366067c7676db6347de3a3e52e3480abd082fd02528bd5b5041859d7379e16160370c5c5dec084ca231dddda12d0108533a7a0c479e4d DIST python-gentoo-patches-2.7.10-0.tar.xz 12892 SHA256 c9a838bd62ae50cc385da23a837acfd05f2b74e4f086c9c76eb4d3aa5366ef6d SHA512 5f100944635e360691dc0a2b340a906646c4ae9ee558246ddffc56e8b15d389f25f1fbdc1db4cc08e7d29560d04d66b058b3904902899d58ecae8c408ebdf056 WHIRLPOOL f69e9a518bb7ee50c1b262a21e70e1e2443f859ee6d2f4fa84421120dbd054a06ce8dd6cfea8512cbc64bce806322b879c25c561d5eb05e1ba6cc15035b373a9 +DIST python-gentoo-patches-2.7.11-0.tar.xz 12916 SHA256 e14b47bb1fd64d366d7dfb8339cc2cbf4a53fc288b11dd83f575eb36a8a6408d SHA512 f0447bb699a163afc08df39b111394377539935546ae23732d7239e78d2bff0c04bc94949f86aef0c1be83736127dbd25c2c531e49befed2d638c3cd4940ac52 WHIRLPOOL 305992849d9d244da1e308e739c9bf62a3ef5c74eb65c765bdc666fb5767eb16c7a609f7c442c17da17f76c3ab81e4b09fa8c21e43f89366539a6a9d656bea77 diff --git a/dev-python/pypy-bin/pypy-bin-5.1.1.ebuild b/dev-python/pypy-bin/pypy-bin-5.1.1.ebuild new file mode 100644 index 000000000000..a76094bbfb69 --- /dev/null +++ b/dev-python/pypy-bin/pypy-bin-5.1.1.ebuild @@ -0,0 +1,203 @@ +# 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}" +CPY_PATCHSET_VERSION="2.7.11-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/~djc/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz + amd64? ( + jit? ( shadowstack? ( + ${BINHOST}/${P}-amd64+bzip2+jit+ncurses+shadowstack.tar.lz + ) ) + jit? ( !shadowstack? ( + ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz + ) ) + !jit? ( !shadowstack? ( + ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz + ) ) + ) + x86? ( + cpu_flags_x86_sse2? ( + jit? ( shadowstack? ( + ${BINHOST}/${P}-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz + ) ) + jit? ( !shadowstack? ( + ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz + ) ) + !jit? ( !shadowstack? ( + ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz + ) ) + ) + !cpu_flags_x86_sse2? ( + !jit? ( !shadowstack? ( + ${BINHOST}/${P}-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="${RDEPEND} + app-arch/lzip + app-arch/xz-utils + doc? ( ${PYTHON_DEPS} + dev-python/sphinx )" +PDEPEND="app-admin/python-updater" + +S=${WORKDIR}/pypy-${PV}-src + +QA_PREBUILT=" + usr/lib*/pypy/pypy-c + usr/lib*/pypy/libpypy-c.so" + +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 libpypy-c.so +} + +src_test() { + # (unset) + local -x PYTHONDONTWRITEBYTECODE + + ./pypy-c ./pypy/test_all.py --pypy=./pypy-c lib-python || die +} + +src_install() { + local dest=/usr/$(get_libdir)/pypy + einfo "Installing PyPy ..." + insinto "${dest}" + doins -r include lib_pypy lib-python pypy-c libpypy-c.so + fperms a+x ${dest}/pypy-c ${dest}/libpypy-c.so + pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so" + dosym ../$(get_libdir)/pypy/pypy-c /usr/bin/pypy + dodoc README.rst + + if ! use gdbm; then + rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \ + "${ED%/}${dest}"/lib-python/*2.7/test/test_gdbm.py || die + fi + if ! use sqlite; then + rm -r "${ED%/}${dest}"/lib-python/*2.7/sqlite3 \ + "${ED%/}${dest}"/lib_pypy/_sqlite3.py \ + "${ED%/}${dest}"/lib-python/*2.7/test/test_sqlite.py || die + fi + if ! use tk; then + rm -r "${ED%/}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \ + "${ED%/}${dest}"/lib_pypy/_tkinter \ + "${ED%/}${dest}"/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%/}${dest}/pypy-c + local -x LD_LIBRARY_PATH="${ED%/}${dest}" + # 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, +# "resource": "_resource_build.py" if sys.platform != "win32" else None, + cffi_targets=( audioop curses syslog gdbm pwdgrp resource ) + 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%/}${dest}"/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%/}${dest}" -name "_cffi_*.[co]" -delete || die + find "${ED%/}${dest}" -type d -empty -delete || die + + # compile the installed modules + python_optimize "${ED%/}${dest}" +} |