From: "Michael R. Crusoe" <crusoe@debian.org>
Date: Thu, 21 Nov 2024 13:43:00 +0100
Subject: Skip some architectures + Seqan app combinations

Forwarded: not-needed

Could be a bug in gcc or seqan, but the memory requirements on mips{,el} to
compile three of the apps balloons beyond 14GiB, so skip them

If you update this patch (add/remove an architecture/app combo),
then update debian/README.Debian
---
 apps/searchjoin/CMakeLists.txt | 5 +++++
 apps/yara/CMakeLists.txt       | 6 ++++++
 2 files changed, 11 insertions(+)

diff --git a/apps/searchjoin/CMakeLists.txt b/apps/searchjoin/CMakeLists.txt
index 0209f59..6d0d9c5 100644
--- a/apps/searchjoin/CMakeLists.txt
+++ b/apps/searchjoin/CMakeLists.txt
@@ -12,6 +12,11 @@ message (STATUS "Configuring apps/searchjoin")
 
 set (SEQAN_APP_VERSION "0.5.9")
 
+if ("$ENV{DEB_BUILD_ARCH}" STREQUAL "ia64")
+    message (STATUS "  Not building searchjoin on ia64 due to assembler errors.")
+    return ()
+endif ()
+
 # ----------------------------------------------------------------------------
 # Dependencies
 # ----------------------------------------------------------------------------
diff --git a/apps/yara/CMakeLists.txt b/apps/yara/CMakeLists.txt
index b6dcfea..33ead07 100644
--- a/apps/yara/CMakeLists.txt
+++ b/apps/yara/CMakeLists.txt
@@ -10,6 +10,12 @@ cmake_minimum_required (VERSION 3.12)
 project (seqan_apps_yara CXX)
 message (STATUS "Configuring apps/yara")
 
+set (SEQAN_YARA_EXCLUDE_ARCHS "i386;mips;mipsel;armhf;sh4;armel;kfreebsd-i386;hurd-i386")
+if ("$ENV{DEB_BUILD_ARCH}" IN_LIST SEQAN_YARA_EXCLUDE_ARCHS)
+    message (STATUS "  Not building yara on $ENV{DEB_BUILD_ARCH} due to memory requirements.")
+    return ()
+endif ()
+
 # ----------------------------------------------------------------------------
 # Dependencies
 # ----------------------------------------------------------------------------
