commit:     4201073bab76e63a4e656967389ad37df135b472
Author:     Patrick Lauer <patrick <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 26 13:46:41 2017 +0000
Commit:     Patrick Lauer <patrick <AT> gentoo <DOT> org>
CommitDate: Mon Jun 26 13:50:39 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4201073b

dev-lang/nqp: Bump

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-lang/nqp/Manifest           |   1 +
 dev-lang/nqp/nqp-2017.06.ebuild | 159 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 160 insertions(+)

diff --git a/dev-lang/nqp/Manifest b/dev-lang/nqp/Manifest
index 7b742e903a5..7717de5e684 100644
--- a/dev-lang/nqp/Manifest
+++ b/dev-lang/nqp/Manifest
@@ -6,3 +6,4 @@ DIST nqp-2017.02.tar.gz 3657637 SHA256 
cf2f094296fc7706b2c2f0037331dd624dcdcb2cb
 DIST nqp-2017.03.tar.gz 3674277 SHA256 
2dce67d6a4388a177a0a3c46b95717a47f31c705b0d8f825f936f65358b655e0 SHA512 
8ca0be68785d8f0923d1ef63eca7eb9d7075c475b836911117d62f5030398933e0711bfc5b0ec082e4b4720d6f0fd0f1a74b8c35510f0fffe1e36a972937cd67
 WHIRLPOOL 
3f2a7b0ea4a7ac5ba1eefd4d4a3453a6c02b10d7c0e93570bdb89e33eadba29f664660024b532ed9a41718db767414b0e1ab362263ecd88490b9a1045d370070
 DIST nqp-2017.04.tar.gz 3693688 SHA256 
7c270fc91bb869094fdc981236beefd4e8ecad8b8f4129e7c83abeec67880634 SHA512 
f68e3f63a57bffbaa94267e8da59336cb0c59b1b2538996619fa96d964062e13536208432cb778a717c65438c006a490d8cb5355c899add7146b54664b696fd9
 WHIRLPOOL 
7e9a92a82f80f3fac672fac58d9bb7014b2ab39de585e2cb43326b1b9a7982d5af72cae17db7dd8e8803c59dac25e66e764846e72e3b6783534e98771ef5ebcb
 DIST nqp-2017.05.tar.gz 3698847 SHA256 
e5326a0a4c791f70802cadfc1a71ba119f0da6697b5c57ac6afcc367e21ee1ca SHA512 
2679c48160179e5ed96ceba218a54e0841d89ea9d4ec931e6bd9fabd4541f48da3c3c66b866bb1d11311e9a342fbd77a694f88cb4256f8009a51ec1fbcef849f
 WHIRLPOOL 
d213dd6986a7fd1d81fad26c0dfc4112f443836de5c47a88c80dddf301e0dcaadf87228070dc76871871af0d55759d27ecb8cc24c72921263ef6190ca680e18f
+DIST nqp-2017.06.tar.gz 3714001 SHA256 
8275f0172b1256cc6bfa60c895a5534b65a70a29c20025b011c9edca2a4eb922 SHA512 
7a067c6650442fc1071bc5ce61b01755f2746a825aa48cf8d127cd7fb15aad6729872313df2a18270d6ff995564bdbc3d68138afaaa7a3680567700109595197
 WHIRLPOOL 
ea44ee01c19845f7c59125b5daed1ae63a722ead1f5cffc55ff2cdae78cb989e941be26428324cab746ccda72fa5b2ad8189442e0ccfc6b574c6af42a34ad790

diff --git a/dev-lang/nqp/nqp-2017.06.ebuild b/dev-lang/nqp/nqp-2017.06.ebuild
new file mode 100644
index 00000000000..e2dfdc734d8
--- /dev/null
+++ b/dev-lang/nqp/nqp-2017.06.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-${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/*
+}

Reply via email to