Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions lib/Devel/PatchPerl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ my @patch = (
perl => [ qr/^5\.8\.9$/, ],
subs => [ [ \&_patch_589_perlio_c ], ],
},
{
perl => [
qr/^5\.1[024]/,
],
subs => [
[ \&_patch_darwin_locale_test ],
],
},
);

sub patch_source {
Expand Down Expand Up @@ -1798,6 +1806,72 @@ sub _patch_589_perlio_c
END
}

sub _patch_darwin_locale_test
{
my $perl = shift;

if ($perl =~ /^5\.14/) {
_patch(<<'END');
--- lib/locale.t
+++ lib/locale.t
@@ -460,7 +460,7 @@
if ($v >= 8 and $v < 10) {
debug "# Skipping eu_ES, be_BY locales -- buggy in Darwin\n";
@Locale = grep ! m/^(eu_ES(?:\..*)?|be_BY\.CP1131)$/, @Locale;
- } elsif ($v < 12) {
+ } elsif ($v <= 12) {
debug "# Skipping be_BY locales -- buggy in Darwin\n";
@Locale = grep ! m/^be_BY\.CP1131$/, @Locale;
}
END
}
elsif ($perl =~ /^5\.12\.0/) {
_patch(<<'END');
--- lib/locale.t
+++ lib/locale.t
@@ -460,7 +460,7 @@
if ($v >= 8 and $v < 10) {
debug "# Skipping eu_ES, be_BY locales -- buggy in Darwin\n";
@Locale = grep ! m/^(eu_ES|be_BY\.CP1131)$/, @Locale;
- } elsif ($v < 11) {
+ } elsif ($v <= 12) {
debug "# Skipping be_BY locales -- buggy in Darwin\n";
@Locale = grep ! m/^be_BY\.CP1131$/, @Locale;
}
END
}
elsif ($perl =~ /^5\.12/) {
_patch(<<'END');
--- lib/locale.t
+++ lib/locale.t
@@ -460,7 +460,7 @@
if ($v >= 8 and $v < 10) {
debug "# Skipping eu_ES, be_BY locales -- buggy in Darwin\n";
@Locale = grep ! m/^(eu_ES(?:\..*)?|be_BY\.CP1131)$/, @Locale;
- } elsif ($v < 11) {
+ } elsif ($v <= 12) {
debug "# Skipping be_BY locales -- buggy in Darwin\n";
@Locale = grep ! m/^be_BY\.CP1131$/, @Locale;
}
END
}
elsif ($perl =~ /^5\.10/) {
_patch(<<'END');
--- lib/locale.t
+++ lib/locale.t
@@ -460,6 +460,9 @@
if ($v >= 8 and $v < 10) {
debug "# Skipping eu_ES, be_BY locales -- buggy in Darwin\n";
@Locale = grep ! m/^(eu_ES|be_BY.CP1131$)/, @Locale;
+ } elsif ($v <= 12) {
+ debug "# Skipping be_BY locales -- buggy in Darwin\n";
+ @Locale = grep ! m/^be_BY\.CP1131$/, @Locale;
}
}
END
}
}

qq[patchin'];

=pod
Expand Down