Files
haikuports/dev-perl/module_build/patches/module_build-0.4234.patchset
Joachim Mairböck d353037031 module_build: add hack to support just 'perl' as the interpreter path
This is used as shebang line for installed scripts.

This could be done in a cleaner way by defining a separate Haiku platform file
and overriding some functions there, but for now, this works well enough.
2024-08-04 21:26:37 +02:00

36 lines
1.1 KiB
Plaintext

From 6ae92aaff5292e8b0095d0dc0ac42ff5ee1442f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
Date: Sun, 4 Aug 2024 21:07:10 +0200
Subject: hack to support naked 'perl' as the perl interpreter path
and don't use Config->{perlpath} as fallback, because we don't need to.
diff --git a/lib/Module/Build/Base.pm b/lib/Module/Build/Base.pm
index 10b653f..0ee2515 100644
--- a/lib/Module/Build/Base.pm
+++ b/lib/Module/Build/Base.pm
@@ -463,9 +463,8 @@ sub _discover_perl_interpreter {
my @potential_perls;
- # Try 1, Check $^X for absolute path
- push( @potential_perls, $perl )
- if File::Spec->file_name_is_absolute($perl);
+ # Try 1, Check $^X
+ push( @potential_perls, $perl );
# Try 2, Check $^X for a valid relative path
my $abs_perl = File::Spec->rel2abs($perl);
@@ -511,7 +510,7 @@ sub _discover_perl_interpreter {
$thisperl .= $exe unless $thisperl =~ m/$exe$/i;
}
- if ( -f $thisperl && $proto->_perl_is_same($thisperl) ) {
+ if ( $proto->_perl_is_same($thisperl) ) {
return $thisperl;
}
}
--
2.45.2