summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-07-03 09:43:09 +0200
committerMichał Górny <mgorny@gentoo.org>2016-07-03 10:19:07 +0200
commit47b2958db4e542dd29b751b122cccf35a2ae4f2c (patch)
tree65dfc8374649fda8ae4c9a3c30bb6d2b02277f44
parentdev-python/pypy: Bump to 5.3.1, minor fixes (diff)
downloadgentoo-47b2958db4e542dd29b751b122cccf35a2ae4f2c.tar.gz
gentoo-47b2958db4e542dd29b751b122cccf35a2ae4f2c.tar.bz2
gentoo-47b2958db4e542dd29b751b122cccf35a2ae4f2c.zip
dev-python/pypy-bin: Bump to 5.3.1, minor fixes
-rw-r--r--dev-python/pypy-bin/Manifest8
-rw-r--r--dev-python/pypy-bin/pypy-bin-5.3.1.ebuild205
2 files changed, 213 insertions, 0 deletions
diff --git a/dev-python/pypy-bin/Manifest b/dev-python/pypy-bin/Manifest
index be2c5891c09..6405b93138d 100644
--- a/dev-python/pypy-bin/Manifest
+++ b/dev-python/pypy-bin/Manifest
@@ -29,6 +29,14 @@ DIST pypy-bin-5.3.0-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz 10236641 SHA25
DIST pypy-bin-5.3.0-x86+bzip2+jit+ncurses+sse2.tar.lz 11388844 SHA256 a1ed4a65a4e04ecd3a3ee6a94bdd313511e9c78a82e70b491a835d9d6b00ecba SHA512 24dd548147a1e045d646be633058f1b40e35f3c069fe44b93a60262a134163a7811664a279e70b54ad149a4659b5bafb0fffa0e213d0dc5fb62eb14e41c46bf6 WHIRLPOOL 5b8a17fd56baae8b039e723ec32728b5d89b58bd3606372b9b09cf0353a77070ca63fd5107fdfe964184072f466c6de6b10a9dea30a185baf08e8fb300427b25
DIST pypy-bin-5.3.0-x86+bzip2+ncurses+sse2.tar.lz 5955669 SHA256 24f76d7c4803c69ae66bcdc38fee60a41b843cc81ca83d76e0ece4464efd22a5 SHA512 692f5601291d7ed3789d38cc6fdf4e4c0c56318953f9109113cb7cb11659f6d649287425b60cf5a2cab2a005d174e6c44be05b4c49ce148bfbdbf117892c888f WHIRLPOOL 03c6a14f5c09e25e3a16b23c96b4754063e29d1847f549295ab81891de1cf35a473d84143897d0be36b2f2a683da8d45bc6506b7fef6985fdcd84f127d522fa2
DIST pypy-bin-5.3.0-x86+bzip2+ncurses.tar.lz 5955780 SHA256 f3e5affc786235ec61491cc0c6941303df486314b7707f98e342a5d9f39eea67 SHA512 d55dc85a2c968289320658da80507e2b1a8993a923aac09963adcc2482689b5094b0734cee481dd4490d83261744a720bc0606ec9a578c4e6deba3e41ba7e92e WHIRLPOOL b76bb53064e8a4d00012fee500d06f0f94a8548fe7ce89efa26b2f5482f169cf93f2b835e841b0c094ee6b58e7df67433520ccb5df3463678604e790cfa54689
+DIST pypy-bin-5.3.1-amd64+bzip2+jit+ncurses+shadowstack.tar.lz 12719733 SHA256 47b275cc2db72572d574097eff11438eeec8d36a8cd389aaec26d8b51dd6575b SHA512 f7cc370b2b5ec106f8391adda3c49b51e374fff794ac3776ee247bbe6bbb32c3068decb3958bd015270b737d8b05bb5d13471abf2d215eadd93155710ae45433 WHIRLPOOL 59b91372b0d3b8d2378dcedc63a55323c10df314f0e03448eacffedc98195b62e67c9450b67290bbd50339de8b90d54c5689c62e5c316f83de0897bf6f3e6cab
+DIST pypy-bin-5.3.1-amd64+bzip2+jit+ncurses.tar.lz 13761610 SHA256 23763847865ec0a08e1e4fcee978991cfc3558476e194cc5b58372c5205c3460 SHA512 f2647ed47f10a8576f338dc2a3e950dbe2bf1404958b85e09ad44a6826adbbbea062fd5f8881bcea3d6e875fb040366e83f948228ac978850afb4cc6c666ac0b WHIRLPOOL 8535780f15c1ef0886c4433d7604b7d8384418d0d4b49fa20f08734fee76f0a1336df49e96416de46440e3e437c8c7e4aa7a791e03c3221bbfb36990e892fc67
+DIST pypy-bin-5.3.1-amd64+bzip2+ncurses.tar.lz 7207110 SHA256 001f4a8c051098569ccf3c426bcda2c173d307aa30d2a74d9f5e37670c9e03fe SHA512 1c69865abf6abf3199d63f575a269a36739adbda8956db76b26dcdd4ead2142d7b9638d5dd3b6ea60d6e5760fb4e97039454e68170c9e264ac8998ab7e8bb3c3 WHIRLPOOL 2f00b8ec3c78ef4e0825aea4e205ee10cfbb2cb0fa32bb593c69fee062f06fa91efc442a505f3ae3066f8a53adacbf3cb89715df384e0bbd7e176e27e9e54c9b
+DIST pypy-bin-5.3.1-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz 10268792 SHA256 2ef23f4506fe71cb301610054a5fc398902017bdf57866c7bf873b43a0adc17b SHA512 9fa8504941f47de98f104ff13d4571a2d78ee929cf62c929640bdf1af5aa47d0665e268b237ab0378910255dd166890a6347c58bcb55cefc7cc418703ed123a8 WHIRLPOOL 6ab119483bc3b9a73363662d5b7a864bf1db7c8a1bc194f74a9ab4960b96ccabc3d88856afd729beb29ac0aa3eaec18af2d74ec94cb460774499d5699571d80d
+DIST pypy-bin-5.3.1-x86+bzip2+jit+ncurses+sse2.tar.lz 11318171 SHA256 afc1a7083ef354cd5037d4d23e44bc243881624037b5eb39084e1e65b61c2284 SHA512 ccfb921a54ff60e0bbdd7f6b8b96f66bc41c47d93d0f9a4fb735a5901081be21db2d60c9d7f89bf8ff07d8cdeed481e9987a7b970d925a0e9579231a86b5441a WHIRLPOOL 842c6210b28653b9a143678ba59dd2649e83b929463fd8e4ddfad00346ad551c8f3c6ffb864b71b60651e6744432afd7305d6a12a6ed6a0f19d73f3564d6de88
+DIST pypy-bin-5.3.1-x86+bzip2+ncurses+sse2.tar.lz 5954728 SHA256 bc7289832ca4c9984180b6cb593de502952d76f6810ee26aff4d37e2798eacfe SHA512 5ced6edb305fd6a38b89baf4c73756ac280934d66b2d11b9a5b1eaf425c3430f6dc3da9e43fa495f8b677fe1263cabacab73ef6ef95bf348c6dbce0defa41ac6 WHIRLPOOL bd7b31b521b7835ad8673b508f5815c80c3c9c1628ba0999ec07340d8b4982a8e04583c7ae0afd73f15437069950c635c25ce42da3ae6a80065de46c6af7a0d7
+DIST pypy-bin-5.3.1-x86+bzip2+ncurses.tar.lz 5953506 SHA256 317b29daa7fe4df693a79eed7dc330fadbfe00084cedbbc5217721b4750c4b30 SHA512 78ee21fc0224e8104843d2652039d26ada52cd5a544056161e739458a83fe28c8cf7b4077c40070deef817a2f6d0581120e44ebc38f017a5f843badb31fa5f3c WHIRLPOOL 62e3a119a7a720710ceb46e15453d6cdb65726af97b5c9f664f7748aeafd3cf0ca6a4e748040a1eb24acfec2afb20543b25c08211f42f3d354d3e01a7cfa214b
DIST pypy2-v5.3.0-src.tar.bz2 17361429 SHA256 4142eb8f403810bc88a4911792bb5a502e152df95806e33e69050c828cd160d5 SHA512 6387987b93bebf8ca6d820bde6c42c1a7427a778ff01cf93766df34be792cb1a8d927b3e402f90159df75f68aa1c913a28e9d453e3b13b28489cb68670ef121d WHIRLPOOL 57b9718b1ed72f13005a6d5a60b24d0fdab522ff63b3f91264433cf17f0bb4c5f36e3121d8d92744386fa5d31fbce14711689c85f87a53b68bfdbddaa19a3edd
+DIST pypy2-v5.3.1-src.tar.bz2 17361760 SHA256 31a52bab584abf3a0f0defd1bf9a29131dab08df43885e7eeddfc7dc9b71836e SHA512 3138dde3cb1a155e389a2be615601e22f468d2bc77dd219a35b310052fa06f68f80c3ff62fa4d0a9179eae014ace18620d0a076a0528cb155b1c33cc94d6b397 WHIRLPOOL 518b73ec649673fb1fc333b5d0e7669f06e9569624e2f8b55dbbf24b5f109a3b9680ed1d45c6401eb62ee8761043ec9c38a33e6d396c39c3f2fb5ba30f15e93a
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.3.1.ebuild b/dev-python/pypy-bin/pypy-bin-5.3.1.ebuild
new file mode 100644
index 00000000000..c0d6f135a0a
--- /dev/null
+++ b/dev-python/pypy-bin/pypy-bin-5.3.1.ebuild
@@ -0,0 +1,205 @@
+# 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"
+MY_P=pypy2-v${PV}
+
+DESCRIPTION="Pre-built version of PyPy"
+HOMEPAGE="http://pypy.org/"
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-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}/${MY_P}-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
+ # (not installed by pypy)
+ rm pypy/module/cpyext/include/_numpypy/numpy/README || die
+ mv pypy/module/cpyext/include/* 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 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}"
+}