diff options
Diffstat (limited to 'poky/meta/recipes-devtools/perl')
4 files changed, 73 insertions, 3 deletions
diff --git a/poky/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch b/poky/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch new file mode 100644 index 000000000..07f153162 --- /dev/null +++ b/poky/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch @@ -0,0 +1,30 @@ +From 31a2c5555f9ef32f35d7d5ce1fd09a010ba5f5c6 Mon Sep 17 00:00:00 2001 +From: Joshua Watt <JPEWhacker@gmail.com> +Date: Mon, 17 Jun 2019 10:47:15 -0500 +Subject: [PATCH 1/2] enc2xs: Add environment variable to suppress comments + +Comment generation in enc2xs can now be suppressed by setting the +ENC2XS_NO_COMMENTS environment variable. This allows enc2xs to produce +reproducible output by omitting the name of the generating program. + +Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> +Upstream-status: Accepted [https://github.com/dankogai/p5-encode/pull/145] +--- + cpan/Encode/bin/enc2xs | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cpan/Encode/bin/enc2xs b/cpan/Encode/bin/enc2xs +index 619b64b757..bfce9ee735 100644 +--- a/cpan/Encode/bin/enc2xs ++++ b/cpan/Encode/bin/enc2xs +@@ -144,6 +144,7 @@ getopts('CM:SQqOo:f:n:v',\%opt); + $opt{M} and make_makefile_pl($opt{M}, @ARGV); + $opt{C} and make_configlocal_pm($opt{C}, @ARGV); + $opt{v} ||= $ENV{ENC2XS_VERBOSE}; ++$opt{q} ||= $ENV{ENC2XS_NO_COMMENTS}; + + sub verbose { + print STDERR @_ if $opt{v}; +-- +2.21.0 + diff --git a/poky/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch b/poky/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch new file mode 100644 index 000000000..e70ff67f7 --- /dev/null +++ b/poky/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch @@ -0,0 +1,32 @@ +From 260ebd15e16cd86b9b58e5c5f3a496b3853ca46d Mon Sep 17 00:00:00 2001 +From: Joshua Watt <JPEWhacker@gmail.com> +Date: Mon, 17 Jun 2019 10:47:23 -0500 +Subject: [PATCH 2/2] Constant: Fix up shebang + +The instructions indicate that the script should be explicitly passed to +"perl -x", so automatically setting the #! to be ^X is unnecessary and +makes the file non-reproducible when building because ^X could be the +absolute path to miniperl. + +Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> +Upstream-status: Submitted [https://rt.cpan.org/Public/Bug/Display.html?id=129866] +--- + cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm b/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm +index 14eb809714..d4d074e121 100644 +--- a/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm ++++ b/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm +@@ -219,7 +219,7 @@ sub dogfood { + Regenerate these constant functions by feeding this entire source file to + perl -x + +-#!$^X -w ++#!/usr/bin/env perl -x -w + use ExtUtils::Constant qw (constant_types C_constant XS_constant); + + EOT +-- +2.21.0 + diff --git a/poky/meta/recipes-devtools/perl/perl-ptest.inc b/poky/meta/recipes-devtools/perl/perl-ptest.inc index 9dd9b7da5..715205776 100644 --- a/poky/meta/recipes-devtools/perl/perl-ptest.inc +++ b/poky/meta/recipes-devtools/perl/perl-ptest.inc @@ -2,6 +2,9 @@ inherit ptest SRC_URI += "file://run-ptest \ " + +DEBUG_PREFIX_MAP_REGEX = "${@'\\|'.join(d.getVar('DEBUG_PREFIX_MAP').split())}" + do_install_ptest () { mkdir -p ${D}${PTEST_PATH} sed -e "s:\/usr\/local:${bindir}:g" -i cpan/version/t/* @@ -13,7 +16,7 @@ do_install_ptest () { --exclude='win32/config.*' --exclude=plan9 --exclude=README.plan9 --exclude=perlplan9.pod --exclude=Configure \ --exclude=veryclean.sh --exclude=realclean.sh --exclude=getioctlsizes \ --exclude=dl_aix.xs --exclude=sdbm.3 --exclude='cflags.SH' --exclude=makefile.old \ - --exclude=miniperl --exclude=generate_uudmap --exclude=patches * | ( cd ${D}${PTEST_PATH} && tar -x ) + --exclude=miniperl --exclude=generate_uudmap --exclude=patches --exclude='config.log' * | ( cd ${D}${PTEST_PATH} && tar -x ) ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl @@ -21,12 +24,12 @@ do_install_ptest () { find "${D}${PTEST_PATH}" \ \( -name '*.PL' -o -name 'myconfig' -o -name 'cflags' -o -name '*.pl' -o -name '*.sh' -o -name '*.pm' \ -o -name 'h2xs' -o -name 'h2ph' \ - -o -name '*.h' -o -name 'config.sh-*' -o -name 'pod2man' -o -name 'pod2text' \) \ + -o -name '*.h' -o -name 'config.sh-*' -o -name 'pod2man' -o -name 'pod2text' -o -name 'Makefile.config' \) \ -type f -exec sed -i \ -e "s,${D},,g" \ -e "s,--sysroot=${STAGING_DIR_HOST},,g" \ -e "s,-isystem${STAGING_INCDIR} ,,g" \ - -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e 's^${DEBUG_PREFIX_MAP_REGEX}^^g' \ -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \ -e "s,${STAGING_LIBDIR},${libdir},g" \ -e "s,${STAGING_BINDIR},${bindir},g" \ diff --git a/poky/meta/recipes-devtools/perl/perl_5.30.0.bb b/poky/meta/recipes-devtools/perl/perl_5.30.0.bb index b18a6b691..e3664290e 100644 --- a/poky/meta/recipes-devtools/perl/perl_5.30.0.bb +++ b/poky/meta/recipes-devtools/perl/perl_5.30.0.bb @@ -19,6 +19,8 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \ file://perl-dynloader.patch \ file://0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch \ file://fix-setgroup.patch \ + file://0001-enc2xs-Add-environment-variable-to-suppress-comments.patch \ + file://0002-Constant-Fix-up-shebang.patch \ " SRC_URI_append_class-native = " \ file://perl-configpm-switch.patch \ @@ -37,6 +39,9 @@ DEPENDS += "db gdbm zlib virtual/crypt" PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0" +# Don't generate comments in enc2xs output files. They are not reproducible +export ENC2XS_NO_COMMENTS = "1" + do_unpack_append() { bb.build.exec_func('do_copy_perlcross', d) } |