git: ce951d576902 - main - multimedia/avidemux: Fix build on i386

From: Thomas Zander <riggs_at_FreeBSD.org>
Date: Tue, 13 Dec 2022 21:27:24 UTC
The branch main has been updated by riggs:

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

commit ce951d576902bed95c66da651dd68d71dca4cd1c
Author:     Thomas Zander <riggs@FreeBSD.org>
AuthorDate: 2022-12-13 19:21:06 +0000
Commit:     Thomas Zander <riggs@FreeBSD.org>
CommitDate: 2022-12-13 21:27:20 +0000

    multimedia/avidemux: Fix build on i386
    
    Details:
    - Do not unconditionally (and broken on gcc12) use SSE.
---
 multimedia/avidemux/Makefile.common              |  7 +++++--
 multimedia/avidemux/files/extra-patch-i386-nosse | 14 ++++++++++++++
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/multimedia/avidemux/Makefile.common b/multimedia/avidemux/Makefile.common
index e71a4f3e5de4..5725e2a276fa 100644
--- a/multimedia/avidemux/Makefile.common
+++ b/multimedia/avidemux/Makefile.common
@@ -73,9 +73,12 @@ OPTIONS_DEFAULT+=	LAME FAAC AMR X264
 # of the stack)
 .if ${ARCH} == amd64
 CFLAGS+=	-fno-omit-frame-pointer
-#MAKE_ENV+=	ARCH=x86_64
-#CONFIGURE_ENV+=	ARCH=x86_64
 .endif
+
+.if ${ARCH} == i386
+EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-i386-nosse
+.endif
+
 CMAKE_ARGS+=	-DLIBEXECINFO_INCLUDE_DIR=/usr/include
 CMAKE_ARGS+=	-DLIBEXECINFO_LIBRARY_DIR=-lexecinfo
 
diff --git a/multimedia/avidemux/files/extra-patch-i386-nosse b/multimedia/avidemux/files/extra-patch-i386-nosse
new file mode 100644
index 000000000000..fbad75fb59ae
--- /dev/null
+++ b/multimedia/avidemux/files/extra-patch-i386-nosse
@@ -0,0 +1,14 @@
+--- avidemux/common/ADM_audioFilter/src/ADM_soundtouch/STTypes.h.orig	2022-09-17 13:59:16 UTC
++++ avidemux/common/ADM_audioFilter/src/ADM_soundtouch/STTypes.h
+@@ -153,11 +153,6 @@ namespace soundtouch
+         // efficient autovectorization
+         typedef float LONG_SAMPLETYPE;
+ 
+-        #ifdef SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS
+-            // Allow SSE optimizations
+-            #define SOUNDTOUCH_ALLOW_SSE       1
+-        #endif
+-
+     #endif  // SOUNDTOUCH_INTEGER_SAMPLES
+ 
+     #if ((SOUNDTOUCH_ALLOW_SSE) || (__SSE__) || (SOUNDTOUCH_USE_NEON))