git: 28c954ae983f - main - graphics/dia: Fix build with llvm16

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Tue, 25 Jul 2023 08:36:41 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=28c954ae983f82069dc923f2aa8ede9e14324fd0

commit 28c954ae983f82069dc923f2aa8ede9e14324fd0
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-07-25 08:12:16 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-07-25 08:36:28 +0000

    graphics/dia: Fix build with llvm16
    
    - Add LICENSE GPLv2
    - Pet portclippy
    
    Sponsored by:   The FreeBSD Foundation
---
 graphics/dia/Makefile | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/graphics/dia/Makefile b/graphics/dia/Makefile
index fa1d27b5ecee..db387895707d 100644
--- a/graphics/dia/Makefile
+++ b/graphics/dia/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	dia
 PORTVERSION=	0.97.3
-PORTREVISION=	4
+PORTREVISION=	5
 PORTEPOCH=	1
 CATEGORIES=	graphics gnome
 MASTER_SITES=	GNOME
@@ -10,22 +10,28 @@ MAINTAINER=	gnome@FreeBSD.org
 COMMENT=	Diagram creation program, similar to Visio
 WWW=		https://live.gnome.org/Dia
 
-OPTIONS_DEFINE=	DOCS
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libpng.so:graphics/png
 
-USES=		cpe desktop-file-utils gettext gmake gnome libtool pathfix \
-		pkgconfig tar:xz
+USES=		cpe desktop-file-utils gettext gmake gnome libtool \
+		localbase:ldflags pathfix pkgconfig tar:xz
+CPE_VENDOR=	gnome
 USE_GNOME=	gtk20 gnomeprefix libxslt libartlgpl2 intlhack
+
 GNU_CONFIGURE=	yes
-CONFIGURE_ENV=	LOCALBASE="${LOCALBASE}"
-CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib `pkg-config --libs gmodule-2.0`
 CONFIGURE_ARGS=	--disable-gnome
+CONFIGURE_ENV=	LOCALBASE="${LOCALBASE}"
+
 INSTALL_TARGET=	install-strip
-CPE_VENDOR=	gnome
+
+LDFLAGS+=	`pkg-config --libs gmodule-2.0`
+
+OPTIONS_DEFINE=	DOCS
 
 DOCS_BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl
+
 .include <bsd.port.options.mk>
 
 #.if ${ARCH} == "i386"
@@ -37,6 +43,10 @@ CONFIGURE_ARGS+=	--disable-libemf
 PLIST_SUB+=		WMF="@comment "
 #.endif
 
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400091
+CFLAGS+=	-Wno-error=incompatible-function-pointer-types
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
 		${WRKSRC}/lib/intl.c