From ac288f000957d00c26e742df0756d63350046193 Mon Sep 17 00:00:00 2001 From: Tobias Leich Date: Tue, 5 Jan 2016 21:40:28 +0100 Subject: first working post 6.c star --- rakudo-cur-bindir.patch | 83 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 rakudo-cur-bindir.patch (limited to 'rakudo-cur-bindir.patch') diff --git a/rakudo-cur-bindir.patch b/rakudo-cur-bindir.patch new file mode 100644 index 0000000..537a061 --- /dev/null +++ b/rakudo-cur-bindir.patch @@ -0,0 +1,83 @@ +diff --git a/src/core/CompUnit/Repository/Installation.pm b/src/core/CompUnit/Repository/Installation.pm +index 0ece1df..12011fd 100644 +--- a/src/core/CompUnit/Repository/Installation.pm ++++ b/src/core/CompUnit/Repository/Installation.pm +@@ -6,7 +6,7 @@ class CompUnit::Repository::Installation does CompUnit::Repository::Locally does + + my $verbose := nqp::getenvhash; + +- submethod BUILD(:$!prefix, :$!lock, :$!WHICH, :$!next-repo) { } ++ submethod BUILD(:$!prefix, :$!bindir, :$!lock, :$!WHICH, :$!next-repo) { } + + method writeable-path { + $.prefix.w ?? $.prefix !! IO::Path; +@@ -68,7 +68,7 @@ sub MAIN(:$name is copy, :$auth, :$ver, *@, *%) { + exit 1; + } + +- exit run($*EXECUTABLE-NAME, @binaries[0].hash., @*ARGS).exitcode ++ exit run($*EXECUTABLE, @binaries[0].hash., @*ARGS).exitcode + }'; + + method !sources-dir() { +@@ -90,7 +90,7 @@ sub MAIN(:$name is copy, :$auth, :$ver, *@, *%) { + } + + method !bin-dir() { +- my $bin = $.prefix.child('bin'); ++ my $bin = $!bindir || $.prefix.child('bin'); + $bin.mkdir unless $bin.e; + $bin + } +@@ -154,14 +154,14 @@ sub MAIN(:$name is copy, :$auth, :$ver, *@, *%) { + my $destination = $resources-dir.child($id); + my $withoutext = $basename.subst(/\.[exe|bat]$/, ''); + for '', '-j', '-m' -> $be { +- "$path/bin/$withoutext$be".IO.spurt: ++ "$bin-dir/$withoutext$be".IO.spurt: + $perl_wrapper.subst('#name#', $basename, :g).subst('#perl#', "perl6$be").subst('#dist-name#', $dist.name); + if $is-win { +- "$path/bin/$withoutext$be.bat".IO.spurt: ++ "$bin-dir/$withoutext$be.bat".IO.spurt: + $windows_wrapper.subst('#perl#', "perl6$be", :g); + } + else { +- "$path/bin/$withoutext$be".IO.chmod(0o755); ++ "$bin-dir/$withoutext$be".IO.chmod(0o755); + } + } + self!add-short-name($basename, $dist); +diff --git a/src/core/CompUnit/Repository/Locally.pm b/src/core/CompUnit/Repository/Locally.pm +index bab6b34..78c1395 100644 +--- a/src/core/CompUnit/Repository/Locally.pm ++++ b/src/core/CompUnit/Repository/Locally.pm +@@ -1,16 +1,18 @@ + role CompUnit::Repository::Locally { + has Lock $!lock; + has IO::Path $.prefix is required; ++ has IO::Path $.bindir is rw; + has Str $.WHICH; + + my %instances; + +- method new(CompUnit::Repository::Locally: Str:D :$prefix, CompUnit::Repository :$next-repo) { +- my $abspath := $*SPEC.rel2abs($prefix); +- my $IO := IO::Path.new-from-absolute-path($abspath); ++ method new(CompUnit::Repository::Locally: Str:D :$prefix, :$bindir, CompUnit::Repository :$next-repo) { ++ my $abspath := $*SPEC.rel2abs($prefix); ++ my $IO-prefix := IO::Path.new-from-absolute-path($abspath); ++ my $IO-bindir := $bindir ?? IO::Path.new-from-absolute-path($bindir) !! IO::Path; + + %instances{$abspath} //= +- self.bless(:prefix($IO), :lock(Lock.new), :WHICH(self.^name ~ '|' ~ $abspath), :$next-repo); ++ self.bless(:prefix($IO-prefix), :bindir($IO-bindir), :lock(Lock.new), :WHICH(self.^name ~ '|' ~ $abspath), :$next-repo); + } + + multi method Str(CompUnit::Repository::Locally:D:) { $!prefix.abspath } +diff --git a/tools/build/NQP_REVISION b/tools/build/NQP_REVISION +index eb54c28..add78a9 100644 +--- a/tools/build/NQP_REVISION ++++ b/tools/build/NQP_REVISION +@@ -1 +1 @@ +-2015.12-11-gd86a422 ++2015.12 -- cgit v1.1