From e08acee293a2f162d4f194fdae6d5f45f9d4be88c2f303a10b4ac5dd4c6069fb Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 23 Mar 2023 09:40:51 +0000 Subject: [PATCH] - Add 0001-sd_opl2alsa-Don-t-include-x86-specific-headers.patch OBS-URL: https://build.opensuse.org/package/show/games/omnispeak?expand=0&rev=2 --- ...a-Don-t-include-x86-specific-headers.patch | 38 +++++++++++++++++++ omnispeak.changes | 6 +++ omnispeak.spec | 7 +++- 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 0001-sd_opl2alsa-Don-t-include-x86-specific-headers.patch diff --git a/0001-sd_opl2alsa-Don-t-include-x86-specific-headers.patch b/0001-sd_opl2alsa-Don-t-include-x86-specific-headers.patch new file mode 100644 index 0000000..17be4a5 --- /dev/null +++ b/0001-sd_opl2alsa-Don-t-include-x86-specific-headers.patch @@ -0,0 +1,38 @@ +From 6bd9a59c53eeafc53b3c69419366276ae52d8be0 Mon Sep 17 00:00:00 2001 +From: David Gow +Date: Fri, 3 Mar 2023 17:31:21 +0800 +Subject: [PATCH] sd_opl2alsa: Don't include x86-specific headers + +As part of an old direct IO port access feature which I gave up on long +ago, id_sd_opl2alsa.c included . + +This header only exists on x86 platforms, so Omnispeak wouldn't build +on, e.g., aarch64 if WITH_ALSA was declared. It's pretty unlikely that +a non-x86 machine has an OPL3 compatible soundcard, but that's no reason +not to support it if it does. + +Of course, all of this should go away and be replaced with liboplhw, but +for now, let's fix it. + +Thanks to Martin Hauke for creating openSUSE packages, whose failed +aarch64 build uncovered this issue: +https://build.opensuse.org/package/live_build_log/home:mnhauke:games/omnispeak/openSUSE_Tumbleweed/aarch64 +--- + src/id_sd_opl2alsa.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/id_sd_opl2alsa.c b/src/id_sd_opl2alsa.c +index 433eb49..f94fe20 100644 +--- a/src/id_sd_opl2alsa.c ++++ b/src/id_sd_opl2alsa.c +@@ -21,7 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + #include + #include + #include +-#include + + #include + #include +-- +2.40.0 + diff --git a/omnispeak.changes b/omnispeak.changes index 861c8ee..4c7ccbd 100644 --- a/omnispeak.changes +++ b/omnispeak.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 23 09:38:19 UTC 2023 - Jan Engelhardt + +- Add 0001-sd_opl2alsa-Don-t-include-x86-specific-headers.patch, + unbreak compilation on non-x86. + ------------------------------------------------------------------- Tue Feb 21 20:37:27 UTC 2023 - Martin Hauke diff --git a/omnispeak.spec b/omnispeak.spec index c1f9133..b86e63d 100644 --- a/omnispeak.spec +++ b/omnispeak.spec @@ -1,6 +1,7 @@ # # spec file for package omnispeak # +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2023, Martin Hauke # # All modifications and additions to the file contributed by third parties @@ -15,6 +16,7 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # + Name: omnispeak Version: 1.1+git20230213 Release: 0 @@ -27,6 +29,7 @@ Source: %{name}-%{version}.tar.xz Source1: omnispeak-keen4-wrapper.sh Source2: omnispeak-keen5-wrapper.sh Source3: omnispeak-keen6-wrapper.sh +Patch1: 0001-sd_opl2alsa-Don-t-include-x86-specific-headers.patch BuildRequires: cmake BuildRequires: fdupes BuildRequires: gcc-c++ @@ -56,10 +59,10 @@ Run * omnispeak-keen4 * omnispeak-keen5 * omnispeak-keen6 -from the folder where the original game files are located. +from the directory where the original game files are located. %prep -%setup -q +%autosetup -p1 %build %cmake \