forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-lang/rakudo: Bump, patches thanks to flussence
Package-Manager: portage-2.2.26
- Loading branch information
1 parent
0cf5efc
commit 9639bc8
Showing
5 changed files
with
275 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
dev-lang/rakudo/files/2015.12/0001-Fix-make-install-when-nqp-is-distro-installed.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
From fb00ed3d71f9407a776c82f03855d1242997878c Mon Sep 17 00:00:00 2001 | ||
From: Anthony Parsons <[email protected]> | ||
Date: Sat, 26 Dec 2015 19:37:18 +0000 | ||
Subject: [PATCH] Fix `make install` when nqp is distro-installed | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=UTF-8 | ||
Content-Transfer-Encoding: 8bit | ||
|
||
During the installation process, tools/build/install-core-dist.pl is called to | ||
precompile the bundled non-CORE.setting libraries such as Test.pm. The way this | ||
was initially coded, it pulled the install path from NQP's build-time | ||
configuration, which will be a root-owned filesystem path if NQP was installed | ||
via a system package manager. | ||
|
||
Other parts of the CompUnit code will see these paths don't exist, and attempt | ||
to helpfully call `mkdir` on them which brings the whole process to a messy end. | ||
This part usually works fine when building everything from a git checkout, | ||
because Moar/NQP/Rakudo all default to an installation prefix the user has write | ||
access to. | ||
|
||
This patch fixes that step of the build process by passing the makefile's path | ||
prefixes to install-core-dist.pl (ensuring precompilation output goes to the | ||
right place), and modifying it to *only* use that path (ensuring it doesn't try | ||
to mkdir where it shouldn't). This isn't a 100% solution, but it fixes enough | ||
to unblock packaging work on a few distros. | ||
|
||
Thanks to mst++ for doing almost all of the legwork here, crux++ for an initial | ||
patch that gave us a few pointers to work from, and nine++ for giving us some | ||
Boxing Day fun ☺ | ||
--- | ||
tools/build/Makefile-JVM.in | 2 +- | ||
tools/build/Makefile-Moar.in | 2 +- | ||
tools/build/install-core-dist.pl | 3 ++- | ||
3 files changed, 4 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/tools/build/Makefile-JVM.in b/tools/build/Makefile-JVM.in | ||
index 11e17810265d..0a3095114e0a 100644 | ||
--- a/tools/build/Makefile-JVM.in | ||
+++ b/tools/build/Makefile-JVM.in | ||
@@ -391,7 +391,7 @@ j-install: j-all tools/build/create-jvm-runner.pl tools/build/install-core-dist. | ||
$(MKPATH) $(DESTDIR)$(PERL6_LANG_DIR)/site/resources | ||
$(MKPATH) $(DESTDIR)$(PERL6_LANG_DIR)/site/bin | ||
$(MKPATH) $(DESTDIR)$(PERL6_LANG_DIR)/site/short | ||
- .@slash@$(J_RUNNER) tools/build/install-core-dist.pl | ||
+ .@slash@$(J_RUNNER) tools/build/install-core-dist.pl $(DESTDIR)$(PERL6_LANG_DIR) | ||
$(PERL) tools/build/create-jvm-runner.pl install "$(DESTDIR)" $(PREFIX) $(NQP_PREFIX) $(NQP_JARS) | ||
$(PERL) tools/build/create-jvm-runner.pl install-debug "$(DESTDIR)" $(PREFIX) $(NQP_PREFIX) $(NQP_JARS) | ||
|
||
diff --git a/tools/build/Makefile-Moar.in b/tools/build/Makefile-Moar.in | ||
index 1e586d92a1fa..670b89c20774 100644 | ||
--- a/tools/build/Makefile-Moar.in | ||
+++ b/tools/build/Makefile-Moar.in | ||
@@ -246,7 +246,7 @@ m-install: m-all tools/build/create-moar-runner.pl tools/build/install-core-dist | ||
$(MKPATH) $(DESTDIR)$(PERL6_LANG_DIR)/site/resources | ||
$(MKPATH) $(DESTDIR)$(PERL6_LANG_DIR)/site/bin | ||
$(MKPATH) $(DESTDIR)$(PERL6_LANG_DIR)/site/short | ||
- .@slash@$(M_RUNNER) tools/build/install-core-dist.pl | ||
+ .@slash@$(M_RUNNER) tools/build/install-core-dist.pl $(DESTDIR)$(PERL6_LANG_DIR) | ||
$(PERL) tools/build/create-moar-runner.pl "$(MOAR)" perl6.moarvm $(DESTDIR)$(PREFIX)/bin/perl6-m "$(PERL6_LANG_DIR)/runtime" "" "$(M_LIBPATH)" "$(PERL6_LANG_DIR)/lib" "$(PERL6_LANG_DIR)/runtime" | ||
$(PERL) tools/build/create-moar-runner.pl "$(MOAR)" perl6-debug.moarvm $(DESTDIR)$(PREFIX)/bin/perl6-debug-m "$(PERL6_LANG_DIR)/runtime" "" "$(M_LIBPATH)" "$(PERL6_LANG_DIR)/lib" "$(PERL6_LANG_DIR)/runtime" | ||
$(CHMOD) 755 $(DESTDIR)$(PREFIX)/bin/perl6-m$(M_BAT) | ||
diff --git a/tools/build/install-core-dist.pl b/tools/build/install-core-dist.pl | ||
index 0990b2676a10..ba14b20828d8 100644 | ||
--- a/tools/build/install-core-dist.pl | ||
+++ b/tools/build/install-core-dist.pl | ||
@@ -9,7 +9,8 @@ my %provides = | ||
"experimental" => "lib/experimental.pm6", | ||
; | ||
|
||
-CompUnit::RepositoryRegistry.repository-for-name('perl').install( | ||
+PROCESS::<$REPO> := CompUnit::RepositoryRegistry.repository-for-spec("inst#@*ARGS[0]"); | ||
+$*REPO.install( | ||
Distribution.new( | ||
name => "CORE", | ||
auth => "perl", | ||
-- | ||
2.6.4 | ||
|
27 changes: 27 additions & 0 deletions
27
dev-lang/rakudo/files/2015.12/0002-Add-RAKUDO_PRECOMP_PREFIX-env-var.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From 4fe18ce14c87c4d63f18db3c38cf32733ba72c31 Mon Sep 17 00:00:00 2001 | ||
From: Anthony Parsons <[email protected]> | ||
Date: Sun, 27 Dec 2015 02:02:22 +0000 | ||
Subject: [PATCH 2/2] Add RAKUDO_PRECOMP_PREFIX env var | ||
|
||
As suggested by nine++, with some name tweaking | ||
--- | ||
docs/running.pod | 6 ++++++ | ||
src/core/CompUnit/RepositoryRegistry.pm | 2 +- | ||
2 files changed, 7 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/src/core/CompUnit/RepositoryRegistry.pm b/src/core/CompUnit/RepositoryRegistry.pm | ||
index f70f22105849..e628ee659c7c 100644 | ||
--- a/src/core/CompUnit/RepositoryRegistry.pm | ||
+++ b/src/core/CompUnit/RepositoryRegistry.pm | ||
@@ -75,7 +75,7 @@ class CompUnit::RepositoryRegistry { | ||
} | ||
#?endif | ||
|
||
- my $prefix := nqp::p6box_s( | ||
+ my $prefix := %*ENV<RAKUDO_PRECOMP_PREFIX> // nqp::p6box_s( | ||
nqp::concat(nqp::atkey(nqp::backendconfig,'prefix'),'/share/perl6') | ||
); | ||
|
||
-- | ||
2.6.4 | ||
|
125 changes: 125 additions & 0 deletions
125
dev-lang/rakudo/files/2015.12/0003-Rewrite-and-complete-the-manpage-s-env-var-list.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
From c6d759c5df9ae4cb539717ecba99f80efe35d9ac Mon Sep 17 00:00:00 2001 | ||
From: Anthony Parsons <[email protected]> | ||
Date: Sun, 27 Dec 2015 01:28:19 +0000 | ||
Subject: [PATCH 1/2] Rewrite and complete the manpage's env var list | ||
|
||
This includes everything I could find with an `ack 'ENV<' src/` command. | ||
Descriptions have been expanded on, expected datatypes are shown, and items are | ||
now broken up into categories. | ||
--- | ||
docs/running.pod | 81 +++++++++++++++++++++++++++++++++++++++++++++----------- | ||
1 file changed, 66 insertions(+), 15 deletions(-) | ||
|
||
diff --git a/docs/running.pod b/docs/running.pod | ||
index 9ed7571df54e..53fb577c8481 100644 | ||
--- a/docs/running.pod | ||
+++ b/docs/running.pod | ||
@@ -44,39 +44,90 @@ The supported values for C<--target> are: | ||
For C<--profile-filename>, specifying a name ending in C<.json> will write a raw JSON profile dump. | ||
The default if this is omitted is C<profile-I<[timestamp]>.html>. | ||
|
||
-=head1 List of env vars used in Rakudo | ||
+=head1 ENVIRONMENT VARIABLES | ||
+ | ||
+Rakudo's behavior can be tweaked by a (growing) number of environment variables; this section | ||
+attempts to document all those currently in use. | ||
+ | ||
+=head2 Module Loading | ||
+ | ||
+=over | ||
+ | ||
+=item C<RAKUDOLIB>, C<PERL6LIB> (I<Str>; F<src/core/Inc.pm>) | ||
+ | ||
+Appends a comma-delimited list of paths to C<@INC>. C<RAKUDOLIB> is evaluated first. | ||
+ | ||
+=item C<RAKUDO_MODULE_DEBUG> (I<Bool>; F<src/Perl6/ModuleLoader.pm>) | ||
+ | ||
+Causes the module loader to print debugging information to standard error. | ||
+ | ||
+=back | ||
+ | ||
+=head2 Error Message Verbosity and Strictness | ||
|
||
=over | ||
|
||
-=item C<RAKUDOLIB>, C<PERL6LIB> (src/core/Inc.pm) | ||
+=item C<RAKUDO_NO_DEPRECATIONS> (I<Bool>; F<src/core/Deprecations.pm>) | ||
+ | ||
+If true, suppresses deprecation warnings triggered by the C<is DEPRECATED> trait. | ||
|
||
-Appends a delimited list of paths to C<@INC>. C<RAKUDOLIB> is evaluated first. | ||
+=item C<RAKUDO_DEPRECATIONS_FATAL> (I<Bool>; F<src/core/Deprecations.pm>) | ||
|
||
-=item C<RAKUDO_MODULE_DEBUG> (src/Perl6/ModuleLoader.pm) | ||
+If true, deprecation warnings become thrown exceptions. | ||
|
||
-If set to a non-false value, causes the module loader to print debugging information to standard | ||
-error. | ||
+=item C<RAKUDO_VERBOSE_STACKFRAME> (I<UInt>; F<src/core/Backtrace.pm>) | ||
|
||
-=item C<RAKUDO_ERROR_COLOR> (src/core/Exception.pm) | ||
+Displays source code in stack frames surrounded by the specified number of lines of context. | ||
+ | ||
+=item C<RAKUDO_BACKTRACE_SETTING> (I<Bool>; F<src/core/Backtrace.pm>) | ||
+ | ||
+Controls whether .setting files are included in backtraces. | ||
+ | ||
+=back | ||
+ | ||
+=head2 Affecting Precompilation | ||
+ | ||
+=over | ||
+ | ||
+=item C<RAKUDO_PRECOMP_DIST> (F<src/core/CompUnit/PrecompilationRepository.pm>) | ||
+ | ||
+=item C<RAKUDO_PRECOMP_LOADING> (F<src/core/CompUnit/PrecompilationRepository.pm>) | ||
+ | ||
+=item C<RAKUDO_PRECOMP_WITH> (F<src/core/CompUnit/PrecompilationRepository.pm>) | ||
+ | ||
+These are internal variables for passing serialized state to precompilation jobs in child processes. | ||
+Please do not set them manually. | ||
+ | ||
+=back | ||
+ | ||
+=head2 Other | ||
+ | ||
+=over | ||
+ | ||
+=item C<RAKUDO_ERROR_COLOR> (I<Bool>; F<src/core/Exception.pm>) | ||
|
||
Controls whether to emit ANSI codes for error highlighting. Defaults to true if unset, except on | ||
Win32. | ||
|
||
-=item C<RAKUDO_MAX_THREADS> (src/core/ThreadPoolScheduler.pm) | ||
+=item C<RAKUDO_MAX_THREADS> (I<UInt>; F<src/core/ThreadPoolScheduler.pm>) | ||
|
||
-Controls the maximum number of threads used by a thread pool. | ||
+Override the default maximum number of threads used by a thread pool. | ||
|
||
-=item C<RAKUDO_NO_DEPRECATIONS> (src/core/Deprecations.pm) | ||
+=item C<TMPDIR>, C<TEMP>, C<TMP> (I<Str>; F<src/core/IO/Spec/>) | ||
|
||
-If set, suppresses deprecation warnings. | ||
+The C<IO::Spec::Unix.tmpdir> method will return C<$TMPDIR> if it points to a directory with full | ||
+access permissions for the current user, with a fallback default of C<'/tmp'>. | ||
|
||
-=item C<RAKUDO_VERBOSE_STACKFRAME> (src/core/Backtrace.pm) | ||
+C<IO::Spec::Cygwin> and C<IO::Spec::Win32> use more Win32-appropriate lists which also include the | ||
+C<%TEMP%> and C<%TMP%> environment variables. | ||
|
||
-Controls stack frame verbosity. | ||
+=item C<PATH>, C<Path> (I<Str>; F<src/core/IO/Spec/>) | ||
|
||
-=item C<RAKUDO_BACKTRACE_SETTING> (src/core/Backtrace.pm) | ||
+The C<IO::Spec::Unix.path> method splits C<$PATH> as a shell would; i.e. as a colon-separated list. | ||
+C<IO::Spec::Cygwin> inherits this from C<IO::Spec::Unix>. | ||
|
||
-Controls whether .setting files are included in backtraces. | ||
+C<IO::Spec::Win32.path> will read the first defined of either C<%PATH%> or C<%Path%> as a | ||
+semicolon-delimited list. | ||
|
||
=back | ||
|
||
-- | ||
2.6.4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright 1999-2016 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI=6 | ||
|
||
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 | ||
else | ||
SRC_URI="${HOMEPAGE}/downloads/${PN}/${P}.tar.gz" | ||
fi | ||
|
||
LICENSE="Artistic-2" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
# TODO: add USE="javascript" once that's usable in nqp | ||
IUSE="java +moar test" | ||
REQUIRED_USE="|| ( java moar )" | ||
|
||
RDEPEND="=dev-lang/nqp-${PV}*:=[moar?,java?]" | ||
DEPEND="${RDEPEND} | ||
>=dev-lang/perl-5.10" | ||
|
||
PATCHES=(${FILESDIR}/${PV}) | ||
|
||
src_configure() { | ||
local BACKENDS | ||
|
||
# The order of this list determines which gets installed as "perl6" | ||
use moar && BACKENDS+="moar," | ||
use java && BACKENDS+="jvm," | ||
#use javascript && BACKENDS+="js," | ||
|
||
perl Configure.pl --prefix=/usr --sysroot=/usr --backends=$BACKENDS | ||
} | ||
|
||
src_test() { | ||
export RAKUDO_PRECOMP_PREFIX=$(mktemp -d) | ||
default | ||
} |