diff options
author | Matthew Brewer <tomboy64@sina.cn> | 2016-05-25 14:55:33 +0200 |
---|---|---|
committer | Matthew Brewer <tomboy64@sina.cn> | 2016-05-25 15:03:19 +0200 |
commit | 2b26c6a1e2f9bf90d413b97f8778162d3b3aed27 (patch) | |
tree | a87acccdff21674d4b25be03ed0eb6508de11926 | |
parent | remove old perl6 ebuilds (diff) | |
download | tbc-2b26c6a1e2f9bf90d413b97f8778162d3b3aed27.tar.gz tbc-2b26c6a1e2f9bf90d413b97f8778162d3b3aed27.tar.bz2 tbc-2b26c6a1e2f9bf90d413b97f8778162d3b3aed27.zip |
backport changes from moarvm,nqp,rakudo 2016.05 to 04
-rw-r--r-- | dev-lang/nqp/nqp-2016.04-r3.ebuild | 99 | ||||
-rw-r--r-- | dev-lang/rakudo/rakudo-2016.04-r2.ebuild | 83 |
2 files changed, 182 insertions, 0 deletions
diff --git a/dev-lang/nqp/nqp-2016.04-r3.ebuild b/dev-lang/nqp/nqp-2016.04-r3.ebuild new file mode 100644 index 0000000..102d9e0 --- /dev/null +++ b/dev-lang/nqp/nqp-2016.04-r3.ebuild @@ -0,0 +1,99 @@ +# 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" +PATCHES=( "${FILESDIR}/enable-external-jars.patch" ) + +pkg_setup() { + use java && java-pkg-2_pkg_setup +} + +src_prepare() { + eapply "${PATCHES[@]}" + 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 nor jna-4.1.0 + # keep testing against it + if use system-libs; then + if use java; then + 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$')" ) + else + einfo "USE=system-libs set, but this won't have any effect without USE=java." + fi + fi + + perl Configure.pl "${myconfargs[@]}" || die +} + +src_compile() { + emake -j1 +} + +src_test() { + emake -j1 test +} + +src_install() { + emake DESTDIR="${ED}" install + + dodoc CREDITS README.pod + + if use doc; then + dodoc -r docs/* + fi +} 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 0000000..b9c781f --- /dev/null +++ b/dev-lang/rakudo/rakudo-2016.04-r2.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 +} |