diff --git a/steps/perl-5.16.3/files/Compress-Raw-Zlib_config.in b/steps/perl-5.16.3/files/Compress-Raw-Zlib_config.in new file mode 100644 index 00000000..3bbcf2f4 --- /dev/null +++ b/steps/perl-5.16.3/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.16.3/pass1.sh b/steps/perl-5.16.3/pass1.sh new file mode 100755 index 00000000..952ba603 --- /dev/null +++ b/steps/perl-5.16.3/pass1.sh @@ -0,0 +1,102 @@ +# 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 charclass_invlists.h + 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 + perl regen/mk_invlists.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=':' \ + -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 + + # install regcharclass.h to the filesystem + # This is for the following version of perl, because the bootstrapping story + # is incredibly bad there! + #cp regcharclass.h "${DESTDIR}/${PREFIX}/lib/perl5/5.16.3/regcharclass.h" + + # Remove messed up manpages + rm "${DESTDIR}/"*.0 +} diff --git a/steps/perl-5.16.3/patches/0001-Revert-l1_char_class_tab.h-Add-field-for-quotemeta.patch b/steps/perl-5.16.3/patches/0001-Revert-l1_char_class_tab.h-Add-field-for-quotemeta.patch new file mode 100644 index 00000000..1fa9d6ef --- /dev/null +++ b/steps/perl-5.16.3/patches/0001-Revert-l1_char_class_tab.h-Add-field-for-quotemeta.patch @@ -0,0 +1,35 @@ +From c7c816ac94667bf4ed1e6185ed79a70aeabaee97 Mon Sep 17 00:00:00 2001 +From: Samuel Tyler +Date: Thu, 21 Aug 2025 21:53:47 +1000 +Subject: [PATCH] Revert "l1_char_class_tab.h: Add field for quotemeta" + +This reverts commit 9a022f3a9e4bafe265086ebafcf8f6990108aa57. +--- + l1_char_class_tab.h | 234 +++++++++++++++++++-------------------- + regen/mk_PL_charclass.pl | 3 - + 2 files changed, 117 insertions(+), 120 deletions(-) + +diff --git perl-5.16.3/regen/mk_PL_charclass.pl perl-5.16.3/regen/mk_PL_charclass.pl +index b903fbe1f0..a2f837fefc 100644 +--- perl-5.16.3/regen/mk_PL_charclass.pl ++++ perl-5.16.3/regen/mk_PL_charclass.pl +@@ -52,7 +52,6 @@ my @properties = qw( + WORDCHAR_A + WORDCHAR_L1 + XDIGIT_A +- QUOTEMETA + ); + + # Read in the case fold mappings. +@@ -140,8 +139,6 @@ for my $ord (0..255) { + $re = qr/\p{Alnum}/; + } elsif ($name eq 'OCTAL') { + $re = qr/[0-7]/; +- } elsif ($name eq 'QUOTEMETA') { +- $re = qr/\p{_Perl_Quotemeta}/; + } else { # The remainder have the same name and values as Unicode + $re = eval "qr/\\p{$name}/"; + use Carp; +-- +2.49.1 + diff --git a/steps/perl-5.16.3/patches/a2p-c-bison.patch b/steps/perl-5.16.3/patches/a2p-c-bison.patch new file mode 100644 index 00000000..451c2cdb --- /dev/null +++ b/steps/perl-5.16.3/patches/a2p-c-bison.patch @@ -0,0 +1,11 @@ +--- perl-5.16.3/x2p/Makefile.SH 2025-07-17 18:07:55.350717970 +1000 ++++ perl-5.16.3/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.16.3/sources b/steps/perl-5.16.3/sources new file mode 100644 index 00000000..fab708dd --- /dev/null +++ b/steps/perl-5.16.3/sources @@ -0,0 +1,2 @@ +https://www.cpan.org/src/5.0/perl-5.16.3.tar.bz2 bb7bc735e6813b177dcfccd480defcde7eddefa173b5967eac11babd1bfa98e8 +git://github.com/Perl/metaconfig~79b14e84d83fb88c2b1a07e0dec3b62ccb9a388c https://github.com/Perl/metaconfig/archive/79b14e84d83fb88c2b1a07e0dec3b62ccb9a388c.tar.gz 857e295a3e3ff3121339b348fd295e03459ce8dc3a382870e94f98c2da99a573