aboutsummaryrefslogtreecommitdiff
path: root/rakudo-cur-bindir.patch
blob: 537a061f92c538e324520970ddc25019c9e06b04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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<RAKUDO_LOG_PRECOMP>;
 
-    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.<files><bin/#name#>, @*ARGS).exitcode
+    exit run($*EXECUTABLE, @binaries[0].hash.<files><bin/#name#>, @*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