summaryrefslogtreecommitdiff
path: root/databases/p5-DBI
diff options
context:
space:
mode:
Diffstat (limited to 'databases/p5-DBI')
-rw-r--r--databases/p5-DBI/Makefile1
-rw-r--r--databases/p5-DBI/files/patch-Makefile.PL29
2 files changed, 30 insertions, 0 deletions
diff --git a/databases/p5-DBI/Makefile b/databases/p5-DBI/Makefile
index adcc584ca808..78acccac7c19 100644
--- a/databases/p5-DBI/Makefile
+++ b/databases/p5-DBI/Makefile
@@ -1,5 +1,6 @@
PORTNAME= DBI
PORTVERSION= 1.647
+PORTREVISION= 1
CATEGORIES= databases perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
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;
+