From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5695E15802E for ; Mon, 24 Jun 2024 09:26:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4B8CB2BC056; Mon, 24 Jun 2024 09:26:36 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 25DD42BC056 for ; Mon, 24 Jun 2024 09:26:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 24AB9335D1C for ; Mon, 24 Jun 2024 09:26:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8392C1D34 for ; Mon, 24 Jun 2024 09:26:33 +0000 (UTC) From: "Patrick Lauer" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrick Lauer" Message-ID: <1719221191.f1ad739dde5b02a5c308feef5f7dbcdd18648a32.patrick@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/nqp/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/nqp/Manifest dev-lang/nqp/nqp-2024.05.ebuild X-VCS-Directories: dev-lang/nqp/ X-VCS-Committer: patrick X-VCS-Committer-Name: Patrick Lauer X-VCS-Revision: f1ad739dde5b02a5c308feef5f7dbcdd18648a32 X-VCS-Branch: master Date: Mon, 24 Jun 2024 09:26:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c3d88fcd-3b09-475d-992c-d54344056594 X-Archives-Hash: e78a3bf5e7dfcae9d3e27544794ddbe4 commit: f1ad739dde5b02a5c308feef5f7dbcdd18648a32 Author: Patrick Lauer gentoo org> AuthorDate: Mon Jun 24 09:25:59 2024 +0000 Commit: Patrick Lauer gentoo org> CommitDate: Mon Jun 24 09:26:31 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1ad739d dev-lang/nqp: add 2024.05 Signed-off-by: Patrick Lauer gentoo.org> dev-lang/nqp/Manifest | 1 + dev-lang/nqp/nqp-2024.05.ebuild | 147 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+) diff --git a/dev-lang/nqp/Manifest b/dev-lang/nqp/Manifest index 9ca0c13fb3f5..99cfa21db808 100644 --- a/dev-lang/nqp/Manifest +++ b/dev-lang/nqp/Manifest @@ -1,2 +1,3 @@ DIST nqp-2024.02.tar.gz 6041352 BLAKE2B cdf1863f80d3a2d64fea3d6b783c91ad3fec44866d0b5a1967e0ac682ef3942a3361c4a4f355a11af938846ef47404df4a5d39fe46ebfef121ab2118d1444e64 SHA512 4dd943920900f0b58385b0a1b7dcc732557a0215975868f322860ec204cbc43d081ce292beb4b2bce70863684d3ec1d981fb809c4558755e791dd7cb0208e05b DIST nqp-2024.04.tar.gz 9726771 BLAKE2B 5582aed194438bc57b862e6b1f14b8fdf1548c5e0048e69315e411913b049fec6df640b95bbd0df3e5b541554473fe207c81dbd083d477f12194c22d22119be3 SHA512 988518e5db2d7bdee6ed55bb337e640d091f404d6cc2b2687e9b542cc91ea755add415b40e8b3ac9ef501e150d2026867d0f1f1bfa32f1767e01ec30ae050dd0 +DIST nqp-2024.05.tar.gz 9727311 BLAKE2B 13303d2fa598628ab3cdcfb2a4a9a34b16aa1b6b7c73883114b23f1d969fc0bbadeb8ce692ddfaadb082c625be9d6cf8a291500fd953b2f43efd2995cd91a1cf SHA512 82b6277ac728b89f3c4548c735484aac21851140613471ba559a13db96fc90c13701ece0689ebd548f4ec91f3b1fca3e92f7a6772d7872c3943d5695222c235b diff --git a/dev-lang/nqp/nqp-2024.05.ebuild b/dev-lang/nqp/nqp-2024.05.ebuild new file mode 100644 index 000000000000..efed9b5e0109 --- /dev/null +++ b/dev-lang/nqp/nqp-2024.05.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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:9 + dev-java/jna:4 + ) + moar? ( ~dev-lang/moarvm-${PV}[clang=] )" +RDEPEND="${CDEPEND} + java? ( >=virtual/jre-11 )" +DEPEND="${CDEPEND}" +BDEPEND="${CDEPEND} + clang? ( sys-devel/clang ) + java? ( >=virtual/jdk-11 ) + 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)" + 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/* +}