summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2016-09-30 15:12:47 +0200
committerPatrick Lauer <patrick@gentoo.org>2016-09-30 15:12:47 +0200
commitc783205d480e73f5f4d7aa1e37b3ec864478173f (patch)
treefdfe5feb6d6c3f22eeab405959116136d316c94b
parentdev-lang/moarvm: Bump (diff)
downloadgentoo-c783205d480e73f5f4d7aa1e37b3ec864478173f.tar.gz
gentoo-c783205d480e73f5f4d7aa1e37b3ec864478173f.tar.bz2
gentoo-c783205d480e73f5f4d7aa1e37b3ec864478173f.zip
dev-lang/nqp: Bump
Package-Manager: portage-2.3.0
-rw-r--r--dev-lang/nqp/Manifest1
-rw-r--r--dev-lang/nqp/nqp-2016.09.ebuild160
2 files changed, 161 insertions, 0 deletions
diff --git a/dev-lang/nqp/Manifest b/dev-lang/nqp/Manifest
index 663a53af87f2..f125f74faead 100644
--- a/dev-lang/nqp/Manifest
+++ b/dev-lang/nqp/Manifest
@@ -4,3 +4,4 @@ DIST nqp-2016.05.tar.gz 5159647 SHA256 7fdd76322383632783b4352e8fab144c3d68acbfd
DIST nqp-2016.06.tar.gz 5162457 SHA256 e8142a6fb9ff710fa8a312e84f73986abb0027f537ec53ef2a42b5d6da6df8ac SHA512 76821f63a247fee1e4d8eea87ef2187f6529f72dd3c77fc2cb2829c050e9689b586a7b61d12e4523c507e08618ca2ae7f6d85a95542113f20bae961be6fd024f WHIRLPOOL 62ee4b31e7e9de3c8623f16cf0d7d216214c1bd2232f7192ea02f2cc6edaf0d67707aacd23692757db6d81711c8719409e4d1518d7b7383c25b04911c64f2cb5
DIST nqp-2016.07.tar.gz 5163170 SHA256 bf579d9b8bfa35e4cae368db0f5fa74785e3d571970e043278fe0ccefb91d59f SHA512 74ef7af564aafac4c4785431e6618ed6ccf962c70fb2ad91e63f765c8e107e230f03b8095c917db9d2ebd2829aaa42cd426de5eeb826c60f3ac935cabfaaefaf WHIRLPOOL 0a83126d163cb045351bb28e6af6860bd62c83ee5570bf702813d1553428739e91f3d3966f16c6977fa418d844eb9072a28dca4a263f956c9c308a98009d0807
DIST nqp-2016.08.1.tar.gz 3931460 SHA256 2eb9c0ea2864a232f50db6f898370caea1e844daabce658b44847aa31dee56ab SHA512 fa771dd46b84aa7cf295a86d4a54953fc99cc3ef90f272ea8331bf02fd30d1e7e4139c5f7518294de98a66d4bac0451e2fe98a8e05ff294fa622ca84d7e45d6f WHIRLPOOL ed4d3b2d035581d4cc031815cb7da00785f96818af9a9970cd7b34d9baef5ecd4955296eaf081df34922667907540309bf3eae22069d29a7c459306ff7d8cfc6
+DIST nqp-2016.09.tar.gz 3935097 SHA256 24f10be9d1072d9dc3314bc729c1fbbe0df09accd2e4f9b2cb0f403a1c251d57 SHA512 0d6af33cfd856a191027a2ca3001b4142e775f919f4f5bf8ef0c92dae1e6c84b3c19bef17d6ec11202429c03f3a1d21fa719201aea935cabeeb8efc656451680 WHIRLPOOL 2175ec6fb8f7b730fdeb35bd014b619af662621ab89491fb3fb870bc6724f03b8af40d07080154af7ec3f246d1e717f662be1feb6e5d4ee39c3143784576b370
diff --git a/dev-lang/nqp/nqp-2016.09.ebuild b/dev-lang/nqp/nqp-2016.09.ebuild
new file mode 100644
index 000000000000..fe2ace68a5d8
--- /dev/null
+++ b/dev-lang/nqp/nqp-2016.09.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit java-pkg-opt-2 multibuild
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/perl6/${PN}.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
+ inherit vcs-snapshot
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
+HOMEPAGE="http://rakudo.org/"
+
+LICENSE="Artistic-2"
+SLOT="0"
+IUSE="doc clang java +moar test"
+REQUIRED_USE="|| ( java moar )"
+
+CDEPEND="java? (
+ dev-java/asm:4
+ dev-java/jline:0
+ dev-java/jna:4
+ )
+ moar? ( ~dev-lang/moarvm-${PV}[clang=] )"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.7 )"
+DEPEND="${CDEPEND}
+ clang? ( sys-devel/clang )
+ java? ( >=virtual/jdk-1.7 )
+ dev-lang/perl"
+
+pkg_pretend() {
+ if has_version dev-lang/rakudo || has_version dev-lang/nqp; then
+ ewarn "NQP is known to fail compilation/installation with Rakudo and/or NQP"
+ ewarn "already being installed. So if it fails, try uninstalling both"
+ ewarn "dev-lang/nqp and dev-lang/rakudo, then do a new installation."
+ ewarn "(see Bug #584394)"
+ fi
+}
+
+java_prepare() {
+ # Don't clean stage0 jars.
+ einfo "Cleaning upstream jars"
+ java-pkg_clean 3rdparty/
+
+ # Don't use jars we just deleted.
+ sed -i -r 's/(:3rdparty[^:]*)+/:${THIRDPARTY_JARS}/g' \
+ src/vm/jvm/runners/nqp-j || die
+}
+
+src_prepare() {
+ MULTIBUILD_VARIANTS=()
+ use moar && MULTIBUILD_VARIANTS+=( moar )
+ use java && MULTIBUILD_VARIANTS+=( jvm )
+
+ multibuild_copy_sources
+
+ # This will pull in conditional java_prepare
+ default
+}
+
+nqp_configure() {
+ pushd "${BUILD_DIR}" > /dev/null || die
+ local myconfargs=(
+ "--backend=${MULTIBUILD_VARIANT}"
+ "--prefix=/usr" )
+
+ perl Configure.pl "${myconfargs[@]}" || die
+ popd || die
+}
+
+nqp_compile() {
+ if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then
+ emake -j1 \
+ -C "${BUILD_DIR}" \
+ THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies asm-4,jline,jna-4) \
+ JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)"
+ elif [[ "${MULTIBUILD_VARIANT}" = moar ]]; then
+ emake -j1 \
+ -C "${BUILD_DIR}"
+ fi
+}
+
+nqp_test() {
+ emake -j1 \
+ -C "${BUILD_DIR}" \
+ test
+}
+
+nqp_install() {
+ # This is the actual reason we need multibuild.eclass.
+ # We need to distinguish the install procedure for MoarVM and JVM backends.
+ case "${MULTIBUILD_VARIANT}" in
+ moar)
+ emake \
+ DESTDIR="${ED}" \
+ -C "${BUILD_DIR}" \
+ install
+ ;;
+ jvm)
+ pushd "${BUILD_DIR}" > /dev/null || die
+ # Set JAVA_PKG_JARDEST early.
+ java-pkg_init_paths_
+
+ # Upstream sets the classpath to this location. Perhaps it's
+ # used to locate the additional libraries?
+ java-pkg_addcp "${JAVA_PKG_JARDEST}"
+
+ insinto "${JAVA_PKG_JARDEST}"
+ local jar
+
+ for jar in *.jar; do
+ if has ${jar} ${PN}.jar ${PN}-runtime.jar; then
+ # jars for NQP itself.
+ java-pkg_dojar ${jar}
+ else
+ # jars used by NQP.
+ doins ${jar}
+ fi
+ done
+
+ # Upstream uses -Xbootclasspath/a, which is faster due to lack
+ # of verification, but gjl isn't flexible enough yet. :(
+ java-pkg_dolauncher ${PN}-j --main ${PN}
+ dosym ${PN}-j /usr/bin/${PN}
+ dobin tools/jvm/eval-client.pl
+ popd > /dev/null || die
+ ;;
+ *)
+ die "Unknown MULTIBUILD_VARIANT ${MULTIBUILD_VARIANT}."
+ ;;
+ esac
+}
+
+src_configure() {
+ multibuild_foreach_variant nqp_configure
+}
+
+src_compile() {
+ multibuild_foreach_variant nqp_compile
+}
+
+src_test() {
+ multibuild_foreach_variant nqp_test
+}
+
+src_install() {
+ multibuild_foreach_variant nqp_install
+
+ dodoc CREDITS README.pod
+ use doc && dodoc -r docs/*
+}