diff options
-rw-r--r-- | dev-python/pypy3-bin/Manifest | 7 | ||||
-rw-r--r-- | dev-python/pypy3-bin/pypy3-bin-2.4.0-r3.ebuild | 177 |
2 files changed, 184 insertions, 0 deletions
diff --git a/dev-python/pypy3-bin/Manifest b/dev-python/pypy3-bin/Manifest index 1d7e85ad79f9..52de5f01bea8 100644 --- a/dev-python/pypy3-bin/Manifest +++ b/dev-python/pypy3-bin/Manifest @@ -2,6 +2,13 @@ DIST pypy3-2.4.0-src.tar.bz2 14693194 SHA256 d9ba207d6eecf8a0dc4414e9f4e92db1abd DIST pypy3-bin-2.4.0-amd64+bzip2+jit+ncurses+shadowstack.tar.xz 9687272 SHA256 8f03fc87ec796877e5a13111f509a5d1c06284bc31133d25c4c9cca6a82f7039 SHA512 ec5e3ef4f2f4b06c31df5ab9fc4a9f7a2a08f744a0128e6ab8215767d4fba7a3e35e319ff9d9a0de4d018ed35eed24809c82928972a860a220ea45f284087770 WHIRLPOOL 15ba1d18ae4fc5d0968fa5c6cadfcb8762b258d683c770530ac35067ca91210f8d825facd775602a9d2b578542a4b760a0a11a9b0a6d59f539d4e7043fcad734 DIST pypy3-bin-2.4.0-amd64+bzip2+jit+ncurses.tar.xz 11047984 SHA256 558176dacd1e3222fb56b8c3226077288281ee2a131149fdbb2a54561d5bc7d9 SHA512 cde76c37bf9c043a4fde4a2d07a04366f3c906562e6ed640544ac0228b511729b481c6cd6b7b25b80c02a69cdd02707d427edcd8e46e41313b31161313c6c5fb WHIRLPOOL 9eb8dc5d3319bf2c09baae38ecaa23c1f7ee38b4ea20f72a9fde3f68004ac4f3cbe807ff93e6cba5318745a251d09d2f951cb5a86f04c41b2e05d151d1f6cd03 DIST pypy3-bin-2.4.0-amd64+bzip2+ncurses.tar.xz 6281232 SHA256 326115bcd7ad2d659b69842182dee4fc2adb558f20a3e44ab4b803fa70c43a21 SHA512 f938aa797e352f80a99095a15bf83a758f0c203adc402cf92494f909ad870457a28ae14b5959880e55898c2ce92ce0b08b05e3d691133758bca52f524c8aad73 WHIRLPOOL b0aa4c24d645aa914aa439646b813dfcae14e6731af86d4348d24637bbdb7f88a26d3a63ff5262749ee654715eaf5312beb4879341d222aaedfcd3e81acd2426 +DIST pypy3-bin-2.4.0-nossl2-amd64+bzip2+jit+ncurses+shadowstack.tar.lz 9320887 SHA256 98a2a6f1ba738e8e39b272e757cfa4b90684be05b58f28e9d7766d2e3238bed2 SHA512 b9569c7d9f607ec89dfc2adadea86d485e99c2cc8a9bd2751fbf450b331a706acd8cab9b67730162f67a74ccb682ec23769556cfb3b028265a7e5b06e920bd07 WHIRLPOOL 450be6f24c7bd58fc801bb95ca08f1d5874c2df0a5e75e062847b25f7a11e1ed81dfbb1b38e9607882593f96a2d3171c7f59cb63fd039c3ebf542bee7a53d09d +DIST pypy3-bin-2.4.0-nossl2-amd64+bzip2+jit+ncurses.tar.lz 10751255 SHA256 aca3afd551ab073d91c9d3d6e7bfffdbee2ccab0672d461b9abc0d3087d6ccab SHA512 85032e9418f03319dbf827fd68870d8c5d8f368f5b416ff9a96af48a1b3bcfd651a66c0d1c3372bf522c1d7433734d1d167e8fb037ca998f55c1ad4c13ed5a5d WHIRLPOOL 0eb02a3c4e7d6d5fbbdf239a68c067f87449a07a8a63a3a03858ada73fcf13a09a1b3f9f8402a173fd17baee4565de9f2b68038471527b8f43f14c4251af6432 +DIST pypy3-bin-2.4.0-nossl2-amd64+bzip2+ncurses.tar.lz 6188358 SHA256 2ee5d99218a02bac26a77327db3bcf754f36ed40ef0593567895ee2ad128bc04 SHA512 a07b3c3cdf16592af9ea76d8f70c053f6e75f3b92e10d019921dd8024161b8953477c3da7a5d82912f1f10f0ab4581e299215e7a5f50ee0ff923648e7a18d8cc WHIRLPOOL 75da4de6977382729d21881d7d66895871ad3e5f53a108bfad3c97d9f6db6dec6754f353e600436853d4d06586b350d4e47ccfa7ca25364c54b276fd629e5d5b +DIST pypy3-bin-2.4.0-nossl2-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz 8246135 SHA256 91df98e4031bca19a1e9cc30cdb18f221ee2df00c2f3c5251b817feb9b2fe3d8 SHA512 d518184c5588e95cf584c5654b8a1ea3c0157d85e5274b5ba612edf38dd9c4848f37f2e87ee508fc0071f5b0a1a272312868b7628c251dcb584de1fd237f85fd WHIRLPOOL 98754b9c05a80167c474feef81ccf4cd057dfae621f1f15c85fa5595c2e9d97b4201a47e866a2fde4137e1e7e0225544aa00901e2c33ae6a1209e859df93510a +DIST pypy3-bin-2.4.0-nossl2-x86+bzip2+jit+ncurses+sse2.tar.lz 9073643 SHA256 436128604cc9649228992206abcfef84ff14994984b3da91b2d4ee1ab654274c SHA512 0cffa75008f174d0703d07e86ed1036a27efe7707b14e2a5c6bfe92bd703ad0ce7223a0b590aeffe1e7dd11756d385ac9e2eba9a7d49d6d970377aef8aa2d8bb WHIRLPOOL 579625d8e36bd22ca04a2468592f784269bd514799725a5fe0f5ce47e09477dada96a95c2296e46a8f4d03fc82aff6100c7a89c4e71993b033a31516ffc0b2a4 +DIST pypy3-bin-2.4.0-nossl2-x86+bzip2+ncurses+sse2.tar.lz 5549183 SHA256 ecb7dae543219b4bc1d75114a0a5316d870a4a92ae439b9679ae8436903fcc77 SHA512 06040c2f843ce77573616f9fc5a9773ffb67957860d33ca26538a39ba68aa56eea98bc0af0e99e6319f50ee42ff894a9f4944b7924348f20ce90078f0615a707 WHIRLPOOL ebf165deb7b65cbfef081841037206a74658906e49b52225c1966874f3f8ad39f19157c801653e2797a03b9fd0287a5c4e7ffb7d53d951fb5686eaba9c533b29 +DIST pypy3-bin-2.4.0-nossl2-x86+bzip2+ncurses.tar.lz 5503668 SHA256 7cc045e8ec9e7d4c01eb0dd9e83296bbf38483bcd0a5af0298ef53b9dc0bc63d SHA512 fa398b43a479c71bcd708e30055716dbe0c8f6421ed632a3ed8b3fa1cf30310e5325106b2c5d2be70b3a7e3bc706e70b599ffa34497ef6a0aeb78df534397f79 WHIRLPOOL c13aee013422d552cbf34fa41326f7edfb1a3817801a3ac72ff472b92460528876505b88e6bd95866dbf731d707d1ba789f22ae76d3a004cded36772afab2436 DIST pypy3-bin-2.4.0-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.xz 8159232 SHA256 65bb567693048894d13c7ffecda126a222ebb641dc6c6e0a899197da8f0844d8 SHA512 734e42d6962b4411d9beab55013454dd27bd18c342ed334e07f85e217cd7d992cbaffb36ee3e74469662860f130d1065a381e49a6b8287fa83736ffe75cb8a5a WHIRLPOOL a5b7ed4a177dc5c1322e79551166d3be8e478e969b223db4fe6a2e9fddaf2e4c22633726a667e3deca19763f44edd4e3f4c20c477da5d7e26c88f21d4ce70544 DIST pypy3-bin-2.4.0-x86+bzip2+jit+ncurses+sse2.tar.xz 9121216 SHA256 5f03284815a313065b99da0154a08831e3ae2c6e43c4ce515de1aff60c4537ad SHA512 f069ece90666385eb8aade97ad81c4c6c2480dee1bf3b1cb520c4fc1d123d17f7ef2cbf7ed25b72b24e56165c08ded671c8bce74ed2ea2f1b6e57ca9fdd214ae WHIRLPOOL 8cf368e0efa416d3cba06ea61bc97ed7ead0e25f5008c948d1bec8d0494fd9908d1e6640414ffe7c6b6260badef41da114370f2a5ef28a63234203a604e1be4e DIST pypy3-bin-2.4.0-x86+bzip2+ncurses+sse2.tar.xz 5366816 SHA256 bff57d563dbce1b4858d87161c2338e5ed6ed20008a8dc4fb78cbb9e320d1188 SHA512 afb395257b0259b096a9fdbae405ffb021950dfda39ddc490777662ab77d0573b5b51e6381241c09debbca0a706637dba39c8644c878e541b83d68a94fc9ad1e WHIRLPOOL a1e1079a68b03b65a0680c65080d6c6dc48e4a652dd634bfaa805a6117c67da84bcc65ee2fe6711a61ab86a905bd2a6993e0ac88547a807eca3722f70ca890fb diff --git a/dev-python/pypy3-bin/pypy3-bin-2.4.0-r3.ebuild b/dev-python/pypy3-bin/pypy3-bin-2.4.0-r3.ebuild new file mode 100644 index 000000000000..87fe7693dc76 --- /dev/null +++ b/dev-python/pypy3-bin/pypy3-bin-2.4.0-r3.ebuild @@ -0,0 +1,177 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +# some random parts need python 2... +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" + +DESCRIPTION="A fast, compliant alternative implementation of Python 3 (binary package)" +HOMEPAGE="http://pypy.org/" +SRC_URI="https://bitbucket.org/pypy/pypy/downloads/pypy3-${PV}-src.tar.bz2 + 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="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 + 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/pypy3:0" +DEPEND="app-arch/lzip + test? ( ${RDEPEND} + ${PYTHON_DEPS} )" +# doc? ( ${PYTHON_DEPS} +# dev-python/sphinx ) +PDEPEND="app-admin/python-updater" + +S=${WORKDIR}/pypy3-${PV}-src + +src_prepare() { + epatch "${FILESDIR}/4.0.0-gentoo-path.patch" \ + "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" \ + "${FILESDIR}/2.4.0-ncurses6.patch" + + 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... + "${PYTHON}" lib_pypy/ctypes_config_cache/rebuild.py \ + || die "Failed to rebuild ctypes config cache" +} + +src_test() { + # (unset) + local -x PYTHONDONTWRITEBYTECODE + + # Test runner requires Python 2 too. However, it spawns PyPy3 + # internally so that we end up testing the correct interpreter. + "${PYTHON}" ./pypy/test_all.py --pypy=./pypy-c lib-python || die +} + +src_install() { + einfo "Installing PyPy ..." + insinto "/usr/$(get_libdir)/pypy3" + 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)/pypy3/pypy-c /usr/bin/pypy3 + dodoc README.rst + + if ! use gdbm; then + rm -r "${ED%/}${INSDESTTREE}"/lib_pypy/gdbm.py \ + "${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_gdbm.py || die + fi + if ! use sqlite; then + rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/sqlite3 \ + "${ED%/}${INSDESTTREE}"/lib_pypy/_sqlite3.py \ + "${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_sqlite.py || die + fi + if ! use tk; then + rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/{idlelib,tkinter} \ + "${ED%/}${INSDESTTREE}"/lib_pypy/_tkinter \ + "${ED%/}${INSDESTTREE}"/lib-python/*3/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)/pypy3/site-packages + python_export pypy3 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 cache + # Please keep in sync with pypy/tool/release/package.py! + "${PYTHON}" -c "import _curses" || die "Failed to import _curses (cffi)" + "${PYTHON}" -c "import syslog" || die "Failed to import syslog (cffi)" + if use gdbm; then + "${PYTHON}" -c "import _gdbm" || die "Failed to import gdbm (cffi)" + fi + if use sqlite; then + "${PYTHON}" -c "import _sqlite3" || die "Failed to import _sqlite3 (cffi)" + fi + if use tk; then + "${PYTHON}" -c "import _tkinter" || die "Failed to import _tkinter (cffi)" + fi + + # 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}" +} |