diff options
author | Patrick Lauer <patrick@gentoo.org> | 2019-01-26 09:54:43 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2019-01-26 15:48:05 +0000 |
commit | 16b18382b72812c1b8f07211292c4759fd9e6b82 (patch) | |
tree | 93d957a1172f205600cafba7f85d7314e8bb556e /dev-lang/nqp | |
parent | dev-lang/moarvm: Bump (diff) | |
download | gentoo-16b18382b72812c1b8f07211292c4759fd9e6b82.tar.gz gentoo-16b18382b72812c1b8f07211292c4759fd9e6b82.tar.bz2 gentoo-16b18382b72812c1b8f07211292c4759fd9e6b82.zip |
dev-lang/nqp: Bump
Package-Manager: Portage-2.3.58, Repoman-2.3.12
X-Autogenerated-SOB: Yes
Signed-off-by: Patrick Lauer <patrick@gentoo.org>
Diffstat (limited to 'dev-lang/nqp')
-rw-r--r-- | dev-lang/nqp/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/nqp/nqp-2018.12.ebuild | 159 |
2 files changed, 160 insertions, 0 deletions
diff --git a/dev-lang/nqp/Manifest b/dev-lang/nqp/Manifest index 2fcfb1501ee7..e34de913e6d7 100644 --- a/dev-lang/nqp/Manifest +++ b/dev-lang/nqp/Manifest @@ -1,3 +1,4 @@ DIST nqp-2018.06.tar.gz 3792244 BLAKE2B 95cfa80c83951e91b71e14162c4c5cd78a8f546ba601002836d2b3fe79325aa26b963d0bb58df70935546f6960f3797a3a7762187defcb6b7c5124a7205bb257 SHA512 312f203c51f3d58bbc474cd7263a118f3438efe230a56a30f38a688b4a57aac88a94a0e6630736066255c122bb001d748a76272f7f634be8ddda91cc3340574b DIST nqp-2018.08.tar.gz 3769932 BLAKE2B 892eec3dcbfcf57bddbbbb296aea2d126176a5b5db79493beccb7625360c42e26fc9025c8f594430c8cdac346b5af93d7a5167fbbd6e17776070bc3b4b754b63 SHA512 b3f1729060c88407eee07fb32841febb51b68e375ff797aa9ebc6019a4c1229ea7e713262fbe7dfbd9e0317594eb8526179b9d63cf034ac3aca3d82c4ff7d565 DIST nqp-2018.09.tar.gz 3797808 BLAKE2B e5c7c79d7577338e89190ee11673e65093f2e08cd5950727ed8f33a35769db8d6f5e5c7450a93ceb73bf011cdd0a492ce70de6026948a20dd972dcb79a07fb9e SHA512 7412ef9c25f9540ae399c8d83b090eec1c7cea63f0cda970e21e3d760ed915895f8d69c092847feda002702e401e6eee8a6521c41e879c82619340d096948126 +DIST nqp-2018.12.tar.gz 3928586 BLAKE2B a11480ae4f09810d349b3adeafb7a6317db41ca28937d99c936f3d8be39be0039fe88db03c9b3b248193a377260a3e21500eb3e11ad282e5ed02635724f05678 SHA512 6c075410490e4c3cab20fffdb986ef179a26c2f11e50e91b50e38e43f8d7909eb8e645ee9280f506da115866f73ef9013cd229e12b100ff43e8610ead69628da diff --git a/dev-lang/nqp/nqp-2018.12.ebuild b/dev-lang/nqp/nqp-2018.12.ebuild new file mode 100644 index 000000000000..f014c8b7f45f --- /dev/null +++ b/dev-lang/nqp/nqp-2018.12.ebuild @@ -0,0 +1,159 @@ +# Copyright 1999-2019 Gentoo Authors +# 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/* +} |