commit 620f23572eda8764f63782b0af809e9b92737323
Author: Michal Schorm <mschorm(a)redhat.com>
Date: Mon Jun 28 23:41:17 2021 +0200
Rework of the %prep phase to be able to patch both EmptyEpsilon and SeriousProton
projects easily
- The SeriousProton project directory is now placed under the EmptyEpsilon project
directory
- Move the JSON11 patched logic to the SeriousProton project
- Cherry-pick an upstream commit to fix loading of CMake modules in the SeriousProton
project
EmptyEpsilon.spec | 29 +++++++++++++++++++------
json.patch | 14 ------------
json_SeriousProton.patch => json_debundle.patch | 2 +-
upstream_SP_002_d52a1b1b61.patch | 25 +++++++++++++++++++++
4 files changed, 48 insertions(+), 22 deletions(-)
---
diff --git a/EmptyEpsilon.spec b/EmptyEpsilon.spec
index 6658c82..5c4f013 100644
--- a/EmptyEpsilon.spec
+++ b/EmptyEpsilon.spec
@@ -30,10 +30,21 @@ Source1:
https://github.com/daid/SeriousProton/archive/EE-%{version}.zip#
# which is licensed under LGPL-3.0 License
Source2: Findjson11.cmake
-Source3: json_SeriousProton.patch
+
+# EmptyEpsilon downstream patches:
Patch1: glm_debundle.patch
-Patch2: json.patch
+
+# SeriousProton downstream patches:
+Patch20: json_debundle.patch
+
+# EmptyEpsilon upstream patches:
+#Patch40:
+
+# SeriousProton upstream patches:
+Patch60: upstream_SP_002_d52a1b1b61.patch
+
+
Recommends: xclip
@@ -50,21 +61,25 @@ information and follow orders.
Note: Network play require port 35666 UDP and TCP allowed in firewall.
%prep
-%autosetup -b 1 -n EmptyEpsilon-EE-%{version}
+%setup -q -a 1 -n EmptyEpsilon-EE-%{version}
-# Patch SeriousProton, instead of the EmptyEpsilon
-patch ../SeriousProton-EE-%{version}/CMakeLists.txt %{SOURCE3}
+%patch1 -p1
+%patch20 -p1 -d SeriousProton-EE-%{version}
+%patch60 -p1 -d SeriousProton-EE-%{version}
# Copy CMake module for finding "json11" to the project
-cp %{SOURCE2} cmake/
+cp %{SOURCE2} SeriousProton-EE-%{version}/cmake/
%build
%cmake3 \
- -DSERIOUS_PROTON_DIR=%{_builddir}/SeriousProton-EE-%{version}/ \
+ -DSERIOUS_PROTON_DIR=SeriousProton-EE-%{version}/ \
-DCPACK_PACKAGE_VERSION_MAJOR=%{version_major} \
-DCPACK_PACKAGE_VERSION_MINOR=%{version_minor} \
-DCPACK_PACKAGE_VERSION_PATCH=%{version_patch} \
-DCONFIG_DIR=%{_sysconfdir}/emptyepsilon/
+
+
+
%cmake3_build
%install
diff --git a/json_SeriousProton.patch b/json_debundle.patch
similarity index 93%
rename from json_SeriousProton.patch
rename to json_debundle.patch
index 742c1a4..a33366f 100644
--- a/json_SeriousProton.patch
+++ b/json_debundle.patch
@@ -8,7 +8,7 @@ Prevent the project to use the bundled sources; use system version
instead
if(SERIOUSPROTON_WITH_JSON)
- add_subdirectory(src/json11)
-+# add_subdirectory(src/json11)
++ find_package(json11 REQUIRED)
endif()
#---------------------------------File lists-----------------------------------
diff --git a/upstream_SP_002_d52a1b1b61.patch b/upstream_SP_002_d52a1b1b61.patch
new file mode 100644
index 0000000..b02a1ef
--- /dev/null
+++ b/upstream_SP_002_d52a1b1b61.patch
@@ -0,0 +1,25 @@
+From d52a1b1b61f6f7d248d154b49f005c850c1548a1 Mon Sep 17 00:00:00 2001
+From: FaramosCZ <mschorm(a)centrum.cz>
+Date: Mon, 28 Jun 2021 08:22:42 +0200
+Subject: [PATCH] Fix the path to the CMake modules (#130)
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 657808d..22244ec 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
+ project(SeriousProton LANGUAGES CXX)
+
+ set(CMAKE_MODULE_PATH
+- ${CMAKE_SOURCE_DIR}/cmake/
++ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/
+ ${CMAKE_MODULE_PATH}
+ )
+
+--
+libgit2 1.0.1
+