summaryrefslogtreecommitdiffstats
path: root/package/perl/perl-mkppport.patch
blob: 97f27a2027b4ba1ab2ba4ae5859a5cff53d85022 (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
Add RUN

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>

Index: b/mkppport
===================================================================
--- a/mkppport
+++ b/mkppport
@@ -1,6 +1,7 @@
 use strict;
 use warnings;
 
+use Config;
 use Getopt::Long;
 use File::Spec;
 use File::Compare qw( compare );
@@ -136,14 +137,18 @@
 #----------------------------------------------
 sub run
 {
+  my @run = $Config{run};
+  @run = () if not defined $run[0] or $run[0] eq '';
   my @args = ("-I" . File::Spec->catdir((File::Spec->updir) x 2, 'lib'), @_);
   my $run = $perl =~ m/\s/ ? qq("$perl") : $perl;
   for (@args) {
     $_ = qq("$_") if $^O eq 'VMS' && /^[^"]/;
     $run .= " $_";
   }
-  print "running $run\n";
-  system $run and die "$run failed: $?\n";
+#  print "running $run\n";
+#  system $run and die "$run failed: $?\n";
+  print "running ", join(' ', @run, $run), "\n";
+  system join(' ', @run, $run) and die "@run $run failed: $?\n";
 }
 
 __END__