summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Brewer (Gentoo Key) <tomboy64@sina.cn>2016-04-28 10:31:58 +0200
committerAmy Winston <amynka@gentoo.org>2016-05-08 22:15:19 +0200
commitec8587d072c387546f6ea8d4b61bd26e94d3b45f (patch)
tree150bbf26ad3477e6558450203f54af7ca3d5f11d /dev-lang
parentdev-lang/nqp: revbump nqp-2016.04-r1 (diff)
downloadgentoo-ec8587d072c387546f6ea8d4b61bd26e94d3b45f.tar.gz
gentoo-ec8587d072c387546f6ea8d4b61bd26e94d3b45f.tar.bz2
gentoo-ec8587d072c387546f6ea8d4b61bd26e94d3b45f.zip
dev-lang/nqp: re-add 9999, based on 2016.04-r1
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/nqp/nqp-9999.ebuild91
1 files changed, 91 insertions, 0 deletions
diff --git a/dev-lang/nqp/nqp-9999.ebuild b/dev-lang/nqp/nqp-9999.ebuild
new file mode 100644
index 000000000000..6351216513c9
--- /dev/null
+++ b/dev-lang/nqp/nqp-9999.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit java-pkg-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"
+ 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 +system-libs test"
+REQUIRED_USE="|| ( java moar )"
+
+RDEPEND="java? ( >=virtual/jre-1.7:*
+ system-libs? (
+ dev-java/asm:4
+ dev-java/jline:0
+ )
+ )
+ moar? ( ~dev-lang/moarvm-${PV}[clang=] )
+ dev-libs/libffi"
+DEPEND="${RDEPEND}
+ clang? ( sys-devel/clang )
+ java? ( >=virtual/jdk-1.7:* )
+ dev-lang/perl"
+
+pkg_setup() {
+ use java && java-pkg-2_pkg_setup
+}
+
+src_prepare() {
+ eapply_user
+ use java && java-pkg-2_src_prepare
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]]; then
+ git-r3_src_unpack
+ else
+ unpack ${A}
+ mv "${WORKDIR}/perl6-nqp-"* "${WORKDIR}/${P}" || die
+ fi
+}
+
+src_configure() {
+ local backends
+ use java && backends+="jvm,"
+ use moar && backends+="moar"
+ local myconfargs=(
+ "--backend=${backends}"
+ "--prefix=/usr" )
+
+ # 2016.04 doesn't like our jna-3.4.1
+ # keep testing against it
+ use system-libs && myconfargs+=(
+ "--with-asm=$(echo $(java-pkg_getjars asm-4) | tr : '\n' | grep '/asm\.jar$')"
+ "--with-asm-tree=$(echo $(java-pkg_getjars asm-4) | tr : '\n' | grep '/asm-tree\.jar$')"
+ "--with-jline=$(echo $(java-pkg_getjars jline) | tr : '\n' | grep '/jline\.jar$')" )
+
+ perl Configure.pl "${myconfargs[@]}" || die
+}
+
+src_compile() {
+ MAKEOPTS=-j1 emake
+}
+
+src_test() {
+ MAKEOPTS=-j1 emake test
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install || die
+
+ dodoc CREDITS README.pod || die
+
+ if use doc; then
+ dodoc -r docs/* || die
+ fi
+}