git: d0c02411acb6 - main - graphics/tesseract: fix build on non-x86 non-arm

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Thu, 02 Dec 2021 15:39:24 UTC
The branch main has been updated by pkubaj:

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

commit d0c02411acb689db9a692dad593867b25f15b281
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2021-12-02 15:32:40 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2021-12-02 15:32:40 +0000

    graphics/tesseract: fix build on non-x86 non-arm
    
    Clang doesn't exit with error on powerpc64* after adding -mfpu=neon, but merely ignores the argument and prints a warning, which incorrectly makes it defined as ARM with NEON.
---
 graphics/tesseract/files/patch-CMakeLists.txt | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/graphics/tesseract/files/patch-CMakeLists.txt b/graphics/tesseract/files/patch-CMakeLists.txt
index 88cfa19b6ebb..1bddd1caeb1a 100644
--- a/graphics/tesseract/files/patch-CMakeLists.txt
+++ b/graphics/tesseract/files/patch-CMakeLists.txt
@@ -1,4 +1,4 @@
---- CMakeLists.txt.orig	2021-12-01 16:27:45 UTC
+--- CMakeLists.txt.orig	2021-12-02 15:06:37 UTC
 +++ CMakeLists.txt
 @@ -149,7 +149,7 @@ endif()
  
@@ -9,3 +9,27 @@
  
  set(HAVE_NEON FALSE)
  
+@@ -220,7 +220,7 @@ set(HAVE_SSE4_1 FALSE)
+ add_definitions("-DHAVE_NEON")
+ set(HAVE_NEON TRUE)
+ 
+-else()
++elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm.*")
+ 
+ set(HAVE_AVX FALSE)
+ set(HAVE_AVX2 FALSE)
+@@ -232,6 +232,14 @@ if(HAVE_NEON)
+     set(NEON_COMPILE_FLAGS "-mfpu=neon")
+     add_definitions("-DHAVE_NEON")
+ endif()
++
++else()
++
++set(HAVE_AVX FALSE)
++set(HAVE_AVX2 FALSE)
++set(HAVE_FMA FALSE)
++set(HAVE_NEON FALSE)
++set(HAVE_SSE4_1 FALSE)
+ 
+ endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86|AMD64")
+