git: 5c61e9cc044a - main - deskutils/gtimer: Fix build with llvm16

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Sat, 05 Aug 2023 11:53:34 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5c61e9cc044a164aca61410ada4365948005fb72

commit 5c61e9cc044a164aca61410ada4365948005fb72
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-08-05 11:10:27 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-08-05 11:53:19 +0000

    deskutils/gtimer: Fix build with llvm16
    
    - Utilize USES=localbase
    - Pet portclippy
    
    Sponsored by:   The FreeBSD Foundation
---
 deskutils/gtimer/Makefile | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/deskutils/gtimer/Makefile b/deskutils/gtimer/Makefile
index 68919609e4f2..0b4a9f1bfe77 100644
--- a/deskutils/gtimer/Makefile
+++ b/deskutils/gtimer/Makefile
@@ -12,13 +12,20 @@ LICENSE=	GPLv2
 
 RUN_DEPENDS=	xdg-open:devel/xdg-utils
 
-USES=		gettext perl5 gmake gnome pkgconfig xorg
-USE_XORG=	x11 xscrnsaver
+USES=		gettext gmake gnome localbase perl5 pkgconfig xorg
 USE_GNOME=	gtk20
+USE_XORG=	x11 xscrnsaver
+
 GNU_CONFIGURE=	yes
 
-CPPFLAGS+=	-I${LOCALBASE}/include -Wno-return-type
-LIBS+=		-L${LOCALBASE}/lib -lX11
+CPPFLAGS+=	-Wno-return-type
+LIBS+=		-lX11
+
+.include <bsd.port.options.mk>
+
+.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
+CFLAGS+=	-Wno-error=incompatible-function-pointer-types
+.endif
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|1.1.7|${PORTVERSION}|g' ${WRKSRC}/configure