public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/dev/mgorny:master commit in: dev-binpkg/pypy3/
@ 2019-02-14 21:06 Michał Górny
  0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2019-02-14 21:06 UTC (permalink / raw
  To: gentoo-commits

commit:     d1fa150f761ae49ac2d4d30a7249947f91cc1c80
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 14 21:06:17 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Feb 14 21:06:17 2019 +0000
URL:        https://gitweb.gentoo.org/repo/dev/mgorny.git/commit/?id=d1fa150f

dev-binpkg/pypy3: Bump to 7.0.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-binpkg/pypy3/Manifest           |   1 +
 dev-binpkg/pypy3/pypy3-7.0.0.ebuild | 178 ++++++++++++++++++++++++++++++++++++
 2 files changed, 179 insertions(+)

diff --git a/dev-binpkg/pypy3/Manifest b/dev-binpkg/pypy3/Manifest
index 332d837..a28ef9f 100644
--- a/dev-binpkg/pypy3/Manifest
+++ b/dev-binpkg/pypy3/Manifest
@@ -7,3 +7,4 @@ DIST pypy3-v5.9.0-src.tar.bz2 29055111 BLAKE2B 181d87ebe4a83a3f03b28d891f248f718
 DIST pypy3-v6.0.0-src.tar.bz2 22648140 BLAKE2B b8678859b0c24494788ddf6f410a3ec1a56a04663452e1aba25d3f41c5073a95866d1623f00cb1a6c9d0256df728fa60d1edb5b58d26c0d88577769cc8a6205d SHA512 ea406c4dd1837a6ab13026de01330790f3c18f6e2bfb83e8553e52acf78b43dfb559ce75c2d91395055c771db359356c8183ed950da6f01a21bf09128935af5e
 DIST pypy3.3-v5.2.0-alpha1-src.tar.bz2 24390595 BLAKE2B 597c2fde68b884592f2c0fb8032a8ee6b0bfb6d3ee47dc1e64a7bb6759f329b909cadb04c99c422f6e4f756ab2787aa3f850d6e05e37f06c3f28436d98e0f805 SHA512 1b6bcab12a7f4dd0ac44158b8acafd64de4b9bcc277385ba4c05982381dcd577fa6ec7b2247f70d2671055f3669764b92b4447b32d51ded58c60e6ec23509595
 DIST pypy3.3-v5.5.0-alpha-src.tar.bz2 25122033 BLAKE2B 6d0fc60fd8f5461a043f7a48dc6faaf0fd886a83a87955053e4fd9aae33e3e0a84421319916284170ade4cb663d1aa3c0db761489745cda685a4d55efc0eccb1 SHA512 b2cf9700e45c452293297edffe08e572dffc3c567026b4b5d9165c1ba1b4d858ffc8a6754f5f28781020016c36440e5c02d07562d075b12444c9c32ea5dd2168
+DIST pypy3.5-v7.0.0-src.tar.bz2 22730690 BLAKE2B 312aea1f88303b225bbfa5e82a28d3c2893d9977b03a3fd12923db15c4a77f04ec3fbce947f0684c4e27073836583ef8a5eaf5be05612e564172170740c2a6e3 SHA512 3facac26e06e254cbf244841824b35ec211859123f6ba9f095dc980292c10d9cf1d11de62cc6372cf77e92ee1cd2358bbd794b3ff25cb7172e1b21c02c8ce6c2

diff --git a/dev-binpkg/pypy3/pypy3-7.0.0.ebuild b/dev-binpkg/pypy3/pypy3-7.0.0.ebuild
new file mode 100644
index 0000000..e9d7985
--- /dev/null
+++ b/dev-binpkg/pypy3/pypy3-7.0.0.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# pypy3 needs to be built using python 2
+PYTHON_COMPAT=( python2_7 pypy )
+inherit check-reqs pax-utils python-any-r1 toolchain-funcs
+
+MY_P=pypy3.5-v${PV}
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (3.5) language"
+HOMEPAGE="http://pypy.org/"
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
+
+LICENSE="MIT"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+SLOT="0/71"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 +jit libressl low-memory ncurses sandbox cpu_flags_x86_sse2"
+
+DEPEND=">=sys-libs/zlib-1.1.3:0=
+	virtual/libffi:0=
+	virtual/libintl:0=
+	dev-libs/expat:0=
+	!libressl? ( dev-libs/openssl:0=[-bindist] )
+	libressl? ( dev-libs/libressl:0= )
+	bzip2? ( app-arch/bzip2:0= )
+	ncurses? ( sys-libs/ncurses:0= )
+	app-arch/lzip
+	low-memory? ( virtual/pypy:0 )
+	!low-memory? ( ${PYTHON_DEPS} )"
+#	doc? ( dev-python/sphinx )
+
+S="${WORKDIR}/${MY_P}-src"
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		if use low-memory; then
+			CHECKREQS_MEMORY="1750M"
+			use amd64 && CHECKREQS_MEMORY="3500M"
+		else
+			CHECKREQS_MEMORY="3G"
+			use amd64 && CHECKREQS_MEMORY="6G"
+		fi
+
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		pkg_pretend
+
+		# unset to allow forcing pypy below :)
+		use low-memory && local EPYTHON=
+		if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
+			einfo "Using PyPy to perform the translation."
+			local EPYTHON=pypy
+		else
+			einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
+			einfo "recommends using PyPy for that. If you wish to do so, please install"
+			einfo "virtual/pypy and ensure that EPYTHON variable is unset."
+		fi
+
+		python-any-r1_pkg_setup
+
+		local cpu
+		if use amd64; then
+			# common denominator between Intel & AMD
+			cpu='x86-64'
+		elif use x86; then
+			if use cpu_flags_x86_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}"
+	fi
+}
+
+src_prepare() {
+	eapply "${FILESDIR}"/5.9.0-shared-lib.patch	# 517002
+
+	eapply_user
+}
+
+src_configure() {
+	tc-export CC
+
+	local args=(
+		--shared
+		$(usex jit -Ojit -O2)
+		$(usex sandbox --sandbox '')
+
+		--jit-backend=auto
+
+		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
+
+	# translate into the C sources
+	# we're going to make them ourselves since otherwise pypy does not
+	# free up the unneeded memory before spawning the compiler
+	set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
+	echo -e "\033[1m${@}\033[0m"
+	"${@}" || die "translation failed"
+}
+
+src_compile() {
+	emake -C "${T}"/usession*-0/testing_1
+
+	# copy back to make sys.prefix happy
+	cp -p "${T}"/usession*-0/testing_1/{pypy3-c,libpypy3-c.so} . || die
+	pax-mark m pypy3-c libpypy3-c.so
+
+	#use doc && emake -C pypy/doc html
+}
+
+src_install() {
+	local flags=( bzip2 jit ncurses sandbox )
+	use x86 && flags+=( cpu_flags_x86_sse2 )
+	local f suffix="-${ARCH}"
+
+	for f in ${flags[@]}; do
+		use ${f} && suffix+="+${f#cpu_flags_x86_}"
+	done
+
+	local BIN_P=pypy3-bin-${PV}
+
+	einfo "Zipping PyPy ..."
+	mkdir "${BIN_P}${suffix}"{,/include} || die
+	mv pypy3-c libpypy3-c.so "${BIN_P}${suffix}"/ || die
+	mv include/pypy_* "${BIN_P}${suffix}"/include/ || die
+	chmod +x "${BIN_P}${suffix}"/pypy3-c || die
+
+	tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die
+	lzip -v9 "${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.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/dev/mgorny:master commit in: dev-binpkg/pypy3/
@ 2019-03-27 12:48 Michał Górny
  0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2019-03-27 12:48 UTC (permalink / raw
  To: gentoo-commits

commit:     ad066639fb2cdb22b3737674916052fc7bd370f7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 27 12:48:33 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Mar 27 12:48:33 2019 +0000
URL:        https://gitweb.gentoo.org/repo/dev/mgorny.git/commit/?id=ad066639

dev-binpkg/pypy3: Bump to 7.1.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-binpkg/pypy3/Manifest           |   1 +
 dev-binpkg/pypy3/pypy3-7.1.0.ebuild | 178 ++++++++++++++++++++++++++++++++++++
 2 files changed, 179 insertions(+)

diff --git a/dev-binpkg/pypy3/Manifest b/dev-binpkg/pypy3/Manifest
index a28ef9f..bd85b76 100644
--- a/dev-binpkg/pypy3/Manifest
+++ b/dev-binpkg/pypy3/Manifest
@@ -8,3 +8,4 @@ DIST pypy3-v6.0.0-src.tar.bz2 22648140 BLAKE2B b8678859b0c24494788ddf6f410a3ec1a
 DIST pypy3.3-v5.2.0-alpha1-src.tar.bz2 24390595 BLAKE2B 597c2fde68b884592f2c0fb8032a8ee6b0bfb6d3ee47dc1e64a7bb6759f329b909cadb04c99c422f6e4f756ab2787aa3f850d6e05e37f06c3f28436d98e0f805 SHA512 1b6bcab12a7f4dd0ac44158b8acafd64de4b9bcc277385ba4c05982381dcd577fa6ec7b2247f70d2671055f3669764b92b4447b32d51ded58c60e6ec23509595
 DIST pypy3.3-v5.5.0-alpha-src.tar.bz2 25122033 BLAKE2B 6d0fc60fd8f5461a043f7a48dc6faaf0fd886a83a87955053e4fd9aae33e3e0a84421319916284170ade4cb663d1aa3c0db761489745cda685a4d55efc0eccb1 SHA512 b2cf9700e45c452293297edffe08e572dffc3c567026b4b5d9165c1ba1b4d858ffc8a6754f5f28781020016c36440e5c02d07562d075b12444c9c32ea5dd2168
 DIST pypy3.5-v7.0.0-src.tar.bz2 22730690 BLAKE2B 312aea1f88303b225bbfa5e82a28d3c2893d9977b03a3fd12923db15c4a77f04ec3fbce947f0684c4e27073836583ef8a5eaf5be05612e564172170740c2a6e3 SHA512 3facac26e06e254cbf244841824b35ec211859123f6ba9f095dc980292c10d9cf1d11de62cc6372cf77e92ee1cd2358bbd794b3ff25cb7172e1b21c02c8ce6c2
+DIST pypy3.6-v7.1.0-src.tar.bz2 23167216 BLAKE2B 12a085c2d4820289643818d8bc1c17304e4cf4f4687054452d878c6f26fd36802bbbe5baee73f0ce2f0322e126dbccbcf7b48ca6569bb7eb8d59f473bd80d4b1 SHA512 1a0a9e9de31c63114c0537747c4a718504a28b780a2ef1f76bff6051a1ec68b496b574989f0b729c07611cd81e199135dd268834dfa6f9664e1e119db8ae20e4

diff --git a/dev-binpkg/pypy3/pypy3-7.1.0.ebuild b/dev-binpkg/pypy3/pypy3-7.1.0.ebuild
new file mode 100644
index 0000000..f1e198c
--- /dev/null
+++ b/dev-binpkg/pypy3/pypy3-7.1.0.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# pypy3 needs to be built using python 2
+PYTHON_COMPAT=( python2_7 pypy )
+inherit check-reqs pax-utils python-any-r1 toolchain-funcs
+
+MY_P=pypy3.6-v${PV}
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (3.6) language"
+HOMEPAGE="http://pypy.org/"
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
+
+LICENSE="MIT"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+SLOT="0/71"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 +jit libressl low-memory ncurses sandbox cpu_flags_x86_sse2"
+
+DEPEND=">=sys-libs/zlib-1.1.3:0=
+	virtual/libffi:0=
+	virtual/libintl:0=
+	dev-libs/expat:0=
+	!libressl? ( dev-libs/openssl:0=[-bindist] )
+	libressl? ( dev-libs/libressl:0= )
+	bzip2? ( app-arch/bzip2:0= )
+	ncurses? ( sys-libs/ncurses:0= )
+	app-arch/lzip
+	low-memory? ( virtual/pypy:0 )
+	!low-memory? ( ${PYTHON_DEPS} )"
+#	doc? ( dev-python/sphinx )
+
+S="${WORKDIR}/${MY_P}-src"
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		if use low-memory; then
+			CHECKREQS_MEMORY="1750M"
+			use amd64 && CHECKREQS_MEMORY="3500M"
+		else
+			CHECKREQS_MEMORY="3G"
+			use amd64 && CHECKREQS_MEMORY="6G"
+		fi
+
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		pkg_pretend
+
+		# unset to allow forcing pypy below :)
+		use low-memory && local EPYTHON=
+		if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
+			einfo "Using PyPy to perform the translation."
+			local EPYTHON=pypy
+		else
+			einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
+			einfo "recommends using PyPy for that. If you wish to do so, please install"
+			einfo "virtual/pypy and ensure that EPYTHON variable is unset."
+		fi
+
+		python-any-r1_pkg_setup
+
+		local cpu
+		if use amd64; then
+			# common denominator between Intel & AMD
+			cpu='x86-64'
+		elif use x86; then
+			if use cpu_flags_x86_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}"
+	fi
+}
+
+src_prepare() {
+	eapply "${FILESDIR}"/5.9.0-shared-lib.patch	# 517002
+
+	eapply_user
+}
+
+src_configure() {
+	tc-export CC
+
+	local args=(
+		--shared
+		$(usex jit -Ojit -O2)
+		$(usex sandbox --sandbox '')
+
+		--jit-backend=auto
+
+		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
+
+	# translate into the C sources
+	# we're going to make them ourselves since otherwise pypy does not
+	# free up the unneeded memory before spawning the compiler
+	set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
+	echo -e "\033[1m${@}\033[0m"
+	"${@}" || die "translation failed"
+}
+
+src_compile() {
+	emake -C "${T}"/usession*-0/testing_1
+
+	# copy back to make sys.prefix happy
+	cp -p "${T}"/usession*-0/testing_1/{pypy3-c,libpypy3-c.so} . || die
+	pax-mark m pypy3-c libpypy3-c.so
+
+	#use doc && emake -C pypy/doc html
+}
+
+src_install() {
+	local flags=( bzip2 jit ncurses sandbox )
+	use x86 && flags+=( cpu_flags_x86_sse2 )
+	local f suffix="-${ARCH}"
+
+	for f in ${flags[@]}; do
+		use ${f} && suffix+="+${f#cpu_flags_x86_}"
+	done
+
+	local BIN_P=pypy3-bin-${PV}
+
+	einfo "Zipping PyPy ..."
+	mkdir "${BIN_P}${suffix}"{,/include} || die
+	mv pypy3-c libpypy3-c.so "${BIN_P}${suffix}"/ || die
+	mv include/pypy_* "${BIN_P}${suffix}"/include/ || die
+	chmod +x "${BIN_P}${suffix}"/pypy3-c || die
+
+	tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die
+	lzip -v9 "${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.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/dev/mgorny:master commit in: dev-binpkg/pypy3/
@ 2019-04-19 11:35 Michał Górny
  0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2019-04-19 11:35 UTC (permalink / raw
  To: gentoo-commits

commit:     22c86b3ece8f8256edbbb437db543ec357373c18
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 19 11:35:13 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Apr 19 11:35:13 2019 +0000
URL:        https://gitweb.gentoo.org/repo/dev/mgorny.git/commit/?id=22c86b3e

dev-binpkg/pypy3: Bump to 7.1.1

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-binpkg/pypy3/Manifest           |   1 +
 dev-binpkg/pypy3/pypy3-7.1.1.ebuild | 178 ++++++++++++++++++++++++++++++++++++
 2 files changed, 179 insertions(+)

diff --git a/dev-binpkg/pypy3/Manifest b/dev-binpkg/pypy3/Manifest
index bd85b76..f058403 100644
--- a/dev-binpkg/pypy3/Manifest
+++ b/dev-binpkg/pypy3/Manifest
@@ -9,3 +9,4 @@ DIST pypy3.3-v5.2.0-alpha1-src.tar.bz2 24390595 BLAKE2B 597c2fde68b884592f2c0fb8
 DIST pypy3.3-v5.5.0-alpha-src.tar.bz2 25122033 BLAKE2B 6d0fc60fd8f5461a043f7a48dc6faaf0fd886a83a87955053e4fd9aae33e3e0a84421319916284170ade4cb663d1aa3c0db761489745cda685a4d55efc0eccb1 SHA512 b2cf9700e45c452293297edffe08e572dffc3c567026b4b5d9165c1ba1b4d858ffc8a6754f5f28781020016c36440e5c02d07562d075b12444c9c32ea5dd2168
 DIST pypy3.5-v7.0.0-src.tar.bz2 22730690 BLAKE2B 312aea1f88303b225bbfa5e82a28d3c2893d9977b03a3fd12923db15c4a77f04ec3fbce947f0684c4e27073836583ef8a5eaf5be05612e564172170740c2a6e3 SHA512 3facac26e06e254cbf244841824b35ec211859123f6ba9f095dc980292c10d9cf1d11de62cc6372cf77e92ee1cd2358bbd794b3ff25cb7172e1b21c02c8ce6c2
 DIST pypy3.6-v7.1.0-src.tar.bz2 23167216 BLAKE2B 12a085c2d4820289643818d8bc1c17304e4cf4f4687054452d878c6f26fd36802bbbe5baee73f0ce2f0322e126dbccbcf7b48ca6569bb7eb8d59f473bd80d4b1 SHA512 1a0a9e9de31c63114c0537747c4a718504a28b780a2ef1f76bff6051a1ec68b496b574989f0b729c07611cd81e199135dd268834dfa6f9664e1e119db8ae20e4
+DIST pypy3.6-v7.1.1-src.tar.bz2 23171982 BLAKE2B be43528bc6f3e02d146016a4969bd8c7a9e880a3bd3b77f441aac6d22ef67700f71e0171ec000066bd2c0bd506db64af69d6b75b59a92222dd0353ee70e6629b SHA512 17e78f9c7080d597a6283d8e8247d1ca78f09a14ff221db8c3d90d255b5befc73102b317ca34a80979e544d5ee72f3e5e649f89d185a085f4cc15012da4d0473

diff --git a/dev-binpkg/pypy3/pypy3-7.1.1.ebuild b/dev-binpkg/pypy3/pypy3-7.1.1.ebuild
new file mode 100644
index 0000000..f1e198c
--- /dev/null
+++ b/dev-binpkg/pypy3/pypy3-7.1.1.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# pypy3 needs to be built using python 2
+PYTHON_COMPAT=( python2_7 pypy )
+inherit check-reqs pax-utils python-any-r1 toolchain-funcs
+
+MY_P=pypy3.6-v${PV}
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (3.6) language"
+HOMEPAGE="http://pypy.org/"
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
+
+LICENSE="MIT"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+SLOT="0/71"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 +jit libressl low-memory ncurses sandbox cpu_flags_x86_sse2"
+
+DEPEND=">=sys-libs/zlib-1.1.3:0=
+	virtual/libffi:0=
+	virtual/libintl:0=
+	dev-libs/expat:0=
+	!libressl? ( dev-libs/openssl:0=[-bindist] )
+	libressl? ( dev-libs/libressl:0= )
+	bzip2? ( app-arch/bzip2:0= )
+	ncurses? ( sys-libs/ncurses:0= )
+	app-arch/lzip
+	low-memory? ( virtual/pypy:0 )
+	!low-memory? ( ${PYTHON_DEPS} )"
+#	doc? ( dev-python/sphinx )
+
+S="${WORKDIR}/${MY_P}-src"
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		if use low-memory; then
+			CHECKREQS_MEMORY="1750M"
+			use amd64 && CHECKREQS_MEMORY="3500M"
+		else
+			CHECKREQS_MEMORY="3G"
+			use amd64 && CHECKREQS_MEMORY="6G"
+		fi
+
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		pkg_pretend
+
+		# unset to allow forcing pypy below :)
+		use low-memory && local EPYTHON=
+		if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
+			einfo "Using PyPy to perform the translation."
+			local EPYTHON=pypy
+		else
+			einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
+			einfo "recommends using PyPy for that. If you wish to do so, please install"
+			einfo "virtual/pypy and ensure that EPYTHON variable is unset."
+		fi
+
+		python-any-r1_pkg_setup
+
+		local cpu
+		if use amd64; then
+			# common denominator between Intel & AMD
+			cpu='x86-64'
+		elif use x86; then
+			if use cpu_flags_x86_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}"
+	fi
+}
+
+src_prepare() {
+	eapply "${FILESDIR}"/5.9.0-shared-lib.patch	# 517002
+
+	eapply_user
+}
+
+src_configure() {
+	tc-export CC
+
+	local args=(
+		--shared
+		$(usex jit -Ojit -O2)
+		$(usex sandbox --sandbox '')
+
+		--jit-backend=auto
+
+		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
+
+	# translate into the C sources
+	# we're going to make them ourselves since otherwise pypy does not
+	# free up the unneeded memory before spawning the compiler
+	set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
+	echo -e "\033[1m${@}\033[0m"
+	"${@}" || die "translation failed"
+}
+
+src_compile() {
+	emake -C "${T}"/usession*-0/testing_1
+
+	# copy back to make sys.prefix happy
+	cp -p "${T}"/usession*-0/testing_1/{pypy3-c,libpypy3-c.so} . || die
+	pax-mark m pypy3-c libpypy3-c.so
+
+	#use doc && emake -C pypy/doc html
+}
+
+src_install() {
+	local flags=( bzip2 jit ncurses sandbox )
+	use x86 && flags+=( cpu_flags_x86_sse2 )
+	local f suffix="-${ARCH}"
+
+	for f in ${flags[@]}; do
+		use ${f} && suffix+="+${f#cpu_flags_x86_}"
+	done
+
+	local BIN_P=pypy3-bin-${PV}
+
+	einfo "Zipping PyPy ..."
+	mkdir "${BIN_P}${suffix}"{,/include} || die
+	mv pypy3-c libpypy3-c.so "${BIN_P}${suffix}"/ || die
+	mv include/pypy_* "${BIN_P}${suffix}"/include/ || die
+	chmod +x "${BIN_P}${suffix}"/pypy3-c || die
+
+	tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die
+	lzip -v9 "${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.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/dev/mgorny:master commit in: dev-binpkg/pypy3/
@ 2019-08-15  8:10 Michał Górny
  0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2019-08-15  8:10 UTC (permalink / raw
  To: gentoo-commits

commit:     21aeb29ab2c7b8162467b4b679e1e946a0f1754a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 15 08:10:13 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Aug 15 08:10:13 2019 +0000
URL:        https://gitweb.gentoo.org/repo/dev/mgorny.git/commit/?id=21aeb29a

dev-binpkg/pypy3: Restore non-SSE2 x86 backend

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-binpkg/pypy3/pypy3-7.1.1.ebuild | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/dev-binpkg/pypy3/pypy3-7.1.1.ebuild b/dev-binpkg/pypy3/pypy3-7.1.1.ebuild
index f1e198c..c104421 100644
--- a/dev-binpkg/pypy3/pypy3-7.1.1.ebuild
+++ b/dev-binpkg/pypy3/pypy3-7.1.1.ebuild
@@ -98,12 +98,32 @@ src_prepare() {
 src_configure() {
 	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 cpu_flags_x86_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 sandbox --sandbox '')
 
-		--jit-backend=auto
+		${jit_backend}
 
 		pypy/goal/targetpypystandalone
 	)


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/dev/mgorny:master commit in: dev-binpkg/pypy3/
@ 2019-10-18  6:30 Michał Górny
  0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2019-10-18  6:30 UTC (permalink / raw
  To: gentoo-commits

commit:     b004a9255b47a53fd0428e4dfd72f3b76ac49541
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 18 06:30:22 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Oct 18 06:30:22 2019 +0000
URL:        https://gitweb.gentoo.org/repo/dev/mgorny.git/commit/?id=b004a925

dev-binpkg/pypy3: Bump to 7.2.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-binpkg/pypy3/Manifest           |   1 +
 dev-binpkg/pypy3/pypy3-7.2.0.ebuild | 196 ++++++++++++++++++++++++++++++++++++
 2 files changed, 197 insertions(+)

diff --git a/dev-binpkg/pypy3/Manifest b/dev-binpkg/pypy3/Manifest
index f058403..5c05d4d 100644
--- a/dev-binpkg/pypy3/Manifest
+++ b/dev-binpkg/pypy3/Manifest
@@ -10,3 +10,4 @@ DIST pypy3.3-v5.5.0-alpha-src.tar.bz2 25122033 BLAKE2B 6d0fc60fd8f5461a043f7a48d
 DIST pypy3.5-v7.0.0-src.tar.bz2 22730690 BLAKE2B 312aea1f88303b225bbfa5e82a28d3c2893d9977b03a3fd12923db15c4a77f04ec3fbce947f0684c4e27073836583ef8a5eaf5be05612e564172170740c2a6e3 SHA512 3facac26e06e254cbf244841824b35ec211859123f6ba9f095dc980292c10d9cf1d11de62cc6372cf77e92ee1cd2358bbd794b3ff25cb7172e1b21c02c8ce6c2
 DIST pypy3.6-v7.1.0-src.tar.bz2 23167216 BLAKE2B 12a085c2d4820289643818d8bc1c17304e4cf4f4687054452d878c6f26fd36802bbbe5baee73f0ce2f0322e126dbccbcf7b48ca6569bb7eb8d59f473bd80d4b1 SHA512 1a0a9e9de31c63114c0537747c4a718504a28b780a2ef1f76bff6051a1ec68b496b574989f0b729c07611cd81e199135dd268834dfa6f9664e1e119db8ae20e4
 DIST pypy3.6-v7.1.1-src.tar.bz2 23171982 BLAKE2B be43528bc6f3e02d146016a4969bd8c7a9e880a3bd3b77f441aac6d22ef67700f71e0171ec000066bd2c0bd506db64af69d6b75b59a92222dd0353ee70e6629b SHA512 17e78f9c7080d597a6283d8e8247d1ca78f09a14ff221db8c3d90d255b5befc73102b317ca34a80979e544d5ee72f3e5e649f89d185a085f4cc15012da4d0473
+DIST pypy3.6-v7.2.0-src.tar.bz2 21850076 BLAKE2B 756ea3034fe8971c979ec83c9cbfac55a680f3ef03b276475aa4318f3480ae5ede609b8413412df64db553a33979670498b1f97184f3b57406619c9db7f01127 SHA512 bcbb53062a473d504bcc082cf6286f6169c83d1f38d22c4d7c4e46ddc32bca9d91e71194637e6650db5bec02b29fe262b22fe236d627b6bc3e6e0c59c66c07cc

diff --git a/dev-binpkg/pypy3/pypy3-7.2.0.ebuild b/dev-binpkg/pypy3/pypy3-7.2.0.ebuild
new file mode 100644
index 0000000..5937d67
--- /dev/null
+++ b/dev-binpkg/pypy3/pypy3-7.2.0.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# pypy3 needs to be built using python 2
+PYTHON_COMPAT=( python2_7 pypy )
+inherit check-reqs pax-utils python-any-r1 toolchain-funcs
+
+MY_P=pypy3.6-v${PV}
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (3.6) language"
+HOMEPAGE="http://pypy.org/"
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
+
+LICENSE="MIT"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+SLOT="0/71"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 +jit low-memory ncurses sandbox cpu_flags_x86_sse2"
+
+DEPEND=">=sys-libs/zlib-1.1.3:0=
+	virtual/libffi:0=
+	virtual/libintl:0=
+	dev-libs/expat:0=
+	bzip2? ( app-arch/bzip2:0= )
+	ncurses? ( sys-libs/ncurses:0= )
+	app-arch/lzip
+	low-memory? ( virtual/pypy:0 )
+	!low-memory? ( ${PYTHON_DEPS} )"
+#	doc? ( dev-python/sphinx )
+
+S="${WORKDIR}/${MY_P}-src"
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		if use low-memory; then
+			CHECKREQS_MEMORY="1750M"
+			use amd64 && CHECKREQS_MEMORY="3500M"
+		else
+			CHECKREQS_MEMORY="3G"
+			use amd64 && CHECKREQS_MEMORY="6G"
+		fi
+
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		pkg_pretend
+
+		# unset to allow forcing pypy below :)
+		use low-memory && local EPYTHON=
+		if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
+			einfo "Using PyPy to perform the translation."
+			local EPYTHON=pypy
+		else
+			einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
+			einfo "recommends using PyPy for that. If you wish to do so, please install"
+			einfo "virtual/pypy and ensure that EPYTHON variable is unset."
+		fi
+
+		python-any-r1_pkg_setup
+
+		local cpu
+		if use amd64; then
+			# common denominator between Intel & AMD
+			cpu='x86-64'
+		elif use x86; then
+			if use cpu_flags_x86_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}"
+	fi
+}
+
+src_prepare() {
+	eapply "${FILESDIR}"/5.9.0-shared-lib.patch	# 517002
+
+	eapply_user
+}
+
+src_configure() {
+	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 cpu_flags_x86_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 sandbox --sandbox '')
+
+		${jit_backend}
+
+		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
+
+	# translate into the C sources
+	# we're going to make them ourselves since otherwise pypy does not
+	# free up the unneeded memory before spawning the compiler
+	set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
+	echo -e "\033[1m${@}\033[0m"
+	"${@}" || die "translation failed"
+}
+
+src_compile() {
+	emake -C "${T}"/usession*-0/testing_1
+
+	# copy back to make sys.prefix happy
+	cp -p "${T}"/usession*-0/testing_1/{pypy3-c,libpypy3-c.so} . || die
+	pax-mark m pypy3-c libpypy3-c.so
+
+	#use doc && emake -C pypy/doc html
+}
+
+src_install() {
+	local flags=( bzip2 jit ncurses sandbox )
+	use x86 && flags+=( cpu_flags_x86_sse2 )
+	local f suffix="-${ARCH}"
+
+	for f in ${flags[@]}; do
+		use ${f} && suffix+="+${f#cpu_flags_x86_}"
+	done
+
+	local BIN_P=pypy3-bin-${PV}
+
+	einfo "Zipping PyPy ..."
+	mkdir "${BIN_P}${suffix}"{,/include} || die
+	mv pypy3-c libpypy3-c.so "${BIN_P}${suffix}"/ || die
+	mv include/pypy_* "${BIN_P}${suffix}"/include/ || die
+	chmod +x "${BIN_P}${suffix}"/pypy3-c || die
+
+	tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die
+	lzip -v9 "${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.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/dev/mgorny:master commit in: dev-binpkg/pypy3/
@ 2019-12-15  4:39 Michał Górny
  0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2019-12-15  4:39 UTC (permalink / raw
  To: gentoo-commits

commit:     468d31040f8d45dbbdf6b19ad24224275f0053a8
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 15 04:34:56 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 04:35:22 2019 +0000
URL:        https://gitweb.gentoo.org/repo/dev/mgorny.git/commit/?id=468d3104

dev-binpkg/pypy3: Fix UnnecessarySlashStrip

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-binpkg/pypy3/pypy3-7.2.0.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-binpkg/pypy3/pypy3-7.2.0.ebuild b/dev-binpkg/pypy3/pypy3-7.2.0.ebuild
index 5937d67..e366d41 100644
--- a/dev-binpkg/pypy3/pypy3-7.2.0.ebuild
+++ b/dev-binpkg/pypy3/pypy3-7.2.0.ebuild
@@ -191,6 +191,6 @@ src_install() {
 pkg_preinst() {
 	# integrity check.
 	[[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!'
-	mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die
-	mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die
+	mkdir -p "${ROOT}${PYPY_BINPKG_STORE}" || die
+	mv "${S}"/*.tar.lz "${ROOT}${PYPY_BINPKG_STORE}" || die
 }


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-12-15  4:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-18  6:30 [gentoo-commits] repo/dev/mgorny:master commit in: dev-binpkg/pypy3/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2019-12-15  4:39 Michał Górny
2019-08-15  8:10 Michał Górny
2019-04-19 11:35 Michał Górny
2019-03-27 12:48 Michał Górny
2019-02-14 21:06 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox