From d95d83e6e61ea4838325ef71b8e02600a434e76c Mon Sep 17 00:00:00 2001 From: Bernard Cafarelli Date: Wed, 23 Sep 2026 10:39:48 +0200 Subject: [PATCH] games-emulation/dosbox-staging: allow build on all arches New cmake build system only allows builds for x86-64 and arm64, allow this on all arches (with interpreter-only configuration, as in older releases) Thanks to Filip "widelec" Maryjanski for report and patch Signed-off-by: Bernard Cafarelli --- .../dosbox-staging-0.83.0.ebuild | 1 + .../files/dosbox-staging-0.83.0-any-cpu.patch | 49 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 games-emulation/dosbox-staging/files/dosbox-staging-0.83.0-any-cpu.patch diff --git a/games-emulation/dosbox-staging/dosbox-staging-0.83.0.ebuild b/games-emulation/dosbox-staging/dosbox-staging-0.83.0.ebuild index e77acb165cc0c..4ad7656f6c97b 100644 --- a/games-emulation/dosbox-staging/dosbox-staging-0.83.0.ebuild +++ b/games-emulation/dosbox-staging/dosbox-staging-0.83.0.ebuild @@ -48,6 +48,7 @@ BDEPEND="test? ( dev-cpp/gtest ) PATCHES=( "${FILESDIR}"/${P}-optional_mt32.patch + "${FILESDIR}"/${P}-any-cpu.patch ) DOCS=( README.md docs/AUTHORS ) diff --git a/games-emulation/dosbox-staging/files/dosbox-staging-0.83.0-any-cpu.patch b/games-emulation/dosbox-staging/files/dosbox-staging-0.83.0-any-cpu.patch new file mode 100644 index 0000000000000..24102060de827 --- /dev/null +++ b/games-emulation/dosbox-staging/files/dosbox-staging-0.83.0-any-cpu.patch @@ -0,0 +1,49 @@ +From 37d5cd10f72d0342405940a605a907246ffb1fce Mon Sep 17 00:00:00 2001 +From: widelec-BB +Date: Tue, 22 Sep 2026 16:27:51 +0200 +Subject: [PATCH] build: Allow to build on machines with CPU other than x86 and + ARM + +Don't hard-fail on unknown processors; build interpreter-only + +x86 and arm64 remain the only optimized targets, but ppc64, +riscv64 and others can now build and run with the generic core +instead of dying at configure time. +--- + CMakeLists.txt | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 679470e64..d57445810 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -277,6 +277,7 @@ check_cxx_source_compiles("${TEST_CODE_BUILTIN_CLEAR_CACHE}" + + set(C_TARGET_CPU_ARM OFF) + set(C_TARGET_CPU_X86 OFF) ++set(C_TARGET_CPU_UNK OFF) + + option(OPT_FORCE_DYNREC "Force DYNREC dynamic recompiler (not x86-64 optimized)" OFF) + +@@ -307,9 +308,16 @@ elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR + set(C_DYNREC ON) + set(C_FPU_X86 OFF) + set(C_UNALIGNED_MEMORY OFF) +- + else() +- message(FATAL_ERROR "Unknown processor ${CMAKE_SYSTEM_PROCESSOR}") ++ message(WARNING "Unsupported processor ${CMAKE_SYSTEM_PROCESSOR}: " ++ "building interpreter-only, untested configuration") ++ ++ set(C_TARGET_CPU_UNK ON) ++ ++ set(C_DYNAMIC_X86 OFF) ++ set(C_DYNREC OFF) ++ set(C_FPU_X86 OFF) ++ set(C_UNALIGNED_MEMORY OFF) + endif() + + check_include_file("libgen.h" HAVE_LIBGEN_H) +-- +2.55.0 +