Final perl: Add perl 5.42.0!

This commit is contained in:
Samuel Tyler 2025-09-08 10:06:42 +10:00
parent 495365c016
commit c634840581
7 changed files with 187 additions and 0 deletions

View file

@ -0,0 +1,6 @@
BUILD_ZLIB = False
ZLIB_INCLUDE = /usr/include
ZLIB_LIB = /usr/lib/i386-unknown-linux-musl
OLD_ZLIB = False
GZIP_OS_CODE = AUTO_DETECT
USE_ZLIB_NG = False

96
steps/perl-5.42.0/pass1.sh Executable file
View file

@ -0,0 +1,96 @@
# SPDX-FileCopyrightText: 2025 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_prepare() {
default
mv Compress-Raw-Zlib_config.in cpan/Compress-Raw-Zlib/config.in
# Remove miscellaneous pregenerated files
rm -f Porting/Glossary \
dist/Devel-PPPort/parts/apidoc.fnc Configure config_h.SH \
cpan/Win32API-File/cFile.pc cpan/Sys-Syslog/win32/Win32.pm \
dist/ExtUtils-CBuilder/Makefile.PL \
cpan/Test-Simple/lib/Test2/Util/HashBase.pm \
cpan/Term-Table/lib/Term/Table/HashBase.pm \
dist/Tie-File/Makefile.PL
rm win32/perlexe.ico
rm -r cpan/Compress-Raw-Zlib/zlib-src
# Generated tests
rm cpan/Unicode-Collate/Collate/keys.txt
# Regenerate other prebuilt header files
# Taken from headers of regen scripts
rm -f lib/warnings.pm warnings.h regnodes.h reentr.h reentr.c \
overload.h opcode.h opnames.h pp_proto.h \
keywords.h embed.h embedvar.h perlapi.{c,h} \
proto.h lib/overload/numbers.pm regcharclass.h perly.{tab,h,act} \
mg_{raw.h,vtable.h} keywords.c l1_char_class_tab.h \
lib/feature.pm lib/B/Op_private.pm lib/unicore/uni_keywords.pl \
miniperlmain.c unicode_constants.h uni_keywords.h \
charclass_invlists.h ebcdic_tables.h mg_names.inc overload.inc \
packsizetables.inc regexp_constants.h locale_table.h scope_types.h \
charclass_invlists.inc
perl regen.pl
perl regen_perly.pl
perl regen/keywords.pl
perl regen/mk_PL_charclass.pl
perl regen/regcharclass.pl
perl regen/genpacksizetables.pl
perl regen/ebcdic.pl
perl regen/miniperlmain.pl
perl regen/unicode_constants.pl
perl lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p
perl -Ilib regen/mk_invlists.pl
# regenerate configure
mconf_dir=$(echo ../metaconfig*)
ln -s "$mconf_dir"/.package .
ln -s "$mconf_dir"/U .
touch U/modified/{d_openat.U,d_vsnprintf.U,d_sched_yield.U} # null it
metaconfig -m
# Glossary
ln -s ../perl-* "$mconf_dir"/perl
"$mconf_dir"/U/mkglossary > Porting/Glossary
# Remove lines from MANIFEST that we have deleted
while read -r line; do
f="$(echo "${line}" | cut -d' ' -f1)"
if [ -e "${f}" ]; then
echo "${line}"
fi
done < MANIFEST > MANIFEST.new
mv MANIFEST.new MANIFEST
}
src_configure() {
./Configure -des \
-Dprefix="${PREFIX}" \
-Dcc=gcc \
-Dusedl=false \
-Ddate=':' \
-Dccflags="-U__DATE__ -U__TIME__" \
-Darchname="i386-linux" \
-Dmyhostname="(none)" \
-Dmaildomain="(none)"
}
src_compile() {
make "${MAKEJOBS}" pod/perlapi.pod
pushd dist/Devel-PPPort
perl devel/mkapidoc.pl
popd
default
}
src_install() {
default
# Remove messed up manpages
rm "${DESTDIR}/"*.0
}

View file

@ -0,0 +1,13 @@
diff --git perl-5.42.0/dist/Devel-PPPort/PPPort_pm.PL perl-5.42.0/dist/Devel-PPPort/PPPort_pm.PL
index cfbfaeb8fa..f93e56df15 100644
--- perl-5.42.0/dist/Devel-PPPort/PPPort_pm.PL
+++ perl-5.42.0/dist/Devel-PPPort/PPPort_pm.PL
@@ -891,8 +891,6 @@ __DATA__
%include snprintf
-%include sprintf
-
%include exception
%include strlfuncs

View file

@ -0,0 +1,13 @@
diff --git perl-5.42.0/ext/re/Makefile.PL perl-5.42.0/ext/re/Makefile.PL
index 01786e1ec2..cc4619bfc3 100644
--- perl-5.42.0/ext/re/Makefile.PL
+++ perl-5.42.0/ext/re/Makefile.PL
@@ -27,7 +27,7 @@ foreach my $tuple (@files) {
}
}
-my $defines = '-DPERL_EXT_RE_BUILD -DPERL_EXT_RE_DEBUG -DPERL_EXT';
+my $defines = '-DPERL_EXT_RE_BUILD -DPERL_EXT_RE_DEBUG -DPERL_EXT -DDEBUGGING';
my %args;
for my $arg (@ARGV) {
$args{$1} = $2 if $arg =~ /^(\w+)=(.*)$/;

View file

@ -0,0 +1,38 @@
Make mk_invlists work in 5.40.
diff --git perl-5.42.0/regen/mk_invlists.pl perl-5.42.0/regen/mk_invlists.pl
index 5d30ee2234..f02c07a9af 100644
--- perl-5.42.0/regen/mk_invlists.pl
+++ perl-5.42.0/regen/mk_invlists.pl
@@ -1,12 +1,10 @@
#!perl
-use v5.41.9;
+use v5.40.3;
use utf8;
use re "/aa";
use feature 'signatures';
use feature 'state';
-use feature 'keyword_any';
use warnings;
-no warnings 'experimental::keyword_any';
use Data::Dumper;
$Data::Dumper::Sortkeys = 1;
use Unicode::UCD qw(prop_aliases
@@ -1483,7 +1481,7 @@ sub get_cell_list($table_size, $splits, $enums, $x, $y, $me_too = undef) {
foreach my $pair ($me_too->{$me_too_key}->@*) {
my $copy_x = $pair->[0];
my $copy_y = $pair->[1];
- next if any { $copy_x == $_->[0]
+ next if grep { $copy_x == $_->[0]
&& $copy_y == $_->[1]
} @list;
push @list, [ $copy_x, $copy_y ];
@@ -2185,7 +2183,7 @@ sub setup_splits($to_enum, $table_size, $has_unused, $splits) {
# If any of the items this expands to are themselves split, this
# one isn't ready to be processed. But an item can refer to
# itself. That shouldn't count XXX
- next if any { defined $splits->{$_} }
+ next if grep { defined $splits->{$_} }
grep { $_ ne $name } $splits->{$name}->@*;
push @ordered, $name;

View file

@ -0,0 +1,19 @@
There is no way to regenerate this easily. It is merely a fallback for when the
previous fails and it will not fail with our perl.
diff --color -ru perl-5.42.0/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm perl-5.42.0/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm
--- perl-5.42.0/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm 2025-07-23 21:56:14.121284638 +1000
+++ perl-5.42.0/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm 2025-07-23 22:05:05.990255330 +1000
@@ -74,13 +74,6 @@
my $script_run_re = eval 'no warnings "experimental::script_run";
qr/(*script_run: ^ .* $ )/x';
my $latin_re = my_qr('[\p{IsLatin}\p{IsInherited}\p{IsCommon}]', "\x{100}");
-unless ($latin_re) {
- # This was machine generated to be the ranges of the union of the above
- # three properties, with things that were undefined by Unicode 4.1 filling
- # gaps. That is the version in use when Perl advanced enough to
- # successfully compile and execute the above pattern.
- $latin_re = my_qr('[\x00-\x{02E9}\x{02EC}-\x{0374}\x{037E}\x{0385}\x{0387}\x{0485}\x{0486}\x{0589}\x{060C}\x{061B}\x{061F}\x{0640}\x{064B}-\x{0655}\x{0670}\x{06DD}\x{0951}-\x{0954}\x{0964}\x{0965}\x{0E3F}\x{10FB}\x{16EB}-\x{16ED}\x{1735}\x{1736}\x{1802}\x{1803}\x{1805}\x{1D00}-\x{1D25}\x{1D2C}-\x{1D5C}\x{1D62}-\x{1D65}\x{1D6B}-\x{1D77}\x{1D79}-\x{1DBE}\x{1DC0}-\x{1EF9}\x{2000}-\x{2125}\x{2127}-\x{27FF}\x{2900}-\x{2B13}\x{2E00}-\x{2E1D}\x{2FF0}-\x{3004}\x{3006}\x{3008}-\x{3020}\x{302A}-\x{302D}\x{3030}-\x{3037}\x{303C}-\x{303F}\x{3099}-\x{309C}\x{30A0}\x{30FB}\x{30FC}\x{3190}-\x{319F}\x{31C0}-\x{31CF}\x{3220}-\x{325F}\x{327F}-\x{32CF}\x{3358}-\x{33FF}\x{4DC0}-\x{4DFF}\x{A700}-\x{A716}\x{FB00}-\x{FB06}\x{FD3E}\x{FD3F}\x{FE00}-\x{FE6B}\x{FEFF}-\x{FF65}\x{FF70}\x{FF9E}\x{FF9F}\x{FFE0}-\x{FFFD}\x{10100}-\x{1013F}\x{1D000}-\x{1D1DD}\x{1D300}-\x{1D7FF}]', "\x{100}");
-}
my $every_char_is_latin_re = my_qr("^(?:$latin_re)*\\z", "A");

View file

@ -0,0 +1,2 @@
http://www.cpan.org/src/5.0/perl-5.42.0.tar.xz 73cf6cc1ea2b2b1c110a18c14bbbc73a362073003893ffcedc26d22ebdbdd0c3
git://github.com/Perl/metaconfig~5.42.0 https://github.com/Perl/metaconfig/archive/5.42.0.tar.gz ac3948bd684a3c017a241b6fc7b899c901f814b36d030ee79887374884e30301