summaryrefslogtreecommitdiff
path: root/dev-lang/nqp
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/nqp')
-rw-r--r--dev-lang/nqp/Manifest2
-rw-r--r--dev-lang/nqp/nqp-2018.05.ebuild159
2 files changed, 161 insertions, 0 deletions
diff --git a/dev-lang/nqp/Manifest b/dev-lang/nqp/Manifest
index dd83dd0d164d..ab901673803a 100644
--- a/dev-lang/nqp/Manifest
+++ b/dev-lang/nqp/Manifest
@@ -3,10 +3,12 @@ DIST nqp-2018.02.tar.gz 3759551 BLAKE2B 48713a0d300ec2e296b426784bb22f7859693710
DIST nqp-2018.03.tar.gz 3778268 BLAKE2B 16e8e3924daa3aecf9987e9c39173fb32a769cd668add4b62bf04feb09755e5442224357610189ae8184c8c5c6fa35b2ce0d29cb708e8c5c0218963e2f918022 SHA512 d90fc8c933c31f1013bfdda5a02699c1c668ed5466167d58355c6baa65c294269cb4dbe072452bd14a9bbf180d83e61fedd3354b4404d590304be04e28489460
DIST nqp-2018.04.1.tar.gz 3783660 BLAKE2B b596163b4d4a8d4b708d59dba586713e50edf3d5d1dc400960464e9528cefbf9867508712b74ee7014f4ad0badb742ca483816c6efff5909c8c52bf48d5fa85a SHA512 01211c8535873f26f1eb144033bbee318948dfaf2988f9f737002e41ad745294a6fe193e15d997e7d9297fcd2632fc71f9c9a6960c3af7606946c23e49d284de
DIST nqp-2018.04.tar.gz 3782652 BLAKE2B 0d36363956a3b150c5dbd7e9c094281680bfe2b87fa509e5a27ffc8be1df8ab82cd89276d9392c11b0912cf4d00d5a668dd6f497f4cfdf4914c40de2b0443c5c SHA512 5cb749577c5e985174c0721b92a00af7a93a5a7b3833718718b825d71d135ba14150b8a6bb065cf21356a37ea082431eacbff8ca63bce6f0ddeaf200494fe646
+DIST nqp-2018.05.tar.gz 3785860 BLAKE2B 058f29acf6a9a2f79677dcca7fd145a8bf4d780eb516a874bf128cca4c8916e7b13868a29189888a22b827656156039a2fadaca26865d8a609559ebab6cec5c7 SHA512 463e795a6893dc418d87a347672781f8424ae3484f2d5ab20fa75a4fb226c239175d10889783e3cbca83c4f8d317406afa858f725dbe7f9869277f9d1cbcd9f0
EBUILD nqp-2018.01.ebuild 3607 BLAKE2B e7ccbd696d6dbe35b6a1c6ed99b1013aac46deb0631e6258a909144594fd143e760ca47dad422c9056686cc5dcdd07782847aa0a14da61d6b1577accf4997435 SHA512 76efc1ed63882e483414e49747c5d15524afdf39d45c5013189fbd9463aba177b3cae73c403480d6e81a65a436ce806e2c41204dffa2cbcc220fc58aa5cddac4
EBUILD nqp-2018.02.ebuild 3607 BLAKE2B e7ccbd696d6dbe35b6a1c6ed99b1013aac46deb0631e6258a909144594fd143e760ca47dad422c9056686cc5dcdd07782847aa0a14da61d6b1577accf4997435 SHA512 76efc1ed63882e483414e49747c5d15524afdf39d45c5013189fbd9463aba177b3cae73c403480d6e81a65a436ce806e2c41204dffa2cbcc220fc58aa5cddac4
EBUILD nqp-2018.03.ebuild 3607 BLAKE2B e7ccbd696d6dbe35b6a1c6ed99b1013aac46deb0631e6258a909144594fd143e760ca47dad422c9056686cc5dcdd07782847aa0a14da61d6b1577accf4997435 SHA512 76efc1ed63882e483414e49747c5d15524afdf39d45c5013189fbd9463aba177b3cae73c403480d6e81a65a436ce806e2c41204dffa2cbcc220fc58aa5cddac4
EBUILD nqp-2018.04.1.ebuild 3607 BLAKE2B e7ccbd696d6dbe35b6a1c6ed99b1013aac46deb0631e6258a909144594fd143e760ca47dad422c9056686cc5dcdd07782847aa0a14da61d6b1577accf4997435 SHA512 76efc1ed63882e483414e49747c5d15524afdf39d45c5013189fbd9463aba177b3cae73c403480d6e81a65a436ce806e2c41204dffa2cbcc220fc58aa5cddac4
EBUILD nqp-2018.04.ebuild 3607 BLAKE2B e7ccbd696d6dbe35b6a1c6ed99b1013aac46deb0631e6258a909144594fd143e760ca47dad422c9056686cc5dcdd07782847aa0a14da61d6b1577accf4997435 SHA512 76efc1ed63882e483414e49747c5d15524afdf39d45c5013189fbd9463aba177b3cae73c403480d6e81a65a436ce806e2c41204dffa2cbcc220fc58aa5cddac4
+EBUILD nqp-2018.05.ebuild 3607 BLAKE2B 187da0f139d742686c2e36efb8d219c865e116c976ef2eb3c399277fb2bd76b9e16116ecdbcd60854858197e584fc1f98463349395c66d629c23d1115572d62f SHA512 214d69640ce932f49c4b0c22871d96fda5eaf2ba2ef47247e142cf5958ad193058d3fd59761f2d51a3ac5f76d60e53df20cf7ae2f615d59d587d9727b77f7315
EBUILD nqp-9999.ebuild 3607 BLAKE2B e7ccbd696d6dbe35b6a1c6ed99b1013aac46deb0631e6258a909144594fd143e760ca47dad422c9056686cc5dcdd07782847aa0a14da61d6b1577accf4997435 SHA512 76efc1ed63882e483414e49747c5d15524afdf39d45c5013189fbd9463aba177b3cae73c403480d6e81a65a436ce806e2c41204dffa2cbcc220fc58aa5cddac4
MISC metadata.xml 634 BLAKE2B 1ef5daf7c995ddad1df4b2c7d33ecfc7a4cd146cb518314f88d58e370ede9e986bb47747b10952cf0ee6d587fe5925ba5b0086006182f3e16bd114d49e1a0f3a SHA512 a093877d22e76bbbced97c7752ed76d6aa110eb8d0676f97ae3d38ad79ab7b8ba770243b64e618b588faebf179713813fe6fc8ec7371c695c9f0979f6bce3dc0
diff --git a/dev-lang/nqp/nqp-2018.05.ebuild b/dev-lang/nqp/nqp-2018.05.ebuild
new file mode 100644
index 000000000000..2600c72c270a
--- /dev/null
+++ b/dev-lang/nqp/nqp-2018.05.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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="https://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/*
+}