git: a93afe3da100 - main - cad/ldview: Fix build with llvm16

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

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

commit a93afe3da100b2f9b59773f6c7b7c8cc5d68c5e9
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-08-05 11:06:39 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-08-05 11:53:19 +0000

    cad/ldview: Fix build with llvm16
    
    - Pet portclippy
    
    Approved by:    portmgr (blanket)
    Sponsored by:   The FreeBSD Foundation
---
 cad/ldview/Makefile | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/cad/ldview/Makefile b/cad/ldview/Makefile
index f22fa3d32df8..c272bf557b43 100644
--- a/cad/ldview/Makefile
+++ b/cad/ldview/Makefile
@@ -20,21 +20,25 @@ RUN_DEPENDS=	bash:shells/bash \
 		ldraw>0:cad/ldraw
 
 USES=		desktop-file-utils gl gmake jpeg qmake qt:5 shared-mime-info shebangfix xorg
-USE_QT=		core gui linguist opengl printsupport widgets buildtools:build qmake:build
-USE_GL=		gl glu
-USE_XORG=	x11
-
 USE_GITHUB=	yes
 GH_ACCOUNT=	tcobbs
+USE_GL=		gl glu
+USE_QT=		core gui linguist opengl printsupport widgets buildtools:build qmake:build
+USE_XORG=	x11
 
 SHEBANG_FILES=	desktop/ldraw-thumbnailer
 
+QMAKE_ARGS=	MANDIR=${PREFIX}/man CONFIG+=EXPORT_3DS
+
 WRKSRC_SUBDIR=	QT
 
-QMAKE_ARGS=	MANDIR=${PREFIX}/man CONFIG+=EXPORT_3DS
+.include <bsd.port.options.mk>
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|"/usr/share/ldraw"|"${PREFIX}/share/ldraw"|' ${WRKSRC}/ModelViewerWidget.cpp
+.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
+	@${REINPLACE_CMD} -e 's|register ||' ${WRKSRC}/../LDLoader/LDrawIni.c
+.endif
 
 pre-configure:
 	@cd ${WRKSRC} && ${LRELEASE} LDView.pro