summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
Diffstat (limited to 'extra')
-rw-r--r--extra/perl/musl-locale.patch37
-rw-r--r--extra/perl/musl-skip-dst-test.patch13
-rw-r--r--extra/perl/musl-stack-size.patch16
-rw-r--r--extra/perl/skip-test-due-to-busybox-ps.patch13
-rw-r--r--extra/perl/zlib-test.patch80
5 files changed, 159 insertions, 0 deletions
diff --git a/extra/perl/musl-locale.patch b/extra/perl/musl-locale.patch
new file mode 100644
index 0000000..65839f1
--- /dev/null
+++ b/extra/perl/musl-locale.patch
@@ -0,0 +1,37 @@
+diff --git a/locale.c b/locale.c
+index 7653340..7243cb1 100644
+--- a/locale.c
++++ b/locale.c
+@@ -581,6 +581,10 @@ S_emulate_setlocale(const int category,
+
+ return (char *) querylocale(mask, cur_obj);
+
++# elif defined(_NL_LOCALE_NAME)
++
++ return (char *) nl_langinfo_l(_NL_LOCALE_NAME(category), cur_obj);
++
+ # else
+
+ /* If this assert fails, adjust the size of curlocales in intrpvar.h */
+@@ -737,7 +741,7 @@ S_emulate_setlocale(const int category,
+
+ /* Here, we are switching locales. */
+
+-# ifndef HAS_QUERYLOCALE
++# if !defined(HAS_QUERYLOCALE) && !defined(_NL_LOCALE_NAME)
+
+ if (strEQ(locale, "")) {
+
+@@ -1094,6 +1098,12 @@ S_emulate_setlocale(const int category,
+ locale = querylocale(mask, new_obj);
+ }
+
++# elif defined(_NL_LOCALE_NAME)
++
++ if (strEQ(locale, "")) {
++ locale = nl_langinfo_l(_NL_LOCALE_NAME(category), new_obj);
++ }
++
+ # else
+
+ /* Here, 'locale' is the return value */
diff --git a/extra/perl/musl-skip-dst-test.patch b/extra/perl/musl-skip-dst-test.patch
new file mode 100644
index 0000000..d217ecc
--- /dev/null
+++ b/extra/perl/musl-skip-dst-test.patch
@@ -0,0 +1,13 @@
+diff --git a/cpan/Time-Piece/t/02core_dst.t b/cpan/Time-Piece/t/02core_dst.t
+index 3f54fff..4b1faa8 100644
+--- a/cpan/Time-Piece/t/02core_dst.t
++++ b/cpan/Time-Piece/t/02core_dst.t
+@@ -119,7 +119,7 @@ cmp_ok($t->month_last_day, '==', 31); # test more
+
+
+ SKIP: {
+- skip "Extra tests for Linux, BSD only.", 8 unless $is_linux or $is_mac or $is_bsd;
++ skip "Extra tests for Linux, BSD only.", 8 unless $is_mac or $is_bsd;
+
+ local $ENV{TZ} = "EST5EDT4";
+ Time::Piece::_tzset();
diff --git a/extra/perl/musl-stack-size.patch b/extra/perl/musl-stack-size.patch
new file mode 100644
index 0000000..08a9ef0
--- /dev/null
+++ b/extra/perl/musl-stack-size.patch
@@ -0,0 +1,16 @@
+Tests fails on s390x due to low thread stack size
+upstream report: https://github.com/Perl/perl5/issues/18160
+
+diff --git a/t/thread_it.pl b/t/thread_it.pl
+index f38a580..e8c450a 100644
+--- a/t/thread_it.pl
++++ b/t/thread_it.pl
+@@ -36,7 +36,7 @@ my $curr = threads->create({
+ stack_size => $^O eq 'hpux' ? 524288 :
+ $^O eq 'darwin' ? 2000000:
+ $^O eq 'VMS' ? 150000 :
+- $^O eq 'aix' ? 1500000 : 0,
++ $^O eq 'aix' ? 1500000 : 256*1024,
+ }, sub {
+ run_tests();
+ return defined &curr_test ? curr_test() : ()
diff --git a/extra/perl/skip-test-due-to-busybox-ps.patch b/extra/perl/skip-test-due-to-busybox-ps.patch
new file mode 100644
index 0000000..ac3becc
--- /dev/null
+++ b/extra/perl/skip-test-due-to-busybox-ps.patch
@@ -0,0 +1,13 @@
+diff --git a/t/op/magic.t b/t/op/magic.t
+index 27c1d43..91882f4 100644
+--- a/t/op/magic.t
++++ b/t/op/magic.t
+@@ -408,7 +408,7 @@ EOP
+ # argv[0] assignment and by calling prctl()
+ {
+ SKIP: {
+- skip "We don't have prctl() here, or we're on Android", 2 unless $Config{d_prctl_set_name} && $^O ne 'android';
++ skip "Skip test to avoid external ps(1) dependency", 2;
+
+ # We don't really need these tests. prctl() is tested in the
+ # Kernel, but test it anyway for our sanity. If something doesn't
diff --git a/extra/perl/zlib-test.patch b/extra/perl/zlib-test.patch
new file mode 100644
index 0000000..1cb8f5e
--- /dev/null
+++ b/extra/perl/zlib-test.patch
@@ -0,0 +1,80 @@
+diff --git a/cpan/Compress-Raw-Zlib/t/02zlib.t b/cpan/Compress-Raw-Zlib/t/02zlib.t
+index 64c8944..9b2e9cb 100644
+--- a/cpan/Compress-Raw-Zlib/t/02zlib.t
++++ b/cpan/Compress-Raw-Zlib/t/02zlib.t
+@@ -13,6 +13,7 @@ use bytes;
+ use Test::More ;
+ use CompTestUtils;
+
++use constant ZLIB_1_2_12_0 => 0x12C0;
+
+ BEGIN
+ {
+@@ -490,7 +491,16 @@ SKIP:
+ last if $status == Z_STREAM_END or $status != Z_OK ;
+ }
+
+- cmp_ok $status, '==', Z_DATA_ERROR ;
++ # Z_STREAM_END returned by 1.12.2, Z_DATA_ERROR for older zlib
++ if (ZLIB_VERNUM >= ZLIB_1_2_12_0)
++ {
++ cmp_ok $status, '==', Z_STREAM_END ;
++ }
++ else
++ {
++ cmp_ok $status, '==', Z_DATA_ERROR ;
++ }
++
+ is $GOT, $goodbye ;
+
+
+@@ -514,7 +524,17 @@ SKIP:
+ is length($rest), $len2, "expected compressed output";
+
+ $GOT = '';
+- cmp_ok $k->inflate($rest, $GOT), '==', Z_DATA_ERROR, "inflate returns Z_DATA_ERROR";
++ $status = $k->inflate($rest, $GOT);
++ # Z_STREAM_END returned by 1.12.2, Z_DATA_ERROR for older zlib
++ if (ZLIB_VERNUM >= ZLIB_1_2_12_0)
++ {
++ cmp_ok $status, '==', Z_STREAM_END ;
++ }
++ else
++ {
++ cmp_ok $status, '==', Z_DATA_ERROR ;
++ }
++
+ is $GOT, $goodbye ;
+ }
+
+diff --git a/cpan/IO-Compress/t/cz-03zlib-v1.t b/cpan/IO-Compress/t/cz-03zlib-v1.t
+index 9b75f9b..41734d0 100644
+--- a/cpan/IO-Compress/t/cz-03zlib-v1.t
++++ b/cpan/IO-Compress/t/cz-03zlib-v1.t
+@@ -14,6 +14,8 @@ use Test::More ;
+ use CompTestUtils;
+ use Symbol;
+
++use constant ZLIB_1_2_12_0 => 0x12C0;
++
+ BEGIN
+ {
+ # use Test::NoWarnings, if available
+@@ -700,7 +702,16 @@ EOM
+
+ ($GOT, $status) = $k->inflate($rest) ;
+
+- ok $status == Z_DATA_ERROR ;
++ # Z_STREAM_END returned by 1.12.2, Z_DATA_ERROR for older zlib
++ if (ZLIB_VERNUM >= ZLIB_1_2_12_0)
++ {
++ cmp_ok $status, '==', Z_STREAM_END ;
++ }
++ else
++ {
++ cmp_ok $status, '==', Z_DATA_ERROR ;
++ }
++
+ ok $Z . $GOT eq $goodbye ;
+ }
+