git: 07118728f8a2 - 2025Q3 - graphics/p5-Cairo: fix runtime crash

From: Mathieu Arnold <mat_at_FreeBSD.org>
Date: Wed, 09 Jul 2025 10:43:10 UTC
The branch 2025Q3 has been updated by mat:

URL: https://cgit.FreeBSD.org/ports/commit/?id=07118728f8a20748ddf522d87ffc6e50eefe80ec

commit 07118728f8a20748ddf522d87ffc6e50eefe80ec
Author:     Martin Neubauer <m.ne@gmx.net>
AuthorDate: 2025-07-09 10:01:03 +0000
Commit:     Mathieu Arnold <mat@FreeBSD.org>
CommitDate: 2025-07-09 10:42:34 +0000

    graphics/p5-Cairo: fix runtime crash
    
    PR:             288054
    MFH:            2025Q3
    (cherry picked from commit 0712351c53ce3027fbb549c4b18bf654851080f7)
---
 graphics/p5-Cairo/Makefile                |  2 +-
 graphics/p5-Cairo/files/patch-Makefile.PL | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/graphics/p5-Cairo/Makefile b/graphics/p5-Cairo/Makefile
index e7e20d61515f..2d6f99f601dd 100644
--- a/graphics/p5-Cairo/Makefile
+++ b/graphics/p5-Cairo/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	Cairo
 PORTVERSION=	1.109
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	graphics perl5
 MASTER_SITES=	CPAN \
 		SF/gtk2-perl/Cairo/${PORTVERSION}
diff --git a/graphics/p5-Cairo/files/patch-Makefile.PL b/graphics/p5-Cairo/files/patch-Makefile.PL
new file mode 100644
index 000000000000..b90da87f1d95
--- /dev/null
+++ b/graphics/p5-Cairo/files/patch-Makefile.PL
@@ -0,0 +1,14 @@
+Propagate Perl's ccflags to make sure it uses Perl's headers the same way as
+Perl itself.
+
+--- Makefile.PL.orig	2021-01-19 17:26:47 UTC
++++ Makefile.PL
+@@ -612,7 +612,7 @@ my $dep = ExtUtils::Depends->new ('Cairo');
+ push @typemaps, 'cairo-perl.typemap';
+ 
+ my $dep = ExtUtils::Depends->new ('Cairo');
+-$dep->set_inc ('-I. -I'.$autogen_dir.' '.$cairo_cfg{cflags});
++$dep->set_inc ('-I. -I'.$autogen_dir.' '.$cairo_cfg{cflags}.' '.$Config::Config{ccflags});
+ $dep->set_libs ($cairo_cfg{libs});
+ $dep->add_xs (@xs_files);
+ $dep->add_c (qw/cairo-perl-enums.c cairo-perl-flags.c/);