Complete Yocto mirror with license table for TQMa6UL (2038-compliance)

- 264 license table entries with exact download URLs (224/264 resolved)
- Complete sources/ directory with all BitBake recipes
- Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl)
- Full traceability for Softwarefreigabeantrag
- GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4
- License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
Siggi (OpenClaw Agent)
2026-03-01 20:58:18 +00:00
commit 16accb6b24
15086 changed files with 1292356 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
From 75d974a58c461b3b5d35280e497810e46abae4ca Mon Sep 17 00:00:00 2001
From: William Lyu <William.Lyu@windriver.com>
Date: Wed, 4 Oct 2023 08:58:41 -0400
Subject: [PATCH] Fix intermittent failure of test t/op/sigsystem.t
[Perl issue #21546] -- https://github.com/Perl/perl5/issues/21546
This fix addresses the intermittent failure of the test
t/op/sigsystem.t by improving its robustness. Before the fix, this
test waits a hard-coded amount of time in the parent process for the
child process to exit, and the child process may not be able to exit
soon enough. With this fix, the parent process in this test polls for
whether the SIGCHLD handler reaped the child process for at most 25
seconds.
Upstream-Status: Backport [commit ID: 75d974a]
Signed-off-by: William Lyu <William.Lyu@windriver.com>
Signed-off-by: Randy MacLeod <randy.macleod@windriver.com>
Reported-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Committer: William Lyu is now a Perl author.
---
AUTHORS | 1 +
t/op/sigsystem.t | 17 ++++++++++++++---
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index 21948bfdc7..527dd992fd 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1443,6 +1443,7 @@ Wayne Scott <wscott@ichips.intel.com>
Wayne Thompson <Wayne.Thompson@Ebay.sun.com>
Wilfredo Sánchez <wsanchez@mit.edu>
William J. Middleton <William.Middleton@oslo.mobil.telenor.no>
+William Lyu <William.Lyu@windriver.com>
William Mann <wmann@avici.com>
William Middleton <wmiddlet@adobe.com>
William R Ward <hermit@BayView.COM>
diff --git a/t/op/sigsystem.t b/t/op/sigsystem.t
index 25da854902..831feefb0f 100644
--- a/t/op/sigsystem.t
+++ b/t/op/sigsystem.t
@@ -37,7 +37,15 @@ SKIP: {
test_system('with reaper');
note("Waiting briefly for SIGCHLD...");
- Time::HiRes::sleep(0.500);
+
+ # Wait at most 50 * 0.500 = 25.0 seconds for the child process to be
+ # reaped. If the child process exits and gets reaped early, this polling
+ # loop will exit early.
+
+ for (1..50) {
+ last if @pids;
+ Time::HiRes::sleep(0.500);
+ }
ok(@pids == 1, 'Reaped only one process');
ok($pids[0] == $pid, "Reaped the right process.") or diag(Dumper(\@pids));
@@ -50,8 +58,11 @@ sub test_system {
my $got_zeroes = 0;
# This test is looking for a race between system()'s waitpid() and a
- # signal handler. Looping a few times increases the chances of
- # catching the error.
+ # signal handler. The system() call is expected to not interfere with the
+ # SIGCHLD signal handler. In particular, the wait() called within system()
+ # is expected to reap the child process forked by system() before the
+ # SIGCHLD signal handler is called.
+ # Looping a few times increases the chances of catching the error.
for (1..$expected_zeroes) {
$got_zeroes++ unless system(TRUE);
--
2.25.1

View File

@@ -0,0 +1,34 @@
From e8e095b9c71c58f8197d6315359446b6b084cb2b Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Tue, 5 Jun 2018 14:58:42 +0300
Subject: [PATCH] Somehow this module breaks through the perl wrapper and
declares perl binary to be 'perl.real'. This patch forces it back to perl.
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
index 948c476..f537526 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
@@ -1110,6 +1110,9 @@ WARNING
}
foreach my $name (@$names){
+ # Getting MakeMaker.pm use perl wrapper instead of 'perl.real' directly
+ $name =~ s/perl\.real/perl/ if ($name =~ /perl\.real/);
+
my ($abs, $use_dir);
if ($self->file_name_is_absolute($name)) { # /foo/bar
$abs = $name;
@@ -2006,6 +2009,7 @@ sub init_PERL {
$self->{PERL} ||=
$self->find_perl(5.0, \@perls, \@defpath, $Verbose );
+
my $perl = $self->{PERL};
$perl =~ s/^"//;

View File

@@ -0,0 +1,36 @@
From a73fff1fcf0def4ce93964f1b63fe3ad0967259d Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Fri, 18 Feb 2022 09:44:26 +0000
Subject: [PATCH] cpan/Sys-Syslog/Makefile.PL: Fix _PATH_LOG for deterministic
It checks host's path such as /dev/log and uses it, this doesn't make sense for
cross build, and it causes undeterministic, for example, the contianer os
usually doesn't have /dev/log which leads to a different build result since
other host usually has /dev/log, so make it always use the default value to fix
the issue.
Submitted a ticket to upstream: https://rt.cpan.org/Ticket/Display.html?id=141612
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
cpan/Sys-Syslog/Makefile.PL | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cpan/Sys-Syslog/Makefile.PL b/cpan/Sys-Syslog/Makefile.PL
index d09ba69..d44e58c 100644
--- a/cpan/Sys-Syslog/Makefile.PL
+++ b/cpan/Sys-Syslog/Makefile.PL
@@ -130,6 +130,8 @@ else {
$_PATH_LOG = "";
}
+# OE specific
+$_PATH_LOG = "";
# if possible, generate the code that handles the constants with
# ExtUtils::Constant, otherwise use cached copy in fallback/
--
2.31.1

View File

@@ -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

View File

@@ -0,0 +1,45 @@
Fixes to make the perl build reproducible:
a) Remove the \n from configure_attr.sh since it gets quoted differently depending on
whether the shell is bash or dash which can cause the test result to be incorrect.
Reported upstream: https://github.com/arsv/perl-cross/issues/87
b) Sort the order of the module lists from configure_mods.sh since otherwise
the result isn't the same leading to makefile differences.
Reported upstream: https://github.com/arsv/perl-cross/issues/88
c) Sort the Encode::Byte byte_t.fnm file output (and the makefile depends whilst
there for good measure)
Submitted to upstream perl: https://github.com/dankogai/p5-encode/pull/179
d) Use bash for perl-cross configure since otherwise trnl gets set to "\n" with bash
and "" with dash
Reported upstream: https://github.com/arsv/perl-cross/issues/87
RP 2020/2/7
Upstream-Status: Submitted [see links above]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
Index: perl-5.30.1/cpan/Encode/Byte/Makefile.PL
===================================================================
--- perl-5.30.1.orig/cpan/Encode/Byte/Makefile.PL
+++ perl-5.30.1/cpan/Encode/Byte/Makefile.PL
@@ -171,7 +171,7 @@ sub postamble
my $lengthsofar = length($str);
my $continuator = '';
$str .= "$table.c : $enc2xs Makefile.PL";
- foreach my $file (@{$tables{$table}})
+ foreach my $file (sort (@{$tables{$table}}))
{
$str .= $continuator.' '.$self->catfile($dir,$file);
if ( length($str)-$lengthsofar > 128*$numlines )
@@ -189,7 +189,7 @@ sub postamble
qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
open (FILELIST, ">$table.fnm")
|| die "Could not open $table.fnm: $!";
- foreach my $file (@{$tables{$table}})
+ foreach my $file (sort (@{$tables{$table}}))
{
print FILELIST $self->catfile($dir,$file) . "\n";
}

View File

@@ -0,0 +1,20 @@
The code is encoding host compiler parameters into target builds. Avoid
this for our target builds (patch is target specific, not native)
Upstream-Status: Inappropriate [Cross compile hack]
RP 2020/2/18
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Index: perl-5.30.1/cpan/Encode/bin/enc2xs
===================================================================
--- perl-5.30.1.orig/cpan/Encode/bin/enc2xs
+++ perl-5.30.1/cpan/Encode/bin/enc2xs
@@ -195,7 +195,7 @@ sub compiler_info {
# above becomes false.
my $sized = $declaration && !($compat && !$pedantic);
- return ($cpp, $static, $sized);
+ return (0, 1, 1);
}

View File

@@ -0,0 +1,37 @@
From 8e1efba7560d8d55524c7a0f1b0539ddce419b86 Mon Sep 17 00:00:00 2001
From: Brendan O'Dea <bod@debian.org>
Date: Fri, 16 Dec 2005 01:32:14 +1100
Subject: [PATCH 6/8] Remove Errno version check due to upgrade problems with
long-running processes.
Bug-Debian: http://bugs.debian.org/343351
Remove version check which can cause problems for long running
processes embedding perl when upgrading to a newer version,
compatible, but built on a different machine.
Patch-Name: debian/errno_ver.diff
Upstream-Status: Pending
---
ext/Errno/Errno_pm.PL | 5 -----
1 file changed, 5 deletions(-)
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 6251a3c..eeed445 100644
--- a/ext/Errno/Errno_pm.PL
+++ b/ext/Errno/Errno_pm.PL
@@ -294,11 +294,6 @@ EDQ
# they've already declared perl doesn't need to worry about this risk.
if(!$ENV{'PERL_BUILD_EXPAND_CONFIG_VARS'}) {
print <<"CONFIG_CHECK_END";
-use Config;
-"\$Config{'archname'}-\$Config{'osvers'}" eq
-"$archname-$Config{'osvers'}" or
- die "Errno architecture ($archname-$Config{'osvers'}) does not match executable architecture (\$Config{'archname'}-\$Config{'osvers'})";
-
CONFIG_CHECK_END
}
--
2.1.4

View File

@@ -0,0 +1,27 @@
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Index: perl-5.8.8/lib/ExtUtils/MM_Unix.pm
===================================================================
--- perl-5.12.3.orig/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 2008-10-31 22:01:35.000000000 +0000
+++ perl-5.12.3/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 2008-10-31 22:01:35.000000000 +0000
@@ -1597,6 +1597,19 @@
$self->{PERL_LIB} ||= $Config{privlibexp};
$self->{PERL_ARCHLIB} ||= $Config{archlibexp};
$self->{PERL_INC} = $self->catdir("$self->{PERL_ARCHLIB}","CORE"); # wild guess for now
+ # Check for environment override so we'll find the headers in the correct place
+ if (defined $ENV{PERL_LIB})
+ {
+ $self->{PERL_LIB} = $ENV{PERL_LIB};
+ }
+ if (defined $ENV{PERL_ARCHLIB})
+ {
+ $self->{PERL_ARCHLIB} = $ENV{PERL_ARCHLIB};
+ }
+ if (defined $ENV{PERL_INC})
+ {
+ $self->{PERL_INC} = $ENV{PERL_INC};
+ }
my $perl_h;
if (not -f ($perl_h = $self->catfile($self->{PERL_INC},"perl.h"))

View File

@@ -0,0 +1,57 @@
From c25d460a2f00e9af25087d40447fe1a81c89710c Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Sun, 27 May 2007 21:04:11 +0000
Subject: [PATCH] perl: 5.8.7 -> 5.8.8 (from OE)
This patch is used for perl-native only. It enables the switching of
configuration files between Config_heavy.pl and
Config_heavy-target.pl by setting the environment variables
PERLCONFIGTARGET - the later containing settings for the target while
the former contains those for the host. This will allow cpan.bbclass
to use the settings appropriate for the native and/or target builds
as required. This also disables the use of the cache since the cached
values would be valid for the host only.
Upstream-Status: Inappropriate [native]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
configpm | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/configpm b/configpm
index 07219d8..01a23fa 100755
--- a/configpm
+++ b/configpm
@@ -718,7 +718,7 @@ $config_txt .= uncomment <<'ENDOFEND';
# my($self, $key) = @_;
#
# # check for cached value (which may be undef so we use exists not defined)
-# return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key);
+# return $self->fetch_string($key);
# }
#
ENDOFEND
@@ -876,7 +876,21 @@ $config_txt .= sprintf uncomment <<'ENDOFTIE', $fast_config;
# sub DESTROY { }
#
# sub AUTOLOAD {
-# require 'Config_heavy.pl';
+# my $cfgfile = 'Config_heavy.pl';
+# if (defined $ENV{PERLCONFIGTARGET} and $ENV{PERLCONFIGTARGET} eq "yes")
+# {
+# $cfgfile = 'Config_heavy-target.pl';
+# }
+# if (defined $ENV{PERL_ARCHLIB})
+# {
+# push @INC, $ENV{PERL_ARCHLIB};
+# require $cfgfile;
+# pop @INC;
+# }
+# else
+# {
+# require $cfgfile;
+# }
# goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
# die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
# }

View File

@@ -0,0 +1,38 @@
Upstream-Status: Inappropriate [embedded specific]
Allow the location that .so files are searched for for dynamic
loading to be changed via an environment variable. This is to allow
us to load .so's from the host system while building for the target
system.
Update by Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/21
Index: perl-5.24.1/dist/XSLoader/XSLoader_pm.PL
===================================================================
--- perl-5.24.1.orig/dist/XSLoader/XSLoader_pm.PL
+++ perl-5.24.1/dist/XSLoader/XSLoader_pm.PL
@@ -52,6 +52,24 @@ sub load {
my ($caller, $modlibname) = caller();
my $module = $caller;
+ # OE: Allow env to form dynamic loader to look in a different place
+ # This is so it finds the host .so files, not the targets
+ if (defined $ENV{PERLHOSTLIB})
+ {
+ my $hostlib = $ENV{PERLHOSTLIB};
+ my $hostarchlib = $ENV{PERLHOSTARCHLIB};
+ print STDERR "*** Module name IN: $modlibname\n";
+ my ($p1, $p2, $p3, $p4, $p5, $p6, $p7) = $modlibname =~ m/(^(.*lib\w*\/)?)((perl5\/[0-9\.]*\/)?)(([^\/]*)\/)?(.*)$/;
+ print STDERR "*** p1: $p1 p3: $p3 p5: $p5 p7: $p7\n";
+ if ( $p1 ne "" ) {
+ $modlibname = $hostlib.$p7;
+ }
+ if ( $p6 ne "" ) {
+ $modlibname = $hostarchlib.$p7;
+ }
+ print STDERR "*** Module name OUT: $modlibname\n";
+ }
+
if (@_) {
$module = $_[0];
} else {

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
#!/bin/sh
{ cd t && PERL_BUILD_PACKAGING=1 ./TEST || echo "FAIL: perl" ; } | sed -u -e 's|\(.*\) .* ok$|PASS: \1|' -e 's|\(.*\) .* skipped|SKIP: \1|' -e 's|\(.*\) \.\(.*\)|FAIL: \1|'

View File

@@ -0,0 +1,14 @@
#!/bin/sh
for case in `find t -type f -name '*.t'`; do
perl -I inc -I blib -Mblib $case >$case.output 2>&1
ret=$?
cat $case.output
if [ $ret -ne 0 ]; then
echo "FAIL: ${case%.t}"
else
echo "PASS: ${case%.t}"
fi
rm -f $case.output
done

View File

@@ -0,0 +1,138 @@
SUMMARY = "Module::Build - Build and install Perl modules"
DESCRIPTION = "Many Perl distributions use a Build.PL file instead of a \
Makefile.PL file to drive distribution configuration, build, test and \
installation. Traditionally, Build.PL uses Module::Build as the underlying \
build system. This module provides a simple, lightweight, drop-in replacement. \
Whereas Module::Build has over 6,700 lines of code; this module has less than \
120, yet supports the features needed by most distributions."
SECTION = "libs"
HOMEPAGE = "https://metacpan.org/release/Module-Build"
LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
LIC_FILES_CHKSUM = "file://README;beginline=881;endline=886;md5=3027f56c664545e54678c26b7f1ac19c"
SRC_URI = "${CPAN_MIRROR}/authors/id/L/LE/LEONT/Module-Build-${PV}.tar.gz \
file://run-ptest \
"
SRC_URI[sha256sum] = "66aeac6127418be5e471ead3744648c766bd01482825c5b66652675f2bc86a8f"
S = "${WORKDIR}/Module-Build-${PV}"
inherit cpan_build ptest-perl
# From:
# https://github.com/rehsack/meta-cpan/blob/master/recipes-devel/module-build-perl/module-build-perl_0.4216.bb
#
do_patch_module_build () {
cd ${S}
sed -i -e 's,my $interpreter = $self->{properties}{perl};,my $interpreter = "${bindir}/perl";,g' lib/Module/Build/Base.pm
}
do_patch[postfuncs] += "do_patch_module_build"
EXTRA_CPAN_BUILD_FLAGS = "--create_packlist=0"
do_install:prepend () {
# We do not have a recipe for libpod-parser-perl which is for
# documentation (and is deprecated in favor of Pod::Simple)
rm -rf ${B}/t/pod_parser.t
}
do_install:append () {
rm -rf ${D}${docdir}/perl/html
sed -i "s:^#!.*:#!/usr/bin/env perl:" ${D}${bindir}/config_data
}
do_install_ptest() {
cp -r ${B}/inc ${D}${PTEST_PATH}
cp -r ${B}/blib ${D}${PTEST_PATH}
cp -r ${B}/_build ${D}${PTEST_PATH}
cp -r ${B}/lib ${D}${PTEST_PATH}
chown -R root:root ${D}${PTEST_PATH}
sed -i -e "s,'perl' => .*,'perl' => '/usr/bin/perl'\,,g" \
-e "s,${STAGING_BINDIR_NATIVE}/perl-native/\.\.,${bindir}/,g" \
-e "s,${S},,g" \
-e "s,${D},,g" \
${D}${PTEST_PATH}/_build/build_params \
${D}${PTEST_PATH}/_build/runtime_params
rm -rf ${D}${PTEST_PATH}/blib/libhtml/site/lib/Module/
rm -rf ${D}${PTEST_PATH}/_build/magicnum
}
RDEPENDS:${PN} += " \
perl-module-carp \
perl-module-cpan \
perl-module-config \
perl-module-cwd \
perl-module-data-dumper \
perl-module-encode \
perl-module-extutils-cbuilder \
perl-module-extutils-command \
perl-module-extutils-install \
perl-module-extutils-installed \
perl-module-extutils-mkbootstrap \
perl-module-extutils-packlist \
perl-module-extutils-parsexs \
perl-module-file-basename \
perl-module-file-compare \
perl-module-file-copy \
perl-module-file-find \
perl-module-file-glob \
perl-module-file-path \
perl-module-file-spec \
perl-module-file-spec-functions \
perl-module-getopt-long \
perl-module-metadata \
perl-module-perl-ostype \
perl-module-pod-man \
perl-module-tap-harness \
perl-module-text-abbrev \
perl-module-text-parsewords \
perl-module-utf8 \
"
RDEPENDS:${PN}-ptest += " \
packagegroup-core-buildessential \
perl-dev \
perl-module-blib \
perl-module-encode-encoding \
perl-module-extutils-cbuilder-base \
perl-module-extutils-command-mm \
perl-module-extutils-mm-unix \
perl-module-file-temp \
perl-module-lib \
perl-module-parse-cpan-meta \
perl-module-perlio \
perl-module-perlio-encoding \
perl-module-pod-simple-transcodesmart \
perl-module-pod-text \
perl-module-tap-base \
perl-module-tap-formatter-base \
perl-module-tap-formatter-file \
perl-module-tap-formatter-session \
perl-module-tap-harness-env \
perl-module-tap-parser \
perl-module-tap-parser-scheduler \
perl-module-test-harness \
perl-module-test-more \
"
RPROVIDES:${PN} += "\
libmodule-build-base-perl \
libmodule-build-compat-perl \
libmodule-build-config-perl \
libmodule-build-cookbook-perl \
libmodule-build-dumper-perl \
libmodule-build-notes-perl \
libmodule-build-ppmaker-perl \
libmodule-build-platform-default-perl \
libmodule-build-platform-unix-perl \
libmodule-build-podparser-perl \
"
# t/xs.t RDEPENDS on "EXTERN.h" provided by perl-dev
INSANE_SKIP:${PN}-ptest = "dev-deps"
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,36 @@
SUMMARY = "Incredibly simple helpers for testing code with exceptions"
DESCRIPTION = "Test::Fatal is an alternative to the popular Test::Exception.\
It does much less, but should allow greater flexibility in testing \
exception-throwing code with about the same amount of typing."
HOMEPAGE = "https://github.com/rjbs/Test-Fatal"
BUGTRACKER = "https://github.com/rjbs/Test-Fatal/issues"
SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b5c851290cab1dda12fcfb0e9ec43639"
SRC_URI = "${CPAN_MIRROR}/authors/id/R/RJ/RJBS/Test-Fatal-${PV}.tar.gz"
SRC_URI[sha256sum] = "37dfffdafb84b762efe96b02fb2aa41f37026c73e6b83590db76229697f3c4a6"
S = "${WORKDIR}/Test-Fatal-${PV}"
inherit cpan ptest-perl
RDEPENDS:${PN} += "\
libtry-tiny-perl \
perl-module-carp \
perl-module-exporter \
perl-module-test-builder \
"
RDEPENDS:${PN}-ptest += "\
perl-module-extutils-makemaker \
perl-module-extutils-mm-unix \
perl-module-file-spec \
perl-module-overload \
perl-module-test-builder-tester \
perl-module-test-more \
"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,28 @@
SUMMARY = "Skip tests when modules not available"
DESCRIPTION = "Skip test scripts if modules are not available. \
The requested modules will be loaded, and optionally have their versions \
checked. If the module is missing, the test script will be skipped. Modules \
that are found but fail to compile will exit with an error rather than skip."
HOMEPAGE = "https://metacpan.org/release/Test-Needs"
SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
CPAN_NAME = "Test-Needs"
CPAN_AUTHOR = "HAARG"
LIC_FILES_CHKSUM = "file://README;md5=3f3ccd21a0a48aa313db212cc3b1bc09;beginline=88;endline=89"
DEPENDS += "perl"
SRC_URI = "https://cpan.metacpan.org/authors/id/H/HA/${CPAN_AUTHOR}/${CPAN_NAME}-${PV}.tar.gz"
SRC_URI[sha256sum] = "923ffdc78fcba96609753e4bae26b0ba0186893de4a63cd5236e012c7c90e208"
S = "${WORKDIR}/${CPAN_NAME}-${PV}"
inherit cpan ptest-perl
RDEPENDS:${PN}-ptest += "perl-module-test-more perl-module-ipc-open3 perl-module-lib perl-module-version"
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,36 @@
SUMMARY = "Test::Warnings - Test for warnings and the lack of them"
DESCRIPTION = "If you've ever tried to use Test::NoWarnings to confirm there are no \
warnings generated by your tests, combined with the convenience of \
\\"done_testing\\" to not have to declare a test count, you'll have discovered \
that these two features do not play well together, as the test count will \
be calculated *before* the warnings test is run, resulting in a TAP error. \
(See "examples/test_nowarnings.pl" in this distribution for a \
demonstration.)"
HOMEPAGE = "https://github.com/karenetheridge/Test-Warnings"
BUGTRACKER = "https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Warnings"
SECTION = "libs"
LICENSE = "Artistic-1.0-Perl | GPL-1.0-or-later"
LIC_FILES_CHKSUM = "file://LICENCE;md5=f98106ac3cc05d9cbebcdb8fbf7b7815"
SRC_URI = "${CPAN_MIRROR}/authors/id/E/ET/ETHER/Test-Warnings-${PV}.tar.gz"
SRC_URI[sha256sum] = "b9c375719f2c61c5f97aa5ee6cf4c901a972347c415969379b0b51f67c48bbcb"
S = "${WORKDIR}/Test-Warnings-${PV}"
inherit cpan ptest-perl
RDEPENDS:${PN} += "\
perl-module-test-builder \
"
# Many hidden dependencies and mysterious failures occur without full perl-modules
RDEPENDS:${PN}-ptest += "perl-modules"
do_install_ptest_perl:append () {
cp -r ${B}/t/lib ${D}${PTEST_PATH}/t/
chown -R root:root ${D}${PTEST_PATH}/t/lib
}
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,36 @@
SUMMARY = "Try::Tiny - Minimal try/catch with proper preservation of $@"
DESCRIPTION = "This module provides bare bones try/catch/finally statements \
that are designed to minimize common mistakes with eval blocks, and NOTHING \
else."
HOMEPAGE = "https://github.com/p5sagit/Try-Tiny"
BUGTRACKER = "https://rt.cpan.org/Public/Dist/Display.html?Name=Try-Tiny"
SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENCE;md5=5dc332c2d4aade55f5db244681000091"
SRC_URI = "${CPAN_MIRROR}/authors/id/E/ET/ETHER/Try-Tiny-${PV}.tar.gz"
SRC_URI[sha256sum] = "3300d31d8a4075b26d8f46ce864a1d913e0e8467ceeba6655d5d2b2e206c11be"
S = "${WORKDIR}/Try-Tiny-${PV}"
inherit cpan ptest-perl
RDEPENDS:${PN} += "\
perl-module-carp \
perl-module-constant \
perl-module-exporter \
"
RRECOMMENDS:${PN} += "\
perl-module-sub-util \
"
RDEPENDS:${PN}-ptest += "\
perl-module-extutils-makemaker \
perl-module-extutils-mm-unix \
perl-module-file-spec \
perl-module-if \
perl-module-test-more \
"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,110 @@
From 5a4271456104bdf027644c81c3a208cde5cf522e Mon Sep 17 00:00:00 2001
From: Tim Orling <tim.orling@konsulko.com>
Date: Thu, 17 Nov 2022 16:33:20 -0800
Subject: [PATCH] Skip TODO test cases that fail
TODO cases report as "not ok" with ptest-runner
Upstream-Status: Inappropriate [ptest-runner specific]
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
t/escape-char.t | 20 ++++++++++----------
t/iri.t | 18 +++++++++---------
t/mailto.t | 12 ++++++------
3 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/t/escape-char.t b/t/escape-char.t
index c6ce79c..5e62ad5 100644
--- a/t/escape-char.t
+++ b/t/escape-char.t
@@ -6,16 +6,16 @@ use warnings;
use Test::More;
use URI ();
-TODO: {
- my $str = "http://foo/\xE9";
- utf8::upgrade($str);
- my $uri = URI->new($str);
-
- local $TODO = 'URI::Escape::escape_char misunderstands utf8';
-
- # http://foo/%C3%A9
- is("$uri", 'http://foo/%E9', 'correctly created a URI from a utf8-upgraded string');
-}
+#TODO: {
+# my $str = "http://foo/\xE9";
+# utf8::upgrade($str);
+# my $uri = URI->new($str);
+#
+# local $TODO = 'URI::Escape::escape_char misunderstands utf8';
+#
+# # http://foo/%C3%A9
+# is("$uri", 'http://foo/%E9', 'correctly created a URI from a utf8-upgraded string');
+#}
{
my $str = "http://foo/\xE9";
diff --git a/t/iri.t b/t/iri.t
index cf983d6..884b36e 100644
--- a/t/iri.t
+++ b/t/iri.t
@@ -6,7 +6,7 @@ use Test::More;
use Config qw( %Config );
if (defined $Config{useperlio}) {
- plan tests=>30;
+ plan tests=>28;
} else {
plan skip_all=>"this perl doesn't support PerlIO layers";
}
@@ -67,17 +67,17 @@ is $u->as_iri, "http://➡.ws/";
# draft-duerst-iri-bis.txt examples (section 3.7.1):
is(URI->new("http://www.example.org/D%C3%BCrst")->as_iri, "http://www.example.org/D\xFCrst");
is(URI->new("http://www.example.org/D%FCrst")->as_iri, "http://www.example.org/D%FCrst");
-TODO: {
- local $TODO = "some chars (like U+202E, RIGHT-TO-LEFT OVERRIDE) need to stay escaped";
-is(URI->new("http://xn--99zt52a.example.org/%e2%80%ae")->as_iri, "http://\x{7D0D}\x{8C46}.example.org/%e2%80%ae");
-}
+#TODO: {
+# local $TODO = "some chars (like U+202E, RIGHT-TO-LEFT OVERRIDE) need to stay escaped";
+#is(URI->new("http://xn--99zt52a.example.org/%e2%80%ae")->as_iri, "http://\x{7D0D}\x{8C46}.example.org/%e2%80%ae");
+#}
# try some URLs that can't be IDNA encoded (fallback to encoded UTF8 bytes)
$u = URI->new("http://" . ("ü" x 128));
is $u, "http://" . ("%C3%BC" x 128);
is $u->host, ("\xC3\xBC" x 128);
-TODO: {
- local $TODO = "should ihost decode UTF8 bytes?";
- is $u->ihost, ("ü" x 128);
-}
+#TODO: {
+# local $TODO = "should ihost decode UTF8 bytes?";
+# is $u->ihost, ("ü" x 128);
+#}
is $u->as_iri, "http://" . ("ü" x 128);
diff --git a/t/mailto.t b/t/mailto.t
index 79e9a13..c68cfb2 100644
--- a/t/mailto.t
+++ b/t/mailto.t
@@ -48,12 +48,12 @@ $u = URI->new('mailto:user+detail@example.com');
is $u->to, 'user+detail@example.com', 'subaddress with `+` parsed correctly';
is $u, 'mailto:user+detail@example.com', '... and stringification works';
-TODO: {
- local $TODO = "We can't handle quoted local parts without properly parsing the email addresses";
- $u = URI->new('mailto:"foo bar+baz"@example.com');
- is $u->to, '"foo bar+baz"@example.com', 'address with quoted local part containing spaces is parsed correctly';
- is $u, 'mailto:%22foo%20bar+baz%22@example.com', '... and stringification works';
-}
+#TODO: {
+# local $TODO = "We can't handle quoted local parts without properly parsing the email addresses";
+# $u = URI->new('mailto:"foo bar+baz"@example.com');
+# is $u->to, '"foo bar+baz"@example.com', 'address with quoted local part containing spaces is parsed correctly';
+# is $u, 'mailto:%22foo%20bar+baz%22@example.com', '... and stringification works';
+#}
# RFC 5321 (4.1.3) - Address Literals

View File

@@ -0,0 +1,56 @@
SUMMARY = "Perl module to manipulate and access URI strings"
DESCRIPTION = "This package contains the URI.pm module with friends. \
The module implements the URI class. URI objects can be used to access \
and manipulate the various components that make up these strings."
HOMEPAGE = "https://metacpan.org/dist/URI"
SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
LIC_FILES_CHKSUM = "file://LICENSE;md5=9944b87af51186f848ae558344aded9f"
SRC_URI = "${CPAN_MIRROR}/authors/id/O/OA/OALDERS/URI-${PV}.tar.gz \
file://0001-Skip-TODO-test-cases-that-fail.patch \
"
SRC_URI[sha256sum] = "11962d8a8a8496906e5d34774affc235a1c95c112d390c0b4171f3e91e9e2a97"
S = "${WORKDIR}/URI-${PV}"
EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
inherit cpan ptest-perl
do_compile() {
export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
cpan_do_compile
}
do_install:prepend() {
# these tests require "-T" (taint) command line option
rm -rf ${B}/t/cwd.t
rm -rf ${B}/t/file.t
}
RDEPENDS:${PN} += "\
perl-module-integer \
perl-module-mime-base64 \
"
RDEPENDS:${PN}-ptest += " \
libtest-fatal-perl \
libtest-needs-perl \
libtest-warnings-perl \
perl-module-encode \
perl-module-encode-encoding \
perl-module-extutils-makemaker \
perl-module-extutils-mm-unix \
perl-module-file-spec-functions \
perl-module-net-domain \
perl-module-perlio \
perl-module-perlio-encoding \
perl-module-test \
perl-module-test-more \
perl-module-utf8 \
"
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,28 @@
From bd9b0e10843da72276982bd1394ade734fea0289 Mon Sep 17 00:00:00 2001
From: Tim Orling <tim.orling@konsulko.com>
Date: Fri, 2 Feb 2024 21:15:34 -0800
Subject: [PATCH] Makefile.PL: make check_lib cross friendly
lib => qw(expat) does not seem to respect EXPATLIBPATH and
EXPATINCPATH when we are cross-compiling.
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
Makefile.PL | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.PL b/Makefile.PL
index 505d1df..19f428b 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -30,7 +30,7 @@ foreach (@ARGV) {
unless (
check_lib( # fill in what you prompted the user for here
- lib => [qw(expat)],
+ #lib => [qw(expat)],
header => ['expat.h'],
incpath => $expat_incpath,
( $expat_libpath ? ( libpath => $expat_libpath ) : () ),

View File

@@ -0,0 +1,42 @@
SUMMARY = "XML::Parser - A perl module for parsing XML documents"
HOMEPAGE = "https://libexpat.github.io/"
SECTION = "libs"
LICENSE = "Artistic-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4342f85bf14a1fdd6a751573f1e61c03"
DEPENDS += "expat"
SRC_URI = "${CPAN_MIRROR}/authors/id/T/TO/TODDR/XML-Parser-${PV}.tar.gz \
file://0001-Makefile.PL-make-check_lib-cross-friendly.patch \
"
SRC_URI[sha256sum] = "ad4aae643ec784f489b956abe952432871a622d4e2b5c619e8855accbfc4d1d8"
S = "${WORKDIR}/XML-Parser-${PV}"
EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR} CC='${CC}' LD='${CCLD}' FULL_AR='${AR}'"
inherit cpan pkgconfig ptest-perl
do_compile() {
export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
cpan_do_compile
}
do_compile:class-native() {
cpan_do_compile
}
do_install_ptest() {
sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlstats
sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlfilter
sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlcomments
sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/canonical
cp -r ${B}/samples ${D}${PTEST_PATH}
chown -R root:root ${D}${PTEST_PATH}/samples
}
RDEPENDS:${PN} += "perl-module-carp perl-module-file-spec"
RDEPENDS:${PN}-ptest += "perl-module-filehandle perl-module-if perl-module-test perl-module-test-more"
BBCLASSEXTEND="native nativesdk"

View File

@@ -0,0 +1,29 @@
DESCRIPTION = "libxml-perl is a collection of smaller Perl modules, scripts, and \
documents for working with XML in Perl. libxml-perl software \
works in combination with XML::Parser, PerlSAX, XML::DOM, \
XML::Grove and others."
HOMEPAGE = "http://search.cpan.org/dist/libxml-perl/"
SUMMARY = "Collection of Perl modules for working with XML"
SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
LIC_FILES_CHKSUM = "file://README;beginline=33;endline=35;md5=1705549eef7577a3d6ba71123a1f0ce8"
DEPENDS += "libxml-parser-perl"
SRC_URI = "http://www.cpan.org/modules/by-module/XML/${BPN}-${PV}.tar.gz"
SRC_URI[md5sum] = "0ed5fbdda53d1301ddaed88db10503bb"
SRC_URI[sha256sum] = "4571059b7b5d48b7ce52b01389e95d798bf5cf2020523c153ff27b498153c9cb"
EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
inherit cpan ptest-perl
do_compile() {
export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
cpan_do_compile
}
RDEPENDS:${PN} += "perl-module-carp perl-module-overload perl-module-universal perl-module-io-handle"
RDEPENDS:${PN}-ptest += "libxml-parser-perl perl-module-file-glob perl-module-cwd perl-module-constant"

View File

@@ -0,0 +1,35 @@
SUMMARY = "Perl module for reading and writing XML"
DESCRIPTION = "The XML::Simple Perl module provides a simple API layer \
on top of an underlying XML parsing module to maintain XML files \
(especially configuration files). It is a blunt rewrite of XML::Simple \
(by Grant McLean) to use the XML::LibXML parser for XML structures, \
where the original uses plain Perl or SAX parsers."
HOMEPAGE = "http://search.cpan.org/~markov/XML-LibXML-Simple-0.93/lib/XML/LibXML/Simple.pod"
SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cf206df8c9fe775f1d4c484386491eac"
DEPENDS += "libxml-parser-perl"
SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Simple-${PV}.tar.gz"
SRC_URI[md5sum] = "bb841dce889a26c89a1c2739970e9fbc"
SRC_URI[sha256sum] = "531fddaebea2416743eb5c4fdfab028f502123d9a220405a4100e68fc480dbf8"
S = "${WORKDIR}/XML-Simple-${PV}"
EXTRA_PERLFLAGS = "-I ${PERLHOSTLIB}"
inherit cpan ptest-perl
RDEPENDS:${PN} += " \
libxml-namespacesupport-perl \
libxml-parser-perl \
libxml-sax-perl \
"
RDEPENDS:${PN}-ptest += " \
perl-module-file-temp \
perl-module-test-more \
"
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,63 @@
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/*
sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
tar -c --exclude=try --exclude=a.out --exclude='*.o' --exclude=libperl.so* --exclude=[Mm]akefile --exclude=hostperl \
--exclude=cygwin --exclude=os2 --exclude=djgpp --exclude=qnx --exclude=symbian --exclude=haiku \
--exclude=vms --exclude=vos --exclude=NetWare --exclude=amigaos4 --exclude=buildcustomize.pl \
--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=[Mm]akefile.old \
--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
# Remove build host references from various scattered files...
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 '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_REGEX}^^g' \
-e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
-e "s,${STAGING_LIBDIR},${libdir},g" \
-e "s,${STAGING_BINDIR},${bindir},g" \
-e "s,${STAGING_INCDIR},${includedir},g" \
-e "s,${STAGING_BINDIR_NATIVE}/,,g" \
-e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
-e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-e 's:${RECIPE_SYSROOT}::g' \
{} +
# Remove a useless timestamp...
sed -i -e '/Autogenerated starting on/d' ${D}${PTEST_PATH}/lib/unicore/mktables.lst
# Remove files with host-specific configuration for building native binaries
rm ${D}${PTEST_PATH}/Makefile.config ${D}${PTEST_PATH}/xconfig.h ${D}${PTEST_PATH}/xconfig.sh
}
python populate_packages:prepend() {
# Put all *.t files from the lib dir in the ptest package
# do_split_packages requires a pair of () in the regex, but we have nothing
# to match, so use an empty pair.
if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d):
do_split_packages(d, d.expand('${libdir}/perl/${PV}'), r'.*\.t()',
'${PN}-ptest%s', '%s', recursive=True, match_path=True)
}
RDEPENDS:${PN}-ptest += "${PN}-modules ${PN}-doc sed procps-ps"
# The perl-ptest package contains Perl internal modules and generating file
# dependencies for it causes problems.
SKIP_FILEDEPS:${PN}-ptest = '1'

View File

@@ -0,0 +1,426 @@
SUMMARY = "Perl scripting language"
HOMEPAGE = "http://www.perl.org/"
DESCRIPTION = "Perl is a highly capable, feature-rich programming language"
SECTION = "devel"
LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \
file://Artistic;md5=71a4d5d9acc18c0952a6df2218bb68da \
"
SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
file://perl-rdepends.txt \
file://0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch \
file://errno_ver.diff \
file://native-perlinc.patch \
file://perl-dynloader.patch \
file://0002-Constant-Fix-up-shebang.patch \
file://determinism.patch \
file://0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch \
file://0001-Fix-intermittent-failure-of-test-t-op-sigsystem.t.patch \
"
SRC_URI:append:class-native = " \
file://perl-configpm-switch.patch \
"
SRC_URI:append:class-target = " \
file://encodefix.patch \
"
SRC_URI[perl.sha256sum] = "fb888accf8b50b5180e91166e5153608be294c57c19878e95f7659c1f1f12758"
B = "${WORKDIR}/perl-${PV}-build"
inherit upstream-version-is-even update-alternatives
DEPENDS += "perlcross-native zlib virtual/crypt"
# make 4.1 has race issues with the double-colon usage of MakeMaker, see #14096
DEPENDS += "make-native"
PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0"
PACKAGECONFIG ??= "gdbm"
PACKAGECONFIG:append:libc-musl = " anylocale"
PACKAGECONFIG[bdb] = ",-Ui_db,db"
PACKAGECONFIG[gdbm] = ",-Ui_gdbm,gdbm"
PACKAGECONFIG[anylocale] = "-Dd_setlocale_accepts_any_locale_name=define,,"
# Don't generate comments in enc2xs output files. They are not reproducible
export ENC2XS_NO_COMMENTS = "1"
CFLAGS += "-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
do_configure:prepend() {
rm -rf ${B}
cp -rfp ${S} ${B}
cp -rfp ${STAGING_DATADIR_NATIVE}/perl-cross/* ${B}
cd ${B}
}
do_configure:class-target() {
./configure --prefix=${prefix} --libdir=${libdir} \
--target=${TARGET_SYS} \
-Duse64bitint \
-Duseshrplib \
-Dusethreads \
-Dsoname=libperl.so.5 \
-Dvendorprefix=${prefix} \
-Dvendorlibdir=${libdir} \
-Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
-Dlibpth='${libdir} ${base_libdir}' \
-Dglibpth='${libdir} ${base_libdir}' \
-Alddlflags=' ${LDFLAGS}' \
-Dd_gnulibc=define \
${PACKAGECONFIG_CONFARGS}
#perl.c uses an ARCHLIB_EXP define to generate compile-time code that
#adds the archlibexp path to @INC during run-time initialization of a
#new perl interpreter.
#Because we've changed this value in a temporary way to make it
#possible to use ExtUtils::Embed in the target build (the temporary
#value in config.sh gets re-stripped out during packaging), the
#ARCHLIB_EXP value that gets generated still uses the temporary version
#instead of the original expected version (i.e. becauses it's in the
#generated config.h, it doesn't get stripped out during packaging like
#the others in config.sh).
sed -i -e "s,${STAGING_LIBDIR},${libdir},g" config.h
}
do_configure:class-nativesdk() {
./configure --prefix=${prefix} \
--target=${TARGET_SYS} \
-Duseshrplib \
-Dusethreads \
-Dsoname=libperl.so.5 \
-Dvendorprefix=${prefix} \
-Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
-Alddlflags=' ${LDFLAGS}' \
${PACKAGECONFIG_CONFARGS}
# See the comment above
sed -i -e "s,${STAGING_LIBDIR},${libdir},g" config.h
}
do_configure:class-native() {
./configure --prefix=${prefix} \
-Dbin=${bindir}/perl-native \
-Duseshrplib \
-Dusethreads \
-Dsoname=libperl.so.5 \
-Dvendorprefix=${prefix} \
-Ui_xlocale \
-Alddlflags=' ${LDFLAGS}' \
${PACKAGECONFIG_CONFARGS}
# This prevents leakage of build paths into perl-native binaries, which
# causes non-deterministic troubles when those paths no longer exist or aren't accessible.
sed -i -e "s,${STAGING_LIBDIR},/completelyboguspath,g" config.h
}
do_configure:append() {
if [ -n "$SOURCE_DATE_EPOCH" ]; then
PERL_BUILD_DATE="$(${PYTHON} -c "\
from datetime import datetime, timezone; \
print(datetime.fromtimestamp($SOURCE_DATE_EPOCH, timezone.utc).strftime('%a %b %d %H:%M:%S %Y')) \
")"
echo "#define PERL_BUILD_DATE \"$PERL_BUILD_DATE\"" >> config.h
fi
}
do_compile() {
oe_runmake
}
do_install() {
oe_runmake 'DESTDIR=${D}' install
install -d ${D}${libdir}/perl5
install -d ${D}${libdir}/perl5/${PV}/
install -d ${D}${libdir}/perl5/${PV}/ExtUtils/
# Save native config
install config.sh ${D}${libdir}/perl5
install lib/Config.pm ${D}${libdir}/perl5/${PV}/
install lib/ExtUtils/typemap ${D}${libdir}/perl5/${PV}/ExtUtils/
# Fix up shared library
dir=$(echo ${D}/${libdir}/perl5/${PV}/*/CORE)
rm $dir/libperl.so
ln -sf ../../../../libperl.so.${PERL_LIB_VER} $dir/libperl.so
# Try to catch Bug #13946
if [ -e ${D}/${libdir}/perl5/${PV}/Storable.pm ]; then
bbfatal 'non-arch specific Storable.pm found! See https://bugzilla.yoctoproject.org/show_bug.cgi?id=13946'
fi
}
do_install:append:class-target() {
# This is used to substitute target configuration when running native perl via perl-configpm-switch.patch
ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl
# xconfig.h contains references to build host architecture, and yet is included from various other places.
# To make it reproducible let's make it a copy of config.h patch that is specific to the target architecture.
# It is believed that the original header is the product of building miniperl (a helper executable built with host compiler).
cp ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/config.h ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/xconfig.h
}
do_install:append:class-nativesdk() {
# This is used to substitute target configuration when running native perl via perl-configpm-switch.patch
ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl
create_wrapper ${D}${bindir}/perl \
PERL5LIB='$PERL5LIB:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/site_perl/${PV}:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/vendor_perl/${PV}:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/${PV}'
}
do_install:append:class-native () {
# Those wrappers mean that perl installed from sstate (which may change
# path location) works and that in the nativesdk case, the SDK can be
# installed to a different location from the one it was built for.
create_wrapper ${D}${bindir}/perl-native/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl5/site_perl/${PV}:${STAGING_LIBDIR}/perl5/vendor_perl/${PV}:${STAGING_LIBDIR}/perl5/${PV}'
# Use /usr/bin/env nativeperl for the perl script.
for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f
done
}
PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
perl_package_preprocess () {
# Fix up installed configuration
sed -i -e "s,${D},,g" \
-e "s,${DEBUG_PREFIX_MAP},,g" \
-e "s,--sysroot=${STAGING_DIR_HOST},,g" \
-e "s,-isystem${STAGING_INCDIR} ,,g" \
-e "s,${STAGING_LIBDIR},${libdir},g" \
-e "s,${STAGING_BINDIR},${bindir},g" \
-e "s,${STAGING_INCDIR},${includedir},g" \
-e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
-e "s,${STAGING_BINDIR_NATIVE}/,,g" \
-e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
-e 's:${RECIPE_SYSROOT}::g' \
${PKGD}${bindir}/h2xs.perl \
${PKGD}${bindir}/h2ph.perl \
${PKGD}${bindir}/pod2man.perl \
${PKGD}${bindir}/pod2text.perl \
${PKGD}${bindir}/pod2usage.perl \
${PKGD}${bindir}/podchecker.perl \
${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/config.h \
${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/xconfig.h \
${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/perl.h \
${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/pp.h \
${PKGD}${libdir}/perl5/${PV}/Config.pm \
${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \
${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pod \
${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_git.pl \
${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy.pl \
${PKGD}${libdir}/perl5/${PV}/ExtUtils/Liblist/Kid.pm \
${PKGD}${libdir}/perl5/${PV}/FileCache.pm \
${PKGD}${libdir}/perl5/${PV}/pod/*.pod \
${PKGD}${libdir}/perl5/config.sh
}
inherit update-alternatives
ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE:${PN}-misc = "corelist cpan enc2xs encguess h2ph h2xs instmodsh json_pp libnetcfg \
piconv pl2pm pod2html pod2man pod2text pod2usage podchecker \
prove ptar ptardiff ptargrep shasum splain streamzip xsubpp zipdetails"
ALTERNATIVE_LINK_NAME[corelist] = "${bindir}/corelist"
ALTERNATIVE_LINK_NAME[cpan] = "${bindir}/cpan"
ALTERNATIVE_LINK_NAME[enc2xs] = "${bindir}/enc2xs"
ALTERNATIVE_LINK_NAME[encguess] = "${bindir}/encguess"
ALTERNATIVE_LINK_NAME[h2ph] = "${bindir}/h2ph"
ALTERNATIVE_LINK_NAME[h2xs] = "${bindir}/h2xs"
ALTERNATIVE_LINK_NAME[instmodsh] = "${bindir}/instmodsh"
ALTERNATIVE_LINK_NAME[json_pp] = "${bindir}/json_pp"
ALTERNATIVE_LINK_NAME[libnetcfg] = "${bindir}/libnetcfg"
ALTERNATIVE_LINK_NAME[piconv] = "${bindir}/piconv"
ALTERNATIVE_LINK_NAME[pl2pm] = "${bindir}/pl2pm"
ALTERNATIVE_LINK_NAME[pod2html] = "${bindir}/pod2html"
ALTERNATIVE_LINK_NAME[pod2man] = "${bindir}/pod2man"
ALTERNATIVE_LINK_NAME[pod2text] = "${bindir}/pod2text"
ALTERNATIVE_LINK_NAME[pod2usage] = "${bindir}/pod2usage"
ALTERNATIVE_LINK_NAME[podchecker] = "${bindir}/podchecker"
ALTERNATIVE_LINK_NAME[prove] = "${bindir}/prove"
ALTERNATIVE_LINK_NAME[ptar] = "${bindir}/ptar"
ALTERNATIVE_LINK_NAME[ptardiff] = "${bindir}/ptardiff"
ALTERNATIVE_LINK_NAME[ptargrep] = "${bindir}/ptargrep"
ALTERNATIVE_LINK_NAME[shasum] = "${bindir}/shasum"
ALTERNATIVE_LINK_NAME[splain] = "${bindir}/splain"
ALTERNATIVE_LINK_NAME[streamzip] = "${bindir}/streamzip"
ALTERNATIVE_LINK_NAME[xsubpp] = "${bindir}/xsubpp"
ALTERNATIVE_LINK_NAME[zipdetails] = "${bindir}/zipdetails"
require perl-ptest.inc
FILES:${PN} = "${bindir}/perl ${bindir}/perl.real ${bindir}/perl${PV} ${libdir}/libperl.so* \
${libdir}/perl5/site_perl \
${libdir}/perl5/${PV}/Config.pm \
${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \
${libdir}/perl5/${PV}/*/Config_git.pl \
${libdir}/perl5/${PV}/*/Config_heavy-target.pl \
${libdir}/perl5/config.sh \
${libdir}/perl5/${PV}/strict.pm \
${libdir}/perl5/${PV}/warnings.pm \
${libdir}/perl5/${PV}/warnings \
${libdir}/perl5/${PV}/vars.pm \
${libdir}/perl5/site_perl \
${libdir}/perl5/${PV}/ExtUtils/MANIFEST.SKIP \
${libdir}/perl5/${PV}/ExtUtils/xsubpp \
${libdir}/perl5/${PV}/ExtUtils/typemap \
"
RPROVIDES:${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \
perl-module-warnings-register perl-module-config-git"
FILES:${PN}-staticdev:append = " ${libdir}/perl5/${PV}/*/CORE/libperl.a"
FILES:${PN}-dev:append = " ${libdir}/perl5/${PV}/*/CORE"
FILES:${PN}-doc:append = " ${libdir}/perl5/${PV}/Unicode/Collate/*.txt \
${libdir}/perl5/${PV}/*/.packlist \
${libdir}/perl5/${PV}/Encode/encode.h \
"
PACKAGES += "${PN}-misc"
FILES:${PN}-misc = "${bindir}/*"
PACKAGES += "${PN}-pod"
FILES:${PN}-pod = "${libdir}/perl5/${PV}/pod \
${libdir}/perl5/${PV}/*.pod \
${libdir}/perl5/${PV}/*/*.pod \
${libdir}/perl5/${PV}/*/*/*.pod \
${libdir}/perl5/${PV}/*/*/*/*.pod \
"
PACKAGES += "${PN}-module-cpan ${PN}-module-unicore"
FILES:${PN}-module-cpan += "${libdir}/perl5/${PV}/CPAN \
"
FILES:${PN}-module-unicore += "${libdir}/perl5/${PV}/unicore"
ALTERNATIVE_PRIORITY = "40"
ALTERNATIVE:${PN}-doc = "Thread.3"
ALTERNATIVE_LINK_NAME[Thread.3] = "${mandir}/man3/Thread.3"
# Create a perl-modules package that represents the collection of all the
# other perl packages (actually the non modules packages and not created too).
ALLOW_EMPTY:${PN}-modules = "1"
PACKAGES += "${PN}-modules "
PACKAGESPLITFUNCS =+ "split_perl_packages"
python split_perl_packages () {
libdir = d.expand('${libdir}/perl5/${PV}')
do_split_packages(d, libdir, r'.*/auto/([^.]*)/[^/]*\.(so|ld|ix|al)', '${PN}-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
do_split_packages(d, libdir, r'.*linux/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
do_split_packages(d, libdir, r'Module/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
do_split_packages(d, libdir, r'Module/([^\/]*)/.*', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
do_split_packages(d, libdir, r'.*linux/([^\/].*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
do_split_packages(d, libdir, r'(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/|.*linux\/)[^\/]).*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
# perl-modules should runtime-depend on every perl module, and only the
# modules. Don't attempt to use the result of do_split_packages() as some
# modules are manually split (eg. perl-module-unicore). Also, the split
# packages should not include packages defined in RPROVIDES:${PN}.
perl_sub_pkgs = d.getVar(d.expand("RPROVIDES:${PN}")).split()
packages = filter(lambda p: 'perl-module-' in p and p not in perl_sub_pkgs, d.getVar('PACKAGES').split())
d.setVar(d.expand("RDEPENDS:${PN}-modules"), ' '.join(packages))
# Read the pre-generated dependency file, and use it to set module dependecies
for line in open(d.expand("${WORKDIR}") + '/perl-rdepends.txt').readlines():
splitline = line.split()
# Filter empty lines and comments
if len(splitline) == 0 or splitline[0].startswith("#"):
continue
if bb.data.inherits_class('native', d):
module = splitline[0] + '-native'
depends = "perl-native"
else:
module = splitline[0].replace("RDEPENDS:perl", "RDEPENDS:${PN}")
depends = splitline[2].strip('"').replace("perl-module", "${PN}-module")
d.appendVar(d.expand(module), " " + depends)
}
python() {
if d.getVar('CLASSOVERRIDE') == "class-target":
d.setVar("PACKAGES_DYNAMIC", "^${MLPREFIX}perl-module-.*(?<!native)$")
elif d.getVar('CLASSOVERRIDE') == "class-native":
d.setVar("PACKAGES_DYNAMIC", "^perl-module-.*-native$")
elif d.getVar('CLASSOVERRIDE') == "class-nativesdk":
d.setVar("PACKAGES_DYNAMIC", "^nativesdk-perl-module-.*")
}
RDEPENDS:${PN}-misc += "perl"
RRECOMMENDS:${PN}-misc += "perl-modules"
RDEPENDS:${PN}-pod += "perl"
BBCLASSEXTEND = "native nativesdk"
SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
do_create_rdepends_inc() {
cd ${WORKDIR}
cat <<'EOPREAMBLE' > ${WORKDIR}/perl-rdepends.inc
# Some additional dependencies that the above doesn't manage to figure out
RDEPENDS:${PN}-module-file-spec += "${PN}-module-file-spec-unix"
RDEPENDS:${PN}-module-scalar-util += "${PN}-module-list-util"
RDEPENDS:${PN}-module-file-temp += "${PN}-module-scalar-util"
RDEPENDS:${PN}-module-file-temp += "${PN}-module-file-spec"
RDEPENDS:${PN}-module-io-file += "${PN}-module-symbol"
RDEPENDS:${PN}-module-io-file += "${PN}-module-carp"
RDEPENDS:${PN}-module-math-bigint += "${PN}-module-math-bigint-calc"
RDEPENDS:${PN}-module-test-builder += "${PN}-module-list-util"
RDEPENDS:${PN}-module-test-builder += "${PN}-module-scalar-util"
RDEPENDS:${PN}-module-test-builder-formatter += "${PN}-module-test2-formatter-tap"
RDEPENDS:${PN}-module-test2-api += "${PN}-module-test2-event-fail"
RDEPENDS:${PN}-module-test2-api += "${PN}-module-test2-event-pass"
RDEPENDS:${PN}-module-test2-api += "${PN}-module-test2-event-v2"
RDEPENDS:${PN}-module-test2-formatter-tap += "${PN}-module-test2-formatter"
RDEPENDS:${PN}-module-thread-queue += "${PN}-module-attributes"
RDEPENDS:${PN}-module-overload += "${PN}-module-overloading"
# Generated depends list beyond this line
EOPREAMBLE
test -e packages-split.new && rm -rf packages-split.new
cp -r packages-split packages-split.new && cd packages-split.new
find . -name \*.pm | xargs sed -i '/^=head/,/^=cut/d'
egrep -r "^\s*(\<use .*|\<require .*);?" perl-module-* --include="*.pm" | \
sed "s/\/.*\.pm: */ += /g;s/[\"\']//g;s/;.*/\"/g;s/+= .*\(require\|use\)\> */+= \"perl-module-/g;s/CPANPLUS::.*/cpanplus/g;s/CPAN::.*/cpan/g;s/::/-/g;s/ [^+\"].*//g;s/_/-/g;s/\.pl\"$/\"/;s/\"\?\$/\"/;s/(//;s/)//;" | tr [:upper:] [:lower:] | \
awk '{if ($3 != "\x22"$1"\x22"){ print $0}}'| \
grep -v -e "\-vms\-" -e module-5 -e "^$" -e "\\$" -e your -e tk -e autoperl -e html -e http -e parse-cpan -e perl-ostype -e ndbm-file -e module-mac -e fcgi -e lwp -e dbd -e dbix | \
sort -u | \
sed 's/^/RDEPENDS:/;s/perl-module-/${PN}-module-/g;s/module-\(module-\)/\1/g;s/\(module-load\)-conditional/\1/g;s/encode-configlocal/&-pm/;' | \
egrep -wv '=>|module-a|module-apache.?|module-apr|module-authen-sasl|module-b-asmdata|module-convert-ebcdic|module-devel-size|module-digest-perl-md5|module-dumpvalue|module-extutils-constant-aaargh56hash|module-extutils-xssymset|module-file-bsdglob|module-for|module-it|module-io-socket-inet6|module-io-socket-ssl|module-io-string|module-ipc-system-simple|module-lexical|module-local-lib|metadata|module-modperl-util|module-pluggable-object|module-test-builder-io-scalar|module-text-unidecode|module-unicore|module-win32|objects\sload|syscall.ph|systeminfo.ph|%s' | \
egrep -wv '=>|module-algorithm-diff|module-carp|module-c<extutils-mm-unix>|module-l<extutils-mm-unix>|module-encode-hanextra|module-extutils-makemaker-version-regex|module-file-spec|module-io-compress-lzma|module-io-uncompress-unxz|module-locale-maketext-lexicon|module-log-agent|module-meta-notation|module-net-localcfg|module-net-ping-external|module-b-deparse|module-scalar-util|module-some-module|module-symbol|module-uri|module-win32api-file' > ${WORKDIR}/perl-rdepends.generated
cat ${WORKDIR}/perl-rdepends.inc ${WORKDIR}/perl-rdepends.generated > ${THISDIR}/files/perl-rdepends.txt
}
# bitbake perl -c create_rdepends_inc
addtask do_create_rdepends_inc
SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
perl_sysroot_create_wrapper () {
mkdir -p ${SYSROOT_DESTDIR}${bindir}
# Create a wrapper that /usr/bin/env perl will use to get perl-native.
# This MUST live in the normal bindir.
cat > ${SYSROOT_DESTDIR}${bindir}/nativeperl << EOF
#!/bin/sh
realpath=\`readlink -fn \$0\`
exec \`dirname \$realpath\`/perl-native/perl "\$@"
EOF
chmod 0755 ${SYSROOT_DESTDIR}${bindir}/nativeperl
cat ${SYSROOT_DESTDIR}${bindir}/nativeperl
}
SSTATE_HASHEQUIV_FILEMAP = " \
populate_sysroot:*/lib*/perl5/*/*/Config_heavy.pl:${TMPDIR} \
populate_sysroot:*/lib*/perl5/*/*/Config_heavy.pl:${COREBASE} \
populate_sysroot:*/lib*/perl5/config.sh:${TMPDIR} \
populate_sysroot:*/lib*/perl5/config.sh:${COREBASE} \
"