git: d7d4e43aebc2 - main - emulators/dosbox-staging: Disable SIMD autodetection

From: Max Brazhnikov <makc_at_FreeBSD.org>
Date: Tue, 29 Oct 2024 20:48:29 UTC
The branch main has been updated by makc:

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

commit d7d4e43aebc2bf74335fd425cbc7f2d8045a16be
Author:     Max Brazhnikov <makc@FreeBSD.org>
AuthorDate: 2024-10-29 20:47:31 +0000
Commit:     Max Brazhnikov <makc@FreeBSD.org>
CommitDate: 2024-10-29 20:47:31 +0000

    emulators/dosbox-staging: Disable SIMD autodetection
    
    Disable SIMD autodetection when building official package.
    
    PR:             282381
    Reported by:    Eirik Oeverby
---
 emulators/dosbox-staging/Makefile | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/emulators/dosbox-staging/Makefile b/emulators/dosbox-staging/Makefile
index a72c2641a3ee..2238802a3dd9 100644
--- a/emulators/dosbox-staging/Makefile
+++ b/emulators/dosbox-staging/Makefile
@@ -22,7 +22,8 @@ USE_GL=		gl
 USE_SDL=	sdl2 net2
 USE_GITHUB=	yes
 
-MESON_ARGS=	-Dunit_tests=disabled -Duse_mt32emu=false
+MESON_ARGS=	-Dunit_tests=disabled \
+		-Duse_mt32emu=false
 LDFLAGS+=	-pthread
 
 OPTIONS_DEFINE=	ALSA DOCS FLUIDSYNTH
@@ -35,6 +36,12 @@ ALSA_MESON_TRUE=	use_alsa
 FLUIDSYNTH_LIB_DEPENDS=	libfluidsynth.so:audio/fluidsynth
 FLUIDSYNTH_MESON_TRUE=	use_fluidsynth
 
+.if defined(PACKAGE_BUILDING)
+# Disable SIMD autodetection
+# https://github.com/dosbox-staging/dosbox-staging/issues/4020
+MESON_ARGS+=	-Duse_zlib_ng=sse2,ssse3,neon
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} 's,/usr/share/doc/dosbox-staging,${DOCSDIR},' \
 		${WRKSRC}/docs/dosbox.1