git: 7a6166a05e8c - main - graphics/openmvs: fix build on non-x86

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Tue, 26 Jul 2022 21:10:02 UTC
The branch main has been updated by pkubaj:

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

commit 7a6166a05e8cac9a614eb97f0ae26475aee2e592
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-07-26 09:42:59 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-07-26 21:09:56 +0000

    graphics/openmvs: fix build on non-x86
    
    Disable SSE on non-x86 and add powerpc* support.
---
 graphics/openmvs/Makefile                         |  6 ++++++
 graphics/openmvs/files/patch-libs_Common_Config.h | 13 +++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/graphics/openmvs/Makefile b/graphics/openmvs/Makefile
index e54143024018..fa9ca9a2fbaf 100644
--- a/graphics/openmvs/Makefile
+++ b/graphics/openmvs/Makefile
@@ -32,4 +32,10 @@ CMAKE_ON=	BUILD_SHARED_LIBS OpenMVS_USE_CERES
 CMAKE_OFF=	OpenMVS_BUILD_TOOLS # tools can't be built because of https://github.com/cdcseacave/openMVS/issues/846
 CMAKE_ARGS=	-DVCG_ROOT=${LOCALBASE}/include/vcglib
 
+.include <bsd.port.options.mk>
+
+.if ${ARCH} != amd64 && ${ARCH} != i386
+CMAKE_ARGS+=	-DOpenMVS_USE_SSE:BOOL=OFF
+.endif
+
 .include <bsd.port.mk>
diff --git a/graphics/openmvs/files/patch-libs_Common_Config.h b/graphics/openmvs/files/patch-libs_Common_Config.h
new file mode 100644
index 000000000000..571b88947aad
--- /dev/null
+++ b/graphics/openmvs/files/patch-libs_Common_Config.h
@@ -0,0 +1,13 @@
+--- libs/Common/Config.h.orig	2022-07-26 08:34:06 UTC
++++ libs/Common/Config.h
+@@ -144,7 +144,9 @@
+ #endif
+ 
+ 
+-#if defined(__arm__) || defined (__arm64__) || defined(__aarch64__) || defined(_M_ARM) || defined(_M_ARMT)
++#if defined(__powerpc__)
++#define _PLATFFORM_PPC 1
++#elif defined(__arm__) || defined (__arm64__) || defined(__aarch64__) || defined(_M_ARM) || defined(_M_ARMT)
+ #define _PLATFORM_ARM 1
+ #else
+ #define _PLATFORM_X86 1