Perl5: add 5.42.2 version

This commit is contained in:
Vincent Habchi
2026-06-29 07:12:47 +02:00
parent cd0ca2d0bf
commit 4cd094375f
11 changed files with 352 additions and 1 deletions
+2 -1
View File
@@ -38,6 +38,7 @@ set perl5.versions_info {
5.36 3 1 96c867d175fb54b631dbe9237e3d7df2c96ec8cb 45a228daef66d02fdccc820e71f87e40d8e3df1fc4431f8d4580ec08033866bd 13141248
5.38 5 0 eafc0c90904d507421e8b8d9abd4aa6ff66319b1 293efd3c7d100c470624a56a18f85fd656207bf124460e76709d94b8bae14422 13715856
5.40 4 0 96c78e57c561cd4d83ca445274ea927278822344 eb0b1116b84ded552f686c9ee40c83000d8388c454f54197ca1d3a3b17246bd3 13937376
5.42 2 0 31833b01101d728017e4d147b5ecac78affb9236 0a585eeb9e363c0f80482ddb3571625250c2c86aeb408853e8ea50805cfb14bb 14483976
}
foreach {perl5.v perl5.subversion perl5.revision perl5.rmd160 perl5.sha256 perl5.size} ${perl5.versions_info} {
@@ -170,7 +171,7 @@ foreach {perl5.v perl5.subversion perl5.revision perl5.rmd160 perl5.sha256 perl5
patchfiles-append \
${perl5.major}/patch-want-implicit-errors.diff
}
if {${perl5.major} >= 5.36} {
if {${perl5.major} >= 5.36 && ${perl5.major} <= 5.40} {
# Do not override deployment target
# https://trac.macports.org/ticket/71152
patchfiles-append \
@@ -0,0 +1,11 @@
--- hints/darwin.sh.orig
+++ hints/darwin.sh
@@ -130,7 +130,7 @@ esac
# Avoid Apple's cpp precompiler, better for extensions
if [ "X`echo | ${cc} -no-cpp-precomp -E - 2>&1 >/dev/null`" = "X" ]; then
- cppflags="${cppflags} -no-cpp-precomp"
+
# This is necessary because perl's build system doesn't
# apply cppflags to cc compile lines as it should.
@@ -0,0 +1,37 @@
--- Configure.orig
+++ Configure
@@ -108,8 +108,8 @@ if test -d c:/. || ( uname -a | grep -i
fi
: Proper PATH setting
-paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
-paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
+paths='/bin /usr/bin /usr/ucb /usr/lbin'
+paths="$paths /opt/bin __PREFIX__/bin __PREFIX__ /opt/lbin"
paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
@@ -1447,7 +1447,7 @@ archobjs=''
i_whoami=''
: Possible local include directories to search.
: Set locincpth to "" in a hint file to defeat local include searches.
-locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
+locincpth="__PREFIX__/include /usr/gnu/include"
locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
:
: no include file wanted by default
@@ -1464,12 +1464,12 @@ libnames=''
: change the next line if compiling for Xenix/286 on Xenix/386
xlibpth='/usr/lib/386 /lib/386'
: Possible local library directories to search.
-loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
+loclibpth="__PREFIX__/lib /usr/gnu/lib"
loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
: general looking path for locating libraries
glibpth="/lib /usr/lib $xlibpth"
-glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
+glibpth="$glibpth /usr/ccs/lib /usr/ucblib"
test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
test -f /shlib/libc.so && glibpth="/shlib $glibpth"
test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64"
+157
View File
@@ -0,0 +1,157 @@
/define[ ]PRINTF_FORMAT_NULL_OK/c
#ifdef __LP64__
/*#define PRINTF_FORMAT_NULL_OK / **/
#else /* !__LP64__ */
#define PRINTF_FORMAT_NULL_OK /**/
#endif /* __LP64__ */
.
/define[ ]LONGSIZE/c
#ifdef __LP64__
#define LONGSIZE 8 /**/
#else /* !__LP64__ */
#define LONGSIZE 4 /**/
#endif /* __LP64__ */
.
/define[ ]CASTI32/c
#ifdef __ppc__
#define CASTI32 /**/
#else /* !__ppc__ */
/*#define CASTI32 / **/
#endif /* __ppc__ */
.
/define[ ]CASTNEGFLOAT/a
.
.,.+1c
#ifdef __i386__
/*#define CASTNEGFLOAT / **/
#define CASTFLAGS 1 /**/
#else
#define CASTNEGFLOAT /**/
#define CASTFLAGS 0 /**/
#endif
.
/define[ ]Quad_t/a
.
.,.+2c
#ifdef __LP64__
# define Quad_t long /**/
# define Uquad_t unsigned long /**/
# define QUADKIND 2 /**/
#else /* !__LP64__ */
# define Quad_t long long /**/
# define Uquad_t unsigned long long /**/
# define QUADKIND 3 /**/
#endif /* __LP64__ */
.
/define[ ]PTRSIZE/c
#ifdef __LP64__
#define PTRSIZE 8 /**/
#else /* !__LP64__ */
#define PTRSIZE 4 /**/
#endif /* __LP64__ */
.
/define[ ]USE_BSD_SETPGRP/c
#if __DARWIN_UNIX03
/*#define USE_BSD_SETPGRP / **/
#else /* !__DARWIN_UNIX03 */
#define USE_BSD_SETPGRP /**/
#endif /* __DARWIN_UNIX03 */
.
/define[ ]I32TYPE/a
.
.,.+1c
#ifdef __LP64__
#define I32TYPE int /**/
#define U32TYPE unsigned int /**/
#else /* !__LP64__ */
#define I32TYPE long /**/
#define U32TYPE unsigned long /**/
#endif /* __LP64__ */
.
/define[ ]I64TYPE/a
.
.,.+1c
#ifdef __LP64__
#define I64TYPE long /**/
#define U64TYPE unsigned long /**/
#else /* !__LP64__ */
#define I64TYPE long long /**/
#define U64TYPE unsigned long long /**/
#endif /* __LP64__ */
.
/define[ ]IVSIZE/a
.
.,.+1c
#ifdef __LP64__
#define IVSIZE 8 /**/
#define UVSIZE 8 /**/
#else /* !__LP64__ */
#define IVSIZE 4 /**/
#define UVSIZE 4 /**/
#endif /* __LP64__ */
.
/NV_PRESERVES_UV$/a
.
.,.+1c
#ifdef __LP64__
#undef NV_PRESERVES_UV
#define NV_PRESERVES_UV_BITS 53
#else /* !__LP64__ */
#define NV_PRESERVES_UV
#define NV_PRESERVES_UV_BITS 32
#endif /* __LP64__ */
.
/define[ ]HAS_STDIO_STREAM_ARRAY/a
.
.,.+3c
#if __DARWIN_UNIX03
/*#define HAS_STDIO_STREAM_ARRAY / **/
#define STDIO_STREAM_ARRAY
#else /* !__DARWIN_UNIX03 */
#define HAS_STDIO_STREAM_ARRAY /**/
#define STDIO_STREAM_ARRAY __sF
#endif /* __DARWIN_UNIX03 */
.
/define[ ]USE_64_BIT_INT/c
#ifdef __LP64__
#define USE_64_BIT_INT /**/
#else /* !__LP64__ */
/*#define USE_64_BIT_INT / **/
#endif /* __LP64__ */
.
/define[ ]USE_64_BIT_ALL/c
#ifdef __LP64__
#define USE_64_BIT_ALL /**/
#else /* !__LP64__ */
/*#define USE_64_BIT_ALL / **/
#endif /* __LP64__ */
.
/define[ ]Gid_t_f/c
#ifdef __LP64__
#define Gid_t_f "u" /**/
#else /* !__LP64__ */
#define Gid_t_f "lu" /**/
#endif /* __LP64__ */
.
/define[ ]Size_t_size/c
#ifdef __LP64__
#define Size_t_size 8 /* */
#else /* !__LP64__ */
#define Size_t_size 4 /* */
#endif /* __LP64__ */
.
/define[ ]Uid_t_f/c
#ifdef __LP64__
#define Uid_t_f "u" /**/
#else /* !__LP64__ */
#define Uid_t_f "lu" /**/
#endif /* __LP64__ */
.
/define[ ]NEED_VA_COPY/c
#ifdef __LP64__
#define NEED_VA_COPY /**/
#else /* !__LP64__ */
/*#define NEED_VA_COPY / **/
#endif /* __LP64__ */
.
w
@@ -0,0 +1,34 @@
--- hints/darwin.sh.orig
+++ hints/darwin.sh
@@ -345,17 +345,20 @@ EOM
darwin_major=$(echo $osvers|awk -F. '{print $1}')
# macOS 10.12 (darwin 16.0.0) deprecated syscall().
- if [ "$darwin_major" -ge 16 ]; then
- d_syscall='undef'
- # If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime()
- case "$MACOSX_DEPLOYMENT_TARGET" in
- 10.[6-9]|10.10|10.11)
- ccflags="$ccflags -Werror=partial-availability -D_DARWIN_FEATURE_CLOCK_GETTIME=0"
- ;;
- *)
- ;;
- esac
- fi
+ # but it's still available on both macOS 10.12 and 10.13
+ # for compatibility with perl5.24 allow syscall() configuration on Sierra and later
+ # will auto-configure without syscall() if and when it's actually removed
+ # if [ "$darwin_major" -ge 16 ]; then
+ # d_syscall='undef'
+ # # If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime()
+ # case "$MACOSX_DEPLOYMENT_TARGET" in
+ # 10.[6-9]|10.10|10.11)
+ # ccflags="$ccflags -Werror=partial-availability -D_DARWIN_FEATURE_CLOCK_GETTIME=0"
+ # ;;
+ # *)
+ # ;;
+ # esac
+ # fi
lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
;;
@@ -0,0 +1,19 @@
--- cpan/DB_File/config.in.orig
+++ cpan/DB_File/config.in
@@ -9,7 +9,7 @@
# Change the path below to point to the directory where db.h is
# installed on your system.
-INCLUDE = /usr/local/BerkeleyDB/include
+INCLUDE = __PREFIX__/include/db48
#INCLUDE = /usr/local/include
#INCLUDE = /usr/include
@@ -18,7 +18,7 @@
# Change the path below to point to the directory where libdb is
# installed on your system.
-LIB = /usr/local/BerkeleyDB/lib
+LIB = __PREFIX__/lib/db48
#LIB = /usr/local/lib
#LIB = /usr/lib
@@ -0,0 +1,11 @@
--- Makefile.SH.orig
+++ Makefile.SH
@@ -995,7 +995,7 @@ NAMESPACEFLAGS = -force_flat_namespace
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
-@rm -f miniperl.xok
- $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
+ unset LIBRARY_PATH && $(CC) $(subst -L__PREFIX__/lib,,$(CLDFLAGS)) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
$(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
$(MINIPERL) -f write_buildcustomize.pl
@@ -0,0 +1,39 @@
https://trac.macports.org/ticket/43480
--- Configure.orig
+++ Configure
@@ -7110,6 +7110,8 @@ dos|vms)
*)
version=`echo $revision $patchlevel $subversion | \
$awk '{ printf "%d.%d.%d", $1, $2, $3 }'`
+ version_short=`echo $revision $patchlevel | \
+ $awk '{ printf "%d.%d\n", $1, $2 }'`
api_versionstring=`echo $api_revision $api_version $api_subversion | \
$awk '{ printf "%d.%d.%d", $1, $2, $3 }'`
;;
@@ -7361,7 +7363,7 @@ esac
: /opt/perl/lib/perl5... would be redundant.
: The default "style" setting is made in installstyle.U
case "$installstyle" in
-*lib/perl5*) set dflt privlib lib/$package/$version ;;
+*lib/perl5*) set dflt privlib lib/$package/$version_short ;;
*) set dflt privlib lib/$version ;;
esac
eval $prefixit
@@ -7609,7 +7611,7 @@ siteprefixexp="$ansexp"
prog=`echo $package | $sed 's/-*[0-9.]*$//'`
case "$sitelib" in
'') case "$installstyle" in
- *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
+ *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version_short ;;
*) dflt=$siteprefix/lib/site_$prog/$version ;;
esac
;;
@@ -8028,7 +8030,7 @@ case "$vendorprefix" in
'')
prog=`echo $package | $sed 's/-*[0-9.]*$//'`
case "$installstyle" in
- *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
+ *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version_short ;;
*) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
esac
;;
@@ -0,0 +1,11 @@
--- Configure.orig 2023-11-28 15:57:27
+++ Configure 2024-05-19 17:27:30
@@ -1511,7 +1511,7 @@
usereentrant='undef'
: List of libraries we want.
: If anyone needs extra -lxxx, put those in a hint file.
-libswanted="cl pthread socket bind inet ndbm gdbm dbm db malloc dl ld"
+libswanted="pthread socket inet ndbm gdbm dbm db malloc dl ld"
libswanted="$libswanted sun m crypt sec util c cposix posix ucb bsd BSD"
: We probably want to search /usr/shlib before most other libraries.
: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
@@ -0,0 +1,18 @@
Do not suppress errors for implicit function declarations
(which was done for https://rt.cpan.org/Ticket/Display.html?id=133493)
See:
* https://trac.macports.org/ticket/61630
* https://trac.macports.org/ticket/63022
--- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm.orig
+++ cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm
@@ -62,7 +62,7 @@ sub cflags {
foreach (split /\n/, $base) {
/^(\S*)\s*=\s*(\S*)$/ and $self->{$1} = $2;
};
- $self->{CCFLAGS} .= " -Wno-error=implicit-function-declaration";
+
return $self->{CFLAGS} = qq{
CCFLAGS = $self->{CCFLAGS}
@@ -0,0 +1,13 @@
Resolve any symlinks to cwd in dylib install name
https://github.com/Perl/perl5/pull/23461
--- Makefile.SH.orig 2025-07-22 00:55:36.000000000 -0500
+++ Makefile.SH 2025-07-22 00:55:37.000000000 -0500
@@ -64,7 +64,7 @@
${revision}.${patchlevel}.${subversion}"
case "$osvers" in
1[5-9]*|[2-9]*)
- shrpldflags="$shrpldflags -install_name `pwd`/\$@ -Xlinker -headerpad_max_install_names"
+ shrpldflags="$shrpldflags -install_name `pwd -P`/\$@ -Xlinker -headerpad_max_install_names"
exeldflags="-Xlinker -headerpad_max_install_names"
;;
*)