perl: replace 910-miniperl-needs-inc-dot.patch with smaller scope fix

The patch was first introduced in commit 4a94479f96 ("perl: update to
5.26.1") to fix the target build when the host perl has
default_inc_excludes_dot enabled. It just added back the `-I`. to every
call of miniperl; this solution is questionable however, as it adds `.` to
the beginning of the search path, not as a final fallback like perl did
before default_inc_excludes_dot (and like miniperl does).

It is also not necessary - only two scripts, write_buildcustomize.pl and
configpm, expect to be able to include a file from `.` (in both cases a
file the script just generated). Just fix the two scripts instead.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
Matthias Schiffer 2025-04-25 02:06:17 +02:00 committed by Robert Marko
parent 434eaba41f
commit 2a7dc15402
2 changed files with 22 additions and 38 deletions

View File

@ -0,0 +1,22 @@
--- a/write_buildcustomize.pl
+++ b/write_buildcustomize.pl
@@ -3,7 +3,7 @@
use strict;
my $osname = $^O;
-my $file = 'lib/buildcustomize.pl';
+my $file = './lib/buildcustomize.pl';
if ( @ARGV % 2 ) {
my $dir = shift;
--- a/configpm
+++ b/configpm
@@ -129,7 +129,7 @@ if ($Opts{chdir}) {
my ($Config_SH, $Config_PM, $Config_heavy, $Config_POD);
my $Glossary = 'Porting/Glossary';
-$Config_PM = "lib/Config.pm";
+$Config_PM = "./lib/Config.pm";
$Config_POD = "lib/Config.pod";
$Config_SH = "config.sh";

View File

@ -1,38 +0,0 @@
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -346,7 +346,7 @@ OBJ_EXT = $_o
# Macros to invoke a copy of miniperl during the build. Targets which
# are built using these macros should depend on \$(MINIPERL_EXE)
MINIPERL_EXE = miniperl\$(EXE_EXT)
-MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE_EXT) -Ilib
+MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE_EXT) -Ilib -I.
# Macros to invoke sort the MANIFEST during build
MANIFEST_SRT = MANIFEST.srt
@@ -1001,7 +1001,7 @@ lib/buildcustomize.pl: $& $(miniperl_obj
@$(RMS) miniperl.xok
$(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
- $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
+ $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -I. -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
$(MINIPERL) -f write_buildcustomize.pl
!NO!SUBS!
;;
@@ -1012,7 +1012,7 @@ lib/buildcustomize.pl: \$& \$(miniperl_d
@\$(RMS) miniperl.xok
@\$(RMS) \$(MINIPERL_EXE)
\$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE)
- \$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
+ \$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -I. -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
\$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname"
!GROK!THIS!
else
@@ -1021,7 +1021,7 @@ lib/buildcustomize.pl: $& $(miniperl_dep
@$(RMS) miniperl.xok
$(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
- $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
+ $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -I. -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
$(MINIPERL) -f write_buildcustomize.pl
!NO!SUBS!
fi