commit: c022f1ab2b0078a11568697b4214a59a28833b4e
Author: Matthew Brewer <tomboy64 <AT> sina <DOT> cn>
AuthorDate: Wed May 25 12:16:40 2016 +0000
Commit: M. B. <tomboy64 <AT> sina <DOT> cn>
CommitDate: Wed May 25 13:03:19 2016 +0000
URL: https://gitweb.gentoo.org/repo/user/tbc.git/commit/?id=c022f1ab
new experimental perl6 ebuilds
dev-lang/nqp/nqp-2016.04-r4.ebuild | 114 +++++++++++++++++++++
...rakudo-9999.ebuild => rakudo-2016.04-r3.ebuild} | 54 +++++-----
2 files changed, 142 insertions(+), 26 deletions(-)
diff --git a/dev-lang/nqp/nqp-2016.04-r4.ebuild
b/dev-lang/nqp/nqp-2016.04-r4.ebuild
new file mode 100644
index 0000000..9575dfb
--- /dev/null
+++ b/dev-lang/nqp/nqp-2016.04-r4.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit java-pkg-opt-2
+
+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="~x86 ~amd64"
+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"
+
+java_prepare() {
+ # Don't clean stage0 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_configure() {
+ local backends
+ use java && backends+="jvm,"
+ use moar && backends+="moar"
+
+ local myconfargs=(
+ "--backend=${backends}"
+ "--prefix=/usr" )
+
+ perl Configure.pl "${myconfargs[@]}" || die
+
+ if use java; then
+ # Export this for the script we sed'd above.
+ export THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies
asm-4,jline,jna-4)
+ fi
+}
+
+src_compile() {
+ if use java; then
+ emake -j1 \
+ THIRDPARTY_JARS="${THIRDPARTY_JARS}" \
+ JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)"
+ else
+ emake -j1
+ fi
+}
+
+src_test() {
+ emake -j1 test
+}
+
+src_install() {
+ if use java; 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
+ else
+ emake DESTDIR="${ED}" install
+ fi
+
+ dodoc CREDITS README.pod
+ use doc && dodoc -r docs/*
+}
diff --git a/dev-lang/rakudo/rakudo-9999.ebuild
b/dev-lang/rakudo/rakudo-2016.04-r3.ebuild
similarity index 65%
rename from dev-lang/rakudo/rakudo-9999.ebuild
rename to dev-lang/rakudo/rakudo-2016.04-r3.ebuild
index c6696c6..7421cad 100644
--- a/dev-lang/rakudo/rakudo-9999.ebuild
+++ b/dev-lang/rakudo/rakudo-2016.04-r3.ebuild
@@ -4,7 +4,7 @@
EAPI=6
-inherit java-pkg-2
+inherit java-pkg-opt-2
DESCRIPTION="A compiler for the Perl 6 programming language"
HOMEPAGE="http://rakudo.org"
@@ -21,25 +21,23 @@ fi
LICENSE="Artistic-2"
SLOT="0"
# TODO: add USE="javascript" once that's usable in nqp
-IUSE="clang java moar test"
+IUSE="clang java +moar test"
+REQUIRED_USE="|| ( java moar )"
-RDEPEND="~dev-lang/nqp-${PV}:=[java=,moar=,clang=]"
-DEPEND="${RDEPEND}
- clang? ( sys-devel/clang )
- >=dev-lang/perl-5.10"
+CDEPEND="~dev-lang/nqp-${PV}:${SLOT}=[java=,moar=,clang=]"
-REQUIRED_USE="|| ( java moar )"
-PATCHES=( "${FILESDIR}/${PN}-2016.04-Makefile.in.patch" )
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.7:* )"
-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
-}
+DEPEND="${CDEPEND}
+ clang? ( sys-devel/clang )
+ java? ( >=virtual/jdk-1.7:* )
+ >=dev-lang/perl-5.10"
-pkg_setup() {
- use java && java-pkg-2_pkg_setup
-}
+PATCHES=(
+ "${FILESDIR}/${PN}-2016.04-Makefile.in.patch"
+ "${FILESDIR}/${PN}-jna-lib.patch"
+)
src_prepare() {
eapply "${PATCHES[@]}"
@@ -52,32 +50,36 @@ src_prepare() {
done
eapply_user
- use java && java-pkg-2_src_prepare
+ java-pkg-opt-2_src_prepare
}
src_configure() {
local backends
use java && backends+="jvm,"
use moar && backends+="moar,"
- local myargs=( "--prefix=/usr"
+
+ local myargs=(
+ "--prefix=/usr"
"--sysroot=/"
"--sdkroot=/"
- "--make-install"
- "--sdkroot=/"
"--backends=${backends}"
)
+
perl Configure.pl "${myargs[@]}"
+
+ if use java; then
+ NQP=$(java-pkg_getjars --with-dependencies nqp)
+ fi
}
src_compile() {
- emake DESTDIR="${D}"
+ emake DESTDIR="${D}" NQP_JARS="${NQP}" BLD_NQP_JARS="${NQP}"
}
-src_test() {
- export RAKUDO_PRECOMP_PREFIX=$(mktemp -d)
- default
+src_install() {
+ emake DESTDIR="${D}" NQP_JARS="${NQP}" BLD_NQP_JARS="${NQP}" install
}
-src_install() {
- emake DESTDIR="${D}" install
+src_test() {
+ RAKUDO_PRECOMP_PREFIX=$(mktemp -d) default
}