summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2013-05-05 04:37:14 +0000
committerMike Gilbert <floppym@gentoo.org>2013-05-05 04:37:14 +0000
commit0d8b0b7d386d6c5799d08431bd356d0b4c6168af (patch)
treeb293c71569efa01d01c42543b2eea1c21144536e /dev-python/pypy
parentVersion bump. (diff)
downloadgentoo-2-0d8b0b7d386d6c5799d08431bd356d0b4c6168af.tar.gz
gentoo-2-0d8b0b7d386d6c5799d08431bd356d0b4c6168af.tar.bz2
gentoo-2-0d8b0b7d386d6c5799d08431bd356d0b4c6168af.zip
Version bump.
(Portage version: 2.2.0_alpha174/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
Diffstat (limited to 'dev-python/pypy')
-rw-r--r--dev-python/pypy/ChangeLog8
-rw-r--r--dev-python/pypy/files/2.0-no-static-hack-r1.patch39
-rw-r--r--dev-python/pypy/pypy-2.0_beta2.ebuild120
3 files changed, 166 insertions, 1 deletions
diff --git a/dev-python/pypy/ChangeLog b/dev-python/pypy/ChangeLog
index e113143e4267..18eba43d2d32 100644
--- a/dev-python/pypy/ChangeLog
+++ b/dev-python/pypy/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-python/pypy
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/ChangeLog,v 1.34 2013/02/21 15:25:39 idella4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/ChangeLog,v 1.35 2013/05/05 04:37:13 floppym Exp $
+
+*pypy-2.0_beta2 (05 May 2013)
+
+ 05 May 2013; Mike Gilbert <floppym@gentoo.org>
+ +files/2.0-no-static-hack-r1.patch, +pypy-2.0_beta2.ebuild:
+ Version bump.
21 Feb 2013; Ian Delaney <idella4@gentoo.org>
+files/2.0-encoder-3655afd07f2f.patch, pypy-2.0_beta1.ebuild:
diff --git a/dev-python/pypy/files/2.0-no-static-hack-r1.patch b/dev-python/pypy/files/2.0-no-static-hack-r1.patch
new file mode 100644
index 000000000000..98a9633f4d4f
--- /dev/null
+++ b/dev-python/pypy/files/2.0-no-static-hack-r1.patch
@@ -0,0 +1,39 @@
+Remove logic that links to libssl and libcrypto statically if
+possible. Just always link dynamically: Gentoo is expected to have
+sane dynamic libraries for us to use, and our users are not expected
+to copy their pypy binary to a system with an incompatible
+libssl/libcrypto and expect it to work.
+
+Based on patch contributed by XU Benda <heroxbd@gentoo.org>.
+
+--- a/rpython/rlib/ropenssl.py
++++ b/rpython/rlib/ropenssl.py
+@@ -20,27 +20,8 @@
+ # so that openssl/ssl.h can repair this nonsense.
+ 'wincrypt.h']
+ else:
+- libraries = ['z']
++ libraries = ['z','ssl','crypto']
+ includes = []
+- if (sys.platform.startswith('linux') and
+- os.path.exists('/usr/lib/libssl.a') and
+- os.path.exists('/usr/lib/libcrypto.a')):
+- # use static linking to avoid the infinite
+- # amount of troubles due to symbol versions
+- # and 0.9.8/1.0.0
+- link_files += ['/usr/lib/libssl.a', '/usr/lib/libcrypto.a']
+- testonly_libraries += ['ssl', 'crypto']
+- elif (sys.platform.startswith('linux') and
+- os.path.exists('/usr/local/ssl/lib/libssl.a') and
+- os.path.exists('/usr/local/ssl/lib/libcrypto.a')):
+- # use static linking, 2nd version
+- include_dirs += ['/usr/local/ssl/include']
+- link_files += ['/usr/local/ssl/lib/libssl.a',
+- '/usr/local/ssl/lib/libcrypto.a',
+- '-ldl']
+- testonly_libraries += ['ssl', 'crypto']
+- else:
+- libraries += ['ssl', 'crypto']
+
+ includes += [
+ 'openssl/ssl.h',
diff --git a/dev-python/pypy/pypy-2.0_beta2.ebuild b/dev-python/pypy/pypy-2.0_beta2.ebuild
new file mode 100644
index 000000000000..3b8d6948a2ed
--- /dev/null
+++ b/dev-python/pypy/pypy-2.0_beta2.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/pypy-2.0_beta2.ebuild,v 1.1 2013/05/05 04:37:13 floppym Exp $
+
+EAPI=5
+
+# XXX: test other implementations
+PYTHON_COMPAT=( python2_7 pypy{1_8,1_9,2_0} )
+inherit check-reqs eutils multilib multiprocessing python-any-r1 toolchain-funcs vcs-snapshot versionator
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python language"
+HOMEPAGE="http://pypy.org/"
+SRC_URI="https://bitbucket.org/pypy/pypy/get/release-${PV/_/-}.tar.bz2 -> ${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT=$(get_version_component_range 1-2 ${PV})
+KEYWORDS="~amd64 ~amd64-linux ~x86 ~x86-linux"
+IUSE="bzip2 doc examples +jit ncurses sandbox shadowstack sqlite ssl +xml"
+
+RDEPEND=">=sys-libs/zlib-1.1.3
+ virtual/libffi
+ virtual/libintl
+ dev-libs/expat
+ bzip2? ( app-arch/bzip2 )
+ ncurses? ( sys-libs/ncurses )
+ sqlite? ( dev-db/sqlite:3 )
+ ssl? ( dev-libs/openssl )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}"
+PDEPEND="app-admin/python-updater"
+
+pkg_pretend() {
+ CHECKREQS_MEMORY="2G"
+ use amd64 && CHECKREQS_MEMORY="4G"
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ pkg_pretend
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/1.9-scripts-location.patch"
+ epatch "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
+ epatch "${FILESDIR}/2.0-distutils-fix_handling_of_executables_and_flags.patch"
+
+ # The following is Gentoo-specific.
+ epatch "${FILESDIR}/2.0-no-static-hack-r1.patch"
+}
+
+src_compile() {
+ tc-export CC
+
+ local args=(
+ $(usex jit -Ojit -O2)
+ $(usex shadowstack --gcrootfinder=shadowstack '')
+ $(usex sandbox --sandbox '')
+
+ --make-jobs=$(makeopts_jobs)
+
+ pypy/goal/targetpypystandalone
+ )
+
+ # Avoid linking against libraries disabled by use flags
+ local opts=(
+ bzip2:bz2
+ ncurses:_minimal_curses
+ ssl:_ssl
+ )
+
+ local opt
+ for opt in "${opts[@]}"; do
+ local flag=${opt%:*}
+ local mod=${opt#*:}
+
+ args+=(
+ $(usex ${flag} --withmod --withoutmod)-${mod}
+ )
+ done
+
+ set -- "${PYTHON}" rpython/bin/rpython --batch "${args[@]}"
+ echo -e "\033[1m${@}\033[0m"
+ "${@}" || die "compile error"
+}
+
+src_install() {
+ local INSDESTTREE=/usr/$(get_libdir)/pypy${SLOT}
+ doins -r include lib_pypy lib-python pypy-c
+ fperms a+x ${INSDESTTREE}/pypy-c
+ dosym ../$(get_libdir)/pypy${SLOT}/pypy-c /usr/bin/pypy-c${SLOT}
+ dodoc README.rst
+
+ if ! use sqlite; then
+ rm -fr "${ED}${INSDESTTREE}"/lib-python/{2.7,modified-2.7}/sqlite3
+ rm -f "${ED}${INSDESTTREE}"/lib_pypy/_sqlite3.py
+ fi
+
+ python_export pypy-c${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local PYTHON=${ED}${INSDESTTREE}/pypy-c
+ fi
+
+ # Generate Grammar and PatternGrammar pickles.
+ PYTHONPATH="${ED}${INSDESTTREE}/lib-python/2.7" \
+ "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
+ || die "Generation of Grammar and PatternGrammar pickles failed"
+
+ # compile the installed modules
+ python_optimize "${ED}${INSDESTTREE}"
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py
+ python_domodule epython.py
+}
+
+src_test() {
+ "${PYTHON}" ./pypy/test_all.py --pypy=./pypy-c lib-python
+}