aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/rakudo/rakudo-2016.04-r2.ebuild')
-rw-r--r--dev-lang/rakudo/rakudo-2016.04-r2.ebuild70
1 files changed, 31 insertions, 39 deletions
diff --git a/dev-lang/rakudo/rakudo-2016.04-r2.ebuild b/dev-lang/rakudo/rakudo-2016.04-r2.ebuild
index e60d437..478cb08 100644
--- a/dev-lang/rakudo/rakudo-2016.04-r2.ebuild
+++ b/dev-lang/rakudo/rakudo-2016.04-r2.ebuild
@@ -2,9 +2,9 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=6
+EAPI=5
-inherit java-pkg-2
+inherit java-pkg-opt-2
DESCRIPTION="A compiler for the Perl 6 programming language"
HOMEPAGE="http://rakudo.org"
@@ -15,69 +15,61 @@ if [[ ${PV} == "9999" ]]; then
KEYWORDS=""
else
SRC_URI="${HOMEPAGE}/downloads/${PN}/${P}.tar.gz"
- KEYWORDS=""
+ KEYWORDS="~amd64 ~x86"
fi
LICENSE="Artistic-2"
SLOT="0"
# TODO: add USE="javascript" once that's usable in nqp
IUSE="clang java +moar test"
+REQUIRED_USE="|| ( java moar )"
-RDEPEND="~dev-lang/nqp-${PV}:=[java?,moar?,clang=]"
-DEPEND="${RDEPEND}
+CDEPEND="~dev-lang/nqp-${PV}:${SLOT}=[java?,moar?,clang=]
+ >=dev-lang/nqp-2016.04-r3"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.7 )"
+DEPEND="${CDEPEND}
clang? ( sys-devel/clang )
+ java? ( >=virtual/jdk-1.7 )
>=dev-lang/perl-5.10"
-REQUIRED_USE="|| ( java moar )"
-PATCHES=( "${FILESDIR}/${PN}-2016.04-Makefile.in.patch" )
-
-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
-}
-
-pkg_setup() {
- use java && java-pkg-2_pkg_setup
-}
+PATCHES=(
+ "${FILESDIR}/${PN}-2016.04-Makefile.in.patch"
+ "${FILESDIR}/${P}-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
- use java && java-pkg-2_src_prepare
+ epatch "${PATCHES[@]}"
+ epatch_user
}
src_configure() {
local backends
- use java && backends+="jvm,"
use moar && backends+="moar,"
- local myargs=( "--prefix=/usr"
+ use java && backends+="jvm"
+
+ local myargs=(
+ "--prefix=/usr"
"--sysroot=/"
"--sdkroot=/"
- "--make-install"
- "--sdkroot=/"
"--backends=${backends}"
)
- perl Configure.pl "${myargs[@]}"
+
+ perl Configure.pl "${myargs[@]}" || die
+
+ 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
}