From 1b6d89f9b498d8f0b9d0dfd476a507461ed52d29 Mon Sep 17 00:00:00 2001 From: Samuel Tyler Date: Thu, 21 Aug 2025 22:06:52 +1000 Subject: [PATCH] Add perl 5.15.7 --- steps/manifest | 2 + .../files/Compress-Raw-Zlib_config.in | 5 + steps/perl-5.15.7/pass1.sh | 100 ++++++++++++++++++ ..._invlist-Allow-to-return-internal-pr.patch | 45 ++++++++ .../patches/5.14_mk_PL_charclass.patch | 13 +++ steps/perl-5.15.7/patches/a2p-c-bison.patch | 11 ++ steps/perl-5.15.7/sources | 2 + steps/perl-Devel-Tokenizer-C-0.11/pass3.sh | 1 + 8 files changed, 179 insertions(+) create mode 100644 steps/perl-5.15.7/files/Compress-Raw-Zlib_config.in create mode 100755 steps/perl-5.15.7/pass1.sh create mode 100644 steps/perl-5.15.7/patches/0001-Unicode-UCD-prop_invlist-Allow-to-return-internal-pr.patch create mode 100644 steps/perl-5.15.7/patches/5.14_mk_PL_charclass.patch create mode 100644 steps/perl-5.15.7/patches/a2p-c-bison.patch create mode 100644 steps/perl-5.15.7/sources create mode 120000 steps/perl-Devel-Tokenizer-C-0.11/pass3.sh diff --git a/steps/manifest b/steps/manifest index c3e3742f..057c3ca0 100644 --- a/steps/manifest +++ b/steps/manifest @@ -161,6 +161,8 @@ build: perl-Devel-Tokenizer-C-0.11 build: perl-5.8.9 build: perl-Devel-Tokenizer-C-0.11 build: perl-5.12.5 +build: perl-Devel-Tokenizer-C-0.11 +build: perl-5.15.7 build: perl-5.32.1 uninstall: perl-5.6.2 perl-5.10.1 build: libarchive-3.5.2 diff --git a/steps/perl-5.15.7/files/Compress-Raw-Zlib_config.in b/steps/perl-5.15.7/files/Compress-Raw-Zlib_config.in new file mode 100644 index 00000000..3bbcf2f4 --- /dev/null +++ b/steps/perl-5.15.7/files/Compress-Raw-Zlib_config.in @@ -0,0 +1,5 @@ +BUILD_ZLIB = False +INCLUDE = /usr/include +LIB = /usr/lib/i386-unknown-linux-musl +OLD_ZLIB = False +GZIP_OS_CODE = AUTO_DETECT diff --git a/steps/perl-5.15.7/pass1.sh b/steps/perl-5.15.7/pass1.sh new file mode 100755 index 00000000..72f6a066 --- /dev/null +++ b/steps/perl-5.15.7/pass1.sh @@ -0,0 +1,100 @@ +# SPDX-FileCopyrightText: 2025 fosslinux +# +# 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 Porting/Glossary \ + cpan/Devel-PPPort/parts/apidoc.fnc Configure config_h.SH \ + x2p/a2p.c cpan/Win32API-File/cFile.pc cpan/Sys-Syslog/win32/Win32.pm \ + utils/Makefile + rm win32/perlexe.ico + rm -r cpan/Compress-Raw-Zlib/zlib-src + + # Generated tests + rm cpan/Devel-PPPort/t/*.t cpan/Unicode-Collate/Collate/keys.txt + + # Regenerate other prebuilt header files + # Taken from headers of regen scripts + rm lib/warnings.pm warnings.h regnodes.h reentr.h reentr.c \ + overload.h overload.c opcode.h opnames.h pp_proto.h \ + keywords.h embed.h embedvar.h perlapi.c perlapi.h \ + proto.h lib/overload/numbers.pm regcharclass.h perly.{tab,h,act} \ + mg_{raw.h,vtable.h,names.c} keywords.c l1_char_class_tab.h \ + lib/feature.pm + perl regen.pl + perl regen_perly.pl -b bison-2.3 + perl regen/keywords.pl + perl regen/mk_PL_charclass.pl + perl regen/regcharclass.pl + + # regenerate configure + ln -s ../metaconfig*/.package . + ln -s ../metaconfig*/U . + metaconfig -m + + # Glossary + pushd Porting + ln -s /usr/lib/perl5/5.6.2/U . + makegloss + popd + + bash cpan/Devel-PPPort/devel/mkapidoc.sh . \ + cpan/Devel-PPPort/parts/apidoc.fnc \ + cpan/Devel-PPPort/parts/embed.fnc + + # 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=':' \ + -Dusedevel \ + -Dccflags="-U__DATE__ -U__TIME__" \ + -Darchname="i386-linux" \ + -Dmyhostname="(none)" \ + -Dmaildomain="(none)" + + # Remains unclear why this is necessary + pushd x2p + ./Makefile.SH + make depend + popd + + pushd utils + bash Makefile.SH + popd +} + +src_compile() { + pushd x2p + make BYACC=yacc run_byacc + popd + + # there are concurrency issues + make -j1 PREFIX="${PREFIX}" +} + +src_install() { + default + + # As this is a development version it does not install a perl symlink + ln -s perl5.15.7 "${DESTDIR}/${PREFIX}/bin/perl" + + # Remove messed up manpages + rm "${DESTDIR}/"*.0 +} diff --git a/steps/perl-5.15.7/patches/0001-Unicode-UCD-prop_invlist-Allow-to-return-internal-pr.patch b/steps/perl-5.15.7/patches/0001-Unicode-UCD-prop_invlist-Allow-to-return-internal-pr.patch new file mode 100644 index 00000000..f10b0ac5 --- /dev/null +++ b/steps/perl-5.15.7/patches/0001-Unicode-UCD-prop_invlist-Allow-to-return-internal-pr.patch @@ -0,0 +1,45 @@ +From b5bc060d03776870f3ead93e8c565069a66c2af9 Mon Sep 17 00:00:00 2001 +From: Karl Williamson +Date: Mon, 18 Jun 2012 12:38:41 -0600 +Subject: [PATCH] Unicode::UCD::prop_invlist() Allow to return internal + property + +This creates an optional undocumented parameter to this function to +allow it to return the inversion list of an internal-only Perl property. +This will be used by other functions in Perl, but should not be +documented, as we don't want to encourage the use of internal-only +properties, which are subject to change or removal without notice. +--- + lib/Unicode/UCD.pm | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git perl-5.15.7/lib/Unicode/UCD.pm perl-5.15.7/lib/Unicode/UCD.pm +index 17b4fead23..a809c21adc 100644 +--- perl-5.15.7/lib/Unicode/UCD.pm ++++ perl-5.15.7/lib/Unicode/UCD.pm +@@ -1944,8 +1944,12 @@ properties, and will return C if called with one of those. + our %loose_defaults; + our $MAX_UNICODE_CODEPOINT; + +-sub prop_invlist ($) { ++sub prop_invlist ($;$) { + my $prop = $_[0]; ++ ++ # Undocumented way to get at Perl internal properties ++ my $internal_ok = defined $_[1] && $_[1] eq '_perl_core_internal_ok'; ++ + return if ! defined $prop; + + require "utf8_heavy.pl"; +@@ -1962,7 +1966,7 @@ sub prop_invlist ($) { + || ref $swash eq "" + || $swash->{'BITS'} != 1 + || $swash->{'USER_DEFINED'} +- || $prop =~ /^\s*_/; ++ || (! $internal_ok && $prop =~ /^\s*_/); + + if ($swash->{'EXTRAS'}) { + carp __PACKAGE__, "::prop_invlist: swash returned for $prop unexpectedly has EXTRAS magic"; +-- +2.49.1 + diff --git a/steps/perl-5.15.7/patches/5.14_mk_PL_charclass.patch b/steps/perl-5.15.7/patches/5.14_mk_PL_charclass.patch new file mode 100644 index 00000000..400bcc17 --- /dev/null +++ b/steps/perl-5.15.7/patches/5.14_mk_PL_charclass.patch @@ -0,0 +1,13 @@ +diff --git perl-5.15.7/regen/mk_PL_charclass.pl perl-5.15.7/regen/mk_PL_charclass.pl +index a2f837fefc..f777ffe74d 100644 +--- perl-5.15.7/regen/mk_PL_charclass.pl ++++ perl-5.15.7/regen/mk_PL_charclass.pl +@@ -64,7 +64,7 @@ while (<$fh>) { + # Lines look like (without the initial '#' + #0130; F; 0069 0307; # LATIN CAPITAL LETTER I WITH DOT ABOVE + # Get rid of comments, ignore blank or comment-only lines +- my $line = $_ =~ s/ (?: \s* \# .* )? $ //rx; ++ my $line = $_ =~ s/ (?: \s* \# .* )? $ //x; + next unless length $line; + my ($hex_from, $fold_type, @folded) = split /[\s;]+/, $line; + diff --git a/steps/perl-5.15.7/patches/a2p-c-bison.patch b/steps/perl-5.15.7/patches/a2p-c-bison.patch new file mode 100644 index 00000000..4e18bab1 --- /dev/null +++ b/steps/perl-5.15.7/patches/a2p-c-bison.patch @@ -0,0 +1,11 @@ +--- perl-5.15.7/x2p/Makefile.SH 2025-07-17 18:07:55.350717970 +1000 ++++ perl-5.15.7/x2p/Makefile.SH 2025-07-17 18:09:02.340711269 +1000 +@@ -123,7 +123,7 @@ + sed -e 's/(yyn = yydefred\[yystate\])/((yyn = yydefred[yystate]))/' \ + -e 's/(yys = getenv("YYDEBUG"))/((yys = getenv("YYDEBUG")))/' \ + -e 's/^yyerrlab://' \ +- -e 's/^ goto yyerrlab;//' \ ++ -e 's/^ *goto yyerrlab;//' \ + -e 's/^yynewerror://' \ + -e 's/^ goto yynewerror;//' \ + -e 's|^static char yysccsid\(.*\)|/* static char yysccsid\1 */|' \ diff --git a/steps/perl-5.15.7/sources b/steps/perl-5.15.7/sources new file mode 100644 index 00000000..8ea09bd7 --- /dev/null +++ b/steps/perl-5.15.7/sources @@ -0,0 +1,2 @@ +https://www.cpan.org/src/5.0/perl-5.15.7.tar.bz2 331fcc356fccfc47e86ed09c20c081858f9466e419324007a7578441f861177c +git://github.com/Perl/metaconfig~79b14e84d83fb88c2b1a07e0dec3b62ccb9a388c https://github.com/Perl/metaconfig/archive/79b14e84d83fb88c2b1a07e0dec3b62ccb9a388c.tar.gz 857e295a3e3ff3121339b348fd295e03459ce8dc3a382870e94f98c2da99a573 diff --git a/steps/perl-Devel-Tokenizer-C-0.11/pass3.sh b/steps/perl-Devel-Tokenizer-C-0.11/pass3.sh new file mode 120000 index 00000000..c069796d --- /dev/null +++ b/steps/perl-Devel-Tokenizer-C-0.11/pass3.sh @@ -0,0 +1 @@ +pass1.sh \ No newline at end of file