From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/mgorny:master commit in: dev-python/pypy-binpackage/
Date: Wed, 5 Nov 2014 22:20:20 +0000 (UTC) [thread overview]
Message-ID: <1415225938.cb3b31ceb00e89d02582c290f7e3a6499fd8de14.mgorny@gentoo> (raw)
commit: cb3b31ceb00e89d02582c290f7e3a6499fd8de14
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 5 22:18:58 2014 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Nov 5 22:18:58 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=cb3b31ce
dev-python/pypy-binpackage: Bump for 2.4.0.
Package-Manager: portage-2.2.14
---
dev-python/pypy-binpackage/Manifest | 1 +
.../pypy-binpackage/pypy-binpackage-2.4.0.ebuild | 211 +++++++++++++++++++++
2 files changed, 212 insertions(+)
diff --git a/dev-python/pypy-binpackage/Manifest b/dev-python/pypy-binpackage/Manifest
index 4bea985..09546e3 100644
--- a/dev-python/pypy-binpackage/Manifest
+++ b/dev-python/pypy-binpackage/Manifest
@@ -1,2 +1,3 @@
DIST pypy-2.2.1-src.tar.bz2 14439822 SHA256 252045187e443656a2beb412dadac9296e8fe8db0f75a66ed5265db58c35035f SHA512 68b52c5b1a9b96593aa1dd38ad0b1b7b282852008e3ae3c488a5e19ab2bede68e2b40afdb79d85a4ab21cb1da6647b8b958fcefe34c99a1f6cbc1a19d695d3b6 WHIRLPOOL 6eca63959d8ee5663f868daaaac32ad1180b07e2f8b63d839652902095a098ffbfa29c6f83451733270a4b2f73b65450cb3b80a878b9dd1ec71089bfff11e9f6
DIST pypy-2.3.1-src.tar.bz2 15225332 SHA256 3fd10d97c0177c33ed358a78eb26f5bf1f91b266af853564b1a9d8c310a1e439 SHA512 86aab86c5f413cdd6a56680915605de5c1416255b43a8dce1b4dcf8f1febdb3275076a4a9c7de30002387d59e4171a52da2528436eb205d8d947de7edd049c65 WHIRLPOOL c78d41240f1803d9461f797fd0ef647a40a6990a4e3a504e80a0eaaf460d052bb60fe6240cacdb3ee8737500c9c7f418b1d55c619d01ac7b73aace3d82157aa6
+DIST pypy-2.4.0-src.tar.bz2 15495214 SHA256 38810007aee4885ca0703b566db6594dd7649adaaa287df7a1012f10e067740f SHA512 91b41ed80a6ff0d7b2b134a7802f098de35ffd2068dc3e477d27b0bc821c6d329eb8bcad4db4a5ff9ff429830d4abfbeb435a2a2d2d9bbc2c36f2d21af0b2e0c WHIRLPOOL affb14b805b2dcb8b579dd421bfb8276e80d3b31cea41bf57ad5dd9260e2e27d838b0303e4a3af5ca38b0b4f08ac88b142d6f1db20753bec6f8cbfdfc482099b
diff --git a/dev-python/pypy-binpackage/pypy-binpackage-2.4.0.ebuild b/dev-python/pypy-binpackage/pypy-binpackage-2.4.0.ebuild
new file mode 100644
index 0000000..eee63a3
--- /dev/null
+++ b/dev-python/pypy-binpackage/pypy-binpackage-2.4.0.ebuild
@@ -0,0 +1,211 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/pypy-2.2.1.ebuild,v 1.2 2014/03/12 09:14:21 mgorny Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 pypy )
+inherit check-reqs eutils multilib multiprocessing pax-utils \
+ python-any-r1 toolchain-funcs versionator
+MY_P=pypy-${PV}
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python language"
+HOMEPAGE="http://pypy.org/"
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0/$(get_version_component_range 1-2 ${PV})"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 +jit low-memory ncurses sandbox shadowstack sse2"
+
+DEPEND=">=sys-libs/zlib-1.1.3
+ virtual/libffi
+ virtual/libintl
+ dev-libs/expat
+ dev-libs/openssl
+ bzip2? ( app-arch/bzip2 )
+ ncurses? ( sys-libs/ncurses[-tinfo] )
+ app-arch/xz-utils
+ ${PYTHON_DEPS}"
+
+S="${WORKDIR}/${MY_P}-src"
+
+pkg_pretend() {
+ if use low-memory; then
+ if ! has_version dev-python/pypy && ! has_version dev-python/pypy-bin
+ then
+ eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy"
+ eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:"
+ eerror
+ eerror " $ emerge -1v dev-python/pypy-bin"
+ eerror
+ eerror "before attempting to build dev-python/pypy[low-memory]."
+ die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory"
+ fi
+
+ CHECKREQS_MEMORY="1750M"
+ use amd64 && CHECKREQS_MEMORY="3500M"
+ else
+ CHECKREQS_MEMORY="3G"
+ use amd64 && CHECKREQS_MEMORY="6G"
+ fi
+
+ check-reqs_pkg_pretend
+
+ [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!'
+}
+
+pkg_setup() {
+ local force_pypy
+
+ pkg_pretend
+
+ if has_version dev-python/pypy || has_version dev-python/pypy-bin
+ then
+ if [[ ! ${EPYTHON} ]] || use low-memory; then
+ einfo "Using already-installed PyPy to perform the translation."
+ force_pypy=1
+ else
+ einfo "Using ${EPYTHON} to perform the translation. Please note that upstream"
+ einfo "recommends using PyPy for that. If you wish to do so, please unset"
+ einfo "the EPYTHON variable."
+ fi
+ fi
+
+ if [[ ${force_pypy} ]]; then
+ # set manually since python_setup needs virtual/pypy
+ # and we don't force the dep
+ python_export pypy EPYTHON PYTHON
+ python_wrapper_setup
+ else
+ python-any-r1_pkg_setup
+ fi
+
+ local cpu
+ if use amd64; then
+ # common denominator between Intel & AMD
+ cpu='x86-64'
+ elif use x86; then
+ if use sse2; then
+ # lowest with SSE2
+ cpu='pentium-m'
+ else
+ # lowest with SSE, compat. with athlon-xp
+ # TODO: do we want to support something older?
+ cpu='pentium3'
+ fi
+ else
+ die "Unsupported arch ${ARCH}"
+ fi
+
+ export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe"
+ export CXXFLAGS=${CFLAGS}
+
+ elog "CFLAGS: ${CFLAGS}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/1.9-scripts-location.patch" \
+ "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" \
+ "${FILESDIR}"/2.3.1-shared-lib.patch # 517002
+
+ pushd lib-python/2.7 > /dev/null || die
+ epatch "${FILESDIR}/2.3-21_all_distutils_c++.patch"
+ popd > /dev/null || die
+
+ epatch_user
+}
+
+src_compile() {
+ tc-export CC
+
+ local jit_backend
+ if use jit; then
+ jit_backend='--jit-backend='
+
+ # We only need the explicit sse2 switch for x86.
+ # On other arches we can rely on autodetection which uses
+ # compiler macros. Plus, --jit-backend= doesn't accept all
+ # the modern values...
+
+ if use x86; then
+ if use sse2; then
+ jit_backend+=x86
+ else
+ jit_backend+=x86-without-sse2
+ fi
+ else
+ jit_backend+=auto
+ fi
+ fi
+
+ local args=(
+ --shared
+ $(usex jit -Ojit -O2)
+ $(usex shadowstack --gcrootfinder=shadowstack '')
+ $(usex sandbox --sandbox '')
+
+ ${jit_backend}
+ --make-jobs=$(makeopts_jobs)
+
+ pypy/goal/targetpypystandalone
+ )
+
+ # Avoid linking against libraries disabled by use flags
+ local opts=(
+ bzip2:bz2
+ ncurses:_minimal_curses
+ )
+
+ local opt
+ for opt in "${opts[@]}"; do
+ local flag=${opt%:*}
+ local mod=${opt#*:}
+
+ args+=(
+ $(usex ${flag} --withmod --withoutmod)-${mod}
+ )
+ done
+
+ local interp=( "${PYTHON}" )
+ if use low-memory; then
+ interp=( env PYPY_GC_MAX_DELTA=200MB
+ "${PYTHON}" --jit loop_longevity=300 )
+ fi
+
+ set -- "${interp[@]}" rpython/bin/rpython --batch "${args[@]}"
+ echo -e "\033[1m${@}\033[0m"
+ "${@}" || die "compile error"
+
+ use doc && emake -C pypy/doc/ html
+ pax-mark m "${ED%/}${INSDESTTREE}/pypy-c"
+}
+
+src_install() {
+ local flags=( bzip2 jit ncurses sandbox shadowstack )
+ use x86 && flags+=( sse2 )
+ local f suffix="-${ARCH}"
+
+ for f in ${flags[@]}; do
+ use ${f} && suffix+="+${f}"
+ done
+
+ local BIN_P=pypy-bin-${PV}
+
+ einfo "Zipping PyPy ..."
+ mkdir "${BIN_P}${suffix}"{,/include} || die
+ mv pypy-c libpypy-c.so "${BIN_P}${suffix}"/ || die
+ mv include/pypy_* "${BIN_P}${suffix}"/include/ || die
+ chmod +x "${BIN_P}${suffix}"/pypy-c || die
+
+ tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die
+ xz -vz9e "${BIN_P}${suffix}.tar" || die
+}
+
+# Yup, very hacky.
+pkg_preinst() {
+ # integrity check.
+ [[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!'
+ mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die
+ mv "${S}"/*.tar.xz "${ROOT%/}${PYPY_BINPKG_STORE}" || die
+}
next reply other threads:[~2014-11-05 22:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-05 22:20 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-11-05 23:12 [gentoo-commits] dev/mgorny:master commit in: dev-python/pypy-binpackage/ Michał Górny
2014-07-03 6:43 Michał Górny
2014-06-30 8:46 Michał Górny
2014-06-30 8:46 Michał Górny
2013-07-24 20:41 Michał Górny
2013-07-22 7:01 Michał Górny
2013-07-22 7:01 Michał Górny
2013-07-22 7:01 Michał Górny
2013-07-21 11:32 Michał Górny
2013-07-21 11:16 Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415225938.cb3b31ceb00e89d02582c290f7e3a6499fd8de14.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox