aboutsummaryrefslogtreecommitdiff
path: root/databases/p5-DBI/files/patch-Makefile.PL
diff options
context:
space:
mode:
Diffstat (limited to 'databases/p5-DBI/files/patch-Makefile.PL')
-rw-r--r--databases/p5-DBI/files/patch-Makefile.PL29
1 files changed, 29 insertions, 0 deletions
diff --git a/databases/p5-DBI/files/patch-Makefile.PL b/databases/p5-DBI/files/patch-Makefile.PL
new file mode 100644
index 000000000000..e44afc728f64
--- /dev/null
+++ b/databases/p5-DBI/files/patch-Makefile.PL
@@ -0,0 +1,29 @@
+Concatenate CFLAGS passed as argument and the one from Perl
+
+--- Makefile.PL.orig 2025-01-20 08:10:33 UTC
++++ Makefile.PL
+@@ -237,6 +237,24 @@ package MY;
+
+ package MY;
+
++use Config;
++
++sub cflags {
++ my $self = shift;
++
++ my $default = $Config::Config{ccflags} // '';
++ my $user = $self->{CCFLAGS} // '';
++
++ # Merge defaults + user flags, dedupe tokens, keep order so user flags come last
++ my %seen;
++ my @merged = grep { length && !$seen{$_}++ }
++ split(/\s+/, "$default $user");
++
++ local $self->{CCFLAGS} = join ' ', @merged;
++
++ return $self->SUPER::cflags(@_);
++}
++
+ sub postamble {
+ warn <<EOT;
+