diff options
author | 2016-04-28 15:45:26 +0200 | |
---|---|---|
committer | 2016-04-28 15:45:26 +0200 | |
commit | 95955b5e72777d1f8bf98b2539fb53c471323ca0 (patch) | |
tree | d6ea94d37f797ac7d2206ae4624c6edf15a80855 | |
parent | remove old cruft (diff) | |
download | tbc-95955b5e72777d1f8bf98b2539fb53c471323ca0.tar.gz tbc-95955b5e72777d1f8bf98b2539fb53c471323ca0.tar.bz2 tbc-95955b5e72777d1f8bf98b2539fb53c471323ca0.zip |
add rakudo et.al.
-rw-r--r-- | dev-lang/moarvm/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/moarvm/files/Configure-2016.03.patch | 145 | ||||
-rw-r--r-- | dev-lang/moarvm/metadata.xml | 23 | ||||
-rw-r--r-- | dev-lang/moarvm/moarvm-2016.04.ebuild | 68 | ||||
-rw-r--r-- | dev-lang/moarvm/moarvm-9999.ebuild | 68 | ||||
-rw-r--r-- | dev-lang/nqp/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/nqp/files/enable-external-jars.patch | 214 | ||||
-rw-r--r-- | dev-lang/nqp/metadata.xml | 19 | ||||
-rw-r--r-- | dev-lang/nqp/nqp-2016.04.ebuild | 87 | ||||
-rw-r--r-- | dev-lang/nqp/nqp-9999.ebuild | 87 | ||||
-rw-r--r-- | dev-lang/rakudo/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/rakudo/files/rakudo-2016.03-Makefile.in.patch | 17 | ||||
-rw-r--r-- | dev-lang/rakudo/metadata.xml | 16 | ||||
-rw-r--r-- | dev-lang/rakudo/rakudo-2016.04.ebuild | 84 | ||||
-rw-r--r-- | dev-lang/rakudo/rakudo-9999.ebuild | 84 | ||||
-rw-r--r-- | profiles/base/package.use.mask | 15 |
16 files changed, 930 insertions, 0 deletions
diff --git a/dev-lang/moarvm/Manifest b/dev-lang/moarvm/Manifest new file mode 100644 index 0000000..99ca671 --- /dev/null +++ b/dev-lang/moarvm/Manifest @@ -0,0 +1 @@ +DIST MoarVM-2016.04.tar.gz 3332850 SHA256 6fe9000daada59535747f2557cc73573241ba8a6044271caf1647aa37be33c6d SHA512 ef22145c9f7c32d7d12192cee63f286544500adff40fc2dbaad677d57108bc6efedc348fe8ddf460fe12d2c6b282e885bcb74fb3bcaa1e06b7719754175afe7d WHIRLPOOL e314f80cd785d31768630798647d7f445831bb29aaded88ef32326df3f4705a5d3fba2da00fce6888a2256b57aeb838922e94c3096250d30112f2be2bfacbb92 diff --git a/dev-lang/moarvm/files/Configure-2016.03.patch b/dev-lang/moarvm/files/Configure-2016.03.patch new file mode 100644 index 0000000..6fd46c2 --- /dev/null +++ b/dev-lang/moarvm/files/Configure-2016.03.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", <<TERM, "\n"; + make: $config{make} + compile: $config{cc} $config{cflags} ++ includes: $config{cincludes} + link: $config{ld} $config{ldflags} + libs: $config{ldlibs} + +@@ -873,6 +917,10 @@ Build and install MoarVM in addition to configuring it. + + =item --has-libffi + ++=item --pkgconfig=/path/to/pkgconfig/executable ++ ++Provide path to the pkgconfig executable. Default: /usr/bin/pkg-config ++ + =item --no-jit + + Disable JIT compiler, which is enabled by default to JIT-compile hot frames. +diff --git a/build/Makefile.in b/build/Makefile.in +index 56a4c8a..b94e847 100644 +--- a/build/Makefile.in ++++ b/build/Makefile.in +@@ -454,9 +454,6 @@ install: all + $(CP) src/strings/*.h $(DESTDIR)$(PREFIX)/include/moar/strings + $(CP) src/jit/*.h $(DESTDIR)$(PREFIX)/include/moar/jit + $(CP) src/instrument/*.h $(DESTDIR)$(PREFIX)/include/moar/instrument +- $(MKPATH) $(DESTDIR)$(PREFIX)/include/libuv +- $(MKPATH) $(DESTDIR)$(PREFIX)/include/libtommath +- $(CP) 3rdparty/libuv/include/*.h $(DESTDIR)$(PREFIX)/include/libuv + @install@ + + lib: @moar@ +diff --git a/build/setup.pm b/build/setup.pm +index 324cc88..c87d79e 100755 +--- a/build/setup.pm ++++ b/build/setup.pm +@@ -125,7 +125,7 @@ our %TC_POSIX = ( + ccshared => '-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..dffa018 --- /dev/null +++ b/dev-lang/moarvm/metadata.xml @@ -0,0 +1,23 @@ +<?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> + <use> + <flag name="asan">Enable clang's Address Sanitizer functionality. Expect longer compile time.</flag> + <flag name="clang">Use clang compiler instead of GCC</flag> + <flag name="jit">Enable Just-In-Time-Compiler. Has no effect except on AMD64 and Darwin.</flag> + <flag name="optimize">Enable optimization via CFLAGS</flag> + <flag name="system-libs">Link against the system's shared libraries</flag> + <flag name="ubsan">Enable clang's Undefined Behavior Sanitizer functionality. Expect longer compile time.</flag> + </use> + <upstream> + <remote-id type="github">MoarVM/MoarVM</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-lang/moarvm/moarvm-2016.04.ebuild b/dev-lang/moarvm/moarvm-2016.04.ebuild new file mode 100644 index 0000000..9016af7 --- /dev/null +++ b/dev-lang/moarvm/moarvm-2016.04.ebuild @@ -0,0 +1,68 @@ +# 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="https://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.03.patch" ) +DOCS=( CREDITS README.markdown ) + +# Tests are conducted via nqp +RESTRICT=test + +src_prepare() { + eapply "${PATCHES[@]}" + eapply_user + use doc && DOCS+=( docs/* ) +} + +src_configure() { + 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..9016af7 --- /dev/null +++ b/dev-lang/moarvm/moarvm-9999.ebuild @@ -0,0 +1,68 @@ +# 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="https://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.03.patch" ) +DOCS=( CREDITS README.markdown ) + +# Tests are conducted via nqp +RESTRICT=test + +src_prepare() { + eapply "${PATCHES[@]}" + eapply_user + use doc && DOCS+=( docs/* ) +} + +src_configure() { + 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 new file mode 100644 index 0000000..19088f1 --- /dev/null +++ b/dev-lang/nqp/Manifest @@ -0,0 +1 @@ +DIST nqp-2016.04.tar.gz 5156494 SHA256 9176422eb2a99db24ab520bc78686f3a2c008ba73bf8c7091a790985f5061019 SHA512 5dcb685a90b26fee3e8dac3ca24da11bd967d034b5328232d18d9db37e27645b57259cabf54ef8e10b3ac508b1aa784072f0a9542d30168d3017f86e610c3cee WHIRLPOOL 0711e1471740b0ed181f9e4504f810a084056e74650c0ffb1c6c17e2976b2c1facb6a7e73df5d991d9ffe43f055fe844f0756dbd816375708b4d499a0f7a9162 diff --git a/dev-lang/nqp/files/enable-external-jars.patch b/dev-lang/nqp/files/enable-external-jars.patch new file mode 100644 index 0000000..cf5d4bd --- /dev/null +++ b/dev-lang/nqp/files/enable-external-jars.patch @@ -0,0 +1,214 @@ +diff --git a/Configure.pl b/Configure.pl +index 2064ac8..73e2d27 100755 +--- a/Configure.pl ++++ b/Configure.pl +@@ -34,6 +34,7 @@ MAIN: { + 'no-clean', + 'with-parrot=s', 'gen-parrot:s', 'parrot-config=s', 'parrot-option=s@', + 'with-moar=s', 'gen-moar:s', 'moar-option=s@', ++ 'with-asm=s', 'with-asm-tree=s', 'with-jline=s', 'with-jna=s', + 'make-install!', 'makefile-timing!', + 'git-protocol=s', + 'git-depth=s', 'git-reference=s',); +@@ -50,6 +51,53 @@ MAIN: { + "Use --prefix to specify a directory in which parrot is installed."; + } + ++ if ($options{'with-asm'}) { ++ if ($options{'with-asm'} ne '-') { ++ $config{'asm'} = $options{'with-asm'}; ++ } ++ } else { ++ $config{'asm'} = "3rdparty/asm/asm-4.1.jar"; ++ } ++ if ($options{'with-asm-tree'}) { ++ if ($options{'with-asm-tree'} ne '-') { ++ $config{'asmtree'} = $options{'with-asm-tree'}; ++ } ++ } else { ++ $config{'asmtree'} = "3rdparty/asm/asm-tree-4.1.jar"; ++ } ++ if ($options{'with-jline'}) { ++ if ($options{'with-jline'} ne '-') { ++ $config{'jline'} = $options{'with-jline'}; ++ } ++ } else { ++ $config{'jline'} = "3rdparty/jline/jline-1.0.jar"; ++ } ++ if ($options{'with-jna'}) { ++ if ($options{'with-jna'} ne '-') { ++ $config{'jna'} = $options{'with-jna'}; ++ } ++ } else { ++ $config{'jna'} = "3rdparty/jna/jna.jar"; ++ } ++ ++ if ($^O eq 'MSWin32') { ++ $config{'asmfile'} = $config{'asm'}; ++ $config{'asmfile'} =~ s/.*\\//; ++ $config{'jlinefile'} = $config{'jline'}; ++ $config{'jlinefile'} =~ s/.*\\//; ++ } else { ++ $config{'asmfile'} = $config{'asm'}; ++ $config{'asmfile'} =~ s/.*\///; ++ $config{'jlinefile'} = $config{'jline'}; ++ $config{'jlinefile'} =~ s/.*\///; ++ } ++ ++ fill_template_file( ++ 'tools/build/install-jvm-runner.pl.in', ++ 'tools/build/install-jvm-runner.pl', ++ %config, ++ ); ++ + my $default_backend; + my @backends; + my %backends; +@@ -357,6 +405,11 @@ General Options: + --gen-moar Download and build a copy of MoarVM to use + --moar-option='--option=value' + Options to pass to MoarVM configuration for --gen-moar ++ --with-asm='/path/to/jar' ++ --with-asm-tree='/path/to/jar' ++ --with-jline='/path/to/jar' ++ --with-jna='/path/to/jar' ++ Provide paths to already installed jars + --git-protocol={ssh,https,git} + Protocol to use for git clone. Default: https + --make-install Immediately run `MAKE install` after configuring +diff --git a/tools/build/Makefile-JVM.in b/tools/build/Makefile-JVM.in +index 27959ad..c19965a 100644 +--- a/tools/build/Makefile-JVM.in ++++ b/tools/build/Makefile-JVM.in +@@ -2,7 +2,6 @@ BAT = @bat@ + JAVA = java + JAVAC = javac + JAR = jar +-ASM = 3rdparty/asm/ + J_RUNNER = nqp-j$(BAT) + + NQP_JAR_DIR = $(NQP_LANG_DIR)/runtime +@@ -18,7 +17,11 @@ RUNTIME_JAVAS = \ + + RUNTIME_JAR = nqp-runtime.jar + +-THIRDPARTY_JARS = $(ASM)asm-4.1.jar@cpsep@$(ASM)asm-tree-4.1.jar@cpsep@3rdparty/jline/jline-1.0.jar@cpsep@3rdparty/jna/jna.jar ++ASM = @asm@ ++ASMTREE = @asmtree@ ++JLINE = @jline@ ++JNA = @jna@ ++THIRDPARTY_JARS = $(ASM)@cpsep@$(ASMTREE)@cpsep@$(JLINE)@cpsep@$(JNA) + J_STAGE0 = src/vm/jvm/stage0 + J_STAGE1 = $(JVM_BUILD_DIR)/stage1 + J_STAGE2 = $(JVM_BUILD_DIR)/stage2 +@@ -80,8 +83,8 @@ j-install: j-all + $(MKPATH) $(DESTDIR)$(BIN_DIR) + $(MKPATH) $(DESTDIR)$(NQP_JAR_DIR) + $(MKPATH) $(DESTDIR)$(NQP_LIB_DIR) +- $(CP) 3rdparty/asm/asm-4.1.jar 3rdparty/asm/asm-tree-4.1.jar $(DESTDIR)$(NQP_JAR_DIR) +- $(CP) 3rdparty/jline/jline-1.0.jar 3rdparty/jna/jna.jar $(DESTDIR)$(NQP_JAR_DIR) ++ $(CP) $(ASM) $(ASMTREE) $(DESTDIR)$(NQP_JAR_DIR) ++ $(CP) $(JLINE) $(JNA) $(DESTDIR)$(NQP_JAR_DIR) + $(CP) $(RUNTIME_JAR) $(DESTDIR)$(NQP_JAR_DIR) + $(CP) $(NQP_MO_JAR) $(MODULE_LOADER_JAR) $(DESTDIR)$(NQP_LIB_DIR) + $(CP) $(CORE_SETTING_JAR) $(QASTNODE_JAR) $(QREGEX_JAR) $(DESTDIR)$(NQP_LIB_DIR) +diff --git a/tools/build/install-jvm-runner.pl b/tools/build/install-jvm-runner.pl +deleted file mode 100644 +index 14541d6..0000000 +--- a/tools/build/install-jvm-runner.pl ++++ /dev/null +@@ -1,44 +0,0 @@ +-#!/usr/bin/perl +-# Copyright (C) 2013, The Perl Foundation. +- +-use strict; +-use warnings; +-use 5.008; +-use File::Spec; +- +-my ($destdir, $prefix) = @ARGV; +-my $realpath = $destdir.$prefix; +- +-unless (File::Spec->file_name_is_absolute($prefix)) { +- $prefix = File::Spec->rel2abs($prefix); +-} +- +-if ($^O eq 'MSWin32') { +- my $jar_dir = File::Spec->catfile($prefix, 'share', 'nqp', 'runtime'); +- my $lib_dir = File::Spec->catfile($prefix, 'share', 'nqp', 'lib'); +- my $install_to = File::Spec->catfile($realpath, 'bin', 'nqp-j.bat'); +- +- open my $fh, ">", $install_to +- or die "Could not open $install_to: $!"; +- print $fh '@java -Xss1m -Xmx512m -Xbootclasspath/a:' . $jar_dir . '\\nqp-runtime.jar;' . +- "$jar_dir\\asm-4.1.jar;$jar_dir\\jline-1.0.jar;$lib_dir\\nqp.jar -cp $lib_dir nqp %*\n"; +- close $fh +- or die "Could not close $install_to: $!"; +-} +-else { +- my $nqp_dir = File::Spec->catfile($prefix, qw/share nqp/); +- my $jar_dir = File::Spec->catfile('${NQP_DIR}', 'runtime'); +- my $lib_dir = File::Spec->catfile('${NQP_DIR}', 'lib'); +- my $jars = "$jar_dir/nqp-runtime.jar:$jar_dir/asm-4.1.jar:$jar_dir/jline-1.0.jar:$lib_dir/nqp.jar"; +- my $install_to = File::Spec->catfile($realpath, 'bin', 'nqp-j'); +- +- open my $fh, ">", $install_to +- or die "Could not open $install_to: $!"; +- print $fh "#!/bin/sh\n"; +- print $fh ": \${NQP_DIR:=\"$nqp_dir\"}\n"; +- print $fh ": \${NQP_JARS:=\"$jars\"}\n"; +- print $fh "exec java -Xss1m -Xmx512m -Xbootclasspath/a:\${NQP_JARS} -cp $lib_dir nqp \"\$\@\"\n"; +- close $fh +- or die "Could not close $install_to: $!"; +- chmod 0755, $install_to; +-} +diff --git a/tools/build/install-jvm-runner.pl.in b/tools/build/install-jvm-runner.pl.in +new file mode 100644 +index 0000000..92a1109 +--- /dev/null ++++ b/tools/build/install-jvm-runner.pl.in +@@ -0,0 +1,44 @@ ++#!/usr/bin/perl ++# Copyright (C) 2013, The Perl Foundation. ++ ++use strict; ++use warnings; ++use 5.008; ++use File::Spec; ++ ++my ($destdir, $prefix) = @ARGV; ++my $realpath = $destdir.$prefix; ++ ++unless (File::Spec->file_name_is_absolute($prefix)) { ++ $prefix = File::Spec->rel2abs($prefix); ++} ++ ++if ($^O eq 'MSWin32') { ++ my $jar_dir = File::Spec->catfile($prefix, 'share', 'nqp', 'runtime'); ++ my $lib_dir = File::Spec->catfile($prefix, 'share', 'nqp', 'lib'); ++ my $install_to = File::Spec->catfile($realpath, 'bin', 'nqp-j.bat'); ++ ++ open my $fh, ">", $install_to ++ or die "Could not open $install_to: $!"; ++ print $fh '@java -Xss1m -Xmx512m -Xbootclasspath/a:' . $jar_dir . '\\nqp-runtime.jar;' . ++ "$jar_dir\\@asmfile@;$jar_dir\\@jlinefile@;$lib_dir\\nqp.jar -cp $lib_dir nqp %*\n"; ++ close $fh ++ or die "Could not close $install_to: $!"; ++} ++else { ++ my $nqp_dir = File::Spec->catfile($prefix, qw/share nqp/); ++ my $jar_dir = File::Spec->catfile('${NQP_DIR}', 'runtime'); ++ my $lib_dir = File::Spec->catfile('${NQP_DIR}', 'lib'); ++ my $jars = "$jar_dir/nqp-runtime.jar:$jar_dir/@asmfile@:$jar_dir/@jlinefile@:$lib_dir/nqp.jar"; ++ my $install_to = File::Spec->catfile($realpath, 'bin', 'nqp-j'); ++ ++ open my $fh, ">", $install_to ++ or die "Could not open $install_to: $!"; ++ print $fh "#!/bin/sh\n"; ++ print $fh ": \${NQP_DIR:=\"$nqp_dir\"}\n"; ++ print $fh ": \${NQP_JARS:=\"$jars\"}\n"; ++ print $fh "exec java -Xss1m -Xmx512m -Xbootclasspath/a:\${NQP_JARS} -cp $lib_dir nqp \"\$\@\"\n"; ++ close $fh ++ or die "Could not close $install_to: $!"; ++ chmod 0755, $install_to; ++} diff --git a/dev-lang/nqp/metadata.xml b/dev-lang/nqp/metadata.xml new file mode 100644 index 0000000..620f2ca --- /dev/null +++ b/dev-lang/nqp/metadata.xml @@ -0,0 +1,19 @@ +<?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> + <use> + <flag name="clang">Toggle usage of the clang compiler in conjunction with MoarVM</flag> + <flag name="moar">Build the MoarVM backend (experimental/broken)</flag> + </use> + <upstream> + <remote-id type="github">perl6/nqp</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-lang/nqp/nqp-2016.04.ebuild b/dev-lang/nqp/nqp-2016.04.ebuild new file mode 100644 index 0000000..4354072 --- /dev/null +++ b/dev-lang/nqp/nqp-2016.04.ebuild @@ -0,0 +1,87 @@ +# 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 test" +REQUIRED_USE="|| ( java moar )" + +RDEPEND="java? ( >=virtual/jre-1.7:* + 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() { + # 2016.04 doesn't like our jna-3.4.1 + # keep testing against it + local backends + use java && backends+="jvm," + use moar && backends+="moar" + local myconfargs=( + "--backend=${backends}" + "--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$')" + "--prefix=/usr" ) + perl Configure.pl "${myconfargs[@]}" || die +} + +src_compile() { + MAKEOPTS=-j1 emake +} + +src_test() { + MAKEOPTS=-j1 emake test +} + +src_install() { + emake DESTDIR="${ED}" install || die + + dodoc CREDITS README.pod || die + + if use doc; then + dodoc -r docs/* || die + fi +} diff --git a/dev-lang/nqp/nqp-9999.ebuild b/dev-lang/nqp/nqp-9999.ebuild new file mode 100644 index 0000000..4354072 --- /dev/null +++ b/dev-lang/nqp/nqp-9999.ebuild @@ -0,0 +1,87 @@ +# 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 test" +REQUIRED_USE="|| ( java moar )" + +RDEPEND="java? ( >=virtual/jre-1.7:* + 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() { + # 2016.04 doesn't like our jna-3.4.1 + # keep testing against it + local backends + use java && backends+="jvm," + use moar && backends+="moar" + local myconfargs=( + "--backend=${backends}" + "--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$')" + "--prefix=/usr" ) + perl Configure.pl "${myconfargs[@]}" || die +} + +src_compile() { + MAKEOPTS=-j1 emake +} + +src_test() { + MAKEOPTS=-j1 emake test +} + +src_install() { + emake DESTDIR="${ED}" install || die + + dodoc CREDITS README.pod || die + + if use doc; then + dodoc -r docs/* || die + fi +} diff --git a/dev-lang/rakudo/Manifest b/dev-lang/rakudo/Manifest new file mode 100644 index 0000000..34951ea --- /dev/null +++ b/dev-lang/rakudo/Manifest @@ -0,0 +1 @@ +DIST rakudo-2016.04.tar.gz 2706659 SHA256 207d723c9b2d524daf6008a3ed026ea06773d937e76e0fe79b89bfb7dcd0d92b SHA512 08e718643cfa89edbb8995ab9f350f69053e41cff97b33530dd2eb202d2ab2116d219ef1385717b48f5883665c73a181b1b054c1300db302fba31c6081e97532 WHIRLPOOL d49791b696114f57b685221be5cfe1873a88507810819b2a9aace07da2c2d7535eeaecc6c830df3265ecd1ff352effa509cbb3f24cba7e8afc0dc1468553cce6 diff --git a/dev-lang/rakudo/files/rakudo-2016.03-Makefile.in.patch b/dev-lang/rakudo/files/rakudo-2016.03-Makefile.in.patch new file mode 100644 index 0000000..adafa0d --- /dev/null +++ b/dev-lang/rakudo/files/rakudo-2016.03-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 new file mode 100644 index 0000000..eb9eaa1 --- /dev/null +++ b/dev-lang/rakudo/metadata.xml @@ -0,0 +1,16 @@ +<?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> + <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.ebuild b/dev-lang/rakudo/rakudo-2016.04.ebuild new file mode 100644 index 0000000..9df4c8b --- /dev/null +++ b/dev-lang/rakudo/rakudo-2016.04.ebuild @@ -0,0 +1,84 @@ +# 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.03-Makefile.in.patch" ) + +pkg_pretend() { + if has_version dev-lang/rakudo; then + ewarn "Rakudo is known to fail compilation if it's already" + ewarn "installed. So if it fails, you know what to do." + 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-9999.ebuild b/dev-lang/rakudo/rakudo-9999.ebuild new file mode 100644 index 0000000..9df4c8b --- /dev/null +++ b/dev-lang/rakudo/rakudo-9999.ebuild @@ -0,0 +1,84 @@ +# 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.03-Makefile.in.patch" ) + +pkg_pretend() { + if has_version dev-lang/rakudo; then + ewarn "Rakudo is known to fail compilation if it's already" + ewarn "installed. So if it fails, you know what to do." + 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/profiles/base/package.use.mask b/profiles/base/package.use.mask new file mode 100644 index 0000000..c6b4f3e --- /dev/null +++ b/profiles/base/package.use.mask @@ -0,0 +1,15 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# This file requires >=portage-2.1.1 +# New entries go on top. + +# Matthew Brewer <tomboy64@sina.cn> (21 Apr 2016) +# Upstream supports using Clang's address sanitizer, but apparently +# invokes it wrong. +dev-lang/moarvm asan + +# Johannes Huber <johu@gentoo.org> (21 Apr 2016) +# Unreleased dependency. + |