diff options
author | Dirkjan Ochtman <djc@gentoo.org> | 2011-06-06 10:58:35 +0000 |
---|---|---|
committer | Dirkjan Ochtman <djc@gentoo.org> | 2011-06-06 10:58:35 +0000 |
commit | f01f6ed8fc9f1a74552799c54ab3fbd4138c0e08 (patch) | |
tree | ec79942f7249b6eb6ca6da3942a96346cb368bea /dev-python/pypy | |
parent | Version bumped (diff) | |
download | gentoo-2-f01f6ed8fc9f1a74552799c54ab3fbd4138c0e08.tar.gz gentoo-2-f01f6ed8fc9f1a74552799c54ab3fbd4138c0e08.tar.bz2 gentoo-2-f01f6ed8fc9f1a74552799c54ab3fbd4138c0e08.zip |
Initial version of PyPy (bug 300301).
(Portage version: 2.1.9.50/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/pypy')
-rw-r--r-- | dev-python/pypy/ChangeLog | 10 | ||||
-rw-r--r-- | dev-python/pypy/files/1.5-patches.patch | 41 | ||||
-rw-r--r-- | dev-python/pypy/metadata.xml | 12 | ||||
-rw-r--r-- | dev-python/pypy/pypy-1.5.ebuild | 80 |
4 files changed, 143 insertions, 0 deletions
diff --git a/dev-python/pypy/ChangeLog b/dev-python/pypy/ChangeLog new file mode 100644 index 000000000000..3c5be637e5be --- /dev/null +++ b/dev-python/pypy/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for dev-python/pypy +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/ChangeLog,v 1.1 2011/06/06 10:58:35 djc Exp $ + +*pypy-1.5 (06 Jun 2011) + + 06 Jun 2011; Dirkjan Ochtman <djc@gentoo.org> +files/1.5-patches.patch, + +pypy-1.5.ebuild, +metadata.xml: + Initial version of pypy (bug 300301). + diff --git a/dev-python/pypy/files/1.5-patches.patch b/dev-python/pypy/files/1.5-patches.patch new file mode 100644 index 000000000000..92fb524ee168 --- /dev/null +++ b/dev-python/pypy/files/1.5-patches.patch @@ -0,0 +1,41 @@ +diff -ur pypy-1.5-src_orig/pypy/rlib/ropenssl.py pypy-1.5-src/pypy/rlib/ropenssl.py +--- pypy-1.5-src_orig/pypy/rlib/ropenssl.py 2011-04-30 17:18:50.000000000 +0300 ++++ pypy-1.5-src/pypy/rlib/ropenssl.py 2011-05-07 16:22:21.387000017 +0300 +@@ -98,6 +98,7 @@ + ssl_external('SSL_load_error_strings', [], lltype.Void) + ssl_external('SSL_library_init', [], rffi.INT) + if HAVE_OPENSSL_RAND: ++ eci.includes = eci.includes + ('openssl/rand.h',); + ssl_external('RAND_add', [rffi.CCHARP, rffi.INT, rffi.DOUBLE], lltype.Void) + ssl_external('RAND_status', [], rffi.INT) + ssl_external('RAND_egd', [rffi.CCHARP], rffi.INT) +diff -ur pypy-1.5-src_orig/pypy/translator/goal/translate.py pypy-1.5-src/pypy/translator/goal/translate.py +--- pypy-1.5-src_orig/pypy/translator/goal/translate.py 2011-04-30 17:18:50.000000000 +0300 ++++ pypy-1.5-src/pypy/translator/goal/translate.py 2011-05-06 23:32:58.855999980 +0300 +@@ -253,7 +253,6 @@ + log.event("batch mode, not calling interactive helpers") + return + +- log.event("start debugger...") + + if translateconfig.view: + try: +@@ -264,7 +263,6 @@ + page = graphpage.TranslatorPage(t1, translateconfig.huge) + page.display_background() + +- pdb_plus_show.start(tb) + + try: + drv = driver.TranslationDriver.from_targetspec(targetspec_dic, config, args, +diff -ur pypy-1.5-src_orig/pypy/translator/c/gcc/trackgcroot.py pypy-1.5-src/pypy/translator/c/gcc/trackgcroot.py +--- pypy-1.5-src_orig/pypy/translator/c/gcc/trackgcroot.py 2011-05-27 12:41:49.005000002 +0300 ++++ pypy-1.5-src/pypy/translator/c/gcc/trackgcroot.py 2011-05-27 12:56:16.292000001 +0300 +@@ -1640,6 +1640,7 @@ + } + """ + elif self.format in ('elf64', 'darwin64'): ++ print >> output, "\t.section .note.GNU-stack,\"\",%progbits" + print >> output, "\t.text" + print >> output, "\t.globl %s" % _globalname('pypy_asm_stackwalk') + _variant(elf64='.type pypy_asm_stackwalk, @function', diff --git a/dev-python/pypy/metadata.xml b/dev-python/pypy/metadata.xml new file mode 100644 index 000000000000..821611473b94 --- /dev/null +++ b/dev-python/pypy/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<pkgmetadata> + <herd>python</herd> + <maintainer> + <email>djc@gentoo.org</email> + </maintainer> + <use> + <flag name="jit">Enable the JIT compiler</flag> + <flag name="sandbox">Enable sandboxing functionality</flag> + <flag name="stackless">Run in stackless mode</flag> + </use> +</pkgmetadata> diff --git a/dev-python/pypy/pypy-1.5.ebuild b/dev-python/pypy/pypy-1.5.ebuild new file mode 100644 index 000000000000..10e198201cab --- /dev/null +++ b/dev-python/pypy/pypy-1.5.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/pypy-1.5.ebuild,v 1.1 2011/06/06 10:58:35 djc Exp $ + +EAPI="3" + +inherit eutils toolchain-funcs check-reqs python versionator + +DESCRIPTION="PyPy is a fast, compliant implementation of the Python language." +HOMEPAGE="http://pypy.org/" +SRC_URI="http://pypy.org/download/pypy-${PV}-src.tar.bz2" +SLOTVER=$(get_version_component_range 1-2 ${PV}) + +LICENSE="MIT" +SLOT="${SLOTVER}" +PYTHON_ABI="2.7-pypy-${SLOTVER}" +KEYWORDS="~amd64" +IUSE="doc examples +jit sandbox stackless test bzip2 ncurses xml ssl" + +RDEPEND=">=app-admin/eselect-python-20091230 + >=sys-libs/zlib-1.1.3 + virtual/libffi + virtual/libintl + sys-devel/gcc + bzip2? ( app-arch/bzip2 ) + ncurses? ( sys-libs/ncurses ) + xml? ( dev-libs/expat ) + ssl? ( dev-libs/openssl )" +DEPEND="${RDEPEND}" +PDEPEND="app-admin/python-updater" + +S="${WORKDIR}/${P}-src" +DOC="README LICENSE" + +src_prepare() { + CHECKREQS_MEMORY="1250" + use amd64 && CHECKREQS_MEMORY="2500" + check_reqs + epatch "${FILESDIR}/${PV}-patches.patch" +} + +src_compile() { + if use jit; then + conf="-Ojit" + else + conf="-O2" + fi + if use sandbox; then + conf+=" --sandbox" + fi + if use stackless; then + conf+=" --stackless" + fi + conf+=" ./pypy/translator/goal/targetpypystandalone" + # Avoid linking against libraries disabled by use flags + optional_use=("bzip2" "ncurses" "xml" "ssl") + optional_mod=("bz2" "_minimal_curses" "pyexpat" "_ssl") + for ((i = 0; i < ${#optional_use[*]}; i++)); do + if use ${optional_use[$i]}; then + conf+=" --withmod-${optional_mod[$i]}" + else + conf+=" --withoutmod-${optional_mod[$i]}" + fi + done + + translate_cmd="$(PYTHON -2) ./pypy/translator/goal/translate.py $conf" + echo ${_BOLD}"${translate_cmd}"${_NORMAL} + ${translate_cmd} || die "compile error" +} + +src_install() { + INSPATH="/usr/$(get_libdir)/pypy${SLOT}" + insinto ${INSPATH} + doins -r include lib_pypy lib-python pypy-c || die "failed" + fperms a+x ${INSPATH}/pypy-c || die "failed" +} + +src_test() { + ./pypy/test_all.py --pypy=./pypy-c lib-python +} |