git: 51cc6ae471c7 - main - cad/brlcad: Fix build on 14

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Fri, 18 Aug 2023 04:56:30 UTC
The branch main has been updated by bofh:

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

commit 51cc6ae471c71d17495c4be0d5bea385c99b3cb3
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-08-18 03:35:45 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-08-18 04:56:22 +0000

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

diff --git a/cad/brlcad/Makefile b/cad/brlcad/Makefile
index 2f16022e847a..4794a6dc0aed 100644
--- a/cad/brlcad/Makefile
+++ b/cad/brlcad/Makefile
@@ -23,23 +23,32 @@ LIB_DEPENDS=	liblz4.so:archivers/liblz4 \
 USES=		bison:alias cmake:insource cpe gl pathfix pkgconfig python:env \
 		tar:bzip2 tk xorg
 USE_GL=		gl glu
+USE_LDCONFIG=	yes
 USE_XORG=	ice sm x11 xau xcb xdamage xdmcp xext xfixes xft xi \
 		xorgproto xrender xscrnsaver xt xxf86vm
-USE_LDCONFIG=	yes
+
+CMAKE_OFF=	BRLCAD_ENABLE_STRICT
+CMAKE_INSTALL_PREFIX=	${PREFIX}/${PORTNAME}
+
+TEST_TARGET=	check
 
 CONFLICTS_INSTALL=	py[23][0-9]-epsilon
 
+MANPREFIX=	${PREFIX}/${PORTNAME}/share
 NO_MTREE=	yes
 
 WRKSRC=${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
 PLIST_SUB+=	PORTVERSION=${PORTVERSION}
 
-CMAKE_OFF=	BRLCAD_ENABLE_STRICT
-CMAKE_INSTALL_PREFIX=	${PREFIX}/${PORTNAME}
-MANPREFIX=	${PREFIX}/${PORTNAME}/share
+.include <bsd.port.options.mk>
 
-TEST_TARGET=	check
+.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
+USES+=	llvm:max=14
+CC=	clang${LLVM_VERSION}
+CPP=	clang-cpp${LLVM_VERSION}
+CXX=	clang++${LLVM_VERSION}
+.endif
 
 post-patch:
 	@${REINPLACE_CMD} -e 's+-exact Tcl 8\.6\.10+Tcl 8.6+' \