git: 5a85ce841695 - main - games/regoth: fix build on !x86

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Sun, 28 Jun 2026 11:03:40 UTC
The branch main has been updated by fuz:

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

commit 5a85ce841695566e9bf0c6057531226a9f195498
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2026-06-26 13:48:10 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-06-28 10:59:29 +0000

    games/regoth: fix build on !x86
    
    No SSE2 on !x86, so don't try to use it.
    This may need to be adjusted for ppc, and possinle sse2neon can be used
    on ARM targets.
    
    MFH:            2026Q2
---
 games/regoth/Makefile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/games/regoth/Makefile b/games/regoth/Makefile
index 0da8c4c14ea1..20a282645b44 100644
--- a/games/regoth/Makefile
+++ b/games/regoth/Makefile
@@ -41,6 +41,14 @@ CMAKE_ARGS+=	-DREGOTH_BUILD_WITH_SYSTEM_OPENAL:BOOL=YES
 CXXFLAGS_powerpc64le=	-DNO_WARN_X86_INTRINSICS
 LDFLAGS_i386=	-Wl,-znotext
 
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "i386" || ${ARCH} == "amd64"
+CMAKE_ARGS+=	-DBUILD_SQUISH_WITH_SSE2:BOOL=YES
+.else
+CMAKE_ARGS+=	-DBUILD_SQUISH_WITH_SSE2:BOOL=NO
+.endif
+
 post-extract:
 	${MV} ${WRKSRC_bgfx}/* ${WRKSRC}/lib/bgfx-cmake/bgfx
 	${MV} ${WRKSRC_bimg}/* ${WRKSRC}/lib/bgfx-cmake/bimg
@@ -61,4 +69,4 @@ do-install:
 	${CAT} ${FILESDIR}/launcher.sh | ${SED} -e "s|%%DATADIR%%|${DATADIR}|" > \
 		${STAGEDIR}${PREFIX}/bin/REGoth
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>