summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2017-09-22 18:44:34 +0000
committerPatrick Lauer <patrick@gentoo.org>2017-09-22 18:46:30 +0000
commita5db780dfca752e726cef886a15c6886e3359cd2 (patch)
tree9e082aab30333b9590144c37d84c627fba54feec /dev-lang
parentdev-lang/moarvm: Bump (diff)
downloadgentoo-a5db780dfca752e726cef886a15c6886e3359cd2.tar.gz
gentoo-a5db780dfca752e726cef886a15c6886e3359cd2.tar.bz2
gentoo-a5db780dfca752e726cef886a15c6886e3359cd2.zip
dev-lang/nqp: Bump
Package-Manager: Portage-2.3.10, Repoman-2.3.3
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/nqp/Manifest1
-rw-r--r--dev-lang/nqp/nqp-2017.09.ebuild159
2 files changed, 160 insertions, 0 deletions
diff --git a/dev-lang/nqp/Manifest b/dev-lang/nqp/Manifest
index 3a4784c1fcbb..75aaa25c0e86 100644
--- a/dev-lang/nqp/Manifest
+++ b/dev-lang/nqp/Manifest
@@ -6,3 +6,4 @@ DIST nqp-2017.05.tar.gz 3698847 SHA256 e5326a0a4c791f70802cadfc1a71ba119f0da6697
DIST nqp-2017.06.tar.gz 3714001 SHA256 8275f0172b1256cc6bfa60c895a5534b65a70a29c20025b011c9edca2a4eb922 SHA512 7a067c6650442fc1071bc5ce61b01755f2746a825aa48cf8d127cd7fb15aad6729872313df2a18270d6ff995564bdbc3d68138afaaa7a3680567700109595197 WHIRLPOOL ea44ee01c19845f7c59125b5daed1ae63a722ead1f5cffc55ff2cdae78cb989e941be26428324cab746ccda72fa5b2ad8189442e0ccfc6b574c6af42a34ad790
DIST nqp-2017.07.tar.gz 3713517 SHA256 31fefc7fa02441b45ff0ca465b58a8b391522b7090965a85323134aa17cb1166 SHA512 55ef0827c6e013b898d8a5034d2568e787bb89b510234cd58239f13c9f8f9ff24bb3790838aeade79fe09d721c2d2384c94bc4714b24f3d602a9b4a0dbcdcafc WHIRLPOOL 71ee1e98810b32a8fe5220fb0efd5d99c393bbf1b1fd13898cf21c7ba82d5815a9136cc6965077cb58a8777c040f4578b3a50fb180b01e190d8f9f6b82366bae
DIST nqp-2017.08.tar.gz 3718841 SHA256 70e202096c1ca12ccaec700633807e64c21a395ca45a581c762f3a1d417fa76a SHA512 b86e58f1465ca0baaafd3424739b3ad0da8b5b764e53afa36d77c5058015a66d6180c97e56adfa8de2892e28669b3bcc688d16009669ad995170ca6e68c8b486 WHIRLPOOL c3c737d76099d22047860b97926f4af7202d2b1e4783d926a88fd9f914d0c0d0eeb65829f7c4d0d7af4e541b7c09a380f2db9a3c87889b6f2ed06a44aaa8d365
+DIST nqp-2017.09.tar.gz 3724208 SHA256 ac6e1d2cdd8239cb2636c62ee6500e9bb346c63d4934c4dca125bc714cc023c0 SHA512 a932f6d5ea24ad1857339cd5d7314f75b5bb08628df63e180c3675e0e5a8d04fe12add1cf2d04c55e0454bc4c0e5e59cfd57f793c242dfa2459f06ae8a2097cb WHIRLPOOL c015a9b6a82d07fbae86dd1195ddf5e82faecdbed83fa939f02e8a2f9748d5b6cf1e6156792a43ce40b14f58c74c9ad7190f8c319a846aee7e3bb61fb9daf73f
diff --git a/dev-lang/nqp/nqp-2017.09.ebuild b/dev-lang/nqp/nqp-2017.09.ebuild
new file mode 100644
index 000000000000..f171bb707fb9
--- /dev/null
+++ b/dev-lang/nqp/nqp-2017.09.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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-2017.09.1[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/*
+}