Skip to content
Permalink
Browse files

Unbreak create-jvm-runner.pl. More relocatability.

  • Loading branch information...
patzim committed Jan 30, 2019
1 parent e0f84e0 commit e00c9ea85107a7d1daf10506fdc3508e6bceca8e
Showing with 5 additions and 3 deletions.
  1. +5 −3 tools/build/create-jvm-runner.pl
@@ -30,15 +30,17 @@
my $perl6dir = $type eq 'install' ? File::Spec->catfile($prefix, 'share', 'perl6') : $prefix;
my $jardir = $type eq 'install' ? File::Spec->catfile($^O eq 'MSWin32' ? $perl6dir : '${PERL6_DIR}', 'runtime') : $prefix;
my $libdir = $type eq 'install' ? File::Spec->catfile($^O eq 'MSWin32' ? $perl6dir : '${PERL6_DIR}', 'lib') : 'blib';
my $sharedir = File::Spec->catfile($prefix, 'share', 'perl6', 'site', 'lib');
my $sharedir = File::Spec->catfile(
($type eq 'install' && $^O ne 'MSWin32' ? '$DIR/..' : $prefix),
'share', 'perl6', 'site', 'lib');
my $perl6jars = join( $cpsep,
$^O eq 'MSWin32' ? $nqpjars : '${NQP_JARS}',
File::Spec->catfile($jardir, 'rakudo-runtime.jar'),
File::Spec->catfile($jardir, $debugger ? 'perl6-debug.jar' : 'perl6.jar'));

my $NQP_LIB = $blib ? ': ${NQP_LIB:="blib"}' : '';

my $preamble_reloc $^O eq 'MSWin32' ? '@' : "#!/bin/bash
my $preamble_reloc = "#!/bin/bash
# Sourced from https://stackoverflow.com/a/246128/1975049
SOURCE=\"\${BASH_SOURCE[0]}\"
@@ -84,7 +86,7 @@ sub install {
my $classpath = join($cpsep, ($perl6jars, $jardir, $libdir, $nqplibdir));
my $jopts = '-noverify -Xms100m'
. ' -cp ' . ($^O eq 'MSWin32' ? '"%CLASSPATH%";' : '$CLASSPATH:') . $classpath
. ' -Dperl6.prefix=' . $prefix
. ' -Dperl6.prefix=' . ($type eq 'install' && $^O ne 'MSWin32' ? '$DIR/..' : $prefix)
. ' -Djna.library.path=' . $sharedir
. ($^O eq 'MSWin32' ? ' -Dperl6.execname="%~dpf0"' : ' -Dperl6.execname="$0"');
my $jdbopts = '-Xdebug -Xrunjdwp:transport=dt_socket,address='

0 comments on commit e00c9ea

Please sign in to comment.
You can’t perform that action at this time.