summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2022-06-21 13:49:20 +0000
committerPatrick Lauer <patrick@gentoo.org>2022-06-21 13:50:27 +0000
commit52a453b90f9e063bef2b6dda22358fc88eca72b1 (patch)
tree1e34ca131c55f04d03bec67156c612ddfaf6063c /dev-lang/nqp
parentdev-lang/moarvm: Bump to 2022.06 (diff)
downloadgentoo-52a453b90f9e063bef2b6dda22358fc88eca72b1.tar.gz
gentoo-52a453b90f9e063bef2b6dda22358fc88eca72b1.tar.bz2
gentoo-52a453b90f9e063bef2b6dda22358fc88eca72b1.zip
dev-lang/nqp: Bump to 2022.06
Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Patrick Lauer <patrick@gentoo.org>
Diffstat (limited to 'dev-lang/nqp')
-rw-r--r--dev-lang/nqp/Manifest1
-rw-r--r--dev-lang/nqp/nqp-2022.06.ebuild147
2 files changed, 148 insertions, 0 deletions
diff --git a/dev-lang/nqp/Manifest b/dev-lang/nqp/Manifest
index fa55375efff7..e3376e5fab95 100644
--- a/dev-lang/nqp/Manifest
+++ b/dev-lang/nqp/Manifest
@@ -2,3 +2,4 @@ DIST nqp-2021.06.tar.gz 5208065 BLAKE2B 7314f425e418161befc55f9490453a3a4c3caa0d
DIST nqp-2021.08.tar.gz 5208527 BLAKE2B 1f2e454e63484a8a636f61c9110b4a20775ec59dd7734fe32a93b01aaad5ea977ea74678085a66d9f072234de5768d8023182d6df56a448f2a0aa0fd3c1c76c3 SHA512 fca1dc8c36f914304f97330cb33be3a94c539f3cb6cc80d898c734dcf04b12b8be30ffce358a0a5320c6ea56afd627f792b4a8fa3f94134776922ae088b92814
DIST nqp-2021.10.tar.gz 5207621 BLAKE2B 85b6627bc843d211ef8c296e63a97b0f80e019f89080f7c94b1e55767e4fab430c426c77aea741d601e75f6fb354a1f8b6c6077c70ab5cbfd2edef1621137af3 SHA512 d308045cc8a01298bcc544e8fd27752d1fc28e421b1cd24f1d5675333ba8cd71cb946e760ba485710456aebf21eeab1d2f85abffe49336471f1148071df6aa98
DIST nqp-2022.02.tar.gz 5220819 BLAKE2B eba57834cc883e5bab26d0496df5bb059cc31f893e25833ada26cfa4796b9f822d1bb17e6ac0eb2474238e78565cf1da3be6f82d34a82bb4ac70cc19e03e11aa SHA512 0a51eb96486a254543ffbc2dac5d32a2b218a7fd774ccd3c8d4ba23f33dacbebdc0190e7cc919103f57573ea74ff8592200759c9768485044a4433647958ba8f
+DIST nqp-2022.06.tar.gz 5222082 BLAKE2B bf5f3e98ad40d76ca45887ed1d64d3a5d11b91493f5af7324c5ebe62c3c34c9ababaf64e4083c30a4f4a16db46710b28054e423bd84aa259e8b293330265e2c7 SHA512 e044701d77ea6baeb51202a808a86a46e99cae1db03888cd2848424e9dfbb318a82ccf21476050f26e388f3c5137e4389626d52a7434d0ffb1d2c97501e23407
diff --git a/dev-lang/nqp/nqp-2022.06.ebuild b/dev-lang/nqp/nqp-2022.06.ebuild
new file mode 100644
index 000000000000..6b6f6e70f126
--- /dev/null
+++ b/dev-lang/nqp/nqp-2022.06.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit java-pkg-opt-2 multibuild
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/perl6/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/perl6/${PN}/releases/download/${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Not Quite Perl, a Raku bootstrapping compiler"
+HOMEPAGE="https://rakudo.org"
+
+LICENSE="Artistic-2"
+SLOT="0"
+IUSE="doc clang java +moar test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="|| ( java moar )"
+
+CDEPEND="java? (
+ dev-java/asm:4
+ dev-java/jna:4
+ )
+ moar? ( ~dev-lang/moarvm-${PV}[clang=] )"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.9 )"
+DEPEND="${CDEPEND}"
+BDEPEND="${CDEPEND}
+ clang? ( sys-devel/clang )
+ java? ( >=virtual/jdk-1.9 )
+ 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
+}
+
+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=${EPREFIX}/usr" )
+
+ perl Configure.pl "${myconfargs[@]}" || die
+ popd || die
+}
+
+nqp_compile() {
+ if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then
+ emake -j1 \
+ -C "${BUILD_DIR}" \
+ 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/*
+}