commit 58a36fd73fb9e0de2cc66b4a11ae04350e5df915
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Thu Aug 3 17:46:31 2023 +0100
Revert "Rebase to version 2022.10.28"
This reverts commit 09e3f5991cba63619d7ca93d3aa0787bd764857e.
EmptyEpsilon.spec | 47 +++--
gcc12.patch | 26 ---
sources | 4 +-
upstream_EE_001_69d93e6acd.patch | 45 +++++
upstream_EE_002_872ef2667c.patch | 25 +++
upstream_EE_003_ee0cd42bfe.patch | 27 +++
upstream_EE_004_530fe32f95.patch | 387 +++++++++++++++++++++++++++++++++++++++
upstream_SP_001_32509f2db9.patch | 59 ++++++
upstream_SP_002_d52a1b1b61.patch | 25 +++
upstream_SP_003_ec30d87c22.patch | 88 +++++++++
upstream_SP_004_adbba45fd9.patch | 131 +++++++++++++
upstream_SP_005_0d1ac45b73.patch | 44 +++++
12 files changed, 865 insertions(+), 43 deletions(-)
---
diff --git a/EmptyEpsilon.spec b/EmptyEpsilon.spec
index 099cc18..b61c417 100644
--- a/EmptyEpsilon.spec
+++ b/EmptyEpsilon.spec
@@ -1,20 +1,21 @@
-%global version_major 2022
-%global version_minor 10
-%global version_patch 28
+%global version_major 2021
+%global version_minor 06
+%global version_patch 23
Name: EmptyEpsilon
Summary: Spaceship bridge simulator game
Version: %{version_major}.%{version_minor}.%{version_patch}
-Release: 1%{?dist}
-License: GPL-2.0-only
+Release: 5%{?dist}
+License: GPLv2
-BuildRequires: cmake
+BuildRequires: cmake3
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
@@ -25,13 +26,23 @@ Source1:
https://github.com/daid/SeriousProton/archive/EE-%{version}.zip#
# EmptyEpsilon downstream patches:
-Patch0: gcc12.patch
+#Patch1:
# SeriousProton downstream patches:
+#Patch20:
# EmptyEpsilon upstream patches:
+Patch40: upstream_EE_001_69d93e6acd.patch
+Patch41: upstream_EE_002_872ef2667c.patch
+Patch42: upstream_EE_003_ee0cd42bfe.patch
+Patch43: upstream_EE_004_530fe32f95.patch
# SeriousProton upstream patches:
+Patch60: upstream_SP_001_32509f2db9.patch
+Patch61: upstream_SP_002_d52a1b1b61.patch
+Patch62: upstream_SP_003_ec30d87c22.patch
+Patch63: upstream_SP_004_adbba45fd9.patch
+Patch64: upstream_SP_005_0d1ac45b73.patch
Recommends: xclip
@@ -50,24 +61,34 @@ Note: Network play require port 35666 UDP and TCP allowed in
firewall.
%prep
%setup -q -a 1 -n EmptyEpsilon-EE-%{version}
-%patch -P0 -p1
+
+%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}
%build
-%cmake \
+%cmake3 \
-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/
-%cmake_build
+%cmake3_build
%install
-%cmake_install
+%cmake3_install
# icon to pixmaps
mkdir -p %{buildroot}%{_datadir}/pixmaps
@@ -93,14 +114,10 @@ desktop-file-validate
%{buildroot}%{_datadir}/applications/%{name}.desktop
%license LICENSE
%{_bindir}/EmptyEpsilon
%{_datadir}/emptyepsilon
-%{_datadir}/icons/hicolor/1024x1024/
%{_datadir}/pixmaps/EmptyEpsilon.png
%{_datadir}/applications/%{name}.desktop
%changelog
-* Thu Aug 03 2023 Leigh Scott <leigh123linux(a)gmail.com> - 2022.10.28-1
-- Rebase to version 2022.10.28
-
* Thu Aug 03 2023 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
2021.06.23-5
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
diff --git a/sources b/sources
index 621ea1e..c543d6a 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (EmptyEpsilon-EE-2022.10.28.zip) =
e2fd190dc6f35bec679463e6dd1ca64ff203bb96db1c3f39248d8e89e2d5d9802db0e8f41960ee9d732959c769f698847ea929293859eb0f4f728bedd1ff7b15
-SHA512 (SeriousProton-EE-2022.10.28.zip) =
3eb2ac21e89d41efe7bb2ca13860db6c68729254e8612ab8a7ed22020f58aef2b809737d60a596a5ab2136e38f3c28d907041a806e9a4a2a6948df6260a0c803
+SHA512 (EmptyEpsilon-EE-2021.06.23.zip) =
40efed8eb7433323e1d554f66e5ec1a75c4dab23e42664a46e4758dfcb518f51f1d28e1ff76117b319f963bfc2d810d06bbd25d4c0d1f652adf4990332cd43ce
+SHA512 (SeriousProton-EE-2021.06.23.zip) =
63a7fa7022f58fb1b87de509bd4ab122cd17ce3360d1ff48d50c0a7ad1fa55f1a18c512c3e0910a56ff814540983d62edf44b1a45b4a0054e0a01ce81aa4bea2
diff --git a/upstream_EE_001_69d93e6acd.patch b/upstream_EE_001_69d93e6acd.patch
new file mode 100644
index 0000000..1036fb7
--- /dev/null
+++ b/upstream_EE_001_69d93e6acd.patch
@@ -0,0 +1,45 @@
+From 69d93e6acdae3259755924f9d35e7e5ae949d377 Mon Sep 17 00:00:00 2001
+From: Daid <daid303(a)gmail.com>
+Date: Fri, 25 Jun 2021 11:15:48 +0200
+Subject: [PATCH] GLM library is moved to seriousproton
+
+---
+ CMakeLists.txt | 15 +--------------
+ 1 file changed, 1 insertion(+), 14 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f65642f..119a94b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -105,19 +105,6 @@ if(WITH_DISCORD)
+ target_link_libraries(discord INTERFACE discord_h)
+ endif()
+
+-# GLM
+-set(GLM_BASE_PATH "${EXTERNALS_DIR}")
+-
+-if(NOT EXISTS "${GLM_BASE_PATH}/glm/CMakeLists.txt")
+- set(GLM_ZIP "${DOWNLOADS_DIR}/glm.zip")
+- file(DOWNLOAD
"https://github.com/g-truc/glm/releases/download/0.9.9.8/glm-0.9.9.8.zip"
"${GLM_ZIP}" TIMEOUT 60 TLS_VERIFY ON)
+-
+- file(MAKE_DIRECTORY "${GLM_BASE_PATH}/glm")
+- execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xf "${GLM_ZIP}"
WORKING_DIRECTORY "${GLM_BASE_PATH}")
+-endif()
+-
+-add_subdirectory("${GLM_BASE_PATH}/glm" "${PROJECT_BINARY_DIR}/glm"
EXCLUDE_FROM_ALL)
+-
+ set(SOURCES
+ src/main.cpp
+ src/threatLevelEstimate.cpp
+@@ -347,7 +334,7 @@ target_link_libraries(opengl
+
+ target_link_libraries(${PROJECT_NAME}
+ PUBLIC
+- seriousproton glm::glm opengl
++ seriousproton opengl
+ "$<$<BOOL:${ANDROID}>:log;android>"
+ "$<$<BOOL:${WIN32}>:iphlpapi>"
+ "$<$<BOOL:${WITH_DISCORD}>:discord_h>"
+--
+libgit2 1.0.1
+
diff --git a/upstream_EE_002_872ef2667c.patch b/upstream_EE_002_872ef2667c.patch
new file mode 100644
index 0000000..b9b1c62
--- /dev/null
+++ b/upstream_EE_002_872ef2667c.patch
@@ -0,0 +1,25 @@
+From 872ef2667c0e4a3afab1dfe7e977b8dbd539aebd Mon Sep 17 00:00:00 2001
+From: Michal Schorm <mschorm(a)redhat.com>
+Date: Sun, 27 Jun 2021 23:45:45 +0200
+Subject: [PATCH] Remove a forgotten left over from the move of CMake MinGW Crash Logger
code to SeriousProton project
+
+---
+ CMakeLists.txt | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 119a94b..63770de 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -61,8 +61,6 @@ endif()
+ set(SERIOUSPROTON_WITH_JSON ON CACHE BOOL "" FORCE)
+ add_subdirectory("${SERIOUS_PROTON_DIR}"
"${PROJECT_BINARY_DIR}/SeriousProton" EXCLUDE_FROM_ALL)
+
+-message(STATUS "Crash Logger is: ${ENABLE_CRASH_LOGGER}")
+-
+ set(EXTERNALS_DIR "${PROJECT_BINARY_DIR}/externals")
+ set(DOWNLOADS_DIR "${PROJECT_BINARY_DIR}/downloads")
+ file(MAKE_DIRECTORY "${EXTERNAL_DIR}" "${DOWNLOADS_DIR}")
+--
+libgit2 1.0.1
+
diff --git a/upstream_EE_003_ee0cd42bfe.patch b/upstream_EE_003_ee0cd42bfe.patch
new file mode 100644
index 0000000..9c25404
--- /dev/null
+++ b/upstream_EE_003_ee0cd42bfe.patch
@@ -0,0 +1,27 @@
+From ee0cd42bfe5fd20b8339e8e02eb7f69766168d57 Mon Sep 17 00:00:00 2001
+From: Michal Schorm <mschorm(a)redhat.com>
+Date: Mon, 28 Jun 2021 00:44:33 +0200
+Subject: [PATCH] CMake: Explicitly set OpenGL version to LEGACY to deal with the CMake
policy CMP0072
+
+---
+ CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 63770de..1465001 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -51,8 +51,9 @@ message(STATUS "EmptyEpsilon Version = ${PROJECT_VERSION}")
+
+ # Dependencies
+
+-# Setup OpenGl
++# Setup OpenGL
+ if(NOT ANDROID)
++ set(OpenGL_GL_PREFERENCE LEGACY)
+ find_package(OpenGL REQUIRED)
+ endif()
+
+--
+libgit2 1.0.1
+
diff --git a/upstream_EE_004_530fe32f95.patch b/upstream_EE_004_530fe32f95.patch
new file mode 100644
index 0000000..c6c2551
--- /dev/null
+++ b/upstream_EE_004_530fe32f95.patch
@@ -0,0 +1,387 @@
+From 530fe32f95ae7c40fedb1b55420a784d8f73d232 Mon Sep 17 00:00:00 2001
+From: Michal Schorm <mschorm(a)redhat.com>
+Date: Mon, 28 Jun 2021 02:01:28 +0200
+Subject: [PATCH] Remove FindSFML.cmake form the EmptyEpsilon project
+
+- An updated version of this file is present in the SeriousProton project
+ - This file is not called in the EmptyEpsilon project, but the one from SeriousProton
project is called in it
+---
+ cmake/FindSFML.cmake | 366
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ 1 file changed, 366 deletions(-)
+ delete mode 100644 cmake/FindSFML.cmake
+
+diff --git a/cmake/FindSFML.cmake b/cmake/FindSFML.cmake
+deleted file mode 100644
+index 600c1ef..0000000
+--- a/cmake/FindSFML.cmake
++++ a/cmake/FindSFML.cmake
+@@ -1,366 +0,0 @@
+-# This script locates the SFML library
+-# ------------------------------------
+-#
+-# Usage
+-# -----
+-#
+-# When you try to locate the SFML libraries, you must specify which modules you want to
use (system, window, graphics, network, audio, main).
+-# If none is given, the SFML_LIBRARIES variable will be empty and you'll end up
linking to nothing.
+-# example:
+-# find_package(SFML COMPONENTS graphics window system) // find the graphics, window
and system modules
+-#
+-# You can enforce a specific version, either MAJOR.MINOR or only MAJOR.
+-# If nothing is specified, the version won't be checked (i.e. any version will be
accepted).
+-# example:
+-# find_package(SFML COMPONENTS ...) // no specific version required
+-# find_package(SFML 2 COMPONENTS ...) // any 2.x version
+-# find_package(SFML 2.4 COMPONENTS ...) // version 2.4 or greater
+-#
+-# By default, the dynamic libraries of SFML will be found. To find the static ones
instead,
+-# you must set the SFML_STATIC_LIBRARIES variable to TRUE before calling
find_package(SFML ...).
+-# Since you have to link yourself all the SFML dependencies when you link it statically,
the following
+-# additional variables are defined: SFML_XXX_DEPENDENCIES and SFML_DEPENDENCIES (see
their detailed
+-# description below).
+-# In case of static linking, the SFML_STATIC macro will also be defined by this script.
+-# example:
+-# set(SFML_STATIC_LIBRARIES TRUE)
+-# find_package(SFML 2 COMPONENTS network system)
+-#
+-# On Mac OS X if SFML_STATIC_LIBRARIES is not set to TRUE then by default CMake will
search for frameworks unless
+-# CMAKE_FIND_FRAMEWORK is set to "NEVER" for example. Please refer to CMake
documentation for more details.
+-# Moreover, keep in mind that SFML frameworks are only available as release libraries
unlike dylibs which
+-# are available for both release and debug modes.
+-#
+-# If SFML is not installed in a standard path, you can use the SFML_ROOT CMake (or
environment) variable
+-# to tell CMake where SFML is.
+-#
+-# Output
+-# ------
+-#
+-# This script defines the following variables:
+-# - For each specified module XXX (system, window, graphics, network, audio, main):
+-# - SFML_XXX_LIBRARY_DEBUG: the name of the debug library of the xxx module (set to
SFML_XXX_LIBRARY_RELEASE is no debug version is found)
+-# - SFML_XXX_LIBRARY_RELEASE: the name of the release library of the xxx module (set
to SFML_XXX_LIBRARY_DEBUG is no release version is found)
+-# - SFML_XXX_LIBRARY: the name of the library to link to for the xxx module
(includes both debug and optimized names if necessary)
+-# - SFML_XXX_FOUND: true if either the debug or release library of the xxx
module is found
+-# - SFML_XXX_DEPENDENCIES: the list of libraries the module depends on, in case of
static linking
+-# - SFML_LIBRARIES: the list of all libraries corresponding to the required modules
+-# - SFML_FOUND: true if all the required modules are found
+-# - SFML_INCLUDE_DIR: the path where SFML headers are located (the directory containing
the SFML/Config.hpp file)
+-# - SFML_DEPENDENCIES: the list of libraries SFML depends on, in case of static linking
+-#
+-# example:
+-# find_package(SFML 2 COMPONENTS system window graphics audio REQUIRED)
+-# include_directories(${SFML_INCLUDE_DIR})
+-# add_executable(myapp ...)
+-# target_link_libraries(myapp ${SFML_LIBRARIES})
+-
+-# define the SFML_STATIC macro if static build was chosen
+-if(SFML_STATIC_LIBRARIES)
+- add_definitions(-DSFML_STATIC)
+-endif()
+-
+-# define the list of search paths for headers and libraries
+-set(FIND_SFML_PATHS
+- ${SFML_ROOT}
+- $ENV{SFML_ROOT}
+- ~/Library/Frameworks
+- /Library/Frameworks
+- /usr/local
+- /usr
+- /sw
+- /opt/local
+- /opt/csw
+- /opt)
+-
+-# find the SFML include directory
+-find_path(SFML_INCLUDE_DIR SFML/Config.hpp
+- PATH_SUFFIXES include
+- PATHS ${FIND_SFML_PATHS})
+-
+-# check the version number
+-set(SFML_VERSION_OK TRUE)
+-if(SFML_FIND_VERSION AND SFML_INCLUDE_DIR)
+- # extract the major and minor version numbers from SFML/Config.hpp
+- # we have to handle framework a little bit differently:
+- if("${SFML_INCLUDE_DIR}" MATCHES "SFML.framework")
+- set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/Headers/Config.hpp")
+- else()
+- set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/SFML/Config.hpp")
+- endif()
+- FILE(READ "${SFML_CONFIG_HPP_INPUT}" SFML_CONFIG_HPP_CONTENTS)
+- STRING(REGEX MATCH ".*#define SFML_VERSION_MAJOR ([0-9]+).*#define
SFML_VERSION_MINOR ([0-9]+).*#define SFML_VERSION_PATCH ([0-9]+).*"
SFML_CONFIG_HPP_CONTENTS "${SFML_CONFIG_HPP_CONTENTS}")
+- STRING(REGEX REPLACE ".*#define SFML_VERSION_MAJOR ([0-9]+).*"
"\\1" SFML_VERSION_MAJOR "${SFML_CONFIG_HPP_CONTENTS}")
+- STRING(REGEX REPLACE ".*#define SFML_VERSION_MINOR ([0-9]+).*"
"\\1" SFML_VERSION_MINOR "${SFML_CONFIG_HPP_CONTENTS}")
+- STRING(REGEX REPLACE ".*#define SFML_VERSION_PATCH ([0-9]+).*"
"\\1" SFML_VERSION_PATCH "${SFML_CONFIG_HPP_CONTENTS}")
+- math(EXPR SFML_REQUESTED_VERSION "${SFML_FIND_VERSION_MAJOR} * 10000 +
${SFML_FIND_VERSION_MINOR} * 100 + ${SFML_FIND_VERSION_PATCH}")
+-
+- # if we could extract them, compare with the requested version number
+- if (SFML_VERSION_MAJOR)
+- # transform version numbers to an integer
+- math(EXPR SFML_VERSION "${SFML_VERSION_MAJOR} * 10000 +
${SFML_VERSION_MINOR} * 100 + ${SFML_VERSION_PATCH}")
+-
+- # compare them
+- if(SFML_VERSION LESS SFML_REQUESTED_VERSION)
+- set(SFML_VERSION_OK FALSE)
+- endif()
+- else()
+- # SFML version is < 2.0
+- if (SFML_REQUESTED_VERSION GREATER 10900)
+- set(SFML_VERSION_OK FALSE)
+- set(SFML_VERSION_MAJOR 1)
+- set(SFML_VERSION_MINOR x)
+- set(SFML_VERSION_PATCH x)
+- endif()
+- endif()
+-endif()
+-
+-# find the requested modules
+-set(SFML_FOUND TRUE) # will be set to false if one of the required modules is not found
+-foreach(FIND_SFML_COMPONENT ${SFML_FIND_COMPONENTS})
+- string(TOLOWER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_LOWER)
+- string(TOUPPER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_UPPER)
+- set(FIND_SFML_COMPONENT_NAME sfml-${FIND_SFML_COMPONENT_LOWER})
+-
+- # no suffix for sfml-main, it is always a static library
+- if(FIND_SFML_COMPONENT_LOWER STREQUAL "main")
+- # release library
+- find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE
+- NAMES ${FIND_SFML_COMPONENT_NAME}
+- PATH_SUFFIXES lib64 lib lib/${CMAKE_LIBRARY_ARCHITECTURE}
+- PATHS ${FIND_SFML_PATHS})
+-
+- # debug library
+- find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG
+- NAMES ${FIND_SFML_COMPONENT_NAME}-d
+- PATH_SUFFIXES lib64 lib
+- PATHS ${FIND_SFML_PATHS})
+- else()
+- # static release library
+- find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_RELEASE
+- NAMES ${FIND_SFML_COMPONENT_NAME}-s
+- PATH_SUFFIXES lib64 lib lib/${CMAKE_LIBRARY_ARCHITECTURE}
+- PATHS ${FIND_SFML_PATHS})
+-
+- # static debug library
+- find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_DEBUG
+- NAMES ${FIND_SFML_COMPONENT_NAME}-s-d
+- PATH_SUFFIXES lib64 lib lib/${CMAKE_LIBRARY_ARCHITECTURE}
+- PATHS ${FIND_SFML_PATHS})
+-
+- # dynamic release library
+- find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_RELEASE
+- NAMES ${FIND_SFML_COMPONENT_NAME}
+- PATH_SUFFIXES lib64 lib lib/${CMAKE_LIBRARY_ARCHITECTURE}
+- PATHS ${FIND_SFML_PATHS})
+-
+- # dynamic debug library
+- find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_DEBUG
+- NAMES ${FIND_SFML_COMPONENT_NAME}-d
+- PATH_SUFFIXES lib64 lib lib/${CMAKE_LIBRARY_ARCHITECTURE}
+- PATHS ${FIND_SFML_PATHS})
+-
+- # choose the entries that fit the requested link type
+- if(SFML_STATIC_LIBRARIES)
+- if(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_RELEASE)
+- set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE
${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_RELEASE})
+- endif()
+- if(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_DEBUG)
+- set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG
${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_DEBUG})
+- endif()
+- else()
+- if(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_RELEASE)
+- set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE
${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_RELEASE})
+- endif()
+- if(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_DEBUG)
+- set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG
${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_DEBUG})
+- endif()
+- endif()
+- endif()
+-
+- if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG OR
SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE)
+- # library found
+- set(SFML_${FIND_SFML_COMPONENT_UPPER}_FOUND TRUE)
+-
+- # if both are found, set SFML_XXX_LIBRARY to contain both
+- if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG AND
SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE)
+- set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY debug
${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG}
+- optimized
${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE})
+- endif()
+-
+- # if only one debug/release variant is found, set the other to be equal to the
found one
+- if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG AND NOT
SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE)
+- # debug and not release
+- set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE
${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG})
+- set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY
${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG})
+- endif()
+- if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE AND NOT
SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG)
+- # release and not debug
+- set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG
${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE})
+- set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY
${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE})
+- endif()
+- else()
+- # library not found
+- set(SFML_FOUND FALSE)
+- set(SFML_${FIND_SFML_COMPONENT_UPPER}_FOUND FALSE)
+- set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY "")
+- set(FIND_SFML_MISSING "${FIND_SFML_MISSING}
SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY")
+- endif()
+-
+- # mark as advanced
+- MARK_AS_ADVANCED(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY
+- SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE
+- SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG
+- SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_RELEASE
+- SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_DEBUG
+- SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_RELEASE
+- SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_DEBUG)
+-
+- # add to the global list of libraries
+- set(SFML_LIBRARIES ${SFML_LIBRARIES}
"${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY}")
+-endforeach()
+-
+-# in case of static linking, we must also define the list of all the dependencies of
SFML libraries
+-if(SFML_STATIC_LIBRARIES)
+-
+- # detect the OS
+- if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+- set(FIND_SFML_OS_WINDOWS 1)
+- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+- set(FIND_SFML_OS_LINUX 1)
+- elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+- set(FIND_SFML_OS_FREEBSD 1)
+- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+- set(FIND_SFML_OS_MACOSX 1)
+- endif()
+-
+- # start with an empty list
+- set(SFML_DEPENDENCIES)
+- set(FIND_SFML_DEPENDENCIES_NOTFOUND)
+-
+- # macro that searches for a 3rd-party library
+- macro(find_sfml_dependency output friendlyname)
+- # No lookup in environment variables (PATH on Windows), as they may contain
wrong library versions
+- find_library(${output} NAMES ${ARGN} PATHS ${FIND_SFML_PATHS} PATH_SUFFIXES lib
NO_SYSTEM_ENVIRONMENT_PATH)
+- if(${${output}} STREQUAL "${output}-NOTFOUND")
+- unset(output)
+- set(FIND_SFML_DEPENDENCIES_NOTFOUND "${FIND_SFML_DEPENDENCIES_NOTFOUND}
${friendlyname}")
+- endif()
+- endmacro()
+-
+- # sfml-system
+- list(FIND SFML_FIND_COMPONENTS "system" FIND_SFML_SYSTEM_COMPONENT)
+- if(NOT ${FIND_SFML_SYSTEM_COMPONENT} EQUAL -1)
+-
+- # update the list -- these are only system libraries, no need to find them
+- if(FIND_SFML_OS_LINUX OR FIND_SFML_OS_FREEBSD OR FIND_SFML_OS_MACOSX)
+- set(SFML_SYSTEM_DEPENDENCIES "pthread")
+- endif()
+- if(FIND_SFML_OS_LINUX)
+- set(SFML_SYSTEM_DEPENDENCIES ${SFML_SYSTEM_DEPENDENCIES} "rt")
+- endif()
+- if(FIND_SFML_OS_WINDOWS)
+- set(SFML_SYSTEM_DEPENDENCIES "winmm")
+- endif()
+- set(SFML_DEPENDENCIES ${SFML_SYSTEM_DEPENDENCIES} ${SFML_DEPENDENCIES})
+- endif()
+-
+- # sfml-network
+- list(FIND SFML_FIND_COMPONENTS "network" FIND_SFML_NETWORK_COMPONENT)
+- if(NOT ${FIND_SFML_NETWORK_COMPONENT} EQUAL -1)
+-
+- # update the list -- these are only system libraries, no need to find them
+- if(FIND_SFML_OS_WINDOWS)
+- set(SFML_NETWORK_DEPENDENCIES "ws2_32")
+- endif()
+- set(SFML_DEPENDENCIES ${SFML_NETWORK_DEPENDENCIES} ${SFML_DEPENDENCIES})
+- endif()
+-
+- # sfml-window
+- list(FIND SFML_FIND_COMPONENTS "window" FIND_SFML_WINDOW_COMPONENT)
+- if(NOT ${FIND_SFML_WINDOW_COMPONENT} EQUAL -1)
+-
+- # find libraries
+- if(FIND_SFML_OS_LINUX OR FIND_SFML_OS_FREEBSD)
+- find_sfml_dependency(X11_LIBRARY "X11" X11)
+- find_sfml_dependency(LIBXCB_LIBRARIES "XCB" xcb libxcb)
+- find_sfml_dependency(X11_XCB_LIBRARY "X11-xcb" X11-xcb
libX11-xcb)
+- find_sfml_dependency(XCB_RANDR_LIBRARY "xcb-randr" xcb-randr
libxcb-randr)
+- find_sfml_dependency(XCB_IMAGE_LIBRARY "xcb-image" xcb-image
libxcb-image)
+- endif()
+-
+- if(FIND_SFML_OS_LINUX)
+- find_sfml_dependency(UDEV_LIBRARIES "UDev" udev libudev)
+- endif()
+-
+- # update the list
+- if(FIND_SFML_OS_WINDOWS)
+- set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES}
"opengl32" "winmm" "gdi32")
+- elseif(FIND_SFML_OS_LINUX)
+- set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "GL"
${X11_LIBRARY} ${LIBXCB_LIBRARIES} ${X11_XCB_LIBRARY} ${XCB_RANDR_LIBRARY}
${XCB_IMAGE_LIBRARY} ${UDEV_LIBRARIES})
+- elseif(FIND_SFML_OS_FREEBSD)
+- set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "GL"
${X11_LIBRARY} ${LIBXCB_LIBRARIES} ${X11_XCB_LIBRARY} ${XCB_RANDR_LIBRARY}
${XCB_IMAGE_LIBRARY} "usbhid")
+- elseif(FIND_SFML_OS_MACOSX)
+- set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "-framework
OpenGL -framework Foundation -framework AppKit -framework IOKit -framework Carbon")
+- endif()
+- set(SFML_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} ${SFML_DEPENDENCIES})
+- endif()
+-
+- # sfml-graphics
+- list(FIND SFML_FIND_COMPONENTS "graphics" FIND_SFML_GRAPHICS_COMPONENT)
+- if(NOT ${FIND_SFML_GRAPHICS_COMPONENT} EQUAL -1)
+-
+- # find libraries
+- find_sfml_dependency(FREETYPE_LIBRARY "FreeType" freetype)
+- find_sfml_dependency(JPEG_LIBRARY "libjpeg" jpeg)
+-
+- # update the list
+- set(SFML_GRAPHICS_DEPENDENCIES ${FREETYPE_LIBRARY} ${JPEG_LIBRARY})
+- set(SFML_DEPENDENCIES ${SFML_GRAPHICS_DEPENDENCIES} ${SFML_DEPENDENCIES})
+- endif()
+-
+- # sfml-audio
+- list(FIND SFML_FIND_COMPONENTS "audio" FIND_SFML_AUDIO_COMPONENT)
+- if(NOT ${FIND_SFML_AUDIO_COMPONENT} EQUAL -1)
+-
+- # find libraries
+- find_sfml_dependency(OPENAL_LIBRARY "OpenAL" openal openal32)
+- find_sfml_dependency(OGG_LIBRARY "Ogg" ogg)
+- find_sfml_dependency(VORBIS_LIBRARY "Vorbis" vorbis)
+- find_sfml_dependency(VORBISFILE_LIBRARY "VorbisFile" vorbisfile)
+- find_sfml_dependency(VORBISENC_LIBRARY "VorbisEnc" vorbisenc)
+- find_sfml_dependency(FLAC_LIBRARY "FLAC" flac)
+-
+- # update the list
+- set(SFML_AUDIO_DEPENDENCIES ${OPENAL_LIBRARY} ${FLAC_LIBRARY}
${VORBISENC_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY})
+- set(SFML_DEPENDENCIES ${SFML_DEPENDENCIES} ${SFML_AUDIO_DEPENDENCIES})
+- endif()
+-
+-endif()
+-
+-# handle errors
+-if(NOT SFML_VERSION_OK)
+- # SFML version not ok
+- set(FIND_SFML_ERROR "SFML found but version too low (requested:
${SFML_FIND_VERSION}, found:
${SFML_VERSION_MAJOR}.${SFML_VERSION_MINOR}.${SFML_VERSION_PATCH})")
+- set(SFML_FOUND FALSE)
+-elseif(SFML_STATIC_LIBRARIES AND FIND_SFML_DEPENDENCIES_NOTFOUND)
+- set(FIND_SFML_ERROR "SFML found but some of its dependencies are missing
(${FIND_SFML_DEPENDENCIES_NOTFOUND})")
+- set(SFML_FOUND FALSE)
+-elseif(NOT SFML_FOUND)
+- # include directory or library not found
+- set(FIND_SFML_ERROR "Could NOT find SFML (missing:
${FIND_SFML_MISSING})")
+-endif()
+-if (NOT SFML_FOUND)
+- if(SFML_FIND_REQUIRED)
+- # fatal error
+- message(FATAL_ERROR ${FIND_SFML_ERROR})
+- elseif(NOT SFML_FIND_QUIETLY)
+- # error but continue
+- message("${FIND_SFML_ERROR}")
+- endif()
+-endif()
+-
+-# handle success
+-if(SFML_FOUND AND NOT SFML_FIND_QUIETLY)
+- message(STATUS "Found SFML
${SFML_VERSION_MAJOR}.${SFML_VERSION_MINOR}.${SFML_VERSION_PATCH} in
${SFML_INCLUDE_DIR}")
+-endif()
+--
+libgit2 1.0.1
+
diff --git a/upstream_SP_001_32509f2db9.patch b/upstream_SP_001_32509f2db9.patch
new file mode 100644
index 0000000..723e78d
--- /dev/null
+++ b/upstream_SP_001_32509f2db9.patch
@@ -0,0 +1,59 @@
+From 32509f2db91a58b9528aeb1bb505e9426b52b825 Mon Sep 17 00:00:00 2001
+From: Daid <daid303(a)gmail.com>
+Date: Fri, 25 Jun 2021 11:15:30 +0200
+Subject: [PATCH] Add glm library to serious proton, fix android build
+
+---
+ CMakeLists.txt | 22 +++++++++++++++++++++-
+ src/io/network/tcpSocket.cpp | 2 ++
+ 2 files changed, 23 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 184f47d..82a4a87 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -17,6 +17,10 @@ endif()
+ # Preflight checks.
+ message(STATUS "Crash Logger is " ${ENABLE_CRASH_LOGGER})
+
++set(EXTERNALS_DIR "${PROJECT_BINARY_DIR}/externals")
++set(DOWNLOADS_DIR "${PROJECT_BINARY_DIR}/downloads")
++file(MAKE_DIRECTORY "${EXTERNAL_DIR}" "${DOWNLOADS_DIR}")
++
+ if(ENABLE_CRASH_LOGGER)
+ if(NOT DRMINGW_ROOT)
+ message("Downloading Dr. MinGW")
+@@ -81,6 +85,22 @@ if(NOT ${SFML_FOUND})
+ )
+ endif()
+
++
++find_package(glm QUIET)
++if(NOT ${glm_FOUND})
++ set(GLM_BASE_PATH "${EXTERNALS_DIR}")
++
++ if(NOT EXISTS "${GLM_BASE_PATH}/glm/CMakeLists.txt")
++ set(GLM_ZIP "${DOWNLOADS_DIR}/glm.zip")
++ file(DOWNLOAD
"https://github.com/g-truc/glm/releases/download/0.9.9.8/glm-0.9.9.8.zip"
"${GLM_ZIP}" TIMEOUT 60 TLS_VERIFY ON)
++
++ file(MAKE_DIRECTORY "${GLM_BASE_PATH}/glm")
++ execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xf "${GLM_ZIP}"
WORKING_DIRECTORY "${GLM_BASE_PATH}")
++ endif()
++
++ add_subdirectory("${GLM_BASE_PATH}/glm"
"${PROJECT_BINARY_DIR}/glm" EXCLUDE_FROM_ALL)
++endif()
++
+ add_subdirectory(src/Box2D)
+ add_subdirectory(src/lua)
+ add_subdirectory(src/GL)
+@@ -192,7 +192,7 @@ target_compile_options(seriousproton_dep
+
+ target_link_libraries(seriousproton_deps
+ INTERFACE
+- box2d lua glew ${SFML_LIBRARIES}
++ box2d lua glew ${SFML_LIBRARIES} glm::glm
+ "$<$<BOOL:${WIN32}>:wsock32>"
+ # LTO flag must be on the linker's list as well.
+
"$<$<AND:$<BOOL:${CMAKE_COMPILER_IS_GNUCC}>,$<OR:$<CONFIG:RelWithDebInfo>,$<CONFIG:Release>>>:-flto>"
+--
+libgit2 1.0.1
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
+
diff --git a/upstream_SP_003_ec30d87c22.patch b/upstream_SP_003_ec30d87c22.patch
new file mode 100644
index 0000000..d51f01a
--- /dev/null
+++ b/upstream_SP_003_ec30d87c22.patch
@@ -0,0 +1,88 @@
+From ec30d87c2254b64da6a7e6fc166264c02ec64632 Mon Sep 17 00:00:00 2001
+From: FaramosCZ <mschorm(a)centrum.cz>
+Date: Tue, 29 Jun 2021 09:17:08 +0200
+Subject: [PATCH] Enhance the CMake code for MinGW Crash Logger (#128)
+
+- Wrap the whole code as Windows-only
+ - Hide the status message on non-Windows builds
+ - Fix the status message output (the perivously used BOOL did not expaned to
"ON"/"OFF" strings)
+ - Mark download message mode to VERBOSE
+ - Enhance readibility of the DRMINGW_ARCH; the set() is called only once in all cases
+---
+ CMakeLists.txt | 52 ++++++++++++++++++++++++++++------------------------
+ 1 file changed, 28 insertions(+), 24 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 694b5ab..c905b50 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -9,38 +9,42 @@ set(CMAKE_MODULE_PATH
+ # User-settings
+ option(SERIOUSPROTON_WITH_JSON "Use json library." OFF)
+
++#
++set(EXTERNALS_DIR "${PROJECT_BINARY_DIR}/externals")
++set(DOWNLOADS_DIR "${PROJECT_BINARY_DIR}/downloads")
++file(MAKE_DIRECTORY "${EXTERNAL_DIR}" "${DOWNLOADS_DIR}")
++
++# Crash Logger for MinGW
+ if(WIN32)
+ option(ENABLE_CRASH_LOGGER "Enable the Dr. MinGW crash logging facilities"
OFF)
+ set(DRMINGW_ROOT DRMINGW_ROOT-NOTFOUND CACHE PATH "Path to Dr. MinGW")
+-endif()
+
+-# Preflight checks.
+-message(STATUS "Crash Logger is " ${ENABLE_CRASH_LOGGER})
++ if(NOT ENABLE_CRASH_LOGGER)
++ message(STATUS "Crash Logger is OFF")
++ else()
++ message(STATUS "Crash Logger is ON")
+
+-set(EXTERNALS_DIR "${PROJECT_BINARY_DIR}/externals")
+-set(DOWNLOADS_DIR "${PROJECT_BINARY_DIR}/downloads")
+-file(MAKE_DIRECTORY "${EXTERNAL_DIR}" "${DOWNLOADS_DIR}")
++ if(NOT DRMINGW_ROOT)
++ message(VERBOSE "Downloading Dr. MinGW")
+
+-if(ENABLE_CRASH_LOGGER)
+- if(NOT DRMINGW_ROOT)
+- message("Downloading Dr. MinGW")
++ if(${CMAKE_SIZEOF_VOID_P} EQUAL 4)
++ set(DRMINGW_ARCH "32")
++ else()
++ set(DRMINGW_ARCH "64")
++ endif()
+
+- set(DRMINGW_ARCH "64")
+- if(${CMAKE_SIZEOF_VOID_P} EQUAL 4)
+- set(DRMINGW_ARCH "32")
+- endif()
++ # 0.9.x seems to give a hard time to people on Win7.
++ # Sticking with 0.8 for that reason.
++ set(DRMINGW_VERSION "0.8.2")
++ set(DRMINGW_BASENAME
"drmingw-${DRMINGW_VERSION}-win${DRMINGW_ARCH}")
++ set(DRMINGW_ROOT "${CMAKE_CURRENT_BINARY_DIR}/${DRMINGW_BASENAME}"
CACHE PATH "Path to Dr. MinGW" FORCE)
++
++ if(NOT EXISTS "${DRMINGW_ROOT}/bin/exchndl.dll")
++ set(DRMINGW_ZIP
"${CMAKE_CURRENT_BINARY_DIR}/${DRMINGW_BASENAME}.7z")
+
+- # 0.9.x seems to give a hard time to people on Win7.
+- # Sticking with 0.8 for that reason.
+- set(DRMINGW_VERSION "0.8.2")
+- set(DRMINGW_BASENAME "drmingw-${DRMINGW_VERSION}-win${DRMINGW_ARCH}")
+- set(DRMINGW_ROOT "${CMAKE_CURRENT_BINARY_DIR}/${DRMINGW_BASENAME}"
CACHE PATH "Path to Dr. MinGW" FORCE)
+-
+- if(NOT EXISTS "${DRMINGW_ROOT}/bin/exchndl.dll")
+- set(DRMINGW_ZIP
"${CMAKE_CURRENT_BINARY_DIR}/${DRMINGW_BASENAME}.7z")
+-
+- file(DOWNLOAD
"https://github.com/jrfonseca/drmingw/releases/download/${DRMINGW_VERSION}/${DRMINGW_BASENAME}.7z"
"${DRMINGW_ZIP}" TIMEOUT 60 TLS_VERIFY ON)
+- execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xf
"${DRMINGW_ZIP}" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
++ file(DOWNLOAD
"https://github.com/jrfonseca/drmingw/releases/download/${DRMINGW_VERSION}/${DRMINGW_BASENAME}.7z"
"${DRMINGW_ZIP}" TIMEOUT 60 TLS_VERIFY ON)
++ execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xf
"${DRMINGW_ZIP}" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
++ endif()
+ endif()
+ endif()
+ endif()
+--
+libgit2 1.0.1
+
diff --git a/upstream_SP_004_adbba45fd9.patch b/upstream_SP_004_adbba45fd9.patch
new file mode 100644
index 0000000..4bfb8a1
--- /dev/null
+++ b/upstream_SP_004_adbba45fd9.patch
@@ -0,0 +1,131 @@
+From adbba45fd9ae5e020e43e5d7f9326f1355391209 Mon Sep 17 00:00:00 2001
+From: FaramosCZ <mschorm(a)redhat.com>
+Date: Tue, 29 Jun 2021 18:08:21 +0200
+Subject: [PATCH] CMake: Enhance json11 logic (#134)
+
+* Fix CMake deprecation warning in "JSON 11" bundled project
+ - Raise the minimal CMake version required for the "JSON 11" bundled project
to the minimal CMake version required by the SeriousProton project itself, which is 3.8
+ - Remove bits of CMake code applicable only for CMake version < 3
+
+* CMake: Implement logic to use system version of the "json11" library instead
of the bundled one
+Add a CMake module for finding the system "json11" library
+---
+ CMakeLists.txt | 15 ++++++++++++++-
+ cmake/Findjson11.cmake | 44 ++++++++++++++++++++++++++++++++++++++++++++
+ src/json11/CMakeLists.txt | 19 ++++++-------------
+ 3 files changed, 64 insertions(+), 14 deletions(-)
+ create mode 100644 cmake/Findjson11.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bfc6ece..7b96f83 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -109,8 +109,21 @@ add_subdirectory(src/lua)
+ add_subdirectory(src/GL)
+ add_subdirectory(src/libopus)
+
++# json11
+ if(SERIOUSPROTON_WITH_JSON)
+- add_subdirectory(src/json11)
++ SET(WITH_JSON "bundled" CACHE STRING "Which json11 to use (possible
values are 'bundled' or 'system')")
++
++ if(WITH_JSON STREQUAL "system")
++ find_package(json11 QUIET)
++ if(json11_FOUND)
++ message(STATUS "json11 version used: SYSTEM")
++ else()
++ message(FATAL_ERROR "json11: system package is not found or is
unusable")
++ endif()
++ elseif(WITH_JSON STREQUAL "bundled")
++ message(STATUS "json11 version used: BUNDLED")
++ add_subdirectory(src/json11)
++ endif()
+ endif()
+
+ #---------------------------------File lists-----------------------------------
+diff --git a/cmake/Findjson11.cmake b/cmake/Findjson11.cmake
+new file mode 100644
+index 0000000..780eb6f
+--- /dev/null
++++ b/cmake/Findjson11.cmake
+@@ -0,0 +1,44 @@
++# This "FindJson11.cmake" file has been taken from the following project:
++#
https://github.com/MASKOR/mapit/blob/master/cmake/Findjson11.cmake
++# which is licensed under LGPL-3.0 License
++# Aditional changes were done by Michal Schorm
++
++# Locate json11
++#
++# This module defines
++# json11_FOUND, if false, do not try to link to json11
++# json11_LIBRARY, where to find json11
++# json11_INCLUDE_DIR, where to find json11.hpp
++#
++# If json11 is not installed in a standard path, you can use the json11_DIR CMake
variable
++# to tell CMake where json11 is.
++
++find_path(json11_INCLUDE_DIR json11.hpp
++ PATHS
++ /usr/local/include/
++ /usr/include/
++ /sw/json11/ # Fink
++ /opt/local/json11/ # DarwinPorts
++ /opt/csw/json11/ # Blastwave
++ /opt/json11/
++ /include/)
++
++if(NOT WIN32)
++ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")
++endif(NOT WIN32)
++
++find_library(json11_LIBRARY
++ NAMES json11
++ PATH_SUFFIXES lib64 lib
++ PATHS /usr/local
++ /usr
++ /sw
++ /opt/local
++ /opt/csw
++ /opt
++ /lib)
++
++# handle the QUIETLY and REQUIRED arguments and set json11_FOUND to TRUE if all listed
variables are TRUE
++include(FindPackageHandleStandardArgs)
++FIND_PACKAGE_HANDLE_STANDARD_ARGS(json11 DEFAULT_MSG json11_INCLUDE_DIR json11_LIBRARY)
++mark_as_advanced(json11_INCLUDE_DIR json11_LIBRARY)
+diff --git a/src/json11/CMakeLists.txt b/src/json11/CMakeLists.txt
+index 819c36f..cb990e7 100644
+--- a/src/json11/CMakeLists.txt
++++ b/src/json11/CMakeLists.txt
+@@ -1,22 +1,15 @@
+-cmake_minimum_required(VERSION 2.8)
+-if (CMAKE_VERSION VERSION_LESS "3")
+- project(json11 CXX)
+-else()
+- cmake_policy(SET CMP0048 NEW)
+- project(json11 VERSION 1.0.0 LANGUAGES CXX)
+-endif()
++cmake_minimum_required(VERSION 3.8)
++
++cmake_policy(SET CMP0048 NEW)
++project(json11 VERSION 1.0.0 LANGUAGES CXX)
+
+ enable_testing()
+
+ option(JSON11_BUILD_TESTS "Build unit tests" OFF)
+ option(JSON11_ENABLE_DR1467_CANARY "Enable canary test for DR 1467" OFF)
+
+-if(CMAKE_VERSION VERSION_LESS "3")
+- add_definitions(-std=c++11)
+-else()
+- set(CMAKE_CXX_STANDARD 11)
+- set(CMAKE_CXX_STANDARD_REQUIRED ON)
+-endif()
++set(CMAKE_CXX_STANDARD 11)
++set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ set(CMAKE_INSTALL_PREFIX /usr)
+--
+libgit2 1.0.1
+
diff --git a/upstream_SP_005_0d1ac45b73.patch b/upstream_SP_005_0d1ac45b73.patch
new file mode 100644
index 0000000..ffcbed6
--- /dev/null
+++ b/upstream_SP_005_0d1ac45b73.patch
@@ -0,0 +1,44 @@
+From 0d1ac45b738195db5e2785531db713328f547e60 Mon Sep 17 00:00:00 2001
+From: FaramosCZ <mschorm(a)redhat.com>
+Date: Tue, 29 Jun 2021 18:08:36 +0200
+Subject: [PATCH] CMake: Enhance logic around GLM (#133)
+
+* CMake: Add a status message regarding GLM used (system / bundled)
+
+* CMake: Introduce logic and variable WITH_GLM to control which GLM version should be
used (system / bundled / auto)
+---
+ CMakeLists.txt | 18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7b96f83..200de46 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -89,8 +89,22 @@ if(NOT ${SFML_FOUND})
+ endif()
+
+
+-find_package(glm QUIET)
+-if(NOT ${glm_FOUND})
++# GLM - OpenGL Mathematic library
++SET(WITH_GLM "auto" CACHE STRING "Which GLM to use (possible values are
'bundled', 'system' or 'auto')")
++
++if(WITH_GLM STREQUAL "system" OR WITH_GLM STREQUAL "auto")
++ find_package(glm QUIET)
++
++ if(glm_FOUND)
++ message(STATUS "GLM version used: SYSTEM")
++ elseif(WITH_GLM STREQUAL "system")
++ message(FATAL_ERROR "GLM: system package is not found or is
unusable")
++ endif()
++endif()
++
++if(WITH_GLM STREQUAL "bundled" OR (WITH_GLM STREQUAL "auto" AND NOT
glm_FOUND))
++ message(STATUS "GLM version used: BUNDLED")
++
+ set(GLM_BASE_PATH "${EXTERNALS_DIR}")
+
+ if(NOT EXISTS "${GLM_BASE_PATH}/glm/CMakeLists.txt")
+--
+libgit2 1.0.1
+