public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "M. B." <tomboy64@sina.cn>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/user/tbc:master commit in: dev-lang/nqp/, dev-lang/rakudo/
Date: Thu, 26 May 2016 15:44:57 +0000 (UTC)	[thread overview]
Message-ID: <1464277459.92b5d006f7ab058c76be9a4846ba04da4e2ba857.tomboy64@gentoo> (raw)

commit:     92b5d006f7ab058c76be9a4846ba04da4e2ba857
Author:     Matthew Brewer <tomboy64 <AT> sina <DOT> cn>
AuthorDate: Thu May 26 15:44:19 2016 +0000
Commit:     M. B. <tomboy64 <AT> sina <DOT> cn>
CommitDate: Thu May 26 15:44:19 2016 +0000
URL:        https://gitweb.gentoo.org/repo/user/tbc.git/commit/?id=92b5d006

updated new versions of 2016.04; using multibuild with nqp

 dev-lang/nqp/nqp-2016.04-r5.ebuild       | 144 +++++++++++++++++++++++++++++++
 dev-lang/rakudo/rakudo-2016.04-r3.ebuild |  26 ++----
 2 files changed, 152 insertions(+), 18 deletions(-)

diff --git a/dev-lang/nqp/nqp-2016.04-r5.ebuild b/dev-lang/nqp/nqp-2016.04-r5.ebuild
new file mode 100644
index 0000000..82d2b2b
--- /dev/null
+++ b/dev-lang/nqp/nqp-2016.04-r5.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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=] )
+	dev-libs/libffi"
+RDEPEND="${CDEPEND}
+	java? ( >=virtual/jre-1.7 )"
+DEPEND="${CDEPEND}
+	clang? ( sys-devel/clang )
+	java? ( >=virtual/jdk-1.7 )
+	dev-lang/perl"
+PATCHES=( "${FILESDIR}/enable-external-jars.patch" )
+
+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() {
+	pushd "${BUILD_DIR}" > /dev/null || die
+	if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then
+		emake -j1 \
+			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
+	fi
+	popd || die
+}
+
+nqp_test() {
+	pushd "${BUILD_DIR}" > /dev/null || die
+	emake -j1 test
+	popd || die
+}
+
+nqp_install() {
+	pushd "${BUILD_DIR}" > /dev/null || die
+	# This is the actual reason we need multibuild.eclass.
+	# We need to distinguish the install procedure for MoarVM and JVM backends.
+	if [[ "${MULTIBUILD_VARIANT}" = moar ]]; then
+		emake DESTDIR="${ED}" install
+	elif [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then
+		# 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
+	fi
+	popd || die
+}
+
+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/*
+}

diff --git a/dev-lang/rakudo/rakudo-2016.04-r3.ebuild b/dev-lang/rakudo/rakudo-2016.04-r3.ebuild
index 7421cad..0255978 100644
--- a/dev-lang/rakudo/rakudo-2016.04-r3.ebuild
+++ b/dev-lang/rakudo/rakudo-2016.04-r3.ebuild
@@ -24,14 +24,12 @@ SLOT="0"
 IUSE="clang java +moar test"
 REQUIRED_USE="|| ( java moar )"
 
-CDEPEND="~dev-lang/nqp-${PV}:${SLOT}=[java=,moar=,clang=]"
-
+CDEPEND="~dev-lang/nqp-${PV}:${SLOT}=[java?,moar?,clang=]"
 RDEPEND="${CDEPEND}
-	java? ( >=virtual/jre-1.7:* )"
-
+	java? ( >=virtual/jre-1.7 )"
 DEPEND="${CDEPEND}
 	clang? ( sys-devel/clang )
-	java? ( >=virtual/jdk-1.7:* )
+	java? ( >=virtual/jdk-1.7 )
 	>=dev-lang/perl-5.10"
 
 PATCHES=(
@@ -39,24 +37,16 @@ PATCHES=(
 	"${FILESDIR}/${PN}-jna-lib.patch"
 )
 
-src_prepare() {
-	eapply "${PATCHES[@]}"
-
-	# yup, this is ugly. but emake doesn't respect DESTDIR.
-	for i in Moar JVM; do
-		echo "DESTDIR   = ${D}" > "${T}/Makefile-${i}.in" || die
-		cat "${S}/tools/build/Makefile-${i}.in" >> "${T}/Makefile-${i}.in" || die
-		mv "${T}/Makefile-${i}.in" "${S}/tools/build/Makefile-${i}.in" || die
-	done
-
-	eapply_user
-	java-pkg-opt-2_src_prepare
+pkg_pretend() {
+	if has_version dev-lang/rakudo && use java; then
+		die "Rakudo is known to fail compilation with the jvm backend if it's already installed."
+	fi
 }
 
 src_configure() {
 	local backends
 	use java && backends+="jvm,"
-	use moar && backends+="moar,"
+	use moar && backends+="moar"
 
 	local myargs=(
 		"--prefix=/usr"


             reply	other threads:[~2016-05-26 15:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26 15:44 M. B. [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-05-28 12:29 [gentoo-commits] repo/user/tbc:master commit in: dev-lang/nqp/, dev-lang/rakudo/ M. B.
2016-05-28 12:04 M. B.
2016-05-28 11:30 M. B.
2016-05-27  4:11 M. B.
2016-05-26 15:44 M. B.
2016-05-25 20:45 M. B.
2016-05-25 16:17 M. B.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1464277459.92b5d006f7ab058c76be9a4846ba04da4e2ba857.tomboy64@gentoo \
    --to=tomboy64@sina.cn \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox