git: fbb4c79ed30e - main - biology/salmon: fix build on powerpc64le

Piotr Kubaj <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.ports
Message-ID <[email protected]>
The branch main has been updated by pkubaj:

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

commit fbb4c79ed30e965f3a9afa8da5db4c9469df0714
Author:     Piotr Kubaj <[email protected]>
AuthorDate: 2026-08-12 10:54:20 +0000
Commit:     Piotr Kubaj <[email protected]>
CommitDate: 2026-08-12 12:54:30 +0000

    biology/salmon: fix build on powerpc64le
    
    Test amd64 path first and only if that fails use the arm path.
    arm path works just fine on powerpc64le.
---
 biology/salmon/files/patch-CMakeLists.txt          | 25 +++++++++++++++++++++-
 .../files/patch-external_pufferfish_CMakeLists.txt | 24 ++++++++++++++++++---
 2 files changed, 45 insertions(+), 4 deletions(-)

diff --git a/biology/salmon/files/patch-CMakeLists.txt b/biology/salmon/files/patch-CMakeLists.txt
index 36038f452843..91dbffab92c3 100644
--- a/biology/salmon/files/patch-CMakeLists.txt
+++ b/biology/salmon/files/patch-CMakeLists.txt
@@ -1,5 +1,28 @@
---- CMakeLists.txt.orig	2025-07-26 11:52:41 UTC
+--- CMakeLists.txt.orig	2024-03-15 20:01:14 UTC
 +++ CMakeLists.txt
+@@ -19,16 +19,16 @@ if(NOT DEFINED USE_ARM)
+ 
+ # detect host architecture 
+ if(NOT DEFINED USE_ARM)
+-  if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*|arm64.*|ARM64.*)")
+-    message("Detected 64-bit ARM host. Setting USE_ARM to true.")
++  if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|amd64|AMD64|i[3-6]86)$")
++    message("Detected x86 host. Setting USE_ARM to false.")
++    set(USE_ARM FALSE)
++    set(SCHAR_FLAG "")
++  else()
++    message("Detected non-x86 host. Setting USE_ARM to true.")
+     set(USE_ARM TRUE)
+     # set char to be signed
+     add_compile_options(-fsigned-char)
+     set(SCHAR_FLAG "-fsigned-char")
+-  else()
+-    message("Detected non-ARM host. Setting USE_ARM to false.")
+-    set(USE_ARM FALSE)
+-    set(SCHAR_FLAG "")
+   endif()
+ endif()
+ 
 @@ -310,14 +310,16 @@ endif()
  #  Grab pufferfish source --- DURING CONFIGURE TIME!
  #
diff --git a/biology/salmon/files/patch-external_pufferfish_CMakeLists.txt b/biology/salmon/files/patch-external_pufferfish_CMakeLists.txt
index d6c7695325fc..0db8319f2630 100644
--- a/biology/salmon/files/patch-external_pufferfish_CMakeLists.txt
+++ b/biology/salmon/files/patch-external_pufferfish_CMakeLists.txt
@@ -1,6 +1,24 @@
---- external/pufferfish/CMakeLists.txt.orig	2023-06-26 19:34:50 UTC
+--- external/pufferfish/CMakeLists.txt.orig	2024-03-15 14:14:23 UTC
 +++ external/pufferfish/CMakeLists.txt
-@@ -135,7 +135,7 @@ set(WARN_ALL_THINGS "-fdiagnostics-color=always;-Wall;
+@@ -15,12 +15,12 @@ if(NOT DEFINED USE_ARM)
+ message("CC version: ${CC_VERSION}")
+ 
+ if(NOT DEFINED USE_ARM)
+-  if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*|arm64.*|ARM64.*)")
+-    message("Detected 64-bit ARM host. Setting USE_ARM to true.")
+-    set(USE_ARM TRUE)
+-  else()
+-    message("Detected non-ARM host. Setting USE_ARM to false.")
++  if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|amd64|AMD64|i[3-6]86)$")
++    message("Detected x86 host. Setting USE_ARM to false.")
+     set(USE_ARM FALSE)
++  else()
++    message("Detected non-x86 host. Setting USE_ARM to true.")
++    set(USE_ARM TRUE)
+   endif()
+ endif()
+ 
+@@ -135,7 +135,7 @@ set(OPT_FLAGS "-DHAVE_SIMDE;-D__STDC_FORMAT_MACROS;-DS
  
  
  set(OPT_FLAGS "-DHAVE_SIMDE;-D__STDC_FORMAT_MACROS;-DSTX_NO_STD_STRING_VIEW;-O3;-fPIC;-DNDEBUG;-funroll-loops;-ftree-vectorize;-fno-strict-aliasing")
@@ -9,7 +27,7 @@
  
  ##
  # OSX is strange (some might say, stupid in this regard).  Deal with it's quirkines here.
-@@ -188,11 +188,6 @@ endif()
+@@ -188,11 +188,6 @@ set(SHASUM ${CMAKE_CURRENT_SOURCE_DIR}/scripts/check_s
  ##
  set(SHASUM ${CMAKE_CURRENT_SOURCE_DIR}/scripts/check_shasum.sh)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.