mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-14 07:40:07 +02:00
So that recipes using Module::Build don't need to specify that in their recipes. Ironically, Module::Build itself doesn't profit from that, because its build script overrides the default, so we have to set it on the command line still (or alternatively patch the build file). Also, unset the variable for tests, otherwise a test would have to be patched too.
83 lines
2.4 KiB
Plaintext
83 lines
2.4 KiB
Plaintext
From 18db2ea3c12b6fa184a6f21a2cd41fff85ff07cf 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
|
|
|
|
|
|
From a5bd63049b78b8f596b4a35825b5a92846c0c583 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
|
|
Date: Sun, 5 Jan 2025 14:45:19 +0100
|
|
Subject: fix tests
|
|
|
|
$^X is just "perl" on Haiku which breaks if converted to an absolute path.
|
|
|
|
diff --git a/t/lib/MBTest.pm b/t/lib/MBTest.pm
|
|
index 2aeda20..3620523 100644
|
|
--- a/t/lib/MBTest.pm
|
|
+++ b/t/lib/MBTest.pm
|
|
@@ -57,7 +57,7 @@ BEGIN {
|
|
# We change directories, so expand @INC and $^X to absolute paths
|
|
# Also add .
|
|
@INC = (map(File::Spec->rel2abs($_), @INC), ".");
|
|
- $^X = File::Spec->rel2abs($^X);
|
|
+ $^X = '/bin/perl';
|
|
}
|
|
|
|
use Exporter;
|
|
--
|
|
2.45.2
|
|
|
|
|
|
From 8cc76665e751cdc799b6be2d67f264e3fda9b391 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
|
|
Date: Sun, 9 Feb 2025 15:35:30 +0100
|
|
Subject: Add support for HAIKU_USE_VENDOR_DIRECTORIES
|
|
|
|
|
|
diff --git a/lib/Module/Build/Base.pm b/lib/Module/Build/Base.pm
|
|
index 0ee2515..170137d 100644
|
|
--- a/lib/Module/Build/Base.pm
|
|
+++ b/lib/Module/Build/Base.pm
|
|
@@ -917,7 +917,7 @@ __PACKAGE__->add_property(pureperl_only => 0);
|
|
__PACKAGE__->add_property(allow_pureperl => 0);
|
|
__PACKAGE__->add_property(
|
|
'installdirs',
|
|
- default => 'site',
|
|
+ default => $ENV{'HAIKU_USE_VENDOR_DIRECTORIES'} ? 'vendor' : 'site',
|
|
check => sub {
|
|
return 1 if /^(core|site|vendor)$/;
|
|
return shift->property_error(
|
|
--
|
|
2.45.2
|
|
|