From 4a94479f9652fec59c76e5bc187f9dc08fc8eca7 Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Sun, 24 Sep 2017 17:39:27 -0600 Subject: [PATCH] perl: update to 5.26.1 Required changes: * Add qualifying '.' to scripts or to @INC, as appropriate since we're enabling default_inc_excludes_dot; * Add new platform/library definitions like double-double format and locale library functions/headers; * Delete patch 020 as it's been upstreamed; Optional changes: * Instead of using -@rm and having that fail, emit an error message, and be ignored, just use @rm -f instead which will always succeed. Security [CVE-2017-12837] Heap buffer overflow in regular expression compiler Compiling certain regular expression patterns with the case-insensitive modifier could cause a heap buffer overflow and crash perl. This has now been fixed. [perl #131582] [CVE-2017-12883] Buffer over-read in regular expression parser For certain types of syntax error in a regular expression pattern, the error message could either contain the contents of a random, possibly large, chunk of memory, or could crash perl. This has now been fixed. [perl #131598] [CVE-2017-12814] $ENV{$key} stack buffer overflow on Windows A possible stack buffer overflow in the %ENV code on Windows has been fixed by removing the buffer completely since it was superfluous anyway. [perl #131665] Signed-off-by: Philip Prindeville --- lang/perl/Makefile | 6 +- lang/perl/files/arm.config | 1 + lang/perl/files/armeb.config | 1 + lang/perl/files/base.config | 18 ++ lang/perl/files/i486.config | 3 + lang/perl/files/mips.config | 1 + lang/perl/files/mips64.config | 2 + lang/perl/files/mipsel.config | 1 + lang/perl/files/powerpc.config | 1 + lang/perl/files/version.config | 4 +- lang/perl/files/x86_64.config | 3 + ...st-libc-dir-moved-debian+derivatives.patch | 27 -- .../patches/110-always_use_miniperl.patch | 6 +- lang/perl/patches/900-use-rm-force.patch | 285 ++++++++++++++++++ .../patches/910-miniperl-needs-inc-dot.patch | 80 +++++ lang/perl/perlmod.mk | 2 +- 16 files changed, 405 insertions(+), 36 deletions(-) delete mode 100644 lang/perl/patches/020-host-libc-dir-moved-debian+derivatives.patch create mode 100644 lang/perl/patches/900-use-rm-force.patch create mode 100644 lang/perl/patches/910-miniperl-needs-inc-dot.patch diff --git a/lang/perl/Makefile b/lang/perl/Makefile index 015b054898..d265525a7f 100644 --- a/lang/perl/Makefile +++ b/lang/perl/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl -PKG_VERSION:=5.24.1 -PKG_RELEASE:=2 +PKG_VERSION:=5.26.1 +PKG_RELEASE:=1 PKG_SOURCE_URL:=\ https://cpan.metacpan.org/src/5.0 \ @@ -19,7 +19,7 @@ PKG_SOURCE_URL:=\ https://mirrors.sonic.net/cpan/src/5.0 \ https://www.cpan.org/src/5.0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=03a77bac4505c270f1890ece75afc7d4b555090b41aa41ea478747e23b2afb3f +PKG_HASH:=fe8208133e73e47afc3251c08d2c21c5a60160165a8ab8b669c43a420e4ec680 PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl PKG_LICENSE_FILES:=Copying Artistic README diff --git a/lang/perl/files/arm.config b/lang/perl/files/arm.config index 75fe25460c..0f94d4ee25 100644 --- a/lang/perl/files/arm.config +++ b/lang/perl/files/arm.config @@ -6,6 +6,7 @@ ccsymbols='__ARM_ARCH_3__=1' cppccsymbols='' cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1' d_casti32='define' +d_double_style_ieee='define' d_modflproto='undef' doublekind='3' fpossize='20' diff --git a/lang/perl/files/armeb.config b/lang/perl/files/armeb.config index 081300c942..d23a7d010b 100644 --- a/lang/perl/files/armeb.config +++ b/lang/perl/files/armeb.config @@ -6,6 +6,7 @@ ccsymbols='__ARM_ARCH_3__=1' cppccsymbols='' cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1' d_casti32='define' +d_double_style_ieee='define' d_modflproto='undef' doublekind='4' fpossize='20' diff --git a/lang/perl/files/base.config b/lang/perl/files/base.config index 1b17e1c184..7bcfc859c4 100644 --- a/lang/perl/files/base.config +++ b/lang/perl/files/base.config @@ -133,6 +133,14 @@ d_dlerror='define' d_dlopen='define' d_dlsymun='undef' d_dosuid='undef' +d_double_has_inf='define' +d_double_has_nan='define' +d_double_has_negative_zero='define' +d_double_has_subnormals='define' +d_double_style_cray='undef' +d_double_style_ibm='undef' +d_double_style_ieee='define' +d_double_style_vax='undef' d_drand48proto='define' d_dup2='define' d_duplocale='define' @@ -195,6 +203,7 @@ d_fsync='define' d_ftello='define' d_ftime='undef' d_futimes='undef' +d_gai_strerror='define' d_gdbm_ndbm_h_uses_prototypes='undef' d_gdbmndbm_h_uses_prototypes='undef' d_getaddrinfo='define' @@ -283,6 +292,11 @@ d_lockf='define' d_log1p='define' d_log2='define' d_logb='define' +d_long_double_style_ieee='undef' +d_long_double_style_ieee_doubledouble='undef' +d_long_double_style_ieee_extended='undef' +d_long_double_style_ieee_std='undef' +d_long_double_style_vax='undef' d_longdbl='define' d_longlong='define' d_lrint='define' @@ -365,6 +379,7 @@ d_pwpasswd='define' d_pwquota='undef' d_qgcvt='undef' d_quad='define' +d_querylocale='undef' d_re_comp='undef' d_readdir='define' d_readlink='define' @@ -478,6 +493,7 @@ d_strcoll='define' d_strctcpy='define' d_strerrm='strerror(e)' d_strerror='define' +d_strerror_l='define' d_strftime='define' d_strlcat='define' d_strlcpy='define' @@ -547,6 +563,7 @@ db_prefixtype='size_t' db_version_major='' db_version_minor='' db_version_patch='' +default_inc_excludes_dot='define' defvoidused='15' direntrytype='struct dirent' dlext='so' @@ -699,6 +716,7 @@ i_values='define' i_varargs='undef' i_varhdr='stdarg.h' i_vfork='undef' +i_xlocale='undef' ignore_versioned_solibs='y' inc_version_list=' ' inc_version_list_init='0' diff --git a/lang/perl/files/i486.config b/lang/perl/files/i486.config index b44c64e2c7..1ed7039566 100644 --- a/lang/perl/files/i486.config +++ b/lang/perl/files/i486.config @@ -6,6 +6,9 @@ ccsymbols='' cppccsymbols='' cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 i386=1 __i386=1 __i386__=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1' d_casti32='undef' +d_double_style_ieee='define' +d_long_double_style_ieee='define' +d_long_double_style_ieee_extended='define' d_modflproto='define' doublekind='3' fpossize='20' diff --git a/lang/perl/files/mips.config b/lang/perl/files/mips.config index 05e807b30f..0ed9eb1c45 100644 --- a/lang/perl/files/mips.config +++ b/lang/perl/files/mips.config @@ -6,6 +6,7 @@ ccsymbols='' cppccsymbols='' cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 LANGUAGE_C=1 _LANGUAGE_C=1 __LANGUAGE_C=1 __LANGUAGE_C__=1 _LARGEFILE_SOURCE=1 MIPSEL=1 _MIPSEL=1 __MIPSEL=1 __MIPSEL__=1 _MIPS_FPSET=16 _MIPS_ISA=_MIPS_ISA_MIPS1 _MIPS_SIM=1 _MIPS_SZINT=32 _MIPS_SZLONG=32 _MIPS_SZPTR=32 __PIC__=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 R3000=1 _R3000=1 __R3000=1 __R3000__=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 mips=1 _mips=1 __mips=1 __mips__=1 __pic__=1 unix=1 __unix=1 __unix__=1' d_casti32='define' +d_double_style_ieee='define' d_modflproto='undef' doublekind='4' fpossize='24' diff --git a/lang/perl/files/mips64.config b/lang/perl/files/mips64.config index 89875f7d23..470cb4e374 100644 --- a/lang/perl/files/mips64.config +++ b/lang/perl/files/mips64.config @@ -6,6 +6,8 @@ ccsymbols='' cppccsymbols='' cppsymbols='' d_casti32='define' +d_double_style_ieee='define' +d_long_double_style_ieee_doubledouble='define' d_modflproto='undef' doublekind='4' fpossize='24' diff --git a/lang/perl/files/mipsel.config b/lang/perl/files/mipsel.config index d209a0de28..3c5dada77b 100644 --- a/lang/perl/files/mipsel.config +++ b/lang/perl/files/mipsel.config @@ -6,6 +6,7 @@ ccsymbols='' cppccsymbols='' cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 LANGUAGE_C=1 _LANGUAGE_C=1 __LANGUAGE_C=1 __LANGUAGE_C__=1 _LARGEFILE_SOURCE=1 MIPSEL=1 _MIPSEL=1 __MIPSEL=1 __MIPSEL__=1 _MIPS_FPSET=16 _MIPS_ISA=_MIPS_ISA_MIPS1 _MIPS_SIM=1 _MIPS_SZINT=32 _MIPS_SZLONG=32 _MIPS_SZPTR=32 __PIC__=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 R3000=1 _R3000=1 __R3000=1 __R3000__=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 mips=1 _mips=1 __mips=1 __mips__=1 __pic__=1 unix=1 __unix=1 __unix__=1' d_casti32='define' +d_double_style_ieee='define' d_modflproto='undef' doublekind='3' fpossize='24' diff --git a/lang/perl/files/powerpc.config b/lang/perl/files/powerpc.config index 33af767fc5..287ce6c636 100644 --- a/lang/perl/files/powerpc.config +++ b/lang/perl/files/powerpc.config @@ -6,6 +6,7 @@ ccsymbols='__gnu_linux__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 system=linu cppccsymbols='linux=1 unix=1' cppsymbols='_BIG_ENDIAN=1 __BIG_ENDIAN__=1 __ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 __linux=1 __linux__=1 __unix=1 __unix__=1' d_casti32='undef' +d_double_style_ieee='define' d_modflproto='undef' doublekind='4' fpossize='24' diff --git a/lang/perl/files/version.config b/lang/perl/files/version.config index 377ceec9c4..c8ebd4c649 100644 --- a/lang/perl/files/version.config +++ b/lang/perl/files/version.config @@ -1,11 +1,11 @@ # Set the version here PERL_REVISION=5 -PERL_VERSION=24 +PERL_VERSION=26 PERL_SUBVERSION=1 # (api_revison, api_version, api_subversion) = (revision, version, 0) usually PERL_API_REVISION=5 -PERL_API_VERSION=24 +PERL_API_VERSION=26 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' diff --git a/lang/perl/files/x86_64.config b/lang/perl/files/x86_64.config index a9cb581573..ac16efc466 100644 --- a/lang/perl/files/x86_64.config +++ b/lang/perl/files/x86_64.config @@ -6,6 +6,9 @@ ccsymbols='' cppccsymbols='' cppsymbols='__ELF__=1 _LP64=1 __FLT_EVAL_METHOD__=0 __FXSR__=1 __GCC_ATOMIC_LLONG_LOCK_FREE=2 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 __INT64_MAX__=9223372036854775807L __INT64_TYPE__=long\ int __INTMAX_MAX__=9223372036854775807L __INTMAX_TYPE__=long\ int __INTPTR_MAX__=9223372036854775807L __INTPTR_TYPE__=long\ int __INT_FAST16_MAX__=9223372036854775807L __INT_FAST16_TYPE__=long\ int __INT_FAST32_MAX__=9223372036854775807L __INT_FAST32_TYPE__=long\ int __INT_FAST64_MAX__=9223372036854775807L __INT_FAST64_TYPE__=long\ int __INT_LEAST64_MAX__=9223372036854775807L __INT_LEAST64_TYPE__=long\ int __LONG_MAX__=9223372036854775807L __LP64__=1 __MMX__=1 __PTRDIFF_MAX__=9223372036854775807L __PTRDIFF_TYPE__=long\ int __SIZEOF_INT128__=16 __SIZEOF_LONG_DOUBLE__=16 __SIZEOF_LONG__=8 __SIZEOF_POINTER__=8 __SIZEOF_PTRDIFF_T__=8 __SIZEOF_SIZE_T__=8 __SIZE_MAX__=18446744073709551615UL __SIZE_TYPE__=long\ unsigned\ int __SSE2_MATH__=1 __SSE2__=1 __SSE_MATH__=1 __SSE__=1 __UINT64_MAX__=18446744073709551615UL __UINT64_TYPE__=long\ unsigned\ int __UINTMAX_MAX__=18446744073709551615UL __UINTMAX_TYPE__=long\ unsigned\ int __UINTPTR_MAX__=18446744073709551615UL __UINTPTR_TYPE__=long\ unsigned\ int __UINT_FAST16_MAX__=18446744073709551615UL __UINT_FAST16_TYPE__=long\ unsigned\ int __UINT_FAST32_MAX__=18446744073709551615UL __UINT_FAST32_TYPE__=long\ unsigned\ int __UINT_FAST64_MAX__=18446744073709551615UL __UINT_FAST64_TYPE__=long\ unsigned\ int __UINT_LEAST64_MAX__=18446744073709551615UL __UINT_LEAST64_TYPE__=long\ unsigned\ int __WCHAR_MAX__=2147483647 __WCHAR_MIN__=(-2147483647\ -\ 1) __WCHAR_TYPE__=int __amd64=1 __amd64__=1 __code_model_small__=1 __k8=1 __k8__=1 __x86_64=1 __x86_64__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1' d_casti32='undef' +d_double_style_ieee='define' +d_long_double_style_ieee='define' +d_long_double_style_ieee_extended='define' d_modflproto='define' doublekind='3' fpossize='16' diff --git a/lang/perl/patches/020-host-libc-dir-moved-debian+derivatives.patch b/lang/perl/patches/020-host-libc-dir-moved-debian+derivatives.patch deleted file mode 100644 index 956466d99a..0000000000 --- a/lang/perl/patches/020-host-libc-dir-moved-debian+derivatives.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/hints/linux.sh -+++ b/hints/linux.sh -@@ -221,6 +221,24 @@ case "$libc" in - ;; - esac - -+# Ubuntu 11.04 (and later, presumably) doesn't keep most libraries -+# (such as -lm) in /lib or /usr/lib. So we have to ask gcc to tell us -+# where to look. We don't want gcc's own libraries, however, so we -+# filter those out. -+# This could be conditional on Unbuntu, but other distributions may -+# follow suit, and this scheme seems to work even on rather old gcc's. -+# This unconditionally uses gcc because even if the user is using another -+# compiler, we still need to find the math library and friends, and I don't -+# know how other compilers will cope with that situation. -+# Still, as an escape hatch, allow Configure command line overrides to -+# plibpth to bypass this check. -+case "$plibpth" in -+'') plibpth=`gcc -print-search-dirs | grep libraries | -+ cut -f2- -d= | tr ':' $trnl | grep -v 'gcc'` -+ plibpth="$plibpth" # Collapse all entries on one line -+ ;; -+esac -+ - # Are we using ELF? Thanks to Kenneth Albanowski - # for this test. - cat >try.c <<'EOM' diff --git a/lang/perl/patches/110-always_use_miniperl.patch b/lang/perl/patches/110-always_use_miniperl.patch index b1d9994b5e..147c2d38fa 100644 --- a/lang/perl/patches/110-always_use_miniperl.patch +++ b/lang/perl/patches/110-always_use_miniperl.patch @@ -1,6 +1,6 @@ --- a/Makefile.SH +++ b/Makefile.SH -@@ -333,22 +333,11 @@ MANIFEST_SRT = MANIFEST.srt +@@ -334,22 +334,11 @@ MANIFEST_SRT = MANIFEST.srt !GROK!THIS! @@ -17,8 +17,8 @@ +$spitshell >>$Makefile <>$Makefile <<'!NO!SUBS!' + $(DTRACE_MINI_O): perldtrace.d $(miniperl_objs_nodt) +- -rm -rf mpdtrace ++ $(RMS_R) mpdtrace + mkdir mpdtrace + cp $(miniperl_objs_nodt) mpdtrace/ + $(DTRACE) -G -s perldtrace.d -o $(DTRACE_MINI_O) $(miniperl_dtrace_objs) + + $(DTRACE_PERLLIB_O): perldtrace.d $(perllib_objs_nodt) +- -rm -rf libpdtrace ++ $(RMS_R) libpdtrace + mkdir libpdtrace + cp $(perllib_objs_nodt) libpdtrace/ + $(DTRACE) -G -s perldtrace.d -o $(DTRACE_PERLLIB_O) $(perllib_dtrace_objs) + + $(DTRACE_MAIN_O): perldtrace.d perlmain$(OBJ_EXT) +- -rm -rf maindtrace ++ $(RMS_R) maindtrace + mkdir maindtrace + cp perlmain$(OBJ_EXT) maindtrace/ + $(DTRACE) -G -s perldtrace.d -o $(DTRACE_MAIN_O) $(perlmain_dtrace_objs) || \ + ( $(ECHO) "No probes in perlmain$(OBJ_EXT), generating a dummy $(DTRACE_MAIN_O)" && \ + $(ECHO) >dtrace_main.c && \ + `$(CCCMD)` $(PLDLFLAGS) dtrace_main.c && \ +- rm -f dtrace_main.c ) ++ $(RMS) dtrace_main.c ) + + !NO!SUBS! + ;; +@@ -901,13 +902,13 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD + case "$useshrplib" in + true) + $spitshell >>$Makefile <<'!NO!SUBS!' +- rm -f $@ ++ $(RMS) $@ + $(LD) -o $@ $(SHRPLDFLAGS) $(perllib_objs) $(DYNALOADER) $(libs) + !NO!SUBS! + case "$osname" in + aix) + $spitshell >>$Makefile <<'!NO!SUBS!' +- rm -f libperl$(OBJ_EXT) ++ $(RMS) libperl$(OBJ_EXT) + mv $@ libperl$(OBJ_EXT) + $(AR) qv $(LIBPERL) libperl$(OBJ_EXT) + !NO!SUBS! +@@ -916,7 +917,7 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD + ;; + *) + $spitshell >>$Makefile <<'!NO!SUBS!' +- rm -f $(LIBPERL) ++ $(RMS) $(LIBPERL) + $(AR) rc $(LIBPERL) $(perllib_objs) $(DYNALOADER) + @$(ranlib) $(LIBPERL) + !NO!SUBS! +@@ -949,7 +950,7 @@ $(MINIPERL_EXE): lib/buildcustomize.pl + amigaos*) + $spitshell >>$Makefile <<'!NO!SUBS!' + lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl +- -@rm -f miniperl.xok ++ @$(RMS) miniperl.xok + $(CC) $(CLDFLAGS) -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' +@@ -987,7 +988,7 @@ NAMESPACEFLAGS = -force_flat_namespace + esac + $spitshell >>$Makefile <<'!NO!SUBS!' + lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl +- -@rm -f miniperl.xok ++ @$(RMS) miniperl.xok + $(CC) $(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' +@@ -998,8 +999,8 @@ lib/buildcustomize.pl: $& $(miniperl_obj + if test "X$hostperl" != X; then + $spitshell >>$Makefile <' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' + \$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname" +@@ -1007,7 +1008,7 @@ lib/buildcustomize.pl: \$& \$(miniperl_d + else + $spitshell >>$Makefile <<'!NO!SUBS!' + lib/buildcustomize.pl: $& $(miniperl_dep) write_buildcustomize.pl +- -@rm -f miniperl.xok ++ @$(RMS) miniperl.xok + $(CC) $(CLDFLAGS) -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' +@@ -1020,7 +1021,7 @@ lib/buildcustomize.pl: $& $(miniperl_dep + $spitshell >>$Makefile <<'!NO!SUBS!' + + $(PERL_EXE): $& $(perlmain_dep) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) write_buildcustomize.pl +- -@rm -f miniperl.xok ++ @$(RMS) miniperl.xok + !NO!SUBS! + + case $osname in +@@ -1114,8 +1115,8 @@ pod/perl5261delta.pod: pod/perldelta.pod + $(LNS) perldelta.pod pod/perl5261delta.pod + + extra.pods: $(MINIPERL_EXE) +- -@test ! -f extra.pods || rm -f `cat extra.pods` +- -@rm -f extra.pods ++ -@test ! -f extra.pods || $(RMS) `cat extra.pods` ++ @$(RMS) extra.pods + -@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \ + nx=`echo $$x | sed -e "s/README\.//"`; \ + $(LNS) ../$$x "pod/perl"$$nx".pod" ; \ +@@ -1332,11 +1333,11 @@ realclean: _realcleaner _mopup + @echo "Note that '$(MAKE) realclean' does not delete config.sh or Policy.sh" + + _clobber: +- -@rm -f Cross/run-* Cross/to-* Cross/from-* Cross/mkdir +- -rm -rf host +- rm -f t/test_state +- rm -f config.sh cppstdin Policy.sh extras.lst +- rm -f $(MANIFEST_SRT) ++ @$(RMS) Cross/run-* Cross/to-* Cross/from-* Cross/mkdir ++ $(RMS_R) host ++ $(RMS) t/test_state ++ $(RMS) config.sh cppstdin Policy.sh extras.lst ++ $(RMS) $(MANIFEST_SRT) + + clobber: _realcleaner _mopup _clobber + +@@ -1344,23 +1345,23 @@ distclean: clobber + + # Like distclean but also removes emacs backups and *.orig. + veryclean: _verycleaner _mopup _clobber +- -@rm -f 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) + -rmdir .depending +- -@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.export perl.dll perl.libexp perl.map perl.def +- -rm -f *perl.xok +- -rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump +- -rm -f $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl +- -rm -f config.arch config.over $(DTRACE_H) ++ -@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.export perl.dll perl.libexp perl.map perl.def ++ $(RMS) *perl.xok ++ $(RMS) cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump ++ $(RMS) $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl ++ $(RMS) config.arch config.over $(DTRACE_H) + + _cleaner1: +- -cd os2; rm -f Makefile ++ -cd os2; $(RMS) Makefile + -cd pod; $(LDLIBPTH) $(MAKE) $(CLEAN) + -cd utils; $(LDLIBPTH) $(MAKE) $(CLEAN) + -@if test -f $(MINIPERL_EXE) ; then \ +@@ -1370,31 +1371,31 @@ _cleaner1: + else \ + sh $(CLEAN).sh ; \ + fi +- rm -f realclean.sh veryclean.sh +- -rm -f `grep -v ^# mkppport.lst | grep . | sed -e 's/$$/\/ppport.h/'` ++ $(RMS) realclean.sh veryclean.sh ++ $(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. + _cleaner2: +- -rm -f core.*perl.*.? t/core.perl.*.? .?*.c +- rm -f core *perl.core t/core t/*perl.core core.* t/core.* +- rm -f t/$(PERL_EXE) t/rantests +- rm -rf t/tmp* +- rm -rf $(addedbyconf) +- rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old makefile.old utils/Makefile +- rm -f $(private) +- rm -rf $(unidatafiles) $(unidatadirs) +- rm -rf lib/auto +- rm -f lib/.exists lib/*/.exists lib/*/*/.exists +- rm -f h2ph.man +- rm -rf .config +- rm -f preload +- rm -f pod2htmd.tmp +- rm -rf pod/perlfunc pod/perlipc ++ $(RMS) core.*perl.*.? t/core.perl.*.? .?*.c ++ $(RMS) core *perl.core t/core t/*perl.core core.* t/core.* ++ $(RMS) t/$(PERL_EXE) t/rantests ++ $(RMS_R) t/tmp* ++ $(RMS_R) $(addedbyconf) ++ $(RMS) $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old makefile.old utils/Makefile ++ $(RMS) $(private) ++ $(RMS_R) $(unidatafiles) $(unidatadirs) ++ $(RMS_R) lib/auto ++ $(RMS) lib/.exists lib/*/.exists lib/*/*/.exists ++ $(RMS) h2ph.man ++ $(RMS_R) .config ++ $(RMS) preload ++ $(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) + -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 +@@ -1443,11 +1444,11 @@ _realcleaner: + _verycleaner: + @$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=veryclean + @$(LDLIBPTH) $(MAKE) _cleaner2 +- -rm -f *~ *.orig */*~ */*.orig */*/*~ */*/*.orig ++ $(RMS) *~ *.orig */*~ */*.orig */*/*~ */*/*.orig + + .PHONY: lint + lint: $(c) +- rm -f *.ln ++ $(RMS) *.ln + lint $(lintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(c) + + cscopeflags = -Rb # Recursive, build-only. +@@ -1505,7 +1506,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) +- cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE)) ++ cd t && ($(RMS) $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE)) + + !NO!SUBS! + ;; +@@ -1555,7 +1556,7 @@ test_prep test-prep: test_prep_pre \$(MI + $to config.sh + # --- For lib/diagnostics.t with -Duseshrplib + $to \$(PERL_EXE) +- cd t && (rm -f \$(PERL_EXE); \$(LNS) ../\$(PERL_EXE) \$(PERL_EXE)) && cd .. ++ cd t && (\$(RMS) \$(PERL_EXE); \$(LNS) ../\$(PERL_EXE) \$(PERL_EXE)) && cd .. + $to t/\$(PERL_EXE) + + !GROK!THIS! +@@ -1565,7 +1566,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 +- cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE)) ++ cd t && ($(RMS) $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE)) + !NO!SUBS! + + case "$targethost" in +@@ -1620,7 +1621,7 @@ minitest_prep: + @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)) + + 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 new file mode 100644 index 0000000000..02e447a570 --- /dev/null +++ b/lang/perl/patches/910-miniperl-needs-inc-dot.patch @@ -0,0 +1,80 @@ +--- a/Makefile.SH 2017-10-15 18:57:08.436234652 -0600 ++++ b/Makefile.SH 2017-10-15 19:02:47.587658819 -0600 +@@ -327,7 +327,7 @@ PATH_SEP = $p_ + # 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) +-MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE_EXT) -Ilib ++MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE_EXT) -Ilib -I. + + # Macros to invoke sort the MANIFEST during build + MANIFEST_SRT = MANIFEST.srt +@@ -990,7 +990,7 @@ NAMESPACEFLAGS = -force_flat_namespace + @$(RMS) miniperl.xok + $(CC) $(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' ++ $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -I. -Idist/Exporter/lib -MExporter -e '' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' + $(MINIPERL) -f write_buildcustomize.pl + !NO!SUBS! + ;; +@@ -1001,16 +1001,16 @@ lib/buildcustomize.pl: $& $(miniperl_obj + @\$(RMS) miniperl.xok + @\$(RMS) \$(MINIPERL_EXE) + \$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE) +- \$(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' ++ \$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -I. -Idist/Exporter/lib -MExporter -e '' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' + \$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname" + !GROK!THIS! + else + $spitshell >>$Makefile <<'!NO!SUBS!' + lib/buildcustomize.pl: $& $(miniperl_dep) write_buildcustomize.pl + @$(RMS) miniperl.xok + $(CC) $(CLDFLAGS) -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' ++ $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -I. -Idist/Exporter/lib -MExporter -e '' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' + $(MINIPERL) -f write_buildcustomize.pl + !NO!SUBS! + fi +--- a/cpan/Devel-PPPort/PPPort_pm.PL 2017-07-18 16:59:59.000000000 -0600 ++++ b/cpan/Devel-PPPort/PPPort_pm.PL 2017-10-15 19:19:27.341543182 -0600 +@@ -15,6 +15,7 @@ + + use strict; + $^W = 1; ++push(@INC, '.'); + require "parts/ppptools.pl"; + + my $INCLUDE = 'parts/inc'; +--- a/cpan/Devel-PPPort/ppport_h.PL 2017-07-18 16:59:59.000000000 -0600 ++++ b/cpan/Devel-PPPort/ppport_h.PL 2017-10-15 19:27:16.594178623 -0600 +@@ -14,6 +14,7 @@ + ################################################################################ + + package Devel::PPPort; ++push(@INC, '.'); + require "PPPort.pm"; + rename 'ppport.h', 'ppport.old' if -f 'ppport.h'; + unlink "ppport.old" if WriteFile("ppport.h") && -f 'ppport.h'; +--- a/cpan/Devel-PPPort/PPPort_xs.PL 2017-07-18 16:59:59.000000000 -0600 ++++ b/cpan/Devel-PPPort/PPPort_xs.PL 2017-10-15 19:38:09.296679968 -0600 +@@ -15,6 +15,7 @@ + + use strict; + $^W = 1; ++push(@INC, '.'); + require "parts/ppptools.pl"; + + my %SECTION = ( +--- a/cpan/Unicode-Collate/Makefile.PL 2017-07-18 16:49:51.000000000 -0600 ++++ b/cpan/Unicode-Collate/Makefile.PL 2017-10-15 20:19:31.890439791 -0600 +@@ -6,7 +6,7 @@ my $clean = {}; + if (-f "Collate.xs") { + print "Making header files for XS...\n"; + +- do 'mkheader' or die $@ || "mkheader: $!"; ++ do './mkheader' or die $@ || "mkheader: $!"; + + $clean = { FILES => 'ucatbl.h' }; + } diff --git a/lang/perl/perlmod.mk b/lang/perl/perlmod.mk index f65c8427d3..83f63c32d1 100644 --- a/lang/perl/perlmod.mk +++ b/lang/perl/perlmod.mk @@ -1,7 +1,7 @@ # This makefile simplifies perl module builds. # -PERL_VERSION:=5.24 +PERL_VERSION:=5.26 # Build environment HOST_PERL_PREFIX:=$(STAGING_DIR_HOSTPKG)/usr