Skip to content

Commit 0adaa2f

Browse files
committed
fix: install_modules require apperl patch, make core scripts point to real perl executable
1 parent e6193ca commit 0adaa2f

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ v0.8.0 2026-07-XX
33
Add Perl 5.42 builds.
44
Add Perl 5.44 RC2 builds.
55
Cleanup patchlevel patch list.
6+
Fix install_modules requiring apperl patch.
67

78
v0.7.0 2026-07-09
89
Add Perl 5.40 builds. 5.38 is skipped as static builds were

lib/Perl/Dist/APPerl.pm

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,7 @@ sub Build {
12861286

12871287
# pack
12881288
my $APPPATH = "$TEMPDIR/".basename($PERL_APE);
1289+
my $PERLPATH = "$TEMPDIR/perl";
12891290
my $packAPE = sub {
12901291
my $copyexe = sub {
12911292
my ($srcpath, $destpath) = @_;
@@ -1309,6 +1310,8 @@ sub Build {
13091310
chdir($ZIP_ROOT) or die "failed to enter ziproot";
13101311
_command_or_die($zippath // _find_zip(), '-r', $APPPATH, @zipfiles);
13111312
}
1313+
$copyexe->($APPPATH, $PERLPATH);
1314+
_command_or_die($PERLPATH, '--assimilate');
13121315
};
13131316
$packAPE->();
13141317

@@ -1362,11 +1365,21 @@ sub Build {
13621365
my $perlbindir = "$TEMPDIR/perlbin";
13631366
print "mkdir -p $perlbindir\n";
13641367
make_path($perlbindir);
1368+
print "Mapping core scripts to run with $PERLPATH\n";
13651369
opendir(my $dh, $perlbin) or die "failed to open perlbin";
13661370
while (my $file = readdir($dh)) {
13671371
next if ($file eq '.' || $file eq '..');
1368-
print "ln -s $APPPATH $perlbindir/$file\n";
1369-
symlink($APPPATH, "$perlbindir/$file") or die "failed to setup perlbins";
1372+
my $rdpath = "$perlbin/$file";
1373+
open(my $rh, '<', $rdpath) or die "failed to open $rdpath";
1374+
<$rh>;
1375+
my $wrpath = "$perlbindir/$file";
1376+
open(my $wh, '>', $wrpath) or die "failed to open $wrpath";
1377+
print $wh "#!$PERLPATH\n";
1378+
local $/;
1379+
my $script = <$rh>;
1380+
print $wh $script;
1381+
print "chmod 755 $wrpath\n";
1382+
chmod(0755, $wrpath) or die $!;
13701383
}
13711384
local $ENV{PATH} = "$perlbindir:".$ENV{PATH};
13721385
foreach my $module (@{$itemconfig->{install_modules}}) {

0 commit comments

Comments
 (0)