From 99667d408cde2428270d613d7d823db186c9f2e8 Mon Sep 17 00:00:00 2001 From: Matthew Brewer Date: Sat, 28 May 2016 00:43:01 +0200 Subject: push my new perl6 ebuilds to the overlay --- dev-lang/moarvm/Manifest | 2 + dev-lang/moarvm/files/Configure-2016.04.patch | 145 +++++++++++++++++++ dev-lang/moarvm/metadata.xml | 27 ++++ dev-lang/moarvm/moarvm-2016.04-r1.ebuild | 63 ++++++++ dev-lang/moarvm/moarvm-2016.05.ebuild | 61 ++++++++ dev-lang/moarvm/moarvm-9999.ebuild | 61 ++++++++ dev-lang/nqp/Manifest | 1 + dev-lang/nqp/metadata.xml | 1 - dev-lang/nqp/nqp-2016.04-r3.ebuild | 159 ++++++++++++++------- dev-lang/nqp/nqp-2016.04-r4.ebuild | 124 ---------------- dev-lang/nqp/nqp-2016.04-r5.ebuild | 144 ------------------- dev-lang/nqp/nqp-2016.05.ebuild | 159 +++++++++++++++++++++ dev-lang/nqp/nqp-9999.ebuild | 159 +++++++++++++++++++++ dev-lang/rakudo/Manifest | 2 +- dev-lang/rakudo/files/rakudo-2016.04-jna-lib.patch | 21 +++ dev-lang/rakudo/files/rakudo-jna-lib.patch | 21 --- dev-lang/rakudo/rakudo-2016.04-r2.ebuild | 70 ++++----- dev-lang/rakudo/rakudo-2016.04-r3.ebuild | 75 ---------- dev-lang/rakudo/rakudo-2016.05.ebuild | 79 ++++++++++ dev-lang/rakudo/rakudo-9999.ebuild | 79 ++++++++++ tools/chroot-here.sh | 2 +- 21 files changed, 1000 insertions(+), 455 deletions(-) create mode 100644 dev-lang/moarvm/Manifest create mode 100644 dev-lang/moarvm/files/Configure-2016.04.patch create mode 100644 dev-lang/moarvm/metadata.xml create mode 100644 dev-lang/moarvm/moarvm-2016.04-r1.ebuild create mode 100644 dev-lang/moarvm/moarvm-2016.05.ebuild create mode 100644 dev-lang/moarvm/moarvm-9999.ebuild delete mode 100644 dev-lang/nqp/nqp-2016.04-r4.ebuild delete mode 100644 dev-lang/nqp/nqp-2016.04-r5.ebuild create mode 100644 dev-lang/nqp/nqp-2016.05.ebuild create mode 100644 dev-lang/nqp/nqp-9999.ebuild create mode 100644 dev-lang/rakudo/files/rakudo-2016.04-jna-lib.patch delete mode 100644 dev-lang/rakudo/files/rakudo-jna-lib.patch delete mode 100644 dev-lang/rakudo/rakudo-2016.04-r3.ebuild create mode 100644 dev-lang/rakudo/rakudo-2016.05.ebuild create mode 100644 dev-lang/rakudo/rakudo-9999.ebuild diff --git a/dev-lang/moarvm/Manifest b/dev-lang/moarvm/Manifest new file mode 100644 index 0000000..8d79641 --- /dev/null +++ b/dev-lang/moarvm/Manifest @@ -0,0 +1,2 @@ +DIST MoarVM-2016.04.tar.gz 3332850 SHA256 6fe9000daada59535747f2557cc73573241ba8a6044271caf1647aa37be33c6d SHA512 ef22145c9f7c32d7d12192cee63f286544500adff40fc2dbaad677d57108bc6efedc348fe8ddf460fe12d2c6b282e885bcb74fb3bcaa1e06b7719754175afe7d WHIRLPOOL e314f80cd785d31768630798647d7f445831bb29aaded88ef32326df3f4705a5d3fba2da00fce6888a2256b57aeb838922e94c3096250d30112f2be2bfacbb92 +DIST MoarVM-2016.05.tar.gz 3343486 SHA256 d59e3b366cd788a9e9aaa747dc0883dc6f41d97cb76a8fb2815bd565ef75498a SHA512 0cc946962b56cd9075013074228cee008c98b43da9bdaadd8ce91aa06d94510df1c4a2877d36945aff30dada01f3bf66c0ef1028c59967d09c0aec662aa87f99 WHIRLPOOL 1681538cb1a2919bfb49e51fe29877392ee0900d38daed1bbdae92d57332de84888f6ecae3bfbfba5b8132f186ebdfa3151a7cd038f10538e09c97ddae953adc diff --git a/dev-lang/moarvm/files/Configure-2016.04.patch b/dev-lang/moarvm/files/Configure-2016.04.patch new file mode 100644 index 0000000..6fd46c2 --- /dev/null +++ b/dev-lang/moarvm/files/Configure-2016.04.patch @@ -0,0 +1,145 @@ +diff --git a/Configure.pl b/Configure.pl +index 72a5dad..f829d5c 100755 +--- a/Configure.pl ++++ b/Configure.pl +@@ -32,7 +32,7 @@ GetOptions(\%args, qw( + os=s shell=s toolchain=s compiler=s + ar=s cc=s ld=s make=s has-sha has-libuv + static has-libtommath has-libatomic_ops +- has-dyncall has-libffi ++ has-dyncall has-libffi pkgconfig=s + build=s host=s big-endian jit! enable-jit lua=s has-dynasm + prefix=s bindir=s libdir=s mastdir=s make-install asan ubsan), + 'no-optimize|nooptimize' => sub { $args{optimize} = 0 }, +@@ -99,6 +99,7 @@ $config{config} = join ' ', map { / / ? "\"$_\"" : $_ } @args; + $config{osname} = $^O; + $config{osvers} = $Config{osvers}; + $config{lua} = $args{lua} // './3rdparty/dynasm/minilua@exe@'; ++$config{pkgconfig} = $args{pkgconfig} // '/usr/bin/pkg-config'; + + # set options that take priority over all others + my @keys = qw( ar cc ld make ); +@@ -164,12 +165,33 @@ if (-e '3rdparty/libuv/src/unix/threadpool' . $defaults{obj} + system($defaults{make}, 'realclean') + } + ++# test whether pkg-config works ++if (-e "$config{pkgconfig}") { ++ print("\nTesting pkgconfig ... "); ++ system("$config{pkgconfig}", "--version"); ++ if ( $? == 0 ) { ++ $config{pkgconfig_works} = 1; ++ } else { ++ $config{pkgconfig_works} = 0; ++ } ++} ++ + # conditionally set include dirs and install rules + $config{cincludes} //= ''; + $config{install} //= ''; + if ($args{'has-libuv'}) { + $defaults{-thirdparty}->{uv} = undef; + unshift @{$config{usrlibs}}, 'uv'; ++ if ($config{pkgconfig_works}) { ++ my $result = `$config{pkgconfig} --cflags libuv`; ++ if ( $? == 0 ) { ++ $result =~ s/\n/ /g; ++ $config{cincludes} .= ' ' . "$result"; ++ print("Adding extra include for libuv: $result\n"); ++ } else { ++ print("Error occured when running $config{pkgconfig} --cflags libuv.\n"); ++ } ++ } + } + else { + $config{cincludes} .= ' ' . $defaults{ccinc} . '3rdparty/libuv/include' +@@ -181,6 +203,16 @@ else { + if ($args{'has-libatomic_ops'}) { + $defaults{-thirdparty}->{lao} = undef; + unshift @{$config{usrlibs}}, 'atomic_ops'; ++ if ($config{pkgconfig_works}) { ++ my $result = `$config{pkgconfig} --cflags atomic_ops`; ++ if ( $? == 0 ) { ++ $result =~ s/\n/ /g; ++ $config{cincludes} .= ' ' . "$result"; ++ print("Adding extra include for atomic_ops: $result\n"); ++ } else { ++ print("Error occured when running $config{pkgconfig} --cflags atomic_ops.\n"); ++ } ++ } + } + else { + $config{cincludes} .= ' ' . $defaults{ccinc} . '3rdparty/libatomic_ops/src'; +@@ -216,7 +248,8 @@ if ($args{'has-libtommath'}) { + } + else { + $config{cincludes} .= ' ' . $defaults{ccinc} . '3rdparty/libtommath'; +- $config{install} .= "\t\$(CP) 3rdparty/libtommath/*.h \$(DESTDIR)\$(PREFIX)/include/libtommath\n"; ++ $config{install} .= "\t\$(MKPATH) \$(DESTDIR)\$(PREFIX)/include/libtommath\n" ++ . "\t\$(CP) 3rdparty/libtommath/*.h \$(DESTDIR)\$(PREFIX)/include/libtommath\n"; + } + + if ($args{'has-dynasm'}) { +@@ -232,6 +265,16 @@ if ($args{'has-libffi'}) { + $config{nativecall_backend} = 'libffi'; + unshift @{$config{usrlibs}}, 'ffi'; + push @{$config{defs}}, 'HAVE_LIBFFI'; ++ if ($config{pkgconfig_works}) { ++ my $result = `$config{pkgconfig} --cflags libffi`; ++ if ( $? == 0 ) { ++ $result =~ s/\n/ /g; ++ $config{cincludes} .= ' ' . "$result"; ++ print("Adding extra include for libffi: $result\n"); ++ } else { ++ print("Error occured when running $config{pkgconfig} --cflags libffi.\n"); ++ } ++ } + } + elsif ($args{'has-dyncall'}) { + unshift @{$config{usrlibs}}, 'dyncall_s', 'dyncallback_s', 'dynload_s'; +@@ -364,6 +407,7 @@ my $order = $config{be} ? 'big endian' : 'little endian'; + print "\n", < '-fPIC', + ldshared => '-shared @ccshared@', + moarshared => '', +- ldrpath => '-Wl,-rpath,@libdir@ -Wl,-rpath,@prefix@/share/perl6/site/lib', ++ ldrpath => '-Wl,-rpath,/@libdir@ -Wl,-rpath,@prefix@/share/perl6/site/lib', + + arflags => 'rcs', + arout => '', diff --git a/dev-lang/moarvm/metadata.xml b/dev-lang/moarvm/metadata.xml new file mode 100644 index 0000000..3e0f367 --- /dev/null +++ b/dev-lang/moarvm/metadata.xml @@ -0,0 +1,27 @@ + + + + + patrick@gentoo.org + Patrick Lauer + + + tomboy64@sina.cn + Matthew Brewer + + + perl@gentoo.org + Gentoo Perl Project + + + Enable clang's Address Sanitizer functionality. Expect longer compile time. + Use clang compiler instead of GCC + Enable Just-In-Time-Compiler. Has no effect except on AMD64 and Darwin. + Enable optimization via CFLAGS + Link against the system's shared libraries + Enable clang's Undefined Behavior Sanitizer functionality. Expect longer compile time. + + + MoarVM/MoarVM + + diff --git a/dev-lang/moarvm/moarvm-2016.04-r1.ebuild b/dev-lang/moarvm/moarvm-2016.04-r1.ebuild new file mode 100644 index 0000000..30b7f13 --- /dev/null +++ b/dev-lang/moarvm/moarvm-2016.04-r1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit flag-o-matic + +MY_PN="MoarVM" +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git" + inherit git-r3 + KEYWORDS="" + S="${WORKDIR}/${P}" +else + SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/${MY_PN}-${PV}" +fi + +DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6" +HOMEPAGE="http://moarvm.org" +LICENSE="Artistic-2" +SLOT="0" +IUSE="asan clang debug doc +jit static-libs +system-libs optimize ubsan" + +RDEPEND="dev-libs/libatomic_ops + dev-libs/libtommath + dev-libs/libuv + jit? ( dev-lang/lua:0[deprecated] + dev-lua/LuaBitOp ) + virtual/libffi" +DEPEND="${RDEPEND} + clang? ( >=sys-devel/clang-3.1 ) + dev-lang/perl" + +PATCHES=( "${FILESDIR}/Configure-2016.04.patch" ) +DOCS=( CREDITS README.markdown ) + +# Tests are conducted via nqp +RESTRICT=test + +src_configure() { + use doc && DOCS+=( docs/* ) + local myconfigargs=( + "--prefix=/usr" + "--libdir=$(get_libdir)" + "--compiler=$(usex clang clang gcc)" + "$(usex asan --asan)" + "$(usex debug --debug --no-debug)" + "$(usex jit --lua=/usr/bin/lua --no-jit)" + "$(usex optimize --optimize= --no-optimize)" + "$(usex static-libs --static)" + "$(usex system-libs --has-libtommath)" + "$(usex system-libs --has-libuv)" + "$(usex system-libs --has-libatomic_ops)" + "$(usex system-libs --has-libffi)" + "$(usex ubsan --ubsan)" + ) + use optimize && filter-flags '-O*' + + perl Configure.pl "${myconfigargs[@]}" || die +} diff --git a/dev-lang/moarvm/moarvm-2016.05.ebuild b/dev-lang/moarvm/moarvm-2016.05.ebuild new file mode 100644 index 0000000..f6c45bd --- /dev/null +++ b/dev-lang/moarvm/moarvm-2016.05.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit flag-o-matic + +MY_PN="MoarVM" +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git" + inherit git-r3 + KEYWORDS="" + S="${WORKDIR}/${P}" +else + SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/${MY_PN}-${PV}" +fi + +DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6" +HOMEPAGE="http://moarvm.org" +LICENSE="Artistic-2" +SLOT="0" +IUSE="asan clang debug doc +jit static-libs +system-libs optimize ubsan" + +RDEPEND="dev-libs/libatomic_ops + dev-libs/libtommath + dev-libs/libuv + jit? ( dev-lang/lua:0[deprecated] + dev-lua/LuaBitOp ) + virtual/libffi" +DEPEND="${RDEPEND} + clang? ( >=sys-devel/clang-3.1 ) + dev-lang/perl" +DOCS=( CREDITS README.markdown ) + +# Tests are conducted via nqp +RESTRICT=test + +src_configure() { + use doc && DOCS+=( docs/* ) + local myconfigargs=( + "--prefix=/usr" + "--libdir=$(get_libdir)" + "--compiler=$(usex clang clang gcc)" + "$(usex asan --asan)" + "$(usex debug --debug --no-debug)" + "$(usex jit --lua=/usr/bin/lua --no-jit)" + "$(usex optimize --optimize= --no-optimize)" + "$(usex static-libs --static)" + "$(usex system-libs --has-libtommath)" + "$(usex system-libs --has-libuv)" + "$(usex system-libs --has-libatomic_ops)" + "$(usex system-libs --has-libffi)" + "$(usex ubsan --ubsan)" + ) + use optimize && filter-flags '-O*' + + perl Configure.pl "${myconfigargs[@]}" || die +} diff --git a/dev-lang/moarvm/moarvm-9999.ebuild b/dev-lang/moarvm/moarvm-9999.ebuild new file mode 100644 index 0000000..f6c45bd --- /dev/null +++ b/dev-lang/moarvm/moarvm-9999.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit flag-o-matic + +MY_PN="MoarVM" +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git" + inherit git-r3 + KEYWORDS="" + S="${WORKDIR}/${P}" +else + SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/${MY_PN}-${PV}" +fi + +DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6" +HOMEPAGE="http://moarvm.org" +LICENSE="Artistic-2" +SLOT="0" +IUSE="asan clang debug doc +jit static-libs +system-libs optimize ubsan" + +RDEPEND="dev-libs/libatomic_ops + dev-libs/libtommath + dev-libs/libuv + jit? ( dev-lang/lua:0[deprecated] + dev-lua/LuaBitOp ) + virtual/libffi" +DEPEND="${RDEPEND} + clang? ( >=sys-devel/clang-3.1 ) + dev-lang/perl" +DOCS=( CREDITS README.markdown ) + +# Tests are conducted via nqp +RESTRICT=test + +src_configure() { + use doc && DOCS+=( docs/* ) + local myconfigargs=( + "--prefix=/usr" + "--libdir=$(get_libdir)" + "--compiler=$(usex clang clang gcc)" + "$(usex asan --asan)" + "$(usex debug --debug --no-debug)" + "$(usex jit --lua=/usr/bin/lua --no-jit)" + "$(usex optimize --optimize= --no-optimize)" + "$(usex static-libs --static)" + "$(usex system-libs --has-libtommath)" + "$(usex system-libs --has-libuv)" + "$(usex system-libs --has-libatomic_ops)" + "$(usex system-libs --has-libffi)" + "$(usex ubsan --ubsan)" + ) + use optimize && filter-flags '-O*' + + perl Configure.pl "${myconfigargs[@]}" || die +} diff --git a/dev-lang/nqp/Manifest b/dev-lang/nqp/Manifest index 19088f1..3bbe823 100644 --- a/dev-lang/nqp/Manifest +++ b/dev-lang/nqp/Manifest @@ -1 +1,2 @@ DIST nqp-2016.04.tar.gz 5156494 SHA256 9176422eb2a99db24ab520bc78686f3a2c008ba73bf8c7091a790985f5061019 SHA512 5dcb685a90b26fee3e8dac3ca24da11bd967d034b5328232d18d9db37e27645b57259cabf54ef8e10b3ac508b1aa784072f0a9542d30168d3017f86e610c3cee WHIRLPOOL 0711e1471740b0ed181f9e4504f810a084056e74650c0ffb1c6c17e2976b2c1facb6a7e73df5d991d9ffe43f055fe844f0756dbd816375708b4d499a0f7a9162 +DIST nqp-2016.05.tar.gz 5159647 SHA256 7fdd76322383632783b4352e8fab144c3d68acbfda5112c1f178d8909277f616 SHA512 c81d2f6ef13fad36ed863869c985049a5e1daa04e979449fbbd3b5b365ff58430711f6a7ed5ac10ff61fe6a78d4f960f76ade7445ecb82eb3100882449747a61 WHIRLPOOL 119237accc6723db4afa27cdbb1409e9d11a572bf24fbd83e8bed3c507193bf2199bb5a1e8a27052d922040892f5ce35ffd30640218bbc15167fff88e70941c7 diff --git a/dev-lang/nqp/metadata.xml b/dev-lang/nqp/metadata.xml index dd228ef..7d0e9d2 100644 --- a/dev-lang/nqp/metadata.xml +++ b/dev-lang/nqp/metadata.xml @@ -16,7 +16,6 @@ Toggle usage of the clang compiler in conjunction with MoarVM Build the MoarVM backend (experimental/broken) - Use jars provided by the system instead of upstream perl6/nqp diff --git a/dev-lang/nqp/nqp-2016.04-r3.ebuild b/dev-lang/nqp/nqp-2016.04-r3.ebuild index 47c7906..3d3e1b3 100644 --- a/dev-lang/nqp/nqp-2016.04-r3.ebuild +++ b/dev-lang/nqp/nqp-2016.04-r3.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 multibuild if [[ ${PV} == "9999" ]]; then EGIT_REPO_URI="https://github.com/perl6/${PN}.git" @@ -12,7 +12,8 @@ if [[ ${PV} == "9999" ]]; then KEYWORDS="" else SRC_URI="https://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz" - KEYWORDS="" + inherit vcs-snapshot + KEYWORDS="~amd64 ~x86" fi DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler" @@ -20,80 +21,140 @@ HOMEPAGE="http://rakudo.org/" LICENSE="Artistic-2" SLOT="0" -IUSE="doc clang java +moar +system-libs test" +IUSE="doc clang java +moar test" REQUIRED_USE="|| ( java moar )" -RDEPEND="java? ( >=virtual/jre-1.7 - system-libs? ( - dev-java/asm:4 - dev-java/jline:0 - ) +CDEPEND="java? ( + dev-java/asm:4 + dev-java/jline:0 + dev-java/jna:4 ) - moar? ( ~dev-lang/moarvm-${PV}[clang=] ) - dev-libs/libffi" -DEPEND="${RDEPEND} + moar? ( ~dev-lang/moarvm-${PV}[clang=] )" +RDEPEND="${CDEPEND} + java? ( >=virtual/jre-1.7 )" +DEPEND="${CDEPEND} 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 +pkg_pretend() { + if has_version dev-lang/rakudo || has_version dev-lang/nqp; then + ewarn "NQP is known to fail compilation/installation with rakudo and/or NQP" + ewarn "already being installed. So if it fails, try uninstalling them before" + ewarn "reporting a bug." + fi } -src_prepare() { - eapply "${PATCHES[@]}" - eapply_user - use java && java-pkg-2_src_prepare +java_prepare() { + # Don't clean stage0 jars. + einfo "Cleaning upstream jars" + java-pkg_clean 3rdparty/ + + # Don't use jars we just deleted. + sed -i -r 's/(:3rdparty[^:]*)+/:${THIRDPARTY_JARS}/g' \ + src/vm/jvm/runners/nqp-j || die } -src_unpack() { - if [[ ${PV} == "9999" ]]; then - git-r3_src_unpack - else - unpack ${A} - mv "${WORKDIR}/perl6-nqp-"* "${WORKDIR}/${P}" || die - fi +src_prepare() { + MULTIBUILD_VARIANTS=() + use moar && MULTIBUILD_VARIANTS+=( moar ) + use java && MULTIBUILD_VARIANTS+=( jvm ) + + multibuild_copy_sources + + # This will pull in conditional java_prepare + default } -src_configure() { - local backends - use java && backends+="jvm," - use moar && backends+="moar" +nqp_configure() { + pushd "${BUILD_DIR}" > /dev/null || die local myconfargs=( - "--backend=${backends}" + "--backend=${MULTIBUILD_VARIANT}" "--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 + perl Configure.pl "${myconfargs[@]}" || die + popd || die +} + +nqp_compile() { + if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then + emake -j1 \ + -C "${BUILD_DIR}" \ + THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies asm-4,jline,jna-4) \ + JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)" + elif [[ "${MULTIBUILD_VARIANT}" = moar ]]; then + emake -j1 \ + -C "${BUILD_DIR}" fi +} - perl Configure.pl "${myconfargs[@]}" || die +nqp_test() { + emake -j1 \ + -C "${BUILD_DIR}" \ + test +} + +nqp_install() { + # This is the actual reason we need multibuild.eclass. + # We need to distinguish the install procedure for MoarVM and JVM backends. + case "${MULTIBUILD_VARIANT}" in + moar) + emake \ + DESTDIR="${ED}" \ + -C "${BUILD_DIR}" \ + install + ;; + jvm) + pushd "${BUILD_DIR}" > /dev/null || die + # Set JAVA_PKG_JARDEST early. + java-pkg_init_paths_ + + # Upstream sets the classpath to this location. Perhaps it's + # used to locate the additional libraries? + java-pkg_addcp "${JAVA_PKG_JARDEST}" + + insinto "${JAVA_PKG_JARDEST}" + local jar + + for jar in *.jar; do + if has ${jar} ${PN}.jar ${PN}-runtime.jar; then + # jars for NQP itself. + java-pkg_dojar ${jar} + else + # jars used by NQP. + doins ${jar} + fi + done + + # Upstream uses -Xbootclasspath/a, which is faster due to lack + # of verification, but gjl isn't flexible enough yet. :( + java-pkg_dolauncher ${PN}-j --main ${PN} + dosym ${PN}-j /usr/bin/${PN} + dobin tools/jvm/eval-client.pl + popd > /dev/null || die + ;; + *) + die "Unknown MULTIBUILD_VARIANT ${MULTIBUILD_VARIANT}." + ;; + esac +} + +src_configure() { + multibuild_foreach_variant nqp_configure } src_compile() { - emake -j1 + multibuild_foreach_variant nqp_compile } src_test() { - emake -j1 test + multibuild_foreach_variant nqp_test } src_install() { - emake DESTDIR="${ED}" install + multibuild_foreach_variant nqp_install dodoc CREDITS README.pod - - if use doc; then - dodoc -r docs/* - fi + use doc && dodoc -r docs/* } diff --git a/dev-lang/nqp/nqp-2016.04-r4.ebuild b/dev-lang/nqp/nqp-2016.04-r4.ebuild deleted file mode 100644 index 02c414d..0000000 --- a/dev-lang/nqp/nqp-2016.04-r4.ebuild +++ /dev/null @@ -1,124 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -inherit java-pkg-opt-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" - inherit vcs-snapshot - KEYWORDS="" -fi - -DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler" -HOMEPAGE="http://rakudo.org/" - -LICENSE="Artistic-2" -SLOT="0" -IUSE="doc clang java +moar test" -REQUIRED_USE="|| ( java moar )" - -CDEPEND="java? ( - dev-java/asm:4 - dev-java/jline:0 - dev-java/jna:4 - ) - moar? ( ~dev-lang/moarvm-${PV}[clang=] ) - dev-libs/libffi" -RDEPEND="${CDEPEND} - java? ( >=virtual/jre-1.7 )" -DEPEND="${CDEPEND} - clang? ( sys-devel/clang ) - java? ( >=virtual/jdk-1.7 ) - dev-lang/perl" -PATCHES=( "${FILESDIR}/enable-external-jars.patch" ) - -java_prepare() { - # Don't clean stage0 jars. - einfo "Cleaning upstream jars" - java-pkg_clean 3rdparty/ - - # Don't use jars we just deleted. - sed -i -r 's/(:3rdparty[^:]*)+/:${THIRDPARTY_JARS}/g' \ - src/vm/jvm/runners/nqp-j || die -} - -src_configure() { - local backends - use java && backends+="jvm," - use moar && backends+="moar" - - local myconfargs=( - "--backend=${backends}" - "--prefix=/usr" ) - - perl Configure.pl "${myconfargs[@]}" || die - - if use java; then - # Export this for the script we sed'd above. - export THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies asm-4,jline,jna-4) - fi -} - -src_compile() { - if use java; then - emake -j1 \ - THIRDPARTY_JARS="${THIRDPARTY_JARS}" \ - JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)" - else - emake -j1 - fi -} - -src_test() { - emake -j1 test -} - -src_install() { - if use moar; then - if use java; then - # We need to re-run Configure.pl with only the MoarVM backend, - # so we don't overwrite our custom java install. - # This has to happen before the installation of nqp's MoarVM bits. - # Also, those bits have to get installed before the JVM bits. - perl Configure.pl --backend=moar --prefix=/usr || die - fi - emake DESTDIR="${ED}" install - fi - if use java; then - # Set JAVA_PKG_JARDEST early. - java-pkg_init_paths_ - - # Upstream sets the classpath to this location. Perhaps it's - # used to locate the additional libraries? - java-pkg_addcp "${JAVA_PKG_JARDEST}" - - insinto "${JAVA_PKG_JARDEST}" - local jar - - for jar in *.jar; do - if has ${jar} ${PN}.jar ${PN}-runtime.jar; then - # jars for NQP itself. - java-pkg_dojar ${jar} - else - # jars used by NQP. - doins ${jar} - fi - done - - # Upstream uses -Xbootclasspath/a, which is faster due to lack - # of verification, but gjl isn't flexible enough yet. :( - java-pkg_dolauncher ${PN}-j --main ${PN} - dosym ${PN}-j /usr/bin/${PN} - dobin tools/jvm/eval-client.pl - fi - - dodoc CREDITS README.pod - use doc && dodoc -r docs/* -} diff --git a/dev-lang/nqp/nqp-2016.04-r5.ebuild b/dev-lang/nqp/nqp-2016.04-r5.ebuild deleted file mode 100644 index 4f0bf1f..0000000 --- a/dev-lang/nqp/nqp-2016.04-r5.ebuild +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -inherit java-pkg-opt-2 multibuild - -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" - inherit vcs-snapshot - KEYWORDS="" -fi - -DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler" -HOMEPAGE="http://rakudo.org/" - -LICENSE="Artistic-2" -SLOT="0" -IUSE="doc clang java +moar test" -REQUIRED_USE="|| ( java moar )" - -CDEPEND="java? ( - dev-java/asm:4 - dev-java/jline:0 - dev-java/jna:4 - ) - moar? ( ~dev-lang/moarvm-${PV}[clang=] ) - dev-libs/libffi" -RDEPEND="${CDEPEND} - java? ( >=virtual/jre-1.7 )" -DEPEND="${CDEPEND} - clang? ( sys-devel/clang ) - java? ( >=virtual/jdk-1.7 ) - dev-lang/perl" -PATCHES=( "${FILESDIR}/enable-external-jars.patch" ) - -java_prepare() { - # Don't clean stage0 jars. - einfo "Cleaning upstream jars" - java-pkg_clean 3rdparty/ - - # Don't use jars we just deleted. - sed -i -r 's/(:3rdparty[^:]*)+/:${THIRDPARTY_JARS}/g' \ - src/vm/jvm/runners/nqp-j || die -} - -src_prepare() { - MULTIBUILD_VARIANTS=() - use moar && MULTIBUILD_VARIANTS+=( moar ) - use java && MULTIBUILD_VARIANTS+=( jvm ) - - multibuild_copy_sources - - # This will pull in conditional java_prepare - default -} - -nqp_configure() { - pushd "${BUILD_DIR}" > /dev/null || die - local myconfargs=( - "--backend=${MULTIBUILD_VARIANT}" - "--prefix=/usr" ) - - perl Configure.pl "${myconfargs[@]}" || die - popd || die -} - -nqp_compile() { - pushd "${BUILD_DIR}" > /dev/null || die - if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then - emake -j1 \ - THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies asm-4,jline,jna-4) - JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)" - elif [[ "${MULTIBUILD_VARIANT}" = moar ]]; then - emake -j1 - fi - popd || die -} - -nqp_test() { - pushd "${BUILD_DIR}" > /dev/null || die - emake -j1 test - popd || die -} - -nqp_install() { - pushd "${BUILD_DIR}" > /dev/null || die - # This is the actual reason we need multibuild.eclass. - # We need to distinguish the install procedure for MoarVM and JVM backends. - if [[ "${MULTIBUILD_VARIANT}" = moar ]]; then - emake DESTDIR="${ED}" install - elif [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then - # Set JAVA_PKG_JARDEST early. - java-pkg_init_paths_ - - # Upstream sets the classpath to this location. Perhaps it's - # used to locate the additional libraries? - java-pkg_addcp "${JAVA_PKG_JARDEST}" - - insinto "${JAVA_PKG_JARDEST}" - local jar - - for jar in *.jar; do - if has ${jar} ${PN}.jar ${PN}-runtime.jar; then - # jars for NQP itself. - java-pkg_dojar ${jar} - else - # jars used by NQP. - doins ${jar} - fi - done - - # Upstream uses -Xbootclasspath/a, which is faster due to lack - # of verification, but gjl isn't flexible enough yet. :( - java-pkg_dolauncher ${PN}-j --main ${PN} - dosym ${PN}-j /usr/bin/${PN} - dobin tools/jvm/eval-client.pl - fi - popd || die -} - -src_configure() { - multibuild_foreach_variant nqp_configure -} - -src_compile() { - multibuild_foreach_variant nqp_compile -} - -src_test() { - multibuild_foreach_variant nqp_test -} - -src_install() { - multibuild_foreach_variant nqp_install - - dodoc CREDITS README.pod - use doc && dodoc -r docs/* -} diff --git a/dev-lang/nqp/nqp-2016.05.ebuild b/dev-lang/nqp/nqp-2016.05.ebuild new file mode 100644 index 0000000..c142ddf --- /dev/null +++ b/dev-lang/nqp/nqp-2016.05.ebuild @@ -0,0 +1,159 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit java-pkg-opt-2 multibuild + +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" + inherit vcs-snapshot + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler" +HOMEPAGE="http://rakudo.org/" + +LICENSE="Artistic-2" +SLOT="0" +IUSE="doc clang java +moar test" +REQUIRED_USE="|| ( java moar )" + +CDEPEND="java? ( + dev-java/asm:4 + dev-java/jline:0 + dev-java/jna:4 + ) + moar? ( ~dev-lang/moarvm-${PV}[clang=] )" +RDEPEND="${CDEPEND} + java? ( >=virtual/jre-1.7 )" +DEPEND="${CDEPEND} + clang? ( sys-devel/clang ) + java? ( >=virtual/jdk-1.7 ) + dev-lang/perl" + +pkg_pretend() { + if has_version dev-lang/rakudo || has_version dev-lang/nqp; then + ewarn "NQP is known to fail compilation/installation with rakudo and/or NQP" + ewarn "already being installed. So if it fails, try uninstalling them before" + ewarn "reporting a bug." + fi +} + +java_prepare() { + # Don't clean stage0 jars. + einfo "Cleaning upstream jars" + java-pkg_clean 3rdparty/ + + # Don't use jars we just deleted. + sed -i -r 's/(:3rdparty[^:]*)+/:${THIRDPARTY_JARS}/g' \ + src/vm/jvm/runners/nqp-j || die +} + +src_prepare() { + MULTIBUILD_VARIANTS=() + use moar && MULTIBUILD_VARIANTS+=( moar ) + use java && MULTIBUILD_VARIANTS+=( jvm ) + + multibuild_copy_sources + + # This will pull in conditional java_prepare + default +} + +nqp_configure() { + pushd "${BUILD_DIR}" > /dev/null || die + local myconfargs=( + "--backend=${MULTIBUILD_VARIANT}" + "--prefix=/usr" ) + + perl Configure.pl "${myconfargs[@]}" || die + popd || die +} + +nqp_compile() { + if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then + emake -j1 \ + -C "${BUILD_DIR}" \ + THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies asm-4,jline,jna-4) \ + JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)" + elif [[ "${MULTIBUILD_VARIANT}" = moar ]]; then + emake -j1 \ + -C "${BUILD_DIR}" + fi +} + +nqp_test() { + emake -j1 \ + -C "${BUILD_DIR}" \ + test +} + +nqp_install() { + # This is the actual reason we need multibuild.eclass. + # We need to distinguish the install procedure for MoarVM and JVM backends. + case "${MULTIBUILD_VARIANT}" in + moar) + emake \ + DESTDIR="${ED}" \ + -C "${BUILD_DIR}" \ + install + ;; + jvm) + pushd "${BUILD_DIR}" > /dev/null || die + # Set JAVA_PKG_JARDEST early. + java-pkg_init_paths_ + + # Upstream sets the classpath to this location. Perhaps it's + # used to locate the additional libraries? + java-pkg_addcp "${JAVA_PKG_JARDEST}" + + insinto "${JAVA_PKG_JARDEST}" + local jar + + for jar in *.jar; do + if has ${jar} ${PN}.jar ${PN}-runtime.jar; then + # jars for NQP itself. + java-pkg_dojar ${jar} + else + # jars used by NQP. + doins ${jar} + fi + done + + # Upstream uses -Xbootclasspath/a, which is faster due to lack + # of verification, but gjl isn't flexible enough yet. :( + java-pkg_dolauncher ${PN}-j --main ${PN} + dosym ${PN}-j /usr/bin/${PN} + dobin tools/jvm/eval-client.pl + popd > /dev/null || die + ;; + *) + die "Unknown MULTIBUILD_VARIANT ${MULTIBUILD_VARIANT}." + ;; + esac +} + +src_configure() { + multibuild_foreach_variant nqp_configure +} + +src_compile() { + multibuild_foreach_variant nqp_compile +} + +src_test() { + multibuild_foreach_variant nqp_test +} + +src_install() { + multibuild_foreach_variant nqp_install + + dodoc CREDITS README.pod + use doc && dodoc -r docs/* +} diff --git a/dev-lang/nqp/nqp-9999.ebuild b/dev-lang/nqp/nqp-9999.ebuild new file mode 100644 index 0000000..c142ddf --- /dev/null +++ b/dev-lang/nqp/nqp-9999.ebuild @@ -0,0 +1,159 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit java-pkg-opt-2 multibuild + +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" + inherit vcs-snapshot + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler" +HOMEPAGE="http://rakudo.org/" + +LICENSE="Artistic-2" +SLOT="0" +IUSE="doc clang java +moar test" +REQUIRED_USE="|| ( java moar )" + +CDEPEND="java? ( + dev-java/asm:4 + dev-java/jline:0 + dev-java/jna:4 + ) + moar? ( ~dev-lang/moarvm-${PV}[clang=] )" +RDEPEND="${CDEPEND} + java? ( >=virtual/jre-1.7 )" +DEPEND="${CDEPEND} + clang? ( sys-devel/clang ) + java? ( >=virtual/jdk-1.7 ) + dev-lang/perl" + +pkg_pretend() { + if has_version dev-lang/rakudo || has_version dev-lang/nqp; then + ewarn "NQP is known to fail compilation/installation with rakudo and/or NQP" + ewarn "already being installed. So if it fails, try uninstalling them before" + ewarn "reporting a bug." + fi +} + +java_prepare() { + # Don't clean stage0 jars. + einfo "Cleaning upstream jars" + java-pkg_clean 3rdparty/ + + # Don't use jars we just deleted. + sed -i -r 's/(:3rdparty[^:]*)+/:${THIRDPARTY_JARS}/g' \ + src/vm/jvm/runners/nqp-j || die +} + +src_prepare() { + MULTIBUILD_VARIANTS=() + use moar && MULTIBUILD_VARIANTS+=( moar ) + use java && MULTIBUILD_VARIANTS+=( jvm ) + + multibuild_copy_sources + + # This will pull in conditional java_prepare + default +} + +nqp_configure() { + pushd "${BUILD_DIR}" > /dev/null || die + local myconfargs=( + "--backend=${MULTIBUILD_VARIANT}" + "--prefix=/usr" ) + + perl Configure.pl "${myconfargs[@]}" || die + popd || die +} + +nqp_compile() { + if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then + emake -j1 \ + -C "${BUILD_DIR}" \ + THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies asm-4,jline,jna-4) \ + JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)" + elif [[ "${MULTIBUILD_VARIANT}" = moar ]]; then + emake -j1 \ + -C "${BUILD_DIR}" + fi +} + +nqp_test() { + emake -j1 \ + -C "${BUILD_DIR}" \ + test +} + +nqp_install() { + # This is the actual reason we need multibuild.eclass. + # We need to distinguish the install procedure for MoarVM and JVM backends. + case "${MULTIBUILD_VARIANT}" in + moar) + emake \ + DESTDIR="${ED}" \ + -C "${BUILD_DIR}" \ + install + ;; + jvm) + pushd "${BUILD_DIR}" > /dev/null || die + # Set JAVA_PKG_JARDEST early. + java-pkg_init_paths_ + + # Upstream sets the classpath to this location. Perhaps it's + # used to locate the additional libraries? + java-pkg_addcp "${JAVA_PKG_JARDEST}" + + insinto "${JAVA_PKG_JARDEST}" + local jar + + for jar in *.jar; do + if has ${jar} ${PN}.jar ${PN}-runtime.jar; then + # jars for NQP itself. + java-pkg_dojar ${jar} + else + # jars used by NQP. + doins ${jar} + fi + done + + # Upstream uses -Xbootclasspath/a, which is faster due to lack + # of verification, but gjl isn't flexible enough yet. :( + java-pkg_dolauncher ${PN}-j --main ${PN} + dosym ${PN}-j /usr/bin/${PN} + dobin tools/jvm/eval-client.pl + popd > /dev/null || die + ;; + *) + die "Unknown MULTIBUILD_VARIANT ${MULTIBUILD_VARIANT}." + ;; + esac +} + +src_configure() { + multibuild_foreach_variant nqp_configure +} + +src_compile() { + multibuild_foreach_variant nqp_compile +} + +src_test() { + multibuild_foreach_variant nqp_test +} + +src_install() { + multibuild_foreach_variant nqp_install + + dodoc CREDITS README.pod + use doc && dodoc -r docs/* +} diff --git a/dev-lang/rakudo/Manifest b/dev-lang/rakudo/Manifest index 34951ea..eb9ab2e 100644 --- a/dev-lang/rakudo/Manifest +++ b/dev-lang/rakudo/Manifest @@ -1 +1 @@ -DIST rakudo-2016.04.tar.gz 2706659 SHA256 207d723c9b2d524daf6008a3ed026ea06773d937e76e0fe79b89bfb7dcd0d92b SHA512 08e718643cfa89edbb8995ab9f350f69053e41cff97b33530dd2eb202d2ab2116d219ef1385717b48f5883665c73a181b1b054c1300db302fba31c6081e97532 WHIRLPOOL d49791b696114f57b685221be5cfe1873a88507810819b2a9aace07da2c2d7535eeaecc6c830df3265ecd1ff352effa509cbb3f24cba7e8afc0dc1468553cce6 +DIST rakudo-2016.05.tar.gz 2786506 SHA256 f3b3236c22ff75427c87dea1fab1dc9a0b4ca3a97296e64a14c3f2695be7a28a SHA512 524a71fa72fc04ed8a04eebe319d68c051d45082ae4ce0894a34b2c08d5dd1f270fd380ffb9a486c1cbad7df20dd96180a11642dc20f2ef343a386ce9df42ac8 WHIRLPOOL 000c74d0c0c26517b2324a20e91d304fafbf4953e028683b84599cc0508e4d79c8324dd78c95fb456e46163b52bb5615e30ec034813df10c8762a3362ae77fae 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 0000000..3f4532f --- /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/files/rakudo-jna-lib.patch b/dev-lang/rakudo/files/rakudo-jna-lib.patch deleted file mode 100644 index 3f4532f..0000000 --- a/dev-lang/rakudo/files/rakudo-jna-lib.patch +++ /dev/null @@ -1,21 +0,0 @@ -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-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 } diff --git a/dev-lang/rakudo/rakudo-2016.04-r3.ebuild b/dev-lang/rakudo/rakudo-2016.04-r3.ebuild deleted file mode 100644 index cd55aa5..0000000 --- a/dev-lang/rakudo/rakudo-2016.04-r3.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=6 - -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="" -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=]" -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}/${PN}-jna-lib.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 -} - -src_configure() { - local backends - use java && backends+="jvm," - use moar && backends+="moar" - - local myargs=( - "--prefix=/usr" - "--sysroot=/" - "--sdkroot=/" - "--backends=${backends}" - ) - - perl Configure.pl "${myargs[@]}" - - 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 -} diff --git a/dev-lang/rakudo/rakudo-2016.05.ebuild b/dev-lang/rakudo/rakudo-2016.05.ebuild new file mode 100644 index 0000000..4f24e11 --- /dev/null +++ b/dev-lang/rakudo/rakudo-2016.05.ebuild @@ -0,0 +1,79 @@ +# 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=]" +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-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 uninstalling it before" + ewarn "reporting a bug." + 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 +} diff --git a/dev-lang/rakudo/rakudo-9999.ebuild b/dev-lang/rakudo/rakudo-9999.ebuild new file mode 100644 index 0000000..4f24e11 --- /dev/null +++ b/dev-lang/rakudo/rakudo-9999.ebuild @@ -0,0 +1,79 @@ +# 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=]" +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-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 uninstalling it before" + ewarn "reporting a bug." + 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 +} diff --git a/tools/chroot-here.sh b/tools/chroot-here.sh index c7291a1..7c20805 100755 --- a/tools/chroot-here.sh +++ b/tools/chroot-here.sh @@ -147,7 +147,7 @@ MOUNT_PATHS=( usr/portage proc sys dev dev/pts dev/shm ) #if [[ -d "./${ARCH}-chroot" ]] #then - echo -n "Erase './'? [y/N] " + echo -n "Erase '${PWD}/*'? [y/N] " read -n1 -r response if [[ "${response}" == "y" ]] then -- cgit v1.2.3-65-gdbad