perl: replace 910-miniperl-needs-inc-dot.patch with smaller scope fix
authorMatthias Schiffer <redacted>
Fri, 25 Apr 2025 00:06:17 +0000 (02:06 +0200)
committerRobert Marko <redacted>
Mon, 5 May 2025 09:20:38 +0000 (11:20 +0200)
The patch was first introduced in commit 4a94479f9652 ("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 <redacted>
lang/perl/patches/910-fix-default_inc_excludes_dot.patch [new file with mode: 0644]
lang/perl/patches/910-miniperl-needs-inc-dot.patch [deleted file]

diff --git a/lang/perl/patches/910-fix-default_inc_excludes_dot.patch b/lang/perl/patches/910-fix-default_inc_excludes_dot.patch
new file mode 100644 (file)
index 0000000..ab3e624
--- /dev/null
@@ -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";
diff --git a/lang/perl/patches/910-miniperl-needs-inc-dot.patch b/lang/perl/patches/910-miniperl-needs-inc-dot.patch
deleted file mode 100644 (file)
index 6997f04..0000000
+++ /dev/null
@@ -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
git clone https://git.99rst.org/PROJECT