diff options
author | Marshall Brewer <tomboy64@sina.cn> | 2016-05-26 17:56:10 +0200 |
---|---|---|
committer | Amy Winston <amynka@gentoo.org> | 2016-06-02 14:52:37 +0200 |
commit | ef2f15f048eccbec7e68f754788a3acdbd184450 (patch) | |
tree | ba397647782f9d9976394a3444c51d85df5dba8b /dev-lang/rakudo | |
parent | c1894780276cebe2ba38895f4ac6a43d38a15e26 (diff) | |
download | gentoo-ef2f15f048eccbec7e68f754788a3acdbd184450.tar.gz gentoo-ef2f15f048eccbec7e68f754788a3acdbd184450.tar.xz |
dev-lang/rakudo: revbump 2016.04-r2
- switched to java-pkg-opt-2
- removed unnecessary DESTDIR hack
- not requiring nqp to have USE=-java/-moar, if it's not set for
rakudo
- enable usage of nqp with system jna (patch and mechanics contributed
by Chewi)
Diffstat (limited to 'dev-lang/rakudo')
-rw-r--r-- | dev-lang/rakudo/files/rakudo-2016.04-jna-lib.patch | 21 | ||||
-rw-r--r-- | dev-lang/rakudo/rakudo-2016.04-r1.ebuild | 83 | ||||
-rw-r--r-- | dev-lang/rakudo/rakudo-2016.04-r2.ebuild | 84 |
3 files changed, 105 insertions, 83 deletions
diff --git a/dev-lang/rakudo/files/rakudo-2016.04-jna-lib.patch b/dev-lang/rakudo/files/rakudo-2016.04-jna-lib.patch new file mode 100644 index 00000000000..3f4532f0d15 --- /dev/null +++ b/dev-lang/rakudo/files/rakudo-2016.04-jna-lib.patch @@ -0,0 +1,21 @@ +Upstream uses -Xbootclasspath, which prevents us from using +LD_LIBRARY_PATH, thefore we need to set jna.boot.library.path. +See http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4285197. + +Chewi +2016/05/15 + +diff -Naur rakudo-2016.04.orig/tools/build/create-jvm-runner.pl rakudo-2016.04/tools/build/create-jvm-runner.pl +--- rakudo-2016.04.orig/tools/build/create-jvm-runner.pl 2015-12-25 19:23:19.000000000 +0000 ++++ rakudo-2016.04/tools/build/create-jvm-runner.pl 2016-05-15 11:30:37.488085661 +0100 +@@ -60,7 +60,10 @@ + } + + my $classpath = join($cpsep, ($jardir, $libdir, $nqplibdir)); ++my $jna_lib = `java-config --query LIBRARY_PATH --package jna-4`; ++chomp $jna_lib; + my $jopts = '-noverify -Xms100m -Xbootclasspath/a:' . $perl6jars ++ . ' -Djna.boot.library.path=' . $jna_lib + . ' -cp ' . ($^O eq 'MSWin32' ? '"%CLASSPATH%";' : '$CLASSPATH:') . $classpath + . ' -Dperl6.prefix=' . $prefix + . ' -Djna.library.path=' . $sharedir diff --git a/dev-lang/rakudo/rakudo-2016.04-r1.ebuild b/dev-lang/rakudo/rakudo-2016.04-r1.ebuild deleted file mode 100644 index e6777587761..00000000000 --- a/dev-lang/rakudo/rakudo-2016.04-r1.ebuild +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=6 - -inherit java-pkg-2 - -DESCRIPTION="A compiler for the Perl 6 programming language" -HOMEPAGE="http://rakudo.org" - -if [[ ${PV} == "9999" ]]; then - EGIT_REPO_URI="https://github.com/rakudo/${PN}.git" - inherit git-r3 - KEYWORDS="" -else - SRC_URI="${HOMEPAGE}/downloads/${PN}/${P}.tar.gz" - KEYWORDS="~amd64 ~x86" -fi - -LICENSE="Artistic-2" -SLOT="0" -# TODO: add USE="javascript" once that's usable in nqp -IUSE="clang java +moar test" - -RDEPEND="~dev-lang/nqp-${PV}:=[java=,moar=,clang=]" -DEPEND="${RDEPEND} - clang? ( sys-devel/clang ) - >=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 -} - -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 -} - -src_configure() { - local backends - use java && backends+="jvm," - use moar && backends+="moar," - local myargs=( "--prefix=/usr" - "--sysroot=/" - "--sdkroot=/" - "--make-install" - "--sdkroot=/" - "--backends=${backends}" - ) - perl Configure.pl "${myargs[@]}" -} - -src_compile() { - emake DESTDIR="${D}" -} - -src_test() { - export RAKUDO_PRECOMP_PREFIX=$(mktemp -d) - default -} - -src_install() { - emake DESTDIR="${D}" install -} diff --git a/dev-lang/rakudo/rakudo-2016.04-r2.ebuild b/dev-lang/rakudo/rakudo-2016.04-r2.ebuild new file mode 100644 index 00000000000..18eb63155ab --- /dev/null +++ b/dev-lang/rakudo/rakudo-2016.04-r2.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit java-pkg-opt-2 + +DESCRIPTION="A compiler for the Perl 6 programming language" +HOMEPAGE="http://rakudo.org" + +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="https://github.com/rakudo/${PN}.git" + inherit git-r3 + KEYWORDS="" +else + SRC_URI="${HOMEPAGE}/downloads/${PN}/${P}.tar.gz" + 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 )" + +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" + +PATCHES=( + "${FILESDIR}/${PN}-2016.04-Makefile.in.patch" + "${FILESDIR}/${P}-jna-lib.patch" +) + +pkg_pretend() { + if has_version dev-lang/rakudo; then + ewarn "Rakudo is known to fail compilation/installation with Rakudo" + ewarn "already being installed. So if it fails, try unmerging dev-lang/rakudo," + ewarn "then do a new installation." + ewarn "(see Bug #584394)" + fi +} + +src_prepare() { + epatch "${PATCHES[@]}" + epatch_user +} + +src_configure() { + local backends + use moar && backends+="moar," + use java && backends+="jvm" + + local myargs=( + "--prefix=/usr" + "--sysroot=/" + "--sdkroot=/" + "--backends=${backends}" + ) + + perl Configure.pl "${myargs[@]}" || die + + if use java; then + NQP=$(java-pkg_getjars --with-dependencies nqp) + fi +} + +src_compile() { + emake DESTDIR="${D}" NQP_JARS="${NQP}" BLD_NQP_JARS="${NQP}" +} + +src_install() { + emake DESTDIR="${D}" NQP_JARS="${NQP}" BLD_NQP_JARS="${NQP}" install +} + +src_test() { + RAKUDO_PRECOMP_PREFIX=$(mktemp -d) default +} |