perl: update to version 5.38.0
authorAndy Syam <redacted>
Tue, 21 Nov 2023 06:13:35 +0000 (14:13 +0800)
committerRosen Penev <redacted>
Thu, 23 Nov 2023 02:32:50 +0000 (18:32 -0800)
removed some sources to download perl. I believe I only need one source to download perl at https://www.cpan.org/src/5.0. I see some Linux distributions use that source to download.
change the position of PKG_MAINTAINER to make it neater and prettier

perform a patch refresh
removes some patches that have been applied in perl-5.38.0 as well as patches that are no longer used in perl-5.38.0

added one patch Perl/perl5@ba6e2c3 this fixes the issue regcomp*.c, regexec.c - fixup regex engine build under -Uusedl

provided updates and synchronized libc.config base.config version.config to perl-5.38.0
removed deprecated arybase in perl-5.29.4

Signed-off-by: Andy Syam <redacted>
21 files changed:
lang/perl/Makefile
lang/perl/files/base.config
lang/perl/files/libc.config
lang/perl/files/version.config
lang/perl/patches/001-macos_11_support.patch [deleted file]
lang/perl/patches/002-add-Internals-getcwd.patch [deleted file]
lang/perl/patches/003-fallback-to-the-built-in-getcwd-if-we-ca.patch [deleted file]
lang/perl/patches/010-musl-compat.patch
lang/perl/patches/020-storables-stacksize.patch [deleted file]
lang/perl/patches/110-always_use_miniperl.patch
lang/perl/patches/120-remove-build-timestamp.patch
lang/perl/patches/301-fix_macos_static_linking.patch [deleted file]
lang/perl/patches/320-copy-pod-hack.patch
lang/perl/patches/900-use-rm-force.patch
lang/perl/patches/910-miniperl-needs-inc-dot.patch
lang/perl/patches/920-fix-no-locale.patch [deleted file]
lang/perl/patches/998-Errno_errno.h_path.patch
lang/perl/patches/999-fix-build-failure-against-gcc-10.patch [deleted file]
lang/perl/patches/999-fixup-regex-engine-build-under-Uusedl.patch [new file with mode: 0644]
lang/perl/perlbase.mk
lang/perl/perlver.mk

index 7b603b5af28842f35a8873f07b6259a667037c1c..5249a0505e2ec2032d1bf5cd70e455e440d2ec9c 100644 (file)
@@ -11,22 +11,15 @@ include perlver.mk
 
 PKG_NAME:=perl
 PKG_VERSION:=$(PERL_VERSION)
-PKG_RELEASE:=10
-
-PKG_SOURCE_URL:=\
-               https://cpan.metacpan.org/src/5.0 \
-               https://cpan.uib.no/src/5.0 \
-               https://mirrors.rit.edu/CPAN/src/5.0 \
-               https://mirror.transip.net/CPAN/src/5.0 \
-               https://mirrors.sonic.net/cpan/src/5.0 \
-               https://www.cpan.org/src/5.0
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://www.cpan.org/src/5.0
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=fea7162d4cca940a387f0587b93f6737d884bf74d8a9d7cfd978bc12cd0b202d
+PKG_HASH:=eca551caec3bc549a4e590c0015003790bdd1a604ffe19cc78ee631d51f7072e
 
 PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_LICENSE_FILES:=Copying Artistic README
-PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>, \
-               Philip Prindeville <philipp@redfish-solutions.com>
+PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>, Philip Prindeville <philipp@redfish-solutions.com>
 PKG_CPE_ID:=cpe:/a:perl:perl
 
 # Build settings
index f2d18f547061f25ee93d0bda0937d9190042e441..67232b6d83e70505e7e85ad6893a2661f4571f7f 100644 (file)
@@ -81,6 +81,7 @@ d_asinh='define'
 d_atanh='define'
 d_atolf='undef'
 d_atoll='define'
+d_attribute_always_inline='define'
 d_attribute_deprecated='define'
 d_attribute_format='define'
 d_attribute_malloc='define'
@@ -88,6 +89,7 @@ d_attribute_nonnull='define'
 d_attribute_noreturn='define'
 d_attribute_pure='define'
 d_attribute_unused='define'
+d_attribute_visibility='define'
 d_attribute_warn_unused_result='define'
 d_backtrace='define'
 d_bcmp='define'
@@ -179,6 +181,8 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_ffs='define'
+d_ffsl='define'
 d_fgetpos='define'
 d_finite='define'
 d_finitel='undef'
@@ -214,6 +218,7 @@ d_gdbm_ndbm_h_uses_prototypes='undef'
 d_gdbmndbm_h_uses_prototypes='undef'
 d_getaddrinfo='define'
 d_getcwd='define'
+d_getenv_preserves_other_thread='define'
 d_getespwnam='undef'
 d_getfsstat='undef'
 d_getgrent='define'
@@ -363,6 +368,8 @@ d_newlocale='define'
 d_nextafter='define'
 d_nice='define'
 d_nl_langinfo='define'
+d_nl_langinfo_l='define'
+d_non_int_bitfields='define'
 d_nv_zero_is_allbits_zero='define'
 d_old_pthread_create_joinable='undef'
 d_oldpthreads='undef'
@@ -427,6 +434,7 @@ d_semget='define'
 d_semop='define'
 d_sendmsg='define'
 d_setegid='define'
+d_setenv='define'
 d_seteuid='define'
 d_setgrent='define'
 d_setgrent_r='undef'
@@ -436,6 +444,7 @@ d_sethostent_r='undef'
 d_setitimer='define'
 d_setlinebuf='define'
 d_setlocale='define'
+d_setlocale_accepts_any_locale_name='undef'
 d_setlocale_r='undef'
 d_setnent='define'
 d_setnetent_r='undef'
@@ -482,6 +491,7 @@ d_sitearch='define'
 d_snprintf='define'
 d_sockaddr_in6="$owrt:ipv6"
 d_sockaddr_sa_len='undef'
+d_sockaddr_storage='define'
 d_sockatmark='undef'
 d_sockatmarkproto='undef'
 d_socket='define'
@@ -524,6 +534,7 @@ d_strtoul='define'
 d_strtoull='define'
 d_strtouq='define'
 d_strxfrm='define'
+d_strxfrm_l='define'
 d_suidsafe='undef'
 d_symlink='define'
 d_syscall='define'
@@ -537,12 +548,15 @@ d_tcsetpgrp='define'
 d_telldir='define'
 d_telldirproto='define'
 d_tgamma='define'
+d_thread_local='define'
 d_thread_safe_nl_langinfo_l='define'
 d_time='define'
 d_timegm='define'
 d_times='define'
 d_tm_tm_gmtoff='define'
 d_tm_tm_zone='define'
+d_towlower='define'
+d_towupper='define'
 d_trunc='define'
 d_truncate='define'
 d_truncl='define'
@@ -571,6 +585,7 @@ d_vprintf='define'
 d_vsnprintf='define'
 d_wait4='define'
 d_waitpid='define'
+d_wcrtomb='define'
 d_wcscmp='define'
 d_wcstombs='define'
 d_wcsxfrm='define'
@@ -717,6 +732,7 @@ i_syssockio='undef'
 i_sysstat='define'
 i_sysstatfs='define'
 i_sysstatvfs='define'
+i_syssyscall='define'
 i_systime='define'
 i_systimek='undef'
 i_systimes='define'
@@ -737,6 +753,7 @@ i_varargs='undef'
 i_varhdr='stdarg.h'
 i_vfork='undef'
 i_wchar='define'
+i_wctype='define'
 i_xlocale='undef'
 ignore_versioned_solibs='y'
 inc_version_list=' '
@@ -924,6 +941,8 @@ spackage='Perl5'
 spitshell='cat'
 src='.'
 ssizetype='ssize_t'
+st_dev_sign='1'
+st_dev_size='8'
 st_ino_sign='1'
 st_ino_size='8'
 startperl='#!/usr/bin/perl'
@@ -969,6 +988,7 @@ uniq='uniq'
 use5005threads='undef'
 usecbacktrace='undef'
 usecrosscompile='define'
+usedefaultstrict='undef'
 usedevel='undef'
 usedl='define'
 usedtrace='undef'
@@ -1025,6 +1045,7 @@ versiononly='undef'
 vi=''
 voidflags='15'
 xlibpth='/usr/lib/386 /lib/386'
+xlocale_needed='undef'
 yacc='yacc'
 yaccflags=''
 zcat=''
index 93d190c5a8bfa68f756184f124352a185291e479..1b198981a96f1590a398c6332b61eab071600fa0 100644 (file)
 }
 
 ($owrt:libc eq 'musl') {
-       # musl does not provide a working setlocale(). It accepts arbitrary locales
-       # and makes them act as if they were C.UTF-8.
-       d_setlocale='undef'
-       
        d_stdio_ptr_lval='undef'
        d_stdio_ptr_lval_sets_cnt='undef'
        d_stdiobase='undef'
index b318648e0109855bb130933986c529a2222c3fe5..fbd0361309f463ddefcb55c76f6ba710e5094cec 100644 (file)
@@ -1,17 +1,17 @@
 # Set the version here
 PERL_REVISION=5
-PERL_VERSION=28
-PERL_SUBVERSION=1
+PERL_VERSION=38
+PERL_SUBVERSION=0
 
 # (api_revison, api_version, api_subversion) = (revision, version, 0) usually
 PERL_API_REVISION=5
-PERL_API_VERSION=28
+PERL_API_VERSION=38
 PERL_API_SUBVERSION=0
 
-known_extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize Win32 Win32API/File Win32CORE XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash'
-extensions='B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob File/Glob Filter/Util/Call GDBM_File Hash/Util Hash/Util/FieldHash I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Tie/Hash/NamedCapture Time/HiRes Time/Piece Unicode/Collate XS/APItest XS/Typemap arybase attributes mro re threads threads/shared Archive/Tar Attribute/Handlers AutoLoader B/Debug CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Carp Config/Perl/V Devel/SelfStubber Digest Dumpvalue Env Errno Exporter ExtUtils/CBuilder ExtUtils/Command ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS File/Fetch File/Find File/Path File/Temp FileCache Filter/Simple Getopt/Long HTTP/Tiny I18N/Collate I18N/LangTags IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 JSON/PP Locale/Codes Locale/Maketext Locale/Maketext/Simple Math/BigInt Math/BigRat Math/Complex Memoize Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata NEXT Net/Ping Params/Check Parse/CPAN/Meta Perl/OSType PerlIO/via/QuotedPrint Pod/Checker Pod/Escapes Pod/Functions Pod/Html Pod/Parser Pod/Perldoc Pod/Simple Pod/Usage Safe Search/Dict SelfLoader Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Memoize Tie/RefHash Time/Local XSLoader autodie autouse base bignum constant encoding/warnings experimental if lib libnet parent perlfaq podlators Unicode/Normalize version'
-nonxs_ext='Archive/Tar Attribute/Handlers AutoLoader B/Debug CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Carp Config/Perl/V Devel/SelfStubber Digest Dumpvalue Env Errno Exporter ExtUtils/CBuilder ExtUtils/Command ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS File/Fetch File/Find File/Path File/Temp FileCache Filter/Simple Getopt/Long HTTP/Tiny I18N/Collate I18N/LangTags IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 JSON/PP Locale/Codes Locale/Maketext Locale/Maketext/Simple Math/BigInt Math/BigRat Math/Complex Memoize Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata NEXT Net/Ping Params/Check Parse/CPAN/Meta Perl/OSType PerlIO/via/QuotedPrint Pod/Checker Pod/Escapes Pod/Functions Pod/Html Pod/Parser Pod/Perldoc Pod/Simple Pod/Usage Safe Search/Dict SelfLoader Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Memoize Tie/RefHash Time/Local XSLoader autodie autouse base bignum constant encoding/warnings experimental if lib libnet parent perlfaq podlators Unicode/Normalize version'
-dynamic_ext='B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob File/Glob Filter/Util/Call GDBM_File Hash/Util Hash/Util/FieldHash I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Tie/Hash/NamedCapture Time/HiRes Time/Piece Unicode/Collate XS/APItest XS/Typemap arybase attributes mro re threads threads/shared'
+dynamic_ext='attributes B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd Data/Dumper DB_File Devel/Peek Devel/PPPort Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob File/Glob Filter/Util/Call GDBM_File Hash/Util Hash/Util/FieldHash I18N/Langinfo IO IPC/SysV List/Util Math/BigInt/FastCalc MIME/Base64 mro Opcode PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via POSIX re SDBM_File Socket Storable Sys/Hostname Sys/Syslog threads threads/shared Time/HiRes Time/Piece Unicode/Collate Unicode/Normalize XS/APItest XS/Typemap'
+extensions='attributes B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd Data/Dumper DB_File Devel/Peek Devel/PPPort Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob File/Glob Filter/Util/Call Hash/Util Hash/Util/FieldHash I18N/Langinfo IO IPC/SysV List/Util Math/BigInt/FastCalc MIME/Base64 mro Opcode PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via POSIX re SDBM_File Socket Storable Sys/Hostname Sys/Syslog threads threads/shared Time/HiRes Time/Piece Unicode/Collate Unicode/Normalize XS/APItest XS/Typemap Archive/Tar Attribute/Handlers autodie AutoLoader autouse base bignum Carp Config/Perl/V constant CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Devel/SelfStubber Digest Dumpvalue encoding/warnings Env Errno experimental Exporter ExtUtils/CBuilder ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS ExtUtils/PL2Bat FileCache File/Fetch File/Find File/Path File/Temp Filter/Simple FindBin GDBM_File Getopt/Long HTTP/Tiny I18N/Collate I18N/LangTags if IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 JSON/PP lib libnet Locale/Maketext Locale/Maketext/Simple Math/BigInt Math/BigRat Math/Complex Memoize Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata Net/Ping NEXT Params/Check parent perlfaq PerlIO/via/QuotedPrint Perl/OSType Pod/Checker Pod/Escapes Pod/Functions Pod/Html podlators Pod/Perldoc Pod/Simple Pod/Usage Safe Search/Dict SelfLoader Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Hash/NamedCapture Tie/Memoize Tie/RefHash Time/Local version XSLoader'
+known_extensions='Amiga/ARexx Amiga/Exec Archive/Tar Attribute/Handlers attributes autodie AutoLoader autouse B base bignum Carp Compress/Raw/Bzip2 Compress/Raw/Zlib Config/Perl/V constant CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Cwd Data/Dumper DB_File Devel/Peek Devel/PPPort Devel/SelfStubber Digest Digest/MD5 Digest/SHA Dumpvalue Encode encoding/warnings Env Errno experimental Exporter ExtUtils/CBuilder ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS ExtUtils/PL2Bat Fcntl FileCache File/DosGlob File/Fetch File/Find File/Glob File/Path File/Temp Filter/Simple Filter/Util/Call FindBin GDBM_File Getopt/Long Hash/Util Hash/Util/FieldHash HTTP/Tiny I18N/Collate I18N/Langinfo I18N/LangTags if IO IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 IPC/SysV JSON/PP lib libnet List/Util Locale/Maketext Locale/Maketext/Simple Math/BigInt Math/BigInt/FastCalc Math/BigRat Math/Complex Memoize MIME/Base64 Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata mro NDBM_File Net/Ping NEXT ODBM_File Opcode Params/Check parent perlfaq PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via PerlIO/via/QuotedPrint Perl/OSType Pod/Checker Pod/Escapes Pod/Functions Pod/Html podlators Pod/Perldoc Pod/Simple Pod/Usage POSIX re Safe SDBM_File Search/Dict SelfLoader Socket Storable Sys/Hostname Sys/Syslog Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue threads Thread/Semaphore threads/shared Tie/File Tie/Hash/NamedCapture Tie/Memoize Tie/RefHash Time/HiRes Time/Local Time/Piece Unicode/Collate Unicode/Normalize version VMS/DCLsym VMS/Filespec VMS/Stdio Win32 Win32API/File Win32CORE XS/APItest XSLoader XS/Typemap'
+nonxs_ext='Archive/Tar Attribute/Handlers autodie AutoLoader autouse base bignum Carp Config/Perl/V constant CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Devel/SelfStubber Digest Dumpvalue encoding/warnings Env Errno experimental Exporter ExtUtils/CBuilder ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS ExtUtils/PL2Bat FileCache File/Fetch File/Find File/Path File/Temp Filter/Simple FindBin Getopt/Long HTTP/Tiny I18N/Collate I18N/LangTags if IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 JSON/PP lib libnet Locale/Maketext Locale/Maketext/Simple Math/BigInt Math/BigRat Math/Complex Memoize Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata Net/Ping NEXT Params/Check parent perlfaq PerlIO/via/QuotedPrint Perl/OSType Pod/Checker Pod/Escapes Pod/Functions Pod/Html podlators Pod/Perldoc Pod/Simple Pod/Usage Safe Search/Dict SelfLoader Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Hash/NamedCapture Tie/Memoize Tie/RefHash Time/Local version XSLoader'
 
 # No need to change anything from here on
 owrt:perllibpath="/usr/lib/perl5/$PERL_REVISION.$PERL_VERSION"
diff --git a/lang/perl/patches/001-macos_11_support.patch b/lang/perl/patches/001-macos_11_support.patch
deleted file mode 100644 (file)
index f61c519..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/hints/darwin.sh
-+++ b/hints/darwin.sh
-@@ -301,7 +301,7 @@ case "$osvers" in  # Note: osvers is the
-    # We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by
-    # capturing its value and adding it to the flags.
-     case "$MACOSX_DEPLOYMENT_TARGET" in
--    10.*)
-+    [1-9][0-9].*)
-       add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET
-       add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET
-       ;;
-@@ -313,7 +313,7 @@ case "$osvers" in  # Note: osvers is the
- *** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
- ***
--*** Please either set it to 10.something, or to empty.
-+*** Please either set it to a valid macOS version number (e.g., 10.15) or to empty.
- EOM
-       exit 1
-@@ -327,7 +327,7 @@ EOM
-     # "ProductVersion:    10.11"     "10.11"
-         prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
-     case "$prodvers" in
--    10.*)
-+    [1-9][0-9].*)
-       add_macosx_version_min ccflags $prodvers
-       add_macosx_version_min ldflags $prodvers
-       ;;
diff --git a/lang/perl/patches/002-add-Internals-getcwd.patch b/lang/perl/patches/002-add-Internals-getcwd.patch
deleted file mode 100644 (file)
index d2a8497..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-From 15f67d146cf1f32504e8a11de3faa2abc0f467cd Mon Sep 17 00:00:00 2001
-From: Tony Cook <tony@develop-help.com>
-Date: Mon, 25 Mar 2019 16:48:40 +1100
-Subject: [PATCH] (perl #133951) add Internals::getcwd
-
----
- MANIFEST      |  1 +
- t/io/getcwd.t | 22 ++++++++++++++++++++++
- universal.c   | 22 ++++++++++++++++++++++
- 3 files changed, 45 insertions(+)
- create mode 100644 t/io/getcwd.t
-
---- a/MANIFEST
-+++ b/MANIFEST
-@@ -5456,6 +5456,7 @@ t/io/errno.t                     See if $! is correctly se
- t/io/errnosig.t                       Test case for restoration $! when leaving signal handlers
- t/io/fflush.t                 See if auto-flush on fork/exec/system/qx works
- t/io/fs.t                     See if directory manipulations work
-+t/io/getcwd.t                 See if Internals::getcwd is sane
- t/io/inplace.t                        See if inplace editing works
- t/io/iofile.t                 See if we can load IO::File on demand
- t/io/iprefix.t                        See if inplace editing works with prefixes
---- /dev/null
-+++ b/t/io/getcwd.t
-@@ -0,0 +1,22 @@
-+#!./perl -w
-+
-+BEGIN {
-+    chdir 't' if -d 't';
-+    require "./test.pl";
-+    set_up_inc('../lib');
-+}
-+
-+use Config;
-+
-+$Config{d_getcwd}
-+  or plan skip_all => "no getcwd";
-+
-+my $cwd = Internals::getcwd();
-+ok(!defined $cwd || $cwd ne "",
-+   "Internals::getcwd() returned a reasonable result");
-+
-+if (defined $cwd) {
-+    ok(-d $cwd, "check a success result is a directory");
-+}
-+
-+done_testing();
---- a/universal.c
-+++ b/universal.c
-@@ -986,6 +986,25 @@ XS(XS_re_regexp_pattern)
-     NOT_REACHED; /* NOTREACHED */
- }
-+#ifdef HAS_GETCWD
-+
-+XS(XS_Internals_getcwd)
-+{
-+    dXSARGS;
-+    SV *sv = sv_newmortal();
-+
-+    if (items != 0)
-+        croak_xs_usage(cv, "");
-+
-+    (void)getcwd_sv(sv);
-+
-+    SvTAINTED_on(sv);
-+    PUSHs(sv);
-+    XSRETURN(1);
-+}
-+
-+#endif
-+
- #include "vutil.h"
- #include "vxs.inc"
-@@ -1020,6 +1039,9 @@ static const struct xsub_details details
-     {"re::regnames", XS_re_regnames, ";$"},
-     {"re::regnames_count", XS_re_regnames_count, ""},
-     {"re::regexp_pattern", XS_re_regexp_pattern, "$"},
-+#ifdef HAS_GETCWD
-+    {"Internals::getcwd", XS_Internals_getcwd, ""},
-+#endif
- };
- STATIC OP*
diff --git a/lang/perl/patches/003-fallback-to-the-built-in-getcwd-if-we-ca.patch b/lang/perl/patches/003-fallback-to-the-built-in-getcwd-if-we-ca.patch
deleted file mode 100644 (file)
index dcadb31..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
---- a/dist/PathTools/Cwd.pm
-+++ b/dist/PathTools/Cwd.pm
-@@ -659,6 +659,10 @@ if (exists $METHOD_MAP{$^O}) {
-   }
- }
-+# built-in from 5.30
-+*getcwd = \&Internals::getcwd
-+  if !defined &getcwd && defined &Internals::getcwd;
-+
- # In case the XS version doesn't load.
- *abs_path = \&_perl_abs_path unless defined &abs_path;
- *getcwd = \&_perl_getcwd unless defined &getcwd;
---- a/dist/PathTools/t/cwd.t
-+++ b/dist/PathTools/t/cwd.t
-@@ -10,6 +10,7 @@ chdir 't';
- use Config;
- use File::Spec;
- use File::Path;
-+use Errno qw(EACCES);
- use lib File::Spec->catdir('t', 'lib');
- use Test::More;
-@@ -208,7 +209,15 @@ SKIP: {
-     like($abs_path,      qr|$want$|i, "Cwd::abs_path produced $abs_path");
-     like($fast_abs_path, qr|$want$|i, "Cwd::fast_abs_path produced $fast_abs_path");
--    like($pas,           qr|$want$|i, "Cwd::_perl_abs_path produced $pas") if $EXTRA_ABSPATH_TESTS;
-+    if ($EXTRA_ABSPATH_TESTS) {
-+        # _perl_abs_path() can fail if some ancestor directory isn't readable
-+        if (defined $pas) {
-+            like($pas,           qr|$want$|i, "Cwd::_perl_abs_path produced $pas");
-+        }
-+        else {
-+            is($!+0, EACCES, "check we got the expected error on failure");
-+        }
-+    }
-     rmtree($test_dirs[0], 0, 0);
-     1 while unlink $file;
index 77ea26f46b25213b33097fe3a6c31bc4dd184020..e38a05be8d553641ef984d0e5ef7e21b42b1b631 100644 (file)
@@ -1,6 +1,6 @@
 --- a/perl.c
 +++ b/perl.c
-@@ -303,7 +303,7 @@ perl_construct(pTHXx)
+@@ -317,7 +317,7 @@ perl_construct(pTHXx)
      PL_localpatches = local_patches;  /* For possible -v */
  #endif
  
diff --git a/lang/perl/patches/020-storables-stacksize.patch b/lang/perl/patches/020-storables-stacksize.patch
deleted file mode 100644 (file)
index 903d90b..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-From 682a4acb98783a7f9b5c286b308f12863599fec3 Mon Sep 17 00:00:00 2001
-From: Tony Cook <tony@develop-help.com>
-Date: Mon, 30 Jul 2018 21:00:52 +1000
-Subject: (perl #133411) don't try to load Storable with -Dusecrosscompile
-
----
- dist/Storable/Makefile.PL |  9 ++++++++-
- dist/Storable/stacksize   | 10 +++++++---
- 2 files changed, 15 insertions(+), 4 deletions(-)
-
---- a/dist/Storable/Makefile.PL
-+++ b/dist/Storable/Makefile.PL
-@@ -90,12 +90,19 @@ sub depend {
-         # blib.pm needs arch/lib
-         $extra_deps = ' Storable.pm';
-     }
-+    my $whichperl;
-+    if ($Config::Config{usecrosscompile}) {
-+        $whichperl = '$(PERLRUN)';
-+    }
-+    else {
-+        $whichperl = '$(FULLPERLRUNINST)';
-+    }
-     my $linktype = uc($_[0]->{LINKTYPE});
-     my $limit_pm = File::Spec->catfile('lib', 'Storable', 'Limit.pm');
-     "
- $limit_pm : stacksize \$(INST_$linktype)$extra_deps
-       \$(MKPATH) \$(INST_LIB)
--      \$(FULLPERLRUNINST) stacksize $options
-+      $whichperl stacksize $options
- release : dist
-       git tag \$(VERSION)
---- a/dist/Storable/stacksize
-+++ b/dist/Storable/stacksize
-@@ -7,6 +7,9 @@ use Cwd;
- use File::Spec;
- use strict;
-+-d "lib" or mkdir "lib";
-+-d "lib/Storable" or mkdir "lib/Storable";
-+
- my $fn = "lib/Storable/Limit.pm";
- my $ptrsize = $Config{ptrsize};
- my ($bad1, $bad2) = (65001, 25000);
-@@ -29,6 +32,10 @@ sub is_miniperl {
- }
- if (is_miniperl()) {
-+    if ($Config{usecrosscompile}) {
-+        write_limits(500, 265);
-+        exit;
-+    }
-     die "Should not run during miniperl\n";
- }
- my $prefix = "";
-@@ -68,9 +75,6 @@ if ($ENV{PERL_CORE}) {
-     }
- }
---d "lib" or mkdir "lib";
---d "lib/Storable" or mkdir "lib/Storable";
--
- if ($^O eq "MSWin32") {
-     require Win32;
-     my ($str, $major, $minor) = Win32::GetOSVersion();
index 2f7ebcbc49667e2a397561b0b73b60a1500548b7..806a31256b2007ee5f2c36d75261fac0d176cc21 100644 (file)
@@ -1,8 +1,8 @@
 --- a/Makefile.SH
 +++ b/Makefile.SH
-@@ -339,22 +339,11 @@ MANIFEST_SRT = MANIFEST.srt
- !GROK!THIS!
+@@ -360,22 +360,11 @@ PERL_EXE_LDFLAGS=$exeldflags
+       ;;
+ esac
  
 -case "$usecrosscompile$perl" in
 -define?*)
index b0e783462b79ddee3efe6bd5ecb37f6aa2d6f327..ae044c8f165937c8bdaba558ad9d53e5d9ff5241 100644 (file)
@@ -1,8 +1,8 @@
 --- a/perl.c
 +++ b/perl.c
-@@ -1987,16 +1987,6 @@ S_Internals_V(pTHX_ CV *cv)
+@@ -2098,16 +2098,6 @@ S_Internals_V(pTHX_ CV *cv)
      PUSHs(Perl_newSVpvn_flags(aTHX_ non_bincompat_options,
-                             sizeof(non_bincompat_options) - 1, SVs_TEMP));
+                               sizeof(non_bincompat_options) - 1, SVs_TEMP));
  
 -#ifndef PERL_BUILD_DATE
 -#  ifdef __DATE__
@@ -16,4 +16,4 @@
 -
  #ifdef PERL_BUILD_DATE
      PUSHs(Perl_newSVpvn_flags(aTHX_
-                             STR_WITH_LEN("Compiled at " PERL_BUILD_DATE),
+                               STR_WITH_LEN("Compiled at " PERL_BUILD_DATE),
diff --git a/lang/perl/patches/301-fix_macos_static_linking.patch b/lang/perl/patches/301-fix_macos_static_linking.patch
deleted file mode 100644 (file)
index 4b4ef92..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-@@ -2738,14 +2738,14 @@ sub _find_static_libs {
- Called by a utility method of makeaperl. Checks whether a given file
- is an XS library by seeing whether it defines any symbols starting
--with C<boot_>.
-+with C<boot_> (with an optional leading underscore â€“ needed on MacOS).
- =cut
- sub xs_static_lib_is_xs {
-     my ($self, $libfile) = @_;
-     my $devnull = File::Spec->devnull;
--    return `nm $libfile 2>$devnull` =~ /\bboot_/;
-+    return `nm $libfile 2>$devnull` =~ /\b_?boot_/;
- }
- =item makefile (o)
index 9afb8a8ce79a09283050be9aff56d2e0b7fc793b..efe8e0c2993f161c16538a6fbc26c205f0667544 100644 (file)
@@ -1,8 +1,8 @@
 --- a/cpan/podlators/Makefile.PL
 +++ b/cpan/podlators/Makefile.PL
-@@ -18,6 +18,19 @@ use Config;
use ExtUtils::MakeMaker;
- use File::Spec;
+@@ -39,6 +39,19 @@ sub dist_version {
    die "$0: cannot find version in lib/Pod/Man.pm\n";
+ }
  
 +foreach (glob('scripts/pod*.PL')) {
 +    # The various pod*.PL extractors change directory. Doing that with relative
@@ -20,7 +20,7 @@
  # Generate full paths for scripts distributed in the bin directory.  Appends
  # the .com extension to scripts on VMS, unless they already have the .PL
  # extension.
-@@ -28,7 +41,7 @@ use File::Spec;
+@@ -49,7 +62,7 @@ sub dist_version {
  #          (Scalar) Space-separated relative paths from top of distribution
  sub scripts {
      my (@scripts) = @_;
@@ -29,7 +29,7 @@
      if ($^O eq 'VMS') {
          @paths = map { m{ [.] PL \z }xms ? $_ : $_ . '.com' } @paths;
      }
-@@ -77,8 +90,8 @@ my %metadata = (
+@@ -101,8 +114,8 @@ my %metadata = (
  
      # Override the files that generate section 1 man pages.
      MAN1PODS => {
index d2197571a9299d6ad32990374487b5f3666fac57..857cd1e9e2dd0b9a70b84e4be391fa928dc76c65 100644 (file)
@@ -1,14 +1,14 @@
 --- a/Makefile.SH
 +++ b/Makefile.SH
-@@ -275,6 +275,7 @@ LNS = $lns
+@@ -289,6 +289,7 @@ LNS = $lns
  # NOTE: some systems don't grok "cp -f". XXX Configure test needed?
  CPS = $cp
  RMS = rm -f
 +RMS_R = rm -rf
  ranlib = $ranlib
+ ECHO = $echo
  
- # The following are mentioned only to make metaconfig include the
-@@ -736,7 +737,7 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX
+@@ -786,7 +787,7 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX
        ./generate_uudmap$(HOST_EXE_EXT) $(generated_headers)
  
  generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT)
@@ -17,7 +17,7 @@
        $(LNS) $(HOST_GENERATE) generate_uudmap$(HOST_EXE_EXT)
  
  !NO!SUBS!
-@@ -876,26 +877,26 @@ mydtrace.h: $(DTRACE_H)
+@@ -891,26 +892,26 @@ mydtrace.h: $(DTRACE_H)
        define)
                $spitshell >>$Makefile <<'!NO!SUBS!'
  $(DTRACE_MINI_O): perldtrace.d $(miniperl_objs_nodt)
@@ -48,7 +48,7 @@
  
  !NO!SUBS!
                ;;
-@@ -906,13 +907,13 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
+@@ -921,13 +922,13 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
        case "$useshrplib" in
        true)
                $spitshell >>$Makefile <<'!NO!SUBS!'
@@ -64,7 +64,7 @@
        mv $@ libperl$(OBJ_EXT)
        $(AR) qv $(LIBPERL) libperl$(OBJ_EXT)
  !NO!SUBS!
-@@ -921,7 +922,7 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
+@@ -936,7 +937,7 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
                ;;
        *)
                $spitshell >>$Makefile <<'!NO!SUBS!'
@@ -73,7 +73,7 @@
        $(AR) rc $(LIBPERL) $(perllib_objs) $(DYNALOADER)
        @$(ranlib) $(LIBPERL)
  !NO!SUBS!
-@@ -954,7 +955,7 @@ $(MINIPERL_EXE): lib/buildcustomize.pl
+@@ -970,7 +971,7 @@ $(MINIPERL_EXE): lib/buildcustomize.pl
        amigaos*)
                $spitshell >>$Makefile <<'!NO!SUBS!'
  lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
 +      @$(RMS) miniperl.xok
  !NO!SUBS!
  
-         case $osname in
-@@ -1119,8 +1120,8 @@ pod/perl5281delta.pod: pod/perldelta.pod
-       $(LNS) perldelta.pod pod/perl5281delta.pod
+         case "$osname" in
+@@ -1133,8 +1134,8 @@ pod/perl5380delta.pod: pod/perldelta.pod
+       $(LNS) perldelta.pod pod/perl5380delta.pod
  
  extra.pods: $(MINIPERL_EXE)
 -      -@test ! -f extra.pods || rm -f `cat extra.pods`
        -@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \
            nx=`echo $$x | sed -e "s/README\.//"`; \
            $(LNS) ../$$x "pod/perl"$$nx".pod" ; \
-@@ -1340,11 +1341,11 @@ realclean:     _realcleaner _mopup
+@@ -1334,11 +1335,11 @@ realclean:     _realcleaner _mopup
        @echo "Note that '$(MAKE) realclean' does not delete config.sh or Policy.sh"
  
  _clobber:
  
  clobber:      _realcleaner _mopup _clobber
  
-@@ -1352,23 +1353,23 @@ distclean:     clobber
+@@ -1346,24 +1347,24 @@ distclean:     clobber
  
  # Like distclean but also removes emacs backups and *.orig.
  veryclean:    _verycleaner _mopup _clobber
  
  # Do not 'make _mopup' directly.
  _mopup:
--      rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c opmini.c perlmini.c generate_uudmap$(EXE_EXT) $(generated_headers)
-+      $(RMS) *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c opmini.c perlmini.c generate_uudmap$(EXE_EXT) $(generated_headers)
+-      rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c $(mini_only_src) generate_uudmap$(EXE_EXT) $(generated_headers)
++      $(RMS) *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c $(mini_only_src) generate_uudmap$(EXE_EXT) $(generated_headers)
        -rmdir .depending
+-      -rm *.depends makedepend_file
 -      -@test -f extra.pods && rm -f `cat extra.pods`
 -      -@test -f vms/README_vms.pod && rm -f vms/README_vms.pod
--      -rm -f perl.exp ext.libs $(generated_pods) uni.data opmini.o perlmini.o pod/roffitall
+-      -rm -f perl.exp ext.libs $(generated_pods) uni.data $(mini_only_objs) pod/roffitall
 -      -rm -f perl.export perl.dll perl.libexp perl.map perl.def
 -      -rm -f *perl.xok
 -      -rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
 -      -rm -f $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl
 -      -rm -f config.arch config.over $(DTRACE_H)
++      $(RMS) *.depends makedepend_file
 +      -@test -f extra.pods && $(RMS) `cat extra.pods`
 +      -@test -f vms/README_vms.pod && $(RMS) vms/README_vms.pod
-+      $(RMS) perl.exp ext.libs $(generated_pods) uni.data opmini.o perlmini.o pod/roffitall
++      $(RMS) perl.exp ext.libs $(generated_pods) uni.data $(mini_only_objs) pod/roffitall
 +      $(RMS) perl.export perl.dll perl.libexp perl.map perl.def
 +      $(RMS) *perl.xok
 +      $(RMS) cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
        -cd pod; $(LDLIBPTH) $(MAKE) $(CLEAN)
        -cd utils; $(LDLIBPTH) $(MAKE) $(CLEAN)
        -@if test -f $(MINIPERL_EXE) ; then \
-@@ -1378,31 +1379,31 @@ _cleaner1:
+@@ -1373,8 +1374,8 @@ _cleaner1:
        else \
        sh $(CLEAN).sh ; \
        fi
 +      $(RMS) `grep -v ^# mkppport.lst | grep . | sed -e 's/$$/\/ppport.h/'`
  
  # Dear POSIX, thanks for making the default to xargs to be
- # run once if nothhing is passed in. It is such a great help.
- # Some systems do not support "?", so keep these files separate.
+ # run once if nothing is passed in. It is such a great help.
+@@ -1389,24 +1390,24 @@ _cleaner1:
+ # Add new rules before that line - the next line (rm -f so_locations ...) is
+ # used as a placeholder by a regen script.
  _cleaner2:
 -      -rm -f core.*perl.*.? t/core.perl.*.? .?*.c
 -      rm -f core *perl.core t/core t/*perl.core core.* t/core.*
 +      $(RMS) pod2htmd.tmp
 +      $(RMS_R) pod/perlfunc pod/perlipc
        -rmdir ext/B/lib
--      rm -f so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR)
-+      $(RMS) so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR)
+-      -rm -f dist/Time-HiRes/xdefine
+-      rm -f so_locations $(LIBPERL_NONSHR)
++      $(RMS) dist/Time-HiRes/xdefine
++      $(RMS) so_locations $(LIBPERL_NONSHR)
        -rmdir lib/version lib/threads lib/inc/ExtUtils lib/inc lib/encoding
        -rmdir lib/autodie/exception lib/autodie/Scope lib/autodie lib/XS
        -rmdir lib/Win32API lib/VMS lib/Unicode/Collate/Locale
-@@ -1452,11 +1453,11 @@ _realcleaner:
+@@ -1457,11 +1458,11 @@ _realcleaner:
  _verycleaner:
        @$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=veryclean
        @$(LDLIBPTH) $(MAKE) _cleaner2
        lint $(lintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(c)
  
  cscopeflags = -Rb  # Recursive, build-only.
-@@ -1514,7 +1515,7 @@ case "$targethost" in
+@@ -1522,7 +1523,7 @@ case "$targethost" in
  '') $spitshell >>$Makefile <<'!NO!SUBS!'
  test_prep test-prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) $(PERL_EXE) \
        $(dynamic_ext) $(TEST_PERL_DLL) runtests $(generated_pods) common_build
  
  !NO!SUBS!
  ;;
-@@ -1564,7 +1565,7 @@ test_prep test-prep: test_prep_pre \$(MI
+@@ -1572,7 +1573,7 @@ test_prep test-prep: test_prep_pre \$(MI
        $to config.sh
  # --- For lib/diagnostics.t with -Duseshrplib
        $to \$(PERL_EXE)
        $to t/\$(PERL_EXE)
  
  !GROK!THIS!
-@@ -1574,7 +1575,7 @@ esac
+@@ -1582,7 +1583,7 @@ esac
  $spitshell >>$Makefile <<'!NO!SUBS!'
  test_prep_reonly: $(MINIPERL_EXE) $(PERL_EXE) $(dynamic_ext_re) $(TEST_PERL_DLL)
        $(MINIPERL) make_ext.pl $(dynamic_ext_re) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
  !NO!SUBS!
  
  case "$targethost" in
-@@ -1629,7 +1630,7 @@ minitest_prep:
+@@ -1637,7 +1638,7 @@ minitest_prep: $(MINIPERL_EXE)
        @echo "You may see some irrelevant test failures if you have been unable"
        @echo "to build lib/Config.pm, or the Unicode data files."
        @echo " "
--      cd t && (rm -f $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE))
-+      cd t && ($(RMS) $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE))
+-      cd t && (rm -f $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE))
++      cd t && ($(RMS) $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE))
  
  MINITEST_TESTS = base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t
  
index 347f6f2a3f33d4e639c423509d5d53b2d73891ba..6589926bc511746e59a3f1f51bada4cfd29a1f63 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.SH
 +++ b/Makefile.SH
-@@ -333,7 +333,7 @@ PATH_SEP = $p_
+@@ -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)
diff --git a/lang/perl/patches/920-fix-no-locale.patch b/lang/perl/patches/920-fix-no-locale.patch
deleted file mode 100644 (file)
index 25ff285..0000000
+++ /dev/null
@@ -1,383 +0,0 @@
-commit d36adde059ed1c4f7af210b4f9fc3a7bd2d7d343
-Author: Karl Williamson <khw@cpan.org>
-Date:   Wed May 23 15:32:47 2018 -0600
-
-    Fix to compile under -DNO_LOCALE
-    
-    Several problems with this compile option were not caught before 5.28
-    was frozen.
-
---- a/embed.fnc
-+++ b/embed.fnc
-@@ -2793,9 +2793,11 @@ s       |bool   |isa_lookup     |NN HV *stash|NN con
- #endif
- #if defined(PERL_IN_LOCALE_C)
-+#  ifdef USE_LOCALE
- sn    |const char*|category_name |const int category
- s     |const char*|switch_category_locale_to_template|const int switch_category|const int template_category|NULLOK const char * template_locale
- s     |void   |restore_switched_locale|const int category|NULLOK const char * const original_locale
-+#  endif
- #  ifdef HAS_NL_LANGINFO
- sn    |const char*|my_nl_langinfo|const nl_item item|bool toggle
- #  else
---- a/embed.h
-+++ b/embed.h
-@@ -1796,16 +1796,16 @@
- #define unshare_hek_or_pvn(a,b,c,d)   S_unshare_hek_or_pvn(aTHX_ a,b,c,d)
- #  endif
- #  if defined(PERL_IN_LOCALE_C)
--#define category_name         S_category_name
--#define restore_switched_locale(a,b)  S_restore_switched_locale(aTHX_ a,b)
- #define save_to_buffer                S_save_to_buffer
--#define switch_category_locale_to_template(a,b,c)     S_switch_category_locale_to_template(aTHX_ a,b,c)
- #    if defined(USE_LOCALE)
-+#define category_name         S_category_name
- #define new_collate(a)                S_new_collate(aTHX_ a)
- #define new_ctype(a)          S_new_ctype(aTHX_ a)
- #define new_numeric(a)                S_new_numeric(aTHX_ a)
-+#define restore_switched_locale(a,b)  S_restore_switched_locale(aTHX_ a,b)
- #define set_numeric_radix(a)  S_set_numeric_radix(aTHX_ a)
- #define stdize_locale(a)      S_stdize_locale(aTHX_ a)
-+#define switch_category_locale_to_template(a,b,c)     S_switch_category_locale_to_template(aTHX_ a,b,c)
- #      if defined(USE_POSIX_2008_LOCALE)
- #define emulate_setlocale     S_emulate_setlocale
- #      endif
---- a/locale.c
-+++ b/locale.c
-@@ -1264,6 +1264,7 @@ S_locking_setlocale(pTHX_
- }
- #endif
-+#ifdef USE_LOCALE
- STATIC void
- S_set_numeric_radix(pTHX_ const bool use_locale)
-@@ -1299,6 +1300,10 @@ S_set_numeric_radix(pTHX_ const bool use
-     }
- #  endif
-+#else
-+
-+    PERL_UNUSED_ARG(use_locale);
-+
- #endif /* USE_LOCALE_NUMERIC and can find the radix char */
- }
-@@ -1481,7 +1486,6 @@ S_new_ctype(pTHX_ const char *newctype)
- #ifndef USE_LOCALE_CTYPE
--    PERL_ARGS_ASSERT_NEW_CTYPE;
-     PERL_UNUSED_ARG(newctype);
-     PERL_UNUSED_CONTEXT;
-@@ -1994,6 +1998,8 @@ S_new_collate(pTHX_ const char *newcoll)
- }
-+#endif
-+
- #ifdef WIN32
- STATIC char *
-@@ -2139,11 +2145,20 @@ Perl_setlocale(const int category, const
- {
-     /* This wraps POSIX::setlocale() */
-+#ifdef NO_LOCALE
-+
-+    PERL_UNUSED_ARG(category);
-+    PERL_UNUSED_ARG(locale);
-+
-+    return "C";
-+
-+#else
-+
-     const char * retval;
-     const char * newlocale;
-     dSAVEDERRNO;
--    DECLARATION_FOR_LC_NUMERIC_MANIPULATION;
-     dTHX;
-+    DECLARATION_FOR_LC_NUMERIC_MANIPULATION;
- #ifdef USE_LOCALE_NUMERIC
-@@ -2262,6 +2277,8 @@ Perl_setlocale(const int category, const
-     return retval;
-+#endif
-+
- }
- PERL_STATIC_INLINE const char *
-@@ -2414,13 +2431,16 @@ S_my_nl_langinfo(const int item, bool to
-     dTHX;
-     const char * retval;
-+#ifdef USE_LOCALE_NUMERIC
-+
-     /* We only need to toggle into the underlying LC_NUMERIC locale for these
-      * two items, and only if not already there */
-     if (toggle && ((   item != RADIXCHAR && item != THOUSEP)
-                     || PL_numeric_underlying))
--    {
-+
-+#endif  /* No toggling needed if not using LC_NUMERIC */
-+
-         toggle = FALSE;
--    }
- #if defined(HAS_NL_LANGINFO) /* nl_langinfo() is available.  */
- #  if   ! defined(HAS_THREAD_SAFE_NL_LANGINFO_L)      \
-@@ -2468,6 +2488,8 @@ S_my_nl_langinfo(const int item, bool to
-             do_free = TRUE;
-         }
-+#    ifdef USE_LOCALE_NUMERIC
-+
-         if (toggle) {
-             if (PL_underlying_numeric_obj) {
-                 cur = PL_underlying_numeric_obj;
-@@ -2478,6 +2500,8 @@ S_my_nl_langinfo(const int item, bool to
-             }
-         }
-+#    endif
-+
-         /* We have to save it to a buffer, because the freelocale() just below
-          * can invalidate the internal one */
-         retval = save_to_buffer(nl_langinfo_l(item, cur),
-@@ -5169,9 +5193,7 @@ Perl_my_strerror(pTHX_ const int errnum)
-     LOCALE_UNLOCK;
- #  endif /* End of doesn't have strerror_l */
--#endif   /* End of does have locale messages */
--
--#ifdef DEBUGGING
-+#  ifdef DEBUGGING
-     if (DEBUG_Lv_TEST) {
-         PerlIO_printf(Perl_debug_log, "Strerror returned; saving a copy: '");
-@@ -5179,7 +5201,8 @@ Perl_my_strerror(pTHX_ const int errnum)
-         PerlIO_printf(Perl_debug_log, "'\n");
-     }
--#endif
-+#  endif
-+#endif   /* End of does have locale messages */
-     SAVEFREEPV(errstr);
-     return errstr;
-@@ -5301,10 +5324,17 @@ L<C<Perl_switch_to_global_locale>|perlap
- bool
- Perl_sync_locale()
- {
-+
-+#ifndef USE_LOCALE
-+
-+    return TRUE;
-+
-+#else
-+
-     const char * newlocale;
-     dTHX;
--#ifdef USE_POSIX_2008_LOCALE
-+#  ifdef USE_POSIX_2008_LOCALE
-     bool was_in_global_locale = FALSE;
-     locale_t cur_obj = uselocale((locale_t) 0);
-@@ -5316,11 +5346,11 @@ Perl_sync_locale()
-      * will affect the */
-     if (cur_obj == LC_GLOBAL_LOCALE) {
--#  ifdef HAS_QUERY_LOCALE
-+#    ifdef HAS_QUERY_LOCALE
-         do_setlocale_c(LC_ALL, setlocale(LC_ALL, NULL));
--#  else
-+#    else
-         unsigned int i;
-@@ -5330,17 +5360,17 @@ Perl_sync_locale()
-             do_setlocale_r(categories[i], setlocale(categories[i], NULL));
-         }
--#  endif
-+#    endif
-         was_in_global_locale = TRUE;
-     }
--#else
-+#  else
-     bool was_in_global_locale = TRUE;
--#endif
--#ifdef USE_LOCALE_CTYPE
-+#  endif
-+#  ifdef USE_LOCALE_CTYPE
-     newlocale = savepv(do_setlocale_c(LC_CTYPE, NULL));
-     DEBUG_Lv(PerlIO_printf(Perl_debug_log,
-@@ -5349,8 +5379,8 @@ Perl_sync_locale()
-     new_ctype(newlocale);
-     Safefree(newlocale);
--#endif /* USE_LOCALE_CTYPE */
--#ifdef USE_LOCALE_COLLATE
-+#  endif /* USE_LOCALE_CTYPE */
-+#  ifdef USE_LOCALE_COLLATE
-     newlocale = savepv(do_setlocale_c(LC_COLLATE, NULL));
-     DEBUG_Lv(PerlIO_printf(Perl_debug_log,
-@@ -5359,8 +5389,8 @@ Perl_sync_locale()
-     new_collate(newlocale);
-     Safefree(newlocale);
--#endif
--#ifdef USE_LOCALE_NUMERIC
-+#  endif
-+#  ifdef USE_LOCALE_NUMERIC
-     newlocale = savepv(do_setlocale_c(LC_NUMERIC, NULL));
-     DEBUG_Lv(PerlIO_printf(Perl_debug_log,
-@@ -5369,9 +5399,12 @@ Perl_sync_locale()
-     new_numeric(newlocale);
-     Safefree(newlocale);
--#endif /* USE_LOCALE_NUMERIC */
-+#  endif /* USE_LOCALE_NUMERIC */
-     return was_in_global_locale;
-+
-+#endif
-+
- }
- #if defined(DEBUGGING) && defined(USE_LOCALE)
---- a/makedef.pl
-+++ b/makedef.pl
-@@ -574,6 +574,9 @@ unless ($define{USE_LOCALE_COLLATE}) {
-                   PL_collxfrm_mult
-                   Perl_sv_collxfrm
-                   Perl_sv_collxfrm_flags
-+                    PL_strxfrm_NUL_replacement
-+                    PL_strxfrm_is_behaved
-+                    PL_strxfrm_max_cp
-                        );
- }
-@@ -583,6 +586,9 @@ unless ($define{USE_LOCALE_NUMERIC}) {
-                   PL_numeric_name
-                   PL_numeric_radix_sv
-                   PL_numeric_standard
-+                    PL_numeric_underlying
-+                    PL_numeric_underlying_is_standard
-+                    PL_underlying_numeric_obj
-                        );
- }
---- a/perl.h
-+++ b/perl.h
-@@ -5656,6 +5656,9 @@ typedef struct am_table_short AMTS;
- #  define IN_LC_COMPILETIME(category)      0
- #  define IN_LC_RUNTIME(category)          0
- #  define IN_LC(category)                  0
-+#  define _CHECK_AND_WARN_PROBLEMATIC_LOCALE
-+#  define _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(s, send)
-+#  define _CHECK_AND_OUTPUT_WIDE_LOCALE_CP_MSG(c)
- #endif
---- a/proto.h
-+++ b/proto.h
-@@ -4886,8 +4886,6 @@ PERL_CALLCONV SV*        Perl_hfree_next_entry(
-       assert(hv); assert(indexp)
- #endif
- #if defined(PERL_IN_LOCALE_C)
--STATIC const char*    S_category_name(const int category);
--STATIC void   S_restore_switched_locale(pTHX_ const int category, const char * const original_locale);
- #ifndef PERL_NO_INLINE_FUNCTIONS
- PERL_STATIC_INLINE const char *       S_save_to_buffer(const char * string, char **buf, Size_t *buf_size, const Size_t offset)
-                       __attribute__warn_unused_result__;
-@@ -4895,17 +4893,19 @@ PERL_STATIC_INLINE const char *        S_save_t
-       assert(buf_size)
- #endif
--STATIC const char*    S_switch_category_locale_to_template(pTHX_ const int switch_category, const int template_category, const char * template_locale);
- #  if defined(USE_LOCALE)
-+STATIC const char*    S_category_name(const int category);
- STATIC void   S_new_collate(pTHX_ const char* newcoll);
- STATIC void   S_new_ctype(pTHX_ const char* newctype);
- #define PERL_ARGS_ASSERT_NEW_CTYPE    \
-       assert(newctype)
- STATIC void   S_new_numeric(pTHX_ const char* newnum);
-+STATIC void   S_restore_switched_locale(pTHX_ const int category, const char * const original_locale);
- STATIC void   S_set_numeric_radix(pTHX_ const bool use_locale);
- STATIC char*  S_stdize_locale(pTHX_ char* locs);
- #define PERL_ARGS_ASSERT_STDIZE_LOCALE        \
-       assert(locs)
-+STATIC const char*    S_switch_category_locale_to_template(pTHX_ const int switch_category, const int template_category, const char * template_locale);
- #    if defined(USE_POSIX_2008_LOCALE)
- STATIC const char*    S_emulate_setlocale(const int category, const char* locale, unsigned int index, const bool is_index_valid);
- #    endif
---- a/sv.c
-+++ b/sv.c
-@@ -13330,10 +13330,15 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const s
-     SvTAINT(sv);
-+#ifdef USE_LOCALE_NUMERIC
-+
-     if (lc_numeric_set) {
-         RESTORE_LC_NUMERIC();   /* Done outside loop, so don't have to
-                                    save/restore each iteration. */
-     }
-+
-+#endif
-+
- }
- /* =========================================================================
---- a/t/lib/warnings/regexec
-+++ b/t/lib/warnings/regexec
-@@ -215,6 +215,10 @@ Use of \b{} or \B{} for non-UTF-8 locale
- Use of \b{} or \B{} for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 17.
- ########
- # NAME (?[ ]) in non-UTF-8 locale
-+require '../loc_tools.pl';
-+unless (locales_enabled()) {
-+    print("SKIPPED\n# locales not available\n"),exit;
-+}
- eval { require POSIX; POSIX->import("locale_h") };
- if ($@) {
-     print("SKIPPED\n# no POSIX\n"),exit;
-@@ -229,14 +233,14 @@ setlocale(&POSIX::LC_CTYPE, "C");
- ":" =~ /(?[ \: ])/;
- no warnings 'locale';
- EXPECT
--Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 9.
--Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 9.
--Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 10.
--Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 10.
--Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 11.
--Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 11.
--Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 12.
--Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 12.
-+Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 13.
-+Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 13.
-+Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 14.
-+Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 14.
-+Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 15.
-+Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 15.
-+Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 16.
-+Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale at - line 16.
- ########
- # NAME (?[ ]) in UTF-8 locale
- require '../loc_tools.pl';
index a098210dd3a5ed0885f0a31cd699f9b1c703b5df..d0ccec913fc6c1496fd1c5e8cbc9617545b549b3 100644 (file)
@@ -1,11 +1,11 @@
 --- a/ext/Errno/Errno_pm.PL
 +++ b/ext/Errno/Errno_pm.PL
-@@ -133,7 +133,7 @@ sub get_files {
+@@ -115,7 +115,7 @@ sub get_files {
        # Some Linuxes have weird errno.hs which generate
        # no #file or #line directives
-       my ($linux_errno_h) = grep { -e $_ } map { "$_/errno.h" }
+       ($linux_errno_h) = grep { -e $_ } map { "$_/errno.h" }
 -          "$sysroot/usr/include", "$sysroot/usr/local/include",
 +          "$sysroot/usr/include", "$sysroot/usr/local/include", "$sysroot/include",
-           split / / => $Config{locincpth} or
-               die "Cannot find errno.h";
-       $file{$linux_errno_h} = 1;
+           split / / => $Config{locincpth};
+     }
diff --git a/lang/perl/patches/999-fix-build-failure-against-gcc-10.patch b/lang/perl/patches/999-fix-build-failure-against-gcc-10.patch
deleted file mode 100644 (file)
index aa43f05..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-From 6bd6308fcea3541e505651bf8e8127a4a03d22cd Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
-Date: Tue, 12 Nov 2019 09:19:18 +0100
-Subject: [PATCH] Adapt Configure to GCC version 10
-
-I got a notice from Jeff Law <law@redhat.com>:
-
-    Your particular package fails its testsuite. This was ultimately
-    tracked down to a Configure problem. The perl configure script treated
-    gcc-10 as gcc-1 and turned on -fpcc-struct-return. This is an ABI
-    changing flag and caused Perl to not be able to interact properly with
-    the dbm libraries on the system leading to a segfault.
-
-His proposed patch corrected only this one instance of the version
-mismatch. Reading the Configure script revealed more issues. This
-patch fixes all of them I found.
-
----
- Configure | 14 +++++++-------
- cflags.SH |  2 +-
- 2 files changed, 8 insertions(+), 8 deletions(-)
-
---- a/Configure
-+++ b/Configure
-@@ -4689,7 +4689,7 @@ else
- fi
- $rm -f try try.*
- case "$gccversion" in
--1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
-+1.*) cpp=`./loc gcc-cpp $cpp $pth` ;;
- esac
- case "$gccversion" in
- '') gccosandvers='' ;;
-@@ -4729,7 +4729,7 @@ esac
- # gcc 3.* complain about adding -Idirectories that they already know about,
- # so we will take those off from locincpth.
- case "$gccversion" in
--3*)
-+3.*)
-     echo "main(){}">try.c
-     for incdir in $locincpth; do
-        warn=`$cc $ccflags -I$incdir -c try.c 2>&1 | \
-@@ -5455,13 +5455,13 @@ fi
- case "$hint" in
- default|recommended)
-       case "$gccversion" in
--      1*) dflt="$dflt -fpcc-struct-return" ;;
-+      1.*) dflt="$dflt -fpcc-struct-return" ;;
-       esac
-       case "$optimize:$DEBUGGING" in
-       *-g*:old) dflt="$dflt -DDEBUGGING";;
-       esac
-       case "$gccversion" in
--      2*) if $test -d /etc/conf/kconfig.d &&
-+      2.*) if $test -d /etc/conf/kconfig.d &&
-                       $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
-               then
-                       # Interactive Systems (ISC) POSIX mode.
-@@ -5470,7 +5470,7 @@ default|recommended)
-               ;;
-       esac
-       case "$gccversion" in
--      1*) ;;
-+      1.*) ;;
-       2.[0-8]*) ;;
-       ?*)     set strict-aliasing -fno-strict-aliasing
-               eval $checkccflag
-@@ -5588,7 +5588,7 @@ case "$cppflags" in
-     ;;
- esac
- case "$gccversion" in
--1*) cppflags="$cppflags -D__GNUC__"
-+1.*) cppflags="$cppflags -D__GNUC__"
- esac
- case "$mips_type" in
- '');;
-@@ -22957,7 +22957,7 @@ fi
- : add -D_FORTIFY_SOURCE if feasible and not already there
- case "$gccversion" in
--[4567].*)     case "$optimize$ccflags" in
-+[456789].*|[1-9][0-9]*)       case "$optimize$ccflags" in
-       *-O*)   case "$ccflags$cppsymbols" in
-               *_FORTIFY_SOURCE=*) # Don't add it again.
-                       echo "You seem to have -D_FORTIFY_SOURCE already, not adding it." >&4
---- a/cflags.SH
-+++ b/cflags.SH
-@@ -156,7 +156,7 @@ esac
- case "$gccversion" in
- '') ;;
--[12]*) ;; # gcc versions 1 (gasp!) and 2 are not good for this.
-+[12].*) ;; # gcc versions 1 (gasp!) and 2 are not good for this.
- Intel*) ;; # # Is that you, Intel C++?
- #
- # NOTE 1: the -std=c89 without -pedantic is a bit pointless.
diff --git a/lang/perl/patches/999-fixup-regex-engine-build-under-Uusedl.patch b/lang/perl/patches/999-fixup-regex-engine-build-under-Uusedl.patch
new file mode 100644 (file)
index 0000000..99cc13b
--- /dev/null
@@ -0,0 +1,541 @@
+From ba6e2c38aafc23cf114f3ba0d0ff3baead34328b Mon Sep 17 00:00:00 2001
+From: Yves Orton <demerphq@gmail.com>
+Date: Tue, 1 Aug 2023 23:12:46 +0200
+Subject: [PATCH] regcomp*.c, regexec.c - fixup regex engine build under
+ -Uusedl
+
+The regex engine is built a bit different from most of the perl
+codebase. It is compiled as part of the main libperl.so and it is
+also compiled (with DEBUGGING enabled) as part of the re extension.
+When perl itself is compiled with DEBUGGING enabled then the code
+in the re.so extension and the code in libperl.so is the same.
+
+This all works fine and dandy until you have a static build where the
+re.so is linked into libperl.so, which results in duplicate symbols
+being defined. These symbols come in two flaviours: "auxiliary" and
+"debugging" related symbols.
+
+We have basically three cases:
+
+1. USE_DYNAMIC_LOADING is defined. In this case we are doing a dynamic
+   build and re.so will be separate from libperl.so, so it even if this
+   is a DEBUGGING enabled build debug and auxiliary functions can be
+   compiled into *both* re.so and libperl.so. This is basically the
+   "standard build".
+
+2. USE_DYNAMIC_LOADING is not defined, and DEBUGGING is not defined
+   either. In this case auxiliary functions should only be compiled in
+   libperl.so, and the debug functions should only be compiled into
+   re.so
+
+3. USE_DYNAMIC_LOADING is not defined, and DEBUGGING *is* defined. In
+   this case auxiliary functions AND debug functions should only be
+   compiled into libperl.so
+
+It is possible to detect the different build options by looking at the
+defines 'USE_DYNAMIC_LOADING', 'PERL_EXT_RE_DEBUG' and
+'DEBUGGING_RE_ONLY'. 'USE_DYNAMIC_LOADING' is NOT defined when we are
+building a static perl. 'PERL_EXT_RE_DEBUG' is defined only when we are
+building re.so, and 'DEBUGGING_RE_ONLY' is defined only when we are
+building re.so in a perl that is not itself already a DEBUGGING enabled
+perl. The file ext/re/re_top.h responsible for setting up
+DEBUGGING_RE_ONLY.
+
+This patch uses 'PERL_EXT_RE_DEBUG', 'DEBUGGING_RE_ONLY' and
+'USE_DYNAMIC_LOADING' to define in regcomp.h two further define flags
+'PERL_RE_BUILD_DEBUG' and 'PERL_RE_BUILD_AUX'.
+
+The 'PERL_RE_BUILD_DEBUG' flag determines if the debugging functions
+should be compiled into libperl.so or re.so or both. The
+'PERL_RE_BUILD_AUX' flag determines if the auxiliary functions should be
+compiled into just libperl.so or into it and re.so. We then use these
+flags to guard the different types of functions so that we can build in
+all three modes without duplicate symbols.
+---
+ regcomp.c         |  13 +-
+ regcomp.h         |  14 ++-
+ regcomp_debug.c   | 308 +++++++++++++++++++++++-----------------------
+ regcomp_invlist.c |   3 +-
+ regexec.c         |   3 +-
+ 5 files changed, 181 insertions(+), 160 deletions(-)
+
+--- a/regcomp.c
++++ b/regcomp.c
+@@ -290,6 +290,7 @@ S_edit_distance(const UV* src,
+ /* END of edit_distance() stuff
+  * ========================================================= */
++#ifdef PERL_RE_BUILD_AUX
+ /* add a data member to the struct reg_data attached to this regex, it should
+  * always return a non-zero return. the 's' argument is the type of the items
+  * being added and the n is the number of items. The length of 's' should match
+@@ -340,6 +341,7 @@ Perl_reg_add_data(RExC_state_t* const pR
+     assert(count>0);
+     return count;
+ }
++#endif /* PERL_RE_BUILD_AUX */
+ /*XXX: todo make this not included in a non debugging perl, but appears to be
+  * used anyway there, in 'use re' */
+@@ -7443,6 +7445,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_stat
+ }
++#ifdef PERL_RE_BUILD_AUX
+ void
+ Perl_populate_anyof_bitmap_from_invlist(pTHX_ regnode *node, SV** invlist_ptr)
+ {
+@@ -7502,6 +7505,7 @@ Perl_populate_anyof_bitmap_from_invlist(
+         }
+     }
+ }
++#endif /* PERL_RE_BUILD_AUX */
+ /* Parse POSIX character classes: [[:foo:]], [[=foo=]], [[.foo.]].
+    Character classes ([:foo:]) can also be negated ([:^foo:]).
+@@ -9095,6 +9099,7 @@ S_dump_regex_sets_structures(pTHX_ RExC_
+ #undef IS_OPERATOR
+ #undef IS_OPERAND
++#ifdef PERL_RE_BUILD_AUX
+ void
+ Perl_add_above_Latin1_folds(pTHX_ RExC_state_t *pRExC_state, const U8 cp, SV** invlist)
+ {
+@@ -9182,6 +9187,8 @@ Perl_add_above_Latin1_folds(pTHX_ RExC_s
+          }
+     }
+ }
++#endif /* PERL_RE_BUILD_AUX */
++
+ STATIC void
+ S_output_posix_warnings(pTHX_ RExC_state_t *pRExC_state, AV* posix_warnings)
+@@ -12105,6 +12112,7 @@ S_optimize_regclass(pTHX_
+ #undef HAS_NONLOCALE_RUNTIME_PROPERTY_DEFINITION
++#ifdef PERL_RE_BUILD_AUX
+ void
+ Perl_set_ANYOF_arg(pTHX_ RExC_state_t* const pRExC_state,
+                 regnode* const node,
+@@ -12261,6 +12269,7 @@ Perl_set_ANYOF_arg(pTHX_ RExC_state_t* c
+     RExC_rxi->data->data[n] = (void*)rv;
+     ARG1u_SET(node, n);
+ }
++#endif /* PERL_RE_BUILD_AUX */
+ SV *
+@@ -12999,6 +13008,8 @@ S_regtail_study(pTHX_ RExC_state_t *pREx
+ }
+ #endif
++
++#ifdef PERL_RE_BUILD_AUX
+ SV*
+ Perl_get_ANYOFM_contents(pTHX_ const regnode * n) {
+@@ -13047,7 +13058,7 @@ Perl_get_ANYOFHbbm_contents(pTHX_ const
+                                       UTF_CONTINUATION_MARK | 0));
+     return cp_list;
+ }
+-
++#endif /* PERL_RE_BUILD_AUX */
+ SV *
+--- a/regcomp.h
++++ b/regcomp.h
+@@ -1554,7 +1554,19 @@ typedef enum {
+ #define EVAL_OPTIMISTIC_FLAG    128
+ #define EVAL_FLAGS_MASK         (EVAL_OPTIMISTIC_FLAG-1)
+-
++/* We define PERL_RE_BUILD_DEBUG if we are NOT compiling the re extension and
++ * we are under DEBUGGING, or if we are ARE compiling the re extension
++ * and this is not a DEBUGGING enabled build (identified by
++ * DEBUGGING_RE_ONLY being defined)
++ */
++#if ( defined(USE_DYNAMIC_LOADING) && defined(DEBUGGING)) || \
++    ( defined(PERL_EXT_RE_BUILD) && defined(DEBUGGING_RE_ONLY)) || \
++    (!defined(PERL_EXT_RE_BUILD) && defined(DEBUGGING))
++#define PERL_RE_BUILD_DEBUG
++#endif
++#if ( defined(USE_DYNAMIC_LOADING) || !defined(PERL_EXT_RE_BUILD) )
++#define PERL_RE_BUILD_AUX
++#endif
+ #endif /* PERL_REGCOMP_H_ */
+--- a/regcomp_debug.c
++++ b/regcomp_debug.c
+@@ -18,8 +18,7 @@
+ #include "unicode_constants.h"
+ #include "regcomp_internal.h"
+-#ifdef DEBUGGING
+-
++#ifdef PERL_RE_BUILD_DEBUG
+ int
+ Perl_re_printf(pTHX_ const char *fmt, ...)
+ {
+@@ -159,13 +158,160 @@ Perl_debug_peep(pTHX_ const char *str, c
+    });
+ }
+-#endif /* DEBUGGING */
++const regnode *
++Perl_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node,
++            const regnode *last, const regnode *plast,
++            SV* sv, I32 indent, U32 depth)
++{
++    const regnode *next;
++    const regnode *optstart= NULL;
++
++    RXi_GET_DECL(r, ri);
++    DECLARE_AND_GET_RE_DEBUG_FLAGS;
++
++    PERL_ARGS_ASSERT_DUMPUNTIL;
++
++#ifdef DEBUG_DUMPUNTIL
++    Perl_re_printf( aTHX_  "--- %d : %d - %d - %d\n", indent, node-start,
++        last ? last-start : 0, plast ? plast-start : 0);
++#endif
++
++    if (plast && plast < last)
++        last= plast;
++
++    while (node && (!last || node < last)) {
++        const U8 op = OP(node);
++
++        if (op == CLOSE || op == SRCLOSE || op == WHILEM)
++            indent--;
++        next = regnext((regnode *)node);
++        const regnode *after = regnode_after((regnode *)node,0);
++
++        /* Where, what. */
++        if (op == OPTIMIZED) {
++            if (!optstart && RE_DEBUG_FLAG(RE_DEBUG_COMPILE_OPTIMISE))
++                optstart = node;
++            else
++                goto after_print;
++        } else
++            CLEAR_OPTSTART;
++
++        regprop(r, sv, node, NULL, NULL);
++        Perl_re_printf( aTHX_  "%4" IVdf ":%*s%s", (IV)(node - start),
++                      (int)(2*indent + 1), "", SvPVX_const(sv));
++
++        if (op != OPTIMIZED) {
++            if (next == NULL)           /* Next ptr. */
++                Perl_re_printf( aTHX_  " (0)");
++            else if (REGNODE_TYPE(op) == BRANCH
++                     && REGNODE_TYPE(OP(next)) != BRANCH )
++                Perl_re_printf( aTHX_  " (FAIL)");
++            else
++                Perl_re_printf( aTHX_  " (%" IVdf ")", (IV)(next - start));
++            Perl_re_printf( aTHX_ "\n");
++        }
++
++      after_print:
++        if (REGNODE_TYPE(op) == BRANCHJ) {
++            assert(next);
++            const regnode *nnode = (OP(next) == LONGJMP
++                                   ? regnext((regnode *)next)
++                                   : next);
++            if (last && nnode > last)
++                nnode = last;
++            DUMPUNTIL(after, nnode);
++        }
++        else if (REGNODE_TYPE(op) == BRANCH) {
++            assert(next);
++            DUMPUNTIL(after, next);
++        }
++        else if ( REGNODE_TYPE(op)  == TRIE ) {
++            const regnode *this_trie = node;
++            const U32 n = ARG1u(node);
++            const reg_ac_data * const ac = op>=AHOCORASICK ?
++               (reg_ac_data *)ri->data->data[n] :
++               NULL;
++            const reg_trie_data * const trie =
++                (reg_trie_data*)ri->data->data[op<AHOCORASICK ? n : ac->trie];
++#ifdef DEBUGGING
++            AV *const trie_words
++                           = MUTABLE_AV(ri->data->data[n + TRIE_WORDS_OFFSET]);
++#endif
++            const regnode *nextbranch= NULL;
++            I32 word_idx;
++            SvPVCLEAR(sv);
++            for (word_idx= 0; word_idx < (I32)trie->wordcount; word_idx++) {
++                SV ** const elem_ptr = av_fetch_simple(trie_words, word_idx, 0);
++
++                Perl_re_indentf( aTHX_  "%s ",
++                    indent+3,
++                    elem_ptr
++                    ? pv_pretty(sv, SvPV_nolen_const(*elem_ptr),
++                                SvCUR(*elem_ptr), PL_dump_re_max_len,
++                                PL_colors[0], PL_colors[1],
++                                (SvUTF8(*elem_ptr)
++                                 ? PERL_PV_ESCAPE_UNI
++                                 : 0)
++                                | PERL_PV_PRETTY_ELLIPSES
++                                | PERL_PV_PRETTY_LTGT
++                            )
++                    : "???"
++                );
++                if (trie->jump) {
++                    U16 dist= trie->jump[word_idx+1];
++                    Perl_re_printf( aTHX_  "(%" UVuf ")\n",
++                               (UV)((dist ? this_trie + dist : next) - start));
++                    if (dist) {
++                        if (!nextbranch)
++                            nextbranch= this_trie + trie->jump[0];
++                        DUMPUNTIL(this_trie + dist, nextbranch);
++                    }
++                    if (nextbranch && REGNODE_TYPE(OP(nextbranch))==BRANCH)
++                        nextbranch= regnext((regnode *)nextbranch);
++                } else {
++                    Perl_re_printf( aTHX_  "\n");
++                }
++            }
++            if (last && next > last)
++                node= last;
++            else
++                node= next;
++        }
++        else if ( op == CURLY ) {   /* "next" might be very big: optimizer */
++            DUMPUNTIL(after, after + 1); /* +1 is NOT a REGNODE_AFTER */
++        }
++        else if (REGNODE_TYPE(op) == CURLY && op != CURLYX) {
++            assert(next);
++            DUMPUNTIL(after, next);
++        }
++        else if ( op == PLUS || op == STAR) {
++            DUMPUNTIL(after, after + 1); /* +1 NOT a REGNODE_AFTER */
++        }
++        else if (REGNODE_TYPE(op) == EXACT || op == ANYOFHs) {
++            /* Literal string, where present. */
++            node = (const regnode *)REGNODE_AFTER_varies(node);
++        }
++        else {
++            node = REGNODE_AFTER_opcode(node,op);
++        }
++        if (op == CURLYX || op == OPEN || op == SROPEN)
++            indent++;
++        if (REGNODE_TYPE(op) == END)
++            break;
++    }
++    CLEAR_OPTSTART;
++#ifdef DEBUG_DUMPUNTIL
++    Perl_re_printf( aTHX_  "--- %d\n", (int)indent);
++#endif
++    return node;
++}
++
++#endif  /* PERL_RE_BUILD_DEBUG */
+ /*
+  - regdump - dump a regexp onto Perl_debug_log in vaguely comprehensible form
+  */
+ #ifdef DEBUGGING
+-
+ static void
+ S_regdump_intflags(pTHX_ const char *lead, const U32 flags)
+ {
+@@ -907,8 +1053,8 @@ Perl_regprop(pTHX_ const regexp *prog, S
+ #endif  /* DEBUGGING */
+ }
+-#ifdef DEBUGGING
++#ifdef DEBUGGING
+ STATIC void
+ S_put_code_point(pTHX_ SV *sv, UV c)
+ {
+@@ -1517,154 +1663,4 @@ S_put_charclass_bitmap_innards(pTHX_ SV
+     return did_output_something;
+ }
+-
+-
+-const regnode *
+-Perl_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node,
+-            const regnode *last, const regnode *plast,
+-            SV* sv, I32 indent, U32 depth)
+-{
+-    const regnode *next;
+-    const regnode *optstart= NULL;
+-
+-    RXi_GET_DECL(r, ri);
+-    DECLARE_AND_GET_RE_DEBUG_FLAGS;
+-
+-    PERL_ARGS_ASSERT_DUMPUNTIL;
+-
+-#ifdef DEBUG_DUMPUNTIL
+-    Perl_re_printf( aTHX_  "--- %d : %d - %d - %d\n", indent, node-start,
+-        last ? last-start : 0, plast ? plast-start : 0);
+-#endif
+-
+-    if (plast && plast < last)
+-        last= plast;
+-
+-    while (node && (!last || node < last)) {
+-        const U8 op = OP(node);
+-
+-        if (op == CLOSE || op == SRCLOSE || op == WHILEM)
+-            indent--;
+-        next = regnext((regnode *)node);
+-        const regnode *after = regnode_after((regnode *)node,0);
+-
+-        /* Where, what. */
+-        if (op == OPTIMIZED) {
+-            if (!optstart && RE_DEBUG_FLAG(RE_DEBUG_COMPILE_OPTIMISE))
+-                optstart = node;
+-            else
+-                goto after_print;
+-        } else
+-            CLEAR_OPTSTART;
+-
+-        regprop(r, sv, node, NULL, NULL);
+-        Perl_re_printf( aTHX_  "%4" IVdf ":%*s%s", (IV)(node - start),
+-                      (int)(2*indent + 1), "", SvPVX_const(sv));
+-
+-        if (op != OPTIMIZED) {
+-            if (next == NULL)           /* Next ptr. */
+-                Perl_re_printf( aTHX_  " (0)");
+-            else if (REGNODE_TYPE(op) == BRANCH
+-                     && REGNODE_TYPE(OP(next)) != BRANCH )
+-                Perl_re_printf( aTHX_  " (FAIL)");
+-            else
+-                Perl_re_printf( aTHX_  " (%" IVdf ")", (IV)(next - start));
+-            Perl_re_printf( aTHX_ "\n");
+-        }
+-
+-      after_print:
+-        if (REGNODE_TYPE(op) == BRANCHJ) {
+-            assert(next);
+-            const regnode *nnode = (OP(next) == LONGJMP
+-                                   ? regnext((regnode *)next)
+-                                   : next);
+-            if (last && nnode > last)
+-                nnode = last;
+-            DUMPUNTIL(after, nnode);
+-        }
+-        else if (REGNODE_TYPE(op) == BRANCH) {
+-            assert(next);
+-            DUMPUNTIL(after, next);
+-        }
+-        else if ( REGNODE_TYPE(op)  == TRIE ) {
+-            const regnode *this_trie = node;
+-            const U32 n = ARG1u(node);
+-            const reg_ac_data * const ac = op>=AHOCORASICK ?
+-               (reg_ac_data *)ri->data->data[n] :
+-               NULL;
+-            const reg_trie_data * const trie =
+-                (reg_trie_data*)ri->data->data[op<AHOCORASICK ? n : ac->trie];
+-#ifdef DEBUGGING
+-            AV *const trie_words
+-                           = MUTABLE_AV(ri->data->data[n + TRIE_WORDS_OFFSET]);
+-#endif
+-            const regnode *nextbranch= NULL;
+-            I32 word_idx;
+-            SvPVCLEAR(sv);
+-            for (word_idx= 0; word_idx < (I32)trie->wordcount; word_idx++) {
+-                SV ** const elem_ptr = av_fetch_simple(trie_words, word_idx, 0);
+-
+-                Perl_re_indentf( aTHX_  "%s ",
+-                    indent+3,
+-                    elem_ptr
+-                    ? pv_pretty(sv, SvPV_nolen_const(*elem_ptr),
+-                                SvCUR(*elem_ptr), PL_dump_re_max_len,
+-                                PL_colors[0], PL_colors[1],
+-                                (SvUTF8(*elem_ptr)
+-                                 ? PERL_PV_ESCAPE_UNI
+-                                 : 0)
+-                                | PERL_PV_PRETTY_ELLIPSES
+-                                | PERL_PV_PRETTY_LTGT
+-                            )
+-                    : "???"
+-                );
+-                if (trie->jump) {
+-                    U16 dist= trie->jump[word_idx+1];
+-                    Perl_re_printf( aTHX_  "(%" UVuf ")\n",
+-                               (UV)((dist ? this_trie + dist : next) - start));
+-                    if (dist) {
+-                        if (!nextbranch)
+-                            nextbranch= this_trie + trie->jump[0];
+-                        DUMPUNTIL(this_trie + dist, nextbranch);
+-                    }
+-                    if (nextbranch && REGNODE_TYPE(OP(nextbranch))==BRANCH)
+-                        nextbranch= regnext((regnode *)nextbranch);
+-                } else {
+-                    Perl_re_printf( aTHX_  "\n");
+-                }
+-            }
+-            if (last && next > last)
+-                node= last;
+-            else
+-                node= next;
+-        }
+-        else if ( op == CURLY ) {   /* "next" might be very big: optimizer */
+-            DUMPUNTIL(after, after + 1); /* +1 is NOT a REGNODE_AFTER */
+-        }
+-        else if (REGNODE_TYPE(op) == CURLY && op != CURLYX) {
+-            assert(next);
+-            DUMPUNTIL(after, next);
+-        }
+-        else if ( op == PLUS || op == STAR) {
+-            DUMPUNTIL(after, after + 1); /* +1 NOT a REGNODE_AFTER */
+-        }
+-        else if (REGNODE_TYPE(op) == EXACT || op == ANYOFHs) {
+-            /* Literal string, where present. */
+-            node = (const regnode *)REGNODE_AFTER_varies(node);
+-        }
+-        else {
+-            node = REGNODE_AFTER_opcode(node,op);
+-        }
+-        if (op == CURLYX || op == OPEN || op == SROPEN)
+-            indent++;
+-        if (REGNODE_TYPE(op) == END)
+-            break;
+-    }
+-    CLEAR_OPTSTART;
+-#ifdef DEBUG_DUMPUNTIL
+-    Perl_re_printf( aTHX_  "--- %d\n", (int)indent);
+-#endif
+-    return node;
+-}
+-
+-#endif  /* DEBUGGING */
++#endif /* DEBUGGING */
+--- a/regcomp_invlist.c
++++ b/regcomp_invlist.c
+@@ -18,7 +18,7 @@
+ #include "unicode_constants.h"
+ #include "regcomp_internal.h"
+-
++#ifdef PERL_RE_BUILD_AUX
+ void
+ Perl_populate_bitmap_from_invlist(pTHX_ SV * invlist, const UV offset, const U8 * bitmap, const Size_t len)
+ {
+@@ -70,6 +70,7 @@ Perl_populate_invlist_from_bitmap(pTHX_
+         }
+     }
+ }
++#endif /* PERL_RE_BUILD_AUX */
+ /* This section of code defines the inversion list object and its methods.  The
+  * interfaces are highly subject to change, so as much as possible is static to
+--- a/regexec.c
++++ b/regexec.c
+@@ -4421,7 +4421,8 @@ S_regtry(pTHX_ regmatch_info *reginfo, c
+ */
+ #define REPORT_CODE_OFF 29
+ #define INDENT_CHARS(depth) ((int)(depth) % 20)
+-#ifdef DEBUGGING
++
++#ifdef PERL_RE_BUILD_DEBUG
+ int
+ Perl_re_exec_indentf(pTHX_ const char *fmt, U32 depth, ...)
+ {
index e23bf8ef58ed0e44102a4d9185e07aad600ae435..f3d65a51772d939b71bc231456ed29e6cd9feb76 100644 (file)
@@ -51,20 +51,6 @@ endef
 $(eval $(call BuildPackage,perlbase-archive))
 
 
-define Package/perlbase-arybase
-$(call Package/perlbase-template)
-TITLE:=arybase perl module
-DEPENDS+=+perlbase-xsloader
-endef
-
-define Package/perlbase-arybase/install
-$(call perlmod/Install,$(1),arybase.pm auto/arybase,)
-$(call perlmod/InstallBaseTests,$(1),ext/arybase/t)
-endef
-
-$(eval $(call BuildPackage,perlbase-arybase))
-
-
 define Package/perlbase-attribute
 $(call Package/perlbase-template)
 TITLE:=Attribute perl module
@@ -725,7 +711,7 @@ endef
 
 define Package/perlbase-findbin/install
 $(call perlmod/Install,$(1),FindBin.pm,)
-$(call perlmod/InstallBaseTests,$(1),lib/FindBin.t)
+$(call perlmod/InstallBaseTests,$(1),dist/FindBin/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-findbin))
@@ -1441,7 +1427,7 @@ DEPENDS+=+perlbase-essential +perlbase-fcntl +perlbase-xsloader
 endef
 
 define Package/perlbase-tie/install
-$(call perlmod/Install,$(1),Tie auto/Tie,)
+$(call perlmod/Install,$(1),Tie,)
 $(call perlmod/InstallBaseTests,$(1),cpan/Tie-RefHash/t dist/Tie-File/t ext/Tie-Hash-NamedCapture/t ext/Tie-Memoize/lib/Tie/Memoize.pm ext/Tie-Memoize/t lib/Tie/Array/push.t lib/Tie/Array/splice.t lib/Tie/Array/std.t lib/Tie/Array/stdpush.t lib/Tie/ExtraHash.t lib/Tie/Handle/stdhandle.t lib/Tie/Handle/stdhandle_from_handle.t lib/Tie/Hash.t lib/Tie/Scalar.t lib/Tie/SubstrHash.t)
 endef
 
@@ -1522,7 +1508,7 @@ DEPENDS+=+perlbase-essential +perlbase-re +perlbase-unicore
 endef
 
 define Package/perlbase-utf8/install
-$(call perlmod/Install,$(1),utf8.pm utf8_heavy.pl,)
+$(call perlmod/Install,$(1),utf8.pm,)
 $(call perlmod/InstallBaseTests,$(1),lib/utf8.t)
 endef
 
index dbec8151ebe6aa1b7fc0c3b7a100d85697770321..465140bf1b0c5a5b4b9621f731461f4647cc1e74 100644 (file)
@@ -1,4 +1,4 @@
-PERL_VERSION:=5.28.1
+PERL_VERSION:=5.38.0
 
 PERL_EXPLODE:=$(subst ., ,$(PERL_VERSION))
 
git clone https://git.99rst.org/PROJECT