mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-18 09:40:05 +02:00
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.
36 lines
1.1 KiB
Plaintext
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
|
|
|