commit be4bc7b8cf268f255fe8b8f031dce46ec7fcc082
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Fri Aug 4 14:15:18 2023 +0100
Fix gcc compile issue and deps problem
EmptyEpsilon.spec | 35 ++++++++++++++++++-----------------
gcc12.patch | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 57 insertions(+), 17 deletions(-)
---
diff --git a/EmptyEpsilon.spec b/EmptyEpsilon.spec
index b61c417..a265d9f 100644
--- a/EmptyEpsilon.spec
+++ b/EmptyEpsilon.spec
@@ -8,14 +8,14 @@ Version: %{version_major}.%{version_minor}.%{version_patch}
Release: 5%{?dist}
License: GPLv2
-BuildRequires: cmake3
+BuildRequires: cmake
+BuildRequires: dos2unix
BuildRequires: gcc-c++
BuildRequires: SFML-devel >= 2.5.1
BuildRequires: mesa-libGLU-devel >= 9.0.0
BuildRequires: desktop-file-utils
# The following version of "glm-devel" is not currently available for Fedora 33
and older
BuildRequires: glm-devel >= 0.9.9.8
-BuildRequires: json11-devel
ExcludeArch: ppc64 ppc64le
@@ -26,7 +26,7 @@ Source1:
https://github.com/daid/SeriousProton/archive/EE-%{version}.zip#
# EmptyEpsilon downstream patches:
-#Patch1:
+Patch1: gcc12.patch
# SeriousProton downstream patches:
#Patch20:
@@ -61,34 +61,36 @@ Note: Network play require port 35666 UDP and TCP allowed in
firewall.
%prep
%setup -q -a 1 -n EmptyEpsilon-EE-%{version}
+dos2unix SeriousProton-EE-2021.06.23/src/httpServer.cpp \
+ SeriousProton-EE-2021.06.23/src/scriptInterfaceMagic.cpp
-%patch40 -p1
-%patch41 -p1
-%patch42 -p1
-%patch43 -p1
-%patch60 -p1 -d SeriousProton-EE-%{version}
-%patch61 -p1 -d SeriousProton-EE-%{version}
-%patch62 -p1 -d SeriousProton-EE-%{version}
-%patch63 -p1 -d SeriousProton-EE-%{version}
-%patch64 -p1 -d SeriousProton-EE-%{version}
+%patch 1 -p1
+%patch 40 -p1
+%patch 41 -p1
+%patch 42 -p1
+%patch 43 -p1
+%patch 60 -p1 -d SeriousProton-EE-%{version}
+%patch 61 -p1 -d SeriousProton-EE-%{version}
+%patch 62 -p1 -d SeriousProton-EE-%{version}
+%patch 63 -p1 -d SeriousProton-EE-%{version}
+%patch 64 -p1 -d SeriousProton-EE-%{version}
%build
-%cmake3 \
+%cmake \
-DSERIOUS_PROTON_DIR=SeriousProton-EE-%{version}/ \
-DCPACK_PACKAGE_VERSION_MAJOR=%{version_major} \
-DCPACK_PACKAGE_VERSION_MINOR=%{version_minor} \
-DCPACK_PACKAGE_VERSION_PATCH=%{version_patch} \
- -DWITH_JSON="system" \
-DWITH_GLM="system" \
-DCONFIG_DIR=%{_sysconfdir}/emptyepsilon/
-%cmake3_build
+%cmake_build
%install
-%cmake3_install
+%cmake_install
# icon to pixmaps
mkdir -p %{buildroot}%{_datadir}/pixmaps
@@ -184,4 +186,3 @@ desktop-file-validate
%{buildroot}%{_datadir}/applications/%{name}.desktop
* Wed Feb 15 2017 Jan Kalina <jkalina(a)redhat.com> - 2017.01.19-3
- New package built, applied fixes from fedora review
-
diff --git a/gcc12.patch b/gcc12.patch
new file mode 100644
index 0000000..11660c2
--- /dev/null
+++ b/gcc12.patch
@@ -0,0 +1,39 @@
+--- a/SeriousProton-EE-2021.06.23/src/httpServer.cpp
++++ b/SeriousProton-EE-2021.06.23/src/httpServer.cpp
+@@ -1,5 +1,6 @@
+ #include <string.h>
+ #include <stdio.h>
++#include <cstdint>
+
+ #include "httpServer.h"
+ #include "logging.h"
+
+--- a/SeriousProton-EE-2021.06.23/src/multiplayer.h
++++ b/SeriousProton-EE-2021.06.23/src/multiplayer.h
+@@ -4,6 +4,7 @@
+ #include <SFML/Network.hpp>
+ #include <SFML/Graphics/Color.hpp>
+ #include <stdint.h>
++#include <cstdint>
+ #include "Updatable.h"
+ #include "stringImproved.h"
+
+--- a/SeriousProton-EE-2021.06.23/src/scriptInterfaceMagic.cpp
++++ b/SeriousProton-EE-2021.06.23/src/scriptInterfaceMagic.cpp
+@@ -1,4 +1,5 @@
+ #include "scriptInterfaceMagic.h"
++#include <cstdint>
+
+ ScriptClassInfo* scriptClassInfoList;
+
+
+--- a/SeriousProton-EE-2021.06.23/src/fixedSocket.h
++++ b/SeriousProton-EE-2021.06.23/src/fixedSocket.h
+@@ -3,6 +3,7 @@
+
+ #include <SFML/Network.hpp>
+ #include <list>
++#include <cstdint>
+
+ //The sf::TcpSocket has some problems with sending partial packets when the the OS
buffers are full.
+ //The TcpSocket of SeriousProton solves this by storing the partial packet in a buffer,
and storing all other packets after that as well.