From 78971139eee0fdf904eb5ae60a09df5cbf6209d3 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Sat, 20 Jan 2024 21:44:38 +0800 Subject: [PATCH] perl: add support for riscv64 --- lang/perl/Makefile | 15 +- lang/perl/files/base.config | 21 + lang/perl/files/libc.config | 4 - lang/perl/files/riscv64.config | 21 + lang/perl/files/version.config | 14 +- lang/perl/patches/001-macos_11_support.patch | 29 - .../patches/002-add-Internals-getcwd.patch | 85 --- ...back-to-the-built-in-getcwd-if-we-ca.patch | 40 -- lang/perl/patches/010-musl-compat.patch | 2 +- .../patches/020-storables-stacksize.patch | 66 --- .../patches/110-always_use_miniperl.patch | 6 +- .../patches/120-remove-build-timestamp.patch | 6 +- .../301-fix_macos_static_linking.patch | 19 - lang/perl/patches/320-copy-pod-hack.patch | 10 +- lang/perl/patches/900-use-rm-force.patch | 64 ++- .../patches/910-miniperl-needs-inc-dot.patch | 2 +- lang/perl/patches/920-fix-no-locale.patch | 383 ------------- .../perl/patches/998-Errno_errno.h_path.patch | 10 +- ...999-fix-build-failure-against-gcc-10.patch | 96 ---- ...ixup-regex-engine-build-under-Uusedl.patch | 541 ++++++++++++++++++ lang/perl/perlbase.mk | 54 +- lang/perl/perlmod.mk | 3 + lang/perl/perlver.mk | 2 +- 23 files changed, 669 insertions(+), 824 deletions(-) create mode 100644 lang/perl/files/riscv64.config delete mode 100644 lang/perl/patches/001-macos_11_support.patch delete mode 100644 lang/perl/patches/002-add-Internals-getcwd.patch delete mode 100644 lang/perl/patches/003-fallback-to-the-built-in-getcwd-if-we-ca.patch delete mode 100644 lang/perl/patches/020-storables-stacksize.patch delete mode 100644 lang/perl/patches/301-fix_macos_static_linking.patch delete mode 100644 lang/perl/patches/920-fix-no-locale.patch delete mode 100644 lang/perl/patches/999-fix-build-failure-against-gcc-10.patch create mode 100644 lang/perl/patches/999-fixup-regex-engine-build-under-Uusedl.patch diff --git a/lang/perl/Makefile b/lang/perl/Makefile index 40532b5f..afd82997 100644 --- a/lang/perl/Makefile +++ b/lang/perl/Makefile @@ -11,22 +11,15 @@ include perlver.mk PKG_NAME:=perl PKG_VERSION:=$(PERL_VERSION) -PKG_RELEASE:=8 +PKG_RELEASE:=1 -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_SOURCE_URL:=https://www.cpan.org/src/5.0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=fea7162d4cca940a387f0587b93f6737d884bf74d8a9d7cfd978bc12cd0b202d +PKG_HASH:=d91115e90b896520e83d4de6b52f8254ef2b70a8d545ffab33200ea9f1cf29e8 PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_LICENSE_FILES:=Copying Artistic README -PKG_MAINTAINER:=Marcel Denia , \ - Philip Prindeville +PKG_MAINTAINER:=Marcel Denia , Philip Prindeville PKG_CPE_ID:=cpe:/a:perl:perl # Build settings diff --git a/lang/perl/files/base.config b/lang/perl/files/base.config index f2d18f54..67232b6d 100644 --- a/lang/perl/files/base.config +++ b/lang/perl/files/base.config @@ -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='' diff --git a/lang/perl/files/libc.config b/lang/perl/files/libc.config index 93d190c5..1b198981 100644 --- a/lang/perl/files/libc.config +++ b/lang/perl/files/libc.config @@ -10,10 +10,6 @@ } ($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' diff --git a/lang/perl/files/riscv64.config b/lang/perl/files/riscv64.config new file mode 100644 index 00000000..4596f8cd --- /dev/null +++ b/lang/perl/files/riscv64.config @@ -0,0 +1,21 @@ +owrt:arch=riscv +owrt:bits=64 +owrt:endian=little + +ccsymbols='' +cppccsymbols='' +cppsymbols='_FILE_OFFSET_BITS=64 _FORTIFY_SOURCE=2 _GNU_SOURCE=1 _LARGEFILE64_SOURCE=1 _LARGEFILE_SOURCE=1 _LP64=1 _POSIX_C_SOURCE=200809L _POSIX_SOURCE=1 _REENTRANT=1 _STDC_PREDEF_H=1 _XOPEN_SOURCE=700 _XOPEN_SOURCE_EXTENDED=1 __ATOMIC_ACQUIRE=2 __ATOMIC_ACQ_REL=4 __ATOMIC_CONSUME=1 __ATOMIC_RELAXED=0 __ATOMIC_RELEASE=3 __ATOMIC_SEQ_CST=5 __BIGGEST_ALIGNMENT__=16 __BYTE_ORDER__=1234 __CHAR16_TYPE__=short\ unsigned\ int __CHAR32_TYPE__=unsigned\ int __CHAR_BIT__=8 __CHAR_UNSIGNED__=1 __DBL_DECIMAL_DIG__=17 __DBL_DENORM_MIN__=((double)4.94065645841246544176568792868221372e-324L) __DBL_DIG__=15 __DBL_EPSILON__=((double)2.22044604925031308084726333618164062e-16L) __DBL_HAS_DENORM__=1 __DBL_HAS_INFINITY__=1 __DBL_HAS_QUIET_NAN__=1 __DBL_MANT_DIG__=53 __DBL_MAX_10_EXP__=308 __DBL_MAX_EXP__=1024 __DBL_MAX__=((double)1.79769313486231570814527423731704357e+308L) __DBL_MIN_10_EXP__=(-307) __DBL_MIN_EXP__=(-1021) __DBL_MIN__=((double)2.22507385850720138309023271733240406e-308L) __DEC128_EPSILON__=1E-33DL __DEC128_MANT_DIG__=34 __DEC128_MAX_EXP__=6145 __DEC128_MAX__=9.999999999999999999999999999999999E6144DL __DEC128_MIN_EXP__=(-6142) __DEC128_MIN__=1E-6143DL __DEC128_SUBNORMAL_MIN__=0.000000000000000000000000000000001E-6143DL __DEC32_EPSILON__=1E-6DF __DEC32_MANT_DIG__=7 __DEC32_MAX_EXP__=97 __DEC32_MAX__=9.999999E96DF __DEC32_MIN_EXP__=(-94) __DEC32_MIN__=1E-95DF __DEC32_SUBNORMAL_MIN__=0.000001E-95DF __DEC64_EPSILON__=1E-15DD __DEC64_MANT_DIG__=16 __DEC64_MAX_EXP__=385 __DEC64_MAX__=9.999999999999999E384DD __DEC64_MIN_EXP__=(-382) __DEC64_MIN__=1E-383DD __DEC64_SUBNORMAL_MIN__=0.000000000000001E-383DD __DECIMAL_DIG__=36 __DEC_EVAL_METHOD__=2 __ELF__=1 __FINITE_MATH_ONLY__=0 __FLOAT_WORD_ORDER__=1234 __FLT128_DECIMAL_DIG__=36 __FLT128_DENORM_MIN__=6.47517511943802511092443895822764655e-4966F128 __FLT128_DIG__=33 __FLT128_EPSILON__=1.92592994438723585305597794258492732e-34F128 __FLT128_HAS_DENORM__=1 __FLT128_HAS_INFINITY__=1 __FLT128_HAS_QUIET_NAN__=1 __FLT128_MANT_DIG__=113 __FLT128_MAX_10_EXP__=4932 __FLT128_MAX_EXP__=16384 __FLT128_MAX__=1.18973149535723176508575932662800702e+4932F128 __FLT128_MIN_10_EXP__=(-4931) __FLT128_MIN_EXP__=(-16381) __FLT128_MIN__=3.36210314311209350626267781732175260e-4932F128 __FLT32X_DECIMAL_DIG__=17 __FLT32X_DENORM_MIN__=4.94065645841246544176568792868221372e-324F32x __FLT32X_DIG__=15 __FLT32X_EPSILON__=2.22044604925031308084726333618164062e-16F32x __FLT32X_HAS_DENORM__=1 __FLT32X_HAS_INFINITY__=1 __FLT32X_HAS_QUIET_NAN__=1 __FLT32X_MANT_DIG__=53 __FLT32X_MAX_10_EXP__=308 __FLT32X_MAX_EXP__=1024 __FLT32X_MAX__=1.79769313486231570814527423731704357e+308F32x __FLT32X_MIN_10_EXP__=(-307) __FLT32X_MIN_EXP__=(-1021) __FLT32X_MIN__=2.22507385850720138309023271733240406e-308F32x __FLT32_DECIMAL_DIG__=9 __FLT32_DENORM_MIN__=1.40129846432481707092372958328991613e-45F32 __FLT32_DIG__=6 __FLT32_EPSILON__=1.19209289550781250000000000000000000e-7F32 __FLT32_HAS_DENORM__=1 __FLT32_HAS_INFINITY__=1 __FLT32_HAS_QUIET_NAN__=1 __FLT32_MANT_DIG__=24 __FLT32_MAX_10_EXP__=38 __FLT32_MAX_EXP__=128 __FLT32_MAX__=3.40282346638528859811704183484516925e+38F32 __FLT32_MIN_10_EXP__=(-37) __FLT32_MIN_EXP__=(-125) __FLT32_MIN__=1.17549435082228750796873653722224568e-38F32 __FLT64X_DECIMAL_DIG__=36 __FLT64X_DENORM_MIN__=6.47517511943802511092443895822764655e-4966F64x __FLT64X_DIG__=33 __FLT64X_EPSILON__=1.92592994438723585305597794258492732e-34F64x __FLT64X_HAS_DENORM__=1 __FLT64X_HAS_INFINITY__=1 __FLT64X_HAS_QUIET_NAN__=1 __FLT64X_MANT_DIG__=113 __FLT64X_MAX_10_EXP__=4932 __FLT64X_MAX_EXP__=16384 __FLT64X_MAX__=1.18973149535723176508575932662800702e+4932F64x __FLT64X_MIN_10_EXP__=(-4931) __FLT64X_MIN_EXP__=(-16381) __FLT64X_MIN__=3.36210314311209350626267781732175260e-4932F64x __FLT64_DECIMAL_DIG__=17 __FLT64_DENORM_MIN__=4.94065645841246544176568792868221372e-324F64 __FLT64_DIG__=15 __FLT64_EPSILON__=2.22044604925031308084726333618164062e-16F64 __FLT64_HAS_DENORM__=1 __FLT64_HAS_INFINITY__=1 __FLT64_HAS_QUIET_NAN__=1 __FLT64_MANT_DIG__=53 __FLT64_MAX_10_EXP__=308 __FLT64_MAX_EXP__=1024 __FLT64_MAX__=1.79769313486231570814527423731704357e+308F64 __FLT64_MIN_10_EXP__=(-307) __FLT64_MIN_EXP__=(-1021) __FLT64_MIN__=2.22507385850720138309023271733240406e-308F64 __FLT_DECIMAL_DIG__=9 __FLT_DENORM_MIN__=1.40129846432481707092372958328991613e-45F __FLT_DIG__=6 __FLT_EPSILON__=1.19209289550781250000000000000000000e-7F __FLT_EVAL_METHOD_TS_18661_3__=0 __FLT_EVAL_METHOD__=0 __FLT_HAS_DENORM__=1 __FLT_HAS_INFINITY__=1 __FLT_HAS_QUIET_NAN__=1 __FLT_MANT_DIG__=24 __FLT_MAX_10_EXP__=38 __FLT_MAX_EXP__=128 __FLT_MAX__=3.40282346638528859811704183484516925e+38F __FLT_MIN_10_EXP__=(-37) __FLT_MIN_EXP__=(-125) __FLT_MIN__=1.17549435082228750796873653722224568e-38F __FLT_RADIX__=2 __FP_FAST_FMA=1 __FP_FAST_FMAF32=1 __FP_FAST_FMAF32x=1 __FP_FAST_FMAF64=1 __FP_FAST_FMAF=1 __GCC_ATOMIC_BOOL_LOCK_FREE=1 __GCC_ATOMIC_CHAR16_T_LOCK_FREE=1 __GCC_ATOMIC_CHAR32_T_LOCK_FREE=2 __GCC_ATOMIC_CHAR_LOCK_FREE=1 __GCC_ATOMIC_INT_LOCK_FREE=2 __GCC_ATOMIC_LLONG_LOCK_FREE=2 __GCC_ATOMIC_LONG_LOCK_FREE=2 __GCC_ATOMIC_POINTER_LOCK_FREE=2 __GCC_ATOMIC_SHORT_LOCK_FREE=1 __GCC_ATOMIC_TEST_AND_SET_TRUEVAL=1 __GCC_ATOMIC_WCHAR_T_LOCK_FREE=2 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 __GCC_IEC_559=2 __GCC_IEC_559_COMPLEX=2 __GLIBC_MINOR__=27 __GLIBC__=2 __GNUC_MINOR__=2 __GNUC_PATCHLEVEL__=0 __GNUC_STDC_INLINE__=1 __GNUC__=8 __GNU_LIBRARY__=6 __GXX_ABI_VERSION=1013 __INT16_C=__INT16_C __INT16_MAX__=0x7fff __INT16_TYPE__=short\ int __INT32_C=__INT32_C __INT32_MAX__=0x7fffffff __INT32_TYPE__=int __INT64_C=__INT64_C __INT64_MAX__=0x7fffffffffffffffL __INT64_TYPE__=long\ int __INT8_C=__INT8_C __INT8_MAX__=0x7f __INT8_TYPE__=signed\ char __INTMAX_C=__INTMAX_C __INTMAX_MAX__=0x7fffffffffffffffL __INTMAX_TYPE__=long\ int __INTMAX_WIDTH__=64 __INTPTR_MAX__=0x7fffffffffffffffL __INTPTR_TYPE__=long\ int __INTPTR_WIDTH__=64 __INT_FAST16_MAX__=0x7fffffffffffffffL __INT_FAST16_TYPE__=long\ int __INT_FAST16_WIDTH__=64 __INT_FAST32_MAX__=0x7fffffffffffffffL __INT_FAST32_TYPE__=long\ int __INT_FAST32_WIDTH__=64 __INT_FAST64_MAX__=0x7fffffffffffffffL __INT_FAST64_TYPE__=long\ int __INT_FAST64_WIDTH__=64 __INT_FAST8_MAX__=0x7f __INT_FAST8_TYPE__=signed\ char __INT_FAST8_WIDTH__=8 __INT_LEAST16_MAX__=0x7fff __INT_LEAST16_TYPE__=short\ int __INT_LEAST16_WIDTH__=16 __INT_LEAST32_MAX__=0x7fffffff __INT_LEAST32_TYPE__=int __INT_LEAST32_WIDTH__=32 __INT_LEAST64_MAX__=0x7fffffffffffffffL __INT_LEAST64_TYPE__=long\ int __INT_LEAST64_WIDTH__=64 __INT_LEAST8_MAX__=0x7f __INT_LEAST8_TYPE__=signed\ char __INT_LEAST8_WIDTH__=8 __INT_MAX__=0x7fffffff __INT_WIDTH__=32 __LDBL_DECIMAL_DIG__=36 __LDBL_DENORM_MIN__=6.47517511943802511092443895822764655e-4966L __LDBL_DIG__=33 __LDBL_EPSILON__=1.92592994438723585305597794258492732e-34L __LDBL_HAS_DENORM__=1 __LDBL_HAS_INFINITY__=1 __LDBL_HAS_QUIET_NAN__=1 __LDBL_MANT_DIG__=113 __LDBL_MAX_10_EXP__=4932 __LDBL_MAX_EXP__=16384 __LDBL_MAX__=1.18973149535723176508575932662800702e+4932L __LDBL_MIN_10_EXP__=(-4931) __LDBL_MIN_EXP__=(-16381) __LDBL_MIN__=3.36210314311209350626267781732175260e-4932L __LONG_LONG_MAX__=0x7fffffffffffffffLL __LONG_LONG_WIDTH__=64 __LONG_MAX__=0x7fffffffffffffffL __LONG_WIDTH__=64 __LP64__=1 __ORDER_BIG_ENDIAN__=4321 __ORDER_LITTLE_ENDIAN__=1234 __ORDER_PDP_ENDIAN__=3412 __PIC__=2 __PIE__=2 __PRAGMA_REDEFINE_EXTNAME=1 __PTRDIFF_MAX__=0x7fffffffffffffffL __PTRDIFF_TYPE__=long\ int __PTRDIFF_WIDTH__=64 __REGISTER_PREFIX__= __SCHAR_MAX__=0x7f __SCHAR_WIDTH__=8 __SHRT_MAX__=0x7fff __SHRT_WIDTH__=16 __SIG_ATOMIC_MAX__=0x7fffffff __SIG_ATOMIC_MIN__=(-0x7fffffff\ -\ 1) __SIG_ATOMIC_TYPE__=int __SIG_ATOMIC_WIDTH__=32 __SIZEOF_DOUBLE__=8 __SIZEOF_FLOAT__=4 __SIZEOF_INT128__=16 __SIZEOF_INT__=4 __SIZEOF_LONG_DOUBLE__=16 __SIZEOF_LONG_LONG__=8 __SIZEOF_LONG__=8 __SIZEOF_POINTER__=8 __SIZEOF_PTRDIFF_T__=8 __SIZEOF_SHORT__=2 __SIZEOF_SIZE_T__=8 __SIZEOF_WCHAR_T__=4 __SIZEOF_WINT_T__=4 __SIZE_MAX__=0xffffffffffffffffUL __SIZE_TYPE__=long\ unsigned\ int __SIZE_WIDTH__=64 __STDC_HOSTED__=1 __STDC_IEC_559_COMPLEX__=1 __STDC_IEC_559__=1 __STDC_ISO_10646__=201706L __STDC_NO_THREADS__=1 __STDC_UTF_16__=1 __STDC_UTF_32__=1 __STDC_VERSION__=201710L __STDC__=1 __UINT16_C=__UINT16_C __UINT16_MAX__=0xffff __UINT16_TYPE__=short\ unsigned\ int __UINT32_C=__UINT32_C __UINT32_MAX__=0xffffffffU __UINT32_TYPE__=unsigned\ int __UINT64_C=__UINT64_C __UINT64_MAX__=0xffffffffffffffffUL __UINT64_TYPE__=long\ unsigned\ int __UINT8_C=__UINT8_C __UINT8_MAX__=0xff __UINT8_TYPE__=unsigned\ char __UINTMAX_C=__UINTMAX_C __UINTMAX_MAX__=0xffffffffffffffffUL __UINTMAX_TYPE__=long\ unsigned\ int __UINTPTR_MAX__=0xffffffffffffffffUL __UINTPTR_TYPE__=long\ unsigned\ int __UINT_FAST16_MAX__=0xffffffffffffffffUL __UINT_FAST16_TYPE__=long\unsigned\ int __UINT_FAST32_MAX__=0xffffffffffffffffUL __UINT_FAST32_TYPE__=long\ unsigned\ int __UINT_FAST64_MAX__=0xffffffffffffffffUL __UINT_FAST64_TYPE__=long\ unsigned\ int __UINT_FAST8_MAX__=0xff __UINT_FAST8_TYPE__=unsigned\ char__UINT_LEAST16_MAX__=0xffff __UINT_LEAST16_TYPE__=short\ unsigned\ int __UINT_LEAST32_MAX__=0xffffffffU __UINT_LEAST32_TYPE__=unsigned\ int __UINT_LEAST64_MAX__=0xffffffffffffffffUL __UINT_LEAST64_TYPE__=long\ unsigned\ int __UINT_LEAST8_MAX__=0xff __UINT_LEAST8_TYPE__=unsigned\ char __USER_LABEL_PREFIX__= __USE_FILE_OFFSET64=1 __USE_GNU=1 __USE_LARGEFILE64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_POSIX=1 __USE_UNIX98=1 __USE_XOPEN=1 __USE_XOPEN_EXTENDED=1 __VERSION__="8.2.0" __WCHAR_MAX__=0x7fffffff __WCHAR_MIN__=(-0x7fffffff\ -\ 1) __WCHAR_TYPE__=int __WCHAR_WIDTH__=32 __WINT_MAX__=0xffffffffU __WINT_MIN__=0U __WINT_TYPE__=unsigned\ int __WINT_WIDTH__=32 __gnu_linux__=1 __has_include=__has_include __has_include_next=__has_include_next __linux=1 __linux__=1 __pic__=2 __pie__=2 __riscv=1 __riscv_atomic=1 __riscv_cmodel_pic=1 __riscv_compressed=1 __riscv_div=1 __riscv_fdiv=1 __riscv_flen=64 __riscv_float_abi_double=1 __riscv_fsqrt=1 __riscv_mul=1 __riscv_muldiv=1 __riscv_xlen=64 __unix=1 __unix__=1 linux=1 unix=1' + +d_casti32='define' +d_double_style_ieee='define' +d_modflproto='define' +doublekind='3' +fpossize='16' +longdblkind='1' +need_va_copy='undef' +quadkind='2' + +owrt:sig_count='64' +owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS' +owrt:sig_name_extra='IOT CLD POLL UNUSED' +owrt:sig_num_extra='6 17 29 31' diff --git a/lang/perl/files/version.config b/lang/perl/files/version.config index b318648e..1c0e7718 100644 --- a/lang/perl/files/version.config +++ b/lang/perl/files/version.config @@ -1,17 +1,17 @@ # Set the version here PERL_REVISION=5 -PERL_VERSION=28 -PERL_SUBVERSION=1 +PERL_VERSION=38 +PERL_SUBVERSION=2 # (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 index f61c519a..00000000 --- a/lang/perl/patches/001-macos_11_support.patch +++ /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 index d2a84977..00000000 --- a/lang/perl/patches/002-add-Internals-getcwd.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 15f67d146cf1f32504e8a11de3faa2abc0f467cd Mon Sep 17 00:00:00 2001 -From: Tony Cook -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 index dcadb314..00000000 --- a/lang/perl/patches/003-fallback-to-the-built-in-getcwd-if-we-ca.patch +++ /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; diff --git a/lang/perl/patches/010-musl-compat.patch b/lang/perl/patches/010-musl-compat.patch index 77ea26f4..e38a05be 100644 --- a/lang/perl/patches/010-musl-compat.patch +++ b/lang/perl/patches/010-musl-compat.patch @@ -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 index 903d90b7..00000000 --- a/lang/perl/patches/020-storables-stacksize.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 682a4acb98783a7f9b5c286b308f12863599fec3 Mon Sep 17 00:00:00 2001 -From: Tony Cook -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(); diff --git a/lang/perl/patches/110-always_use_miniperl.patch b/lang/perl/patches/110-always_use_miniperl.patch index 2f7ebcbc..806a3125 100644 --- a/lang/perl/patches/110-always_use_miniperl.patch +++ b/lang/perl/patches/110-always_use_miniperl.patch @@ -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?*) diff --git a/lang/perl/patches/120-remove-build-timestamp.patch b/lang/perl/patches/120-remove-build-timestamp.patch index b0e78346..ae044c8f 100644 --- a/lang/perl/patches/120-remove-build-timestamp.patch +++ b/lang/perl/patches/120-remove-build-timestamp.patch @@ -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 index 4b4ef925..00000000 --- a/lang/perl/patches/301-fix_macos_static_linking.patch +++ /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. -+with C (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) diff --git a/lang/perl/patches/320-copy-pod-hack.patch b/lang/perl/patches/320-copy-pod-hack.patch index 9afb8a8c..efe8e0c2 100644 --- a/lang/perl/patches/320-copy-pod-hack.patch +++ b/lang/perl/patches/320-copy-pod-hack.patch @@ -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 => { diff --git a/lang/perl/patches/900-use-rm-force.patch b/lang/perl/patches/900-use-rm-force.patch index d2197571..09967beb 100644 --- a/lang/perl/patches/900-use-rm-force.patch +++ b/lang/perl/patches/900-use-rm-force.patch @@ -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 @@ -119,9 +119,9 @@ + @$(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/perl5382delta.pod: pod/perldelta.pod + $(LNS) perldelta.pod pod/perl5382delta.pod extra.pods: $(MINIPERL_EXE) - -@test ! -f extra.pods || rm -f `cat extra.pods` @@ -131,7 +131,7 @@ -@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: @@ -148,21 +148,22 @@ 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 - -@rm -f Obsolete Wanted -+ $(RMS) Obsolete Wanted ++ @$(RMS) Obsolete Wanted # 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 @@ -170,7 +171,7 @@ - -rm -f config.arch config.over $(DTRACE_H) + -@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 @@ -183,7 +184,7 @@ -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 @@ -193,9 +194,10 @@ + $(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.* @@ -228,12 +230,14 @@ + $(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 @@ -247,7 +251,7 @@ 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 @@ -256,7 +260,7 @@ !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) @@ -265,7 +269,7 @@ $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 @@ -274,12 +278,12 @@ !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 diff --git a/lang/perl/patches/910-miniperl-needs-inc-dot.patch b/lang/perl/patches/910-miniperl-needs-inc-dot.patch index 347f6f2a..6589926b 100644 --- a/lang/perl/patches/910-miniperl-needs-inc-dot.patch +++ b/lang/perl/patches/910-miniperl-needs-inc-dot.patch @@ -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 index 25ff2851..00000000 --- a/lang/perl/patches/920-fix-no-locale.patch +++ /dev/null @@ -1,383 +0,0 @@ -commit d36adde059ed1c4f7af210b4f9fc3a7bd2d7d343 -Author: Karl Williamson -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|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'; diff --git a/lang/perl/patches/998-Errno_errno.h_path.patch b/lang/perl/patches/998-Errno_errno.h_path.patch index a098210d..d0ccec91 100644 --- a/lang/perl/patches/998-Errno_errno.h_path.patch +++ b/lang/perl/patches/998-Errno_errno.h_path.patch @@ -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 index aa43f051..00000000 --- a/lang/perl/patches/999-fix-build-failure-against-gcc-10.patch +++ /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?= -Date: Tue, 12 Nov 2019 09:19:18 +0100 -Subject: [PATCH] Adapt Configure to GCC version 10 - -I got a notice from Jeff Law : - - 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 index 00000000..99cc13b9 --- /dev/null +++ b/lang/perl/patches/999-fixup-regex-engine-build-under-Uusedl.patch @@ -0,0 +1,541 @@ +From ba6e2c38aafc23cf114f3ba0d0ff3baead34328b Mon Sep 17 00:00:00 2001 +From: Yves Orton +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[optrie]; ++#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[optrie]; +-#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, ...) + { diff --git a/lang/perl/perlbase.mk b/lang/perl/perlbase.mk index 51d49fd5..c50fda1b 100644 --- a/lang/perl/perlbase.mk +++ b/lang/perl/perlbase.mk @@ -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 @@ -154,7 +140,7 @@ endef define Package/perlbase-b/install $(call perlmod/Install,$(1),B B.pm auto/B,) -$(call perlmod/InstallBaseTests,$(1),cpan/B-Debug/t ext/B/t lib/B/Deparse-core.t lib/B/Deparse-subclass.t lib/B/Deparse.t) +$(call perlmod/InstallBaseTests,$(1),ext/B/t lib/B/Deparse-core.t lib/B/Deparse-subclass.t lib/B/Deparse.t) endef $(eval $(call BuildPackage,perlbase-b)) @@ -209,7 +195,7 @@ endef define Package/perlbase-bignum/install $(call perlmod/Install,$(1),bignum.pm bigrat.pm,) -$(call perlmod/InstallBaseTests,$(1),dist/bignum/t) +$(call perlmod/InstallBaseTests,$(1),cpan/bignum/t) endef $(eval $(call BuildPackage,perlbase-bignum)) @@ -306,7 +292,7 @@ endef define Package/perlbase-cpan/install $(call perlmod/Install,$(1),CPAN CPAN.pm Parse/CPAN/Meta.pm,CPAN/FirstTime.pm) $(call perlmod/Install/NoStrip,$(1),CPAN/FirstTime.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/CPAN-Meta-Requirements/t cpan/CPAN-Meta-YAML/t cpan/CPAN-Meta/t cpan/CPAN/t cpan/Parse-CPAN-Meta/t) +$(call perlmod/InstallBaseTests,$(1),cpan/CPAN-Meta-Requirements/t cpan/CPAN-Meta-YAML/t cpan/CPAN-Meta/t cpan/CPAN/t) endef $(eval $(call BuildPackage,perlbase-cpan)) @@ -390,7 +376,7 @@ endef define Package/perlbase-devel/install $(call perlmod/Install,$(1),Devel auto/Devel,Devel/PPPort.pm) $(call perlmod/Install/NoStrip,$(1),Devel/PPPort.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/Devel-PPPort/t dist/Devel-SelfStubber/t ext/Devel-Peek/t) +$(call perlmod/InstallBaseTests,$(1),dist/Devel-PPPort/t dist/Devel-SelfStubber/t ext/Devel-Peek/t) endef $(eval $(call BuildPackage,perlbase-devel)) @@ -419,7 +405,6 @@ endef define Package/perlbase-digest/install $(call perlmod/Install,$(1),Digest Digest.pm auto/Digest,) $(call perlmod/InstallBaseTests,$(1),cpan/Digest-MD5/MD5.xs cpan/Digest-MD5/t cpan/Digest-SHA/t cpan/Digest/t) - $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/cpan/Digest-SHA/src endef $(eval $(call BuildPackage,perlbase-digest)) @@ -502,7 +487,7 @@ endef define Package/perlbase-encoding/install $(call perlmod/Install,$(1),encoding encoding.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/encoding-warnings/t) +$(call perlmod/InstallBaseTests,$(1),dist/encoding-warnings/t) endef $(eval $(call BuildPackage,perlbase-encoding)) @@ -557,9 +542,9 @@ DEPENDS+=+perlbase-config endef define Package/perlbase-essential/install -$(call perlmod/Install,$(1),Carp Carp.pm Exporter Exporter.pm constant.pm deprecate.pm lib.pm locale.pm overload.pm overloading.pm parent.pm strict.pm subs.pm vars.pm warnings warnings.pm,) +$(call perlmod/Install,$(1),Carp Carp.pm Exporter Exporter.pm constant.pm deprecate.pm lib.pm builtin.pm locale.pm overload.pm overloading.pm parent.pm strict.pm subs.pm vars.pm vmsish.pm warnings warnings.pm,) $(call perlmod/Install/NoStrip,$(1),overload/numbers.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/parent/t dist/Carp/t dist/Exporter/t dist/constant/t dist/lib/t lib/locale.t lib/overload.t lib/overload64.t lib/overloading.t lib/strict.t lib/subs.t lib/vars.t lib/vars_carp.t lib/warnings.t) +$(call perlmod/InstallBaseTests,$(1),cpan/parent/t dist/Carp/t dist/Exporter/t dist/constant/t dist/lib/t lib/builtin.t lib/locale.t lib/overload.t lib/overload64.t lib/overloading.t lib/strict.t lib/subs.t lib/vars.t lib/vars_carp.t lib/vmsish.t lib/warnings.t) endef $(eval $(call BuildPackage,perlbase-essential)) @@ -572,7 +557,7 @@ DEPENDS+=+perlbase-essential +perlbase-feature +perlbase-version endef define Package/perlbase-experimental/install -$(call perlmod/Install,$(1),experimental.pm,) +$(call perlmod/Install,$(1),experimental.pm stable.pm,) $(call perlmod/InstallBaseTests,$(1),cpan/experimental/t) endef @@ -588,7 +573,7 @@ endef define Package/perlbase-extutils/install $(call perlmod/Install,$(1),ExtUtils,ExtUtils/MakeMaker/FAQ.pod ExtUtils/MakeMaker/Tutorial.pod ExtUtils/ParseXS.pm ExtUtils/ParseXS/Utilities.pm) $(call perlmod/Install/NoStrip,$(1),ExtUtils/ParseXS.pm ExtUtils/ParseXS/Utilities.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/ExtUtils-Command/t cpan/ExtUtils-Constant/t cpan/ExtUtils-Install/t cpan/ExtUtils-MakeMaker/t cpan/ExtUtils-Manifest/t dist/ExtUtils-CBuilder/t dist/ExtUtils-ParseXS/t lib/ExtUtils/t lib/h2ph.t lib/h2xs.t utils/h2ph utils/h2xs) +$(call perlmod/InstallBaseTests,$(1),cpan/ExtUtils-Constant/t cpan/ExtUtils-Install/t cpan/ExtUtils-MakeMaker/t cpan/ExtUtils-Manifest/t dist/ExtUtils-CBuilder/t dist/ExtUtils-ParseXS/t lib/ExtUtils/t lib/h2ph.t lib/h2xs.t utils/h2ph utils/h2xs) endef $(eval $(call BuildPackage,perlbase-extutils)) @@ -725,7 +710,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)) @@ -905,7 +890,7 @@ endef define Package/perlbase-locale/install $(call perlmod/Install,$(1),Locale,Locale/Constants.pod Locale/Country.pod Locale/Currency.pod Locale/Language.pod Locale/Maketext.pod Locale/Maketext/TPJ13.pod Locale/Script.pod) -$(call perlmod/InstallBaseTests,$(1),cpan/Locale-Codes/t cpan/Locale-Maketext-Simple/t dist/Locale-Maketext/t) +$(call perlmod/InstallBaseTests,$(1),cpan/Locale-Maketext-Simple/t dist/Locale-Maketext/t) endef $(eval $(call BuildPackage,perlbase-locale)) @@ -919,7 +904,7 @@ endef define Package/perlbase-math/install $(call perlmod/Install,$(1),Math auto/Math,) -$(call perlmod/InstallBaseTests,$(1),cpan/Math-Complex/t dist/Math-BigInt-FastCalc/t dist/Math-BigInt/t dist/Math-BigRat/t) +$(call perlmod/InstallBaseTests,$(1),cpan/Math-BigInt-FastCalc/t cpan/Math-BigInt/t cpan/Math-BigRat/t) endef $(eval $(call BuildPackage,perlbase-math)) @@ -1142,7 +1127,7 @@ endef define Package/perlbase-pod/install $(call perlmod/Install,$(1),Pod,Pod/Usage.pm) $(call perlmod/Install/NoStrip,$(1),Pod/Usage.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/Pod-Checker/t cpan/Pod-Escapes/t cpan/Pod-Parser/lib cpan/Pod-Parser/scripts cpan/Pod-Parser/t cpan/Pod-Perldoc/t cpan/Pod-Simple/t cpan/Pod-Usage/scripts cpan/Pod-Usage/t cpan/podlators/t ext/Pod-Functions/Functions.pm ext/Pod-Functions/t ext/Pod-Html/t lib/Pod/t) +$(call perlmod/InstallBaseTests,$(1),cpan/Pod-Checker/t cpan/Pod-Escapes/t cpan/Pod-Perldoc/t cpan/Pod-Simple/t cpan/Pod-Usage/scripts cpan/Pod-Usage/t cpan/podlators/t ext/Pod-Functions/Functions.pm ext/Pod-Functions/t ext/Pod-Html/t lib/Pod/t) $(INSTALL_DIR) $(1)/usr/bin $(CP) $(PKG_INSTALL_DIR)/usr/bin/pod2man $(1)/usr/bin/ $(CP) $(PKG_INSTALL_DIR)/usr/bin/pod2text $(1)/usr/bin/ @@ -1202,7 +1187,6 @@ endef define Package/perlbase-scalar/install $(call perlmod/Install,$(1),Scalar Sub,) $(call perlmod/InstallBaseTests,$(1),cpan/Scalar-List-Utils/t) - $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/cpan/Scalar-List-Utils/blib endef $(eval $(call BuildPackage,perlbase-scalar)) @@ -1382,9 +1366,9 @@ DEPENDS+=+perlbase-base +perlbase-config +perlbase-essential +perlbase-io +perlb endef define Package/perlbase-test/install -$(call perlmod/Install,$(1),Test Test.pm ok.pm,Test/Builder.pm Test/Harness/TAP.pod Test/More.pm Test/Tutorial.pod) +$(call perlmod/Install,$(1),Test Test2 Test.pm Test2.pm ok.pm,Test/Builder.pm Test/More.pm Test/Tutorial.pod Test2/Transition.pod) $(call perlmod/Install/NoStrip,$(1),Test/Builder.pm Test/More.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/Test-Harness/t cpan/Test-Simple/t cpan/Test/t) +$(call perlmod/InstallBaseTests,$(1),cpan/Test-Harness/t cpan/Test-Simple/t dist/Test/t) $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/prove $(1)/usr/bin endef @@ -1441,7 +1425,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 @@ -1456,7 +1440,7 @@ endef define Package/perlbase-time/install $(call perlmod/Install,$(1),Time auto/Time,) -$(call perlmod/InstallBaseTests,$(1),cpan/Time-HiRes/t cpan/Time-Local/t cpan/Time-Piece/t lib/Time/gmtime.t lib/Time/localtime.t) +$(call perlmod/InstallBaseTests,$(1),dist/Time-HiRes/t cpan/Time-Local/t cpan/Time-Piece/t lib/Time/gmtime.t lib/Time/localtime.t) endef $(eval $(call BuildPackage,perlbase-time)) @@ -1470,7 +1454,7 @@ endef define Package/perlbase-unicode/install $(call perlmod/Install,$(1),Unicode auto/Unicode,) -$(call perlmod/InstallBaseTests,$(1),cpan/Unicode-Collate/t cpan/Unicode-Normalize/t lib/Unicode/UCD.t) +$(call perlmod/InstallBaseTests,$(1),cpan/Unicode-Collate/t dist/Unicode-Normalize/t lib/Unicode/UCD.t) endef $(eval $(call BuildPackage,perlbase-unicode)) @@ -1522,7 +1506,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 diff --git a/lang/perl/perlmod.mk b/lang/perl/perlmod.mk index 5a91c23a..db83d603 100644 --- a/lang/perl/perlmod.mk +++ b/lang/perl/perlmod.mk @@ -25,6 +25,9 @@ MOD_CFLAGS_PERL:=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(TARGET_CFLAGS) $(T ifdef CONFIG_PERL_THREADS MOD_CFLAGS_PERL+= -D_REENTRANT -D_GNU_SOURCE endif +ifdef CONFIG_USE_MUSL + MOD_CFLAGS_PERL+= -D_LARGEFILE64_SOURCE +endif # Module install prefix PERL_SITELIB:=/usr/lib/perl5/$(PERL_VERSION) diff --git a/lang/perl/perlver.mk b/lang/perl/perlver.mk index dbec8151..b0acc5d9 100644 --- a/lang/perl/perlver.mk +++ b/lang/perl/perlver.mk @@ -1,4 +1,4 @@ -PERL_VERSION:=5.28.1 +PERL_VERSION:=5.38.2 PERL_EXPLODE:=$(subst ., ,$(PERL_VERSION))