git: 07083442215a - main - devel/p5-Glib: fix runtime with Perl 5.40

From: Mathieu Arnold <mat_at_FreeBSD.org>
Date: Sun, 01 Jun 2025 19:30:18 UTC
The branch main has been updated by mat:

URL: https://cgit.FreeBSD.org/ports/commit/?id=07083442215a876386a383291c8a3cc8c0bb506a

commit 07083442215a876386a383291c8a3cc8c0bb506a
Author:     Mathieu Arnold <mat@FreeBSD.org>
AuthorDate: 2025-06-01 19:29:12 +0000
Commit:     Mathieu Arnold <mat@FreeBSD.org>
CommitDate: 2025-06-01 19:29:12 +0000

    devel/p5-Glib: fix runtime with Perl 5.40
    
    PR:     286804 (maintainer timeout)
---
 devel/p5-Glib/Makefile                |  1 +
 devel/p5-Glib/files/patch-Makefile.PL | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/devel/p5-Glib/Makefile b/devel/p5-Glib/Makefile
index e1568ab11ff1..5afc1c4b776d 100644
--- a/devel/p5-Glib/Makefile
+++ b/devel/p5-Glib/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	Glib
 PORTVERSION=	1.3294
+PORTREVISION=	1
 CATEGORIES=	devel perl5
 MASTER_SITES=	CPAN \
 		SF/gtk2-perl/Glib/${PORTVERSION}
diff --git a/devel/p5-Glib/files/patch-Makefile.PL b/devel/p5-Glib/files/patch-Makefile.PL
new file mode 100644
index 000000000000..5b6968a15e22
--- /dev/null
+++ b/devel/p5-Glib/files/patch-Makefile.PL
@@ -0,0 +1,14 @@
+Fix runtime starting with Perl 5.40 by adding back Perl's ccflqgs to Glib's
+ccflags when building.
+
+--- Makefile.PL.orig	2025-05-17 07:25:21 UTC
++++ Makefile.PL
+@@ -183,7 +183,7 @@ our $glib = ExtUtils::Depends->new ('Glib');
+ # add -I. and -I./build to the include path so we can find our own files.
+ # this will be inherited by dependant modules, so they can find their
+ # generated files.
+-$glib->set_inc (' -I. ' . $glibcfg{cflags} . ' ' . $gthreadcfg{cflags});
++$glib->set_inc (' -I. ' . $glibcfg{cflags} . ' ' . $gthreadcfg{cflags} . ' ' . $Config::Config{ccflags});
+ $glib->set_libs ($glibcfg{libs} . ' ' . $gthreadcfg{libs});
+ my $cwd = cwd();
+ $glib->add_typemaps (map {File::Spec->catfile($cwd,$_)} 'typemap');