commit e8c0b2b9b6f4634becaabfd6ab3c697580c685b6
Author: Andrea Musuruane <musuruan(a)gmail.com>
Date: Sun May 17 16:47:39 2020 +0200
Added an upstream patch to properly fix duplicate symbol errors when
building with -fno-common
SDLPoP-1.20-dupl-symbols.patch | 48 ++++++++++++++++++++++++++++++++++++++++++
SDLPoP.spec | 13 ++++++++----
2 files changed, 57 insertions(+), 4 deletions(-)
---
diff --git a/SDLPoP-1.20-dupl-symbols.patch b/SDLPoP-1.20-dupl-symbols.patch
new file mode 100644
index 0000000..4f82793
--- /dev/null
+++ b/SDLPoP-1.20-dupl-symbols.patch
@@ -0,0 +1,48 @@
+From cc90c7d77f7d5ed2db01366b55983c66ec119c01 Mon Sep 17 00:00:00 2001
+From: Stefan Schmidt <thrimbor.github(a)gmail.com>
+Date: Sun, 10 May 2020 06:33:19 +0200
+Subject: [PATCH] Fix duplicate symbol errors when building with "-fno-common"
+
+---
+ src/menu.c | 1 -
+ src/seg001.c | 2 --
+ src/seg009.c | 1 -
+ 3 files changed, 4 deletions(-)
+
+diff --git a/src/menu.c b/src/menu.c
+index 9355d01..9ebc1eb 100644
+--- a/src/menu.c
++++ b/src/menu.c
+@@ -117,7 +117,6 @@ int active_settings_subsection = 0;
+ int highlighted_settings_subsection = 0;
+ int scroll_position = 0;
+ int menu_control_y;
+-int menu_control_scroll_y;
+ int menu_control_x;
+ int menu_control_back;
+
+diff --git a/src/seg001.c b/src/seg001.c
+index 33dca45..c07214b 100644
+--- a/src/seg001.c
++++ b/src/seg001.c
+@@ -47,8 +47,6 @@ SDL_COMPILE_TIME_ASSERT(hof_size, sizeof(hof_type) == 29);
+ #pragma pack(pop)
+
+ #define MAX_HOF_COUNT 6
+-// data:405E
+-short hof_count;
+ // data:589A
+ hof_type hof[MAX_HOF_COUNT];
+
+diff --git a/src/seg009.c b/src/seg009.c
+index 7d4a9e6..8961445 100644
+--- a/src/seg009.c
++++ b/src/seg009.c
+@@ -1943,7 +1943,6 @@ void init_digi() {
+
+ const int sound_channel = 0;
+ const int max_sound_id = 58;
+-char** sound_names = NULL;
+
+ void load_sound_names() {
+ const char* names_path = locate_file("data/music/names.txt");
diff --git a/SDLPoP.spec b/SDLPoP.spec
index faf7f39..8274b49 100644
--- a/SDLPoP.spec
+++ b/SDLPoP.spec
@@ -1,8 +1,6 @@
-%define _legacy_common_support 1
-
Name: SDLPoP
Version: 1.20
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: An open-source port of Prince of Persia
License: GPLv3+
@@ -10,6 +8,9 @@ URL:
https://github.com/NagyD/SDLPoP
Source0:
https://github.com/NagyD/%{name}/archive/v%{version}/%{name}-%{version}.t...
Source1: prince.sh
Source2: prince.appdata.xml
+# Fix duplicate symbol errors when building with "-fno-common"
+#
https://github.com/NagyD/SDLPoP/pull/203
+Patch0: %{name}-1.20-dupl-symbols.patch
BuildRequires: gcc
BuildRequires: SDL2-devel
@@ -25,7 +26,7 @@ of the DOS version.
%prep
-%autosetup
+%autosetup -p1
%build
@@ -81,6 +82,10 @@ appstream-util validate-relax --nonet
%{buildroot}%{_metainfodir}/prince.appdata
%changelog
+* Sun May 17 2020 Andrea Musuruane <musuruan(a)gmail.com> - 1.20-3
+- Added an upstream patch to properly fix duplicate symbol errors when
+ building with -fno-common
+
* Sat May 16 2020 Andrea Musuruane <musuruan(a)gmail.com> - 1.20-2
- Fixed FTBFS for F32+