diff options
author | Marshall Brewer (Gentoo Key) <tomboy64@sina.cn> | 2016-05-04 14:02:01 +0200 |
---|---|---|
committer | Amy Winston <amynka@gentoo.org> | 2016-05-08 22:15:25 +0200 |
commit | 7d7838b439533a6a76f31efbbfae68846366df9e (patch) | |
tree | 7e771392f190384c652aef0f483a036992e73e60 /dev-lang/rakudo | |
parent | ec8587d072c387546f6ea8d4b61bd26e94d3b45f (diff) | |
download | gentoo-7d7838b439533a6a76f31efbbfae68846366df9e.tar.gz gentoo-7d7838b439533a6a76f31efbbfae68846366df9e.tar.xz |
dev-lang/rakudo: revbump 2016.04-r1
- update ebuild to reflect the build-system
- enable choice between gcc (default) and clang (use clang)
- enable use of either MoarVM or JavaVM or both as backend
(use java +moar)
- inherit java-pkg-2.eclass
- enable testing (use test)
- abort when rakudo is already installed and JVM backend is wanted (known bug)
- update to EAPI6
- add tomboy64 as secondary maintainer
Package-Manager: portage-2.2.28
Diffstat (limited to 'dev-lang/rakudo')
-rw-r--r-- | dev-lang/rakudo/files/rakudo-2016.04-Makefile.in.patch | 17 | ||||
-rw-r--r-- | dev-lang/rakudo/metadata.xml | 24 | ||||
-rw-r--r-- | dev-lang/rakudo/rakudo-2016.04-r1.ebuild | 83 |
3 files changed, 116 insertions, 8 deletions
diff --git a/dev-lang/rakudo/files/rakudo-2016.04-Makefile.in.patch b/dev-lang/rakudo/files/rakudo-2016.04-Makefile.in.patch new file mode 100644 index 00000000000..adafa0d9477 --- /dev/null +++ b/dev-lang/rakudo/files/rakudo-2016.04-Makefile.in.patch @@ -0,0 +1,17 @@ +diff -Naur a/tools/build/Makefile-Moar.in b/tools/build/Makefile-Moar.in +--- a/tools/build/Makefile-Moar.in 2016-02-02 14:27:13.000000000 +0100 ++++ b/tools/build/Makefile-Moar.in 2016-04-22 15:01:35.338534944 +0200 +@@ -87,11 +87,11 @@ + $(M_CC) @moar::ccswitch@ @moar::ccshared@ $(M_CFLAGS) -I$(PREFIX)/include/libatomic_ops \ + -I$(PREFIX)/include/dyncall -I$(PREFIX)/include/moar \ + -I$(PREFIX)/include/sha1 -I$(PREFIX)/include/tinymt -I$(PREFIX)/include/libtommath \ +- -I$(PREFIX)/include/libuv -I$(PREFIX)/include @moar::ccout@$(M_PERL6_OPS_OBJ) $(M_PERL6_OPS_SRC) ++ -I$(PREFIX)/include/libuv -I$(PREFIX)/include @moar::cincludes@ @moar::ccout@$(M_PERL6_OPS_OBJ) $(M_PERL6_OPS_SRC) + $(M_CC) @moar::ccswitch@ @moar::ccshared@ $(M_CFLAGS) -I$(PREFIX)/include/libatomic_ops \ + -I$(PREFIX)/include/dyncall -I$(PREFIX)/include/moar \ + -I$(PREFIX)/include/sha1 -I$(PREFIX)/include/tinymt -I$(PREFIX)/include/libtommath \ +- -I$(PREFIX)/include/libuv -I$(PREFIX)/include @moar::ccout@$(M_PERL6_CONT_OBJ) $(M_PERL6_CONT_SRC) ++ -I$(PREFIX)/include/libuv -I$(PREFIX)/include @moar::cincludes@ @moar::ccout@$(M_PERL6_CONT_OBJ) $(M_PERL6_CONT_SRC) + $(M_LD) @moar::ldswitch@ -L@moar::libdir@ @moar::ldshared@ $(M_LDFLAGS) @moar::ldout@$(M_PERL6_OPS_DLL) $(M_PERL6_OPS_OBJ) $(M_PERL6_CONT_OBJ) -lmoar @moarimplib@ + + $(PERL6_ML_MOAR): src/Perl6/ModuleLoader.nqp src/vm/moar/ModuleLoaderVMConfig.nqp diff --git a/dev-lang/rakudo/metadata.xml b/dev-lang/rakudo/metadata.xml index 5a5e9977e99..4d1883d315c 100644 --- a/dev-lang/rakudo/metadata.xml +++ b/dev-lang/rakudo/metadata.xml @@ -1,12 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> - <email>patrick@gentoo.org</email> - <name>Patrick Lauer</name> - </maintainer> - <maintainer type="project"> - <email>perl@gentoo.org</email> - <name>Gentoo Perl Project</name> - </maintainer> + <maintainer type="person"> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> + <maintainer type="person"> + <email>tomboy64@sina.cn</email> + <name>Matthew Brewer</name> + </maintainer> + <maintainer type="project"> + <email>perl@gentoo.org</email> + <name>Gentoo Perl Project</name> + </maintainer> + <use> + <flag name="clang">Use Clang to compile the MoarVM backend</flag> + <flag name="moar">Use the MoarVM as backend</flag> + </use> </pkgmetadata> diff --git a/dev-lang/rakudo/rakudo-2016.04-r1.ebuild b/dev-lang/rakudo/rakudo-2016.04-r1.ebuild new file mode 100644 index 00000000000..e6777587761 --- /dev/null +++ b/dev-lang/rakudo/rakudo-2016.04-r1.ebuild @@ -0,0 +1,83 @@ +# 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 +} |