summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2016-11-25 19:52:39 +0100
committerPatrick Lauer <patrick@gentoo.org>2016-11-25 19:52:39 +0100
commit12fbe8f44aa129f483000296363dab188515e89c (patch)
treeef9416d124207a0c423bd8c81d7245b65a1e1ad8
parentdev-lang/moarvm: Bump (diff)
downloadgentoo-12fbe8f44aa129f483000296363dab188515e89c.tar.gz
gentoo-12fbe8f44aa129f483000296363dab188515e89c.tar.bz2
gentoo-12fbe8f44aa129f483000296363dab188515e89c.zip
dev-lang/nqp: Bump
Package-Manager: portage-2.3.2
-rw-r--r--dev-lang/nqp/Manifest1
-rw-r--r--dev-lang/nqp/nqp-2016.11.ebuild160
2 files changed, 161 insertions, 0 deletions
diff --git a/dev-lang/nqp/Manifest b/dev-lang/nqp/Manifest
index 23cf7c06a1b7..208ea73da1fa 100644
--- a/dev-lang/nqp/Manifest
+++ b/dev-lang/nqp/Manifest
@@ -6,3 +6,4 @@ DIST nqp-2016.07.tar.gz 5163170 SHA256 bf579d9b8bfa35e4cae368db0f5fa74785e3d5719
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
DIST nqp-2016.10.tar.gz 3943840 SHA256 d66905006e74b6d55f7abd3fba051fdf9a2583879bbf3cecaab076c07d39d476 SHA512 8a42fd4062237838d71870718e8cb9c166fb022fa05d624543479d9476890aa4eaaba0f4ba0d9c5ca1684559f34d999acdfbb5173d15a462ae94a9aaabbd1dbd WHIRLPOOL 62868016c516888df327601be2f4bb30b156bd0d3a14a3a1e9f7d162c5dfe089f3bf2946b69237eff559e44870a07e702480947bc47e13c6b4b7ca81a947ad31
+DIST nqp-2016.11.tar.gz 3946759 SHA256 08d3eb664ad049e72bd9821755564ee7cbbf0da4833f1bcc9441e970c5f73ccd SHA512 bd99e286dc09fa5096429cc35847e43893d30a9ce9efdfb55346c04eeeda0c44307fd39217107a2210040b7a4dcc900f69279e19d1cc54a469ab286377e28f6a WHIRLPOOL 373fe379cf8fe965d9c1097042a55472d69322c08e613a9d55749bbb4da084b84adee5c5dfe93c4f9bf81298e28308d697f66482b80a16ada3ea9ea81754f54b
diff --git a/dev-lang/nqp/nqp-2016.11.ebuild b/dev-lang/nqp/nqp-2016.11.ebuild
new file mode 100644
index 000000000000..fe2ace68a5d8
--- /dev/null
+++ b/dev-lang/nqp/nqp-2016.11.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/*
+}