commit 2964c6633a6c3d7097d32fc9d924bbec051e4e79
Author: Antonio Trande <sagitter(a)fedoraproject.org>
Date: Fri Mar 22 11:32:26 2024 +0100
Release 2023.06.17
.gitignore | 5 +
EmptyEpsilon-avoid_basis_libs_downloading.patch | 56 +++
EmptyEpsilon-avoid_glm_libs_downloading.patch | 28 ++
...ilon-avoid_meshoptimizer_libs_downloading.patch | 43 +++
EmptyEpsilon.spec | 130 ++++---
gcc12.patch | 39 ---
sources | 7 +-
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 ---
16 files changed, 216 insertions(+), 923 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a7a5bbf..61eb2d0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,8 @@
/*.src.rpm
/*.zip
/*/
+/EmptyEpsilon-EE-2023.06.17.tar.gz
+/SeriousProton-EE-2023.06.12PR.tar.gz
+/basis_universal-1_15_update2.tar.gz
+/glm-0.9.9.8.tar.gz
+/meshoptimizer-0.16.tar.gz
diff --git a/EmptyEpsilon-avoid_basis_libs_downloading.patch
b/EmptyEpsilon-avoid_basis_libs_downloading.patch
new file mode 100644
index 0000000..3391b01
--- /dev/null
+++ b/EmptyEpsilon-avoid_basis_libs_downloading.patch
@@ -0,0 +1,56 @@
+--- a/SeriousProton-EE-2023.06.12PR/libs/basis_universal/CMakeLists.orig.txt 2023-06-09
10:35:14.000000000 +0200
++++ b/SeriousProton-EE-2023.06.12PR/libs/basis_universal/CMakeLists.txt 2024-03-10
19:04:39.372885921 +0100
+@@ -3,35 +3,8 @@
+
+ find_package(Threads REQUIRED)
+
+-set(BASIS_VERSION "v1_15_update2")
+-set(BASIS_URL "https://github.com/BinomialLLC/basis_universal")
+-if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.11)
+- include(FetchContent)
+- FetchContent_Declare(
+- basis
+- GIT_REPOSITORY "${BASIS_URL}"
+- GIT_TAG "${BASIS_VERSION}"
+- )
+- FetchContent_GetProperties(basis)
+-else()
+- set(BASIS_BASE_PATH "${EXTERNALS_DIR}")
+- set(basis_POPULATED FALSE)
+- if(NOT EXISTS "${BASIS_BASE_PATH}/basis/CMakeLists.txt")
+- set(BASIS_ZIP "${DOWNLOADS_DIR}/basis.zip")
+- file(DOWNLOAD "${BASIS_URL}/archive/refs/tags/${BASIS_VERSION}.zip"
"${BASIS_ZIP}" TIMEOUT 60 TLS_VERIFY ON)
+-
+- file(MAKE_DIRECTORY "${BASIS_BASE_PATH}/basis")
+- execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xf "${BASIS_ZIP}"
WORKING_DIRECTORY "${BASIS_BASE_PATH}")
+- endif()
++set(basis_SOURCE_DIR "./")
+
+- set(basis_SOURCE_DIR "${BASIS_BASE_PATH}/basis")
+- set(basis_BINARY_DIR "${PROJECT_BINARY_DIR}/externals/basis")
+-endif()
+-
+-if(NOT basis_POPULATED)
+- if(COMMAND FetchContent_Populate)
+- FetchContent_Populate(basis)
+- endif()
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(BUILD_X64 FALSE CACHE BOOL "")
+ endif()
+@@ -117,4 +90,3 @@
+ )
+ target_compile_features(basisu-transcoder PUBLIC cxx_std_11)
+ target_include_directories(basisu-transcoder INTERFACE
"${basis_SOURCE_DIR}")
+-endif()
+\ No newline at end of file
+--- a/SeriousProton-EE-2023.06.12PR/CMakeLists.orig.txt 2023-06-09 10:35:14.000000000
+0200
++++ b/SeriousProton-EE-2023.06.12PR/CMakeLists.txt 2024-03-10 20:05:58.833718666 +0100
+@@ -132,7 +132,7 @@
+ endif()
+
+ # BASIS Universal (Supercompressed GPU Texture Codec)
+-add_subdirectory(libs/basis_universal)
++add_subdirectory(libs/basis_universal/basis)
+
+ #---------------------------------File lists-----------------------------------
+ set(source_files #All SeriousProton's objects to compile
diff --git a/EmptyEpsilon-avoid_glm_libs_downloading.patch
b/EmptyEpsilon-avoid_glm_libs_downloading.patch
new file mode 100644
index 0000000..67b58cb
--- /dev/null
+++ b/EmptyEpsilon-avoid_glm_libs_downloading.patch
@@ -0,0 +1,28 @@
+--- a/SeriousProton-EE-2023.06.12PR/CMakeLists.txt.backup_basis 2023-06-09
10:35:14.000000000 +0200
++++ b/SeriousProton-EE-2023.06.12PR/CMakeLists.txt 2024-03-12 18:50:31.811860098 +0100
+@@ -55,23 +55,8 @@
+ # * 'auto', if we failed to find a suitable system package,
+ # * 'bundled'
+ message(STATUS "GLM version used: BUNDLED")
+-
+- set(GLM_VERSION "0.9.9.8")
+- set(GLM_URL "https://github.com/g-truc/glm")
+- include(FetchContent)
+- FetchContent_Declare(
+- glm
+- GIT_REPOSITORY "${GLM_URL}"
+- GIT_TAG "${GLM_VERSION}"
+- )
+- FetchContent_GetProperties(glm)
+-
+- if(NOT glm_POPULATED)
+- if(COMMAND FetchContent_Populate)
+- FetchContent_Populate(glm)
+- endif()
+- add_subdirectory(${glm_SOURCE_DIR} ${glm_BINARY_DIR} EXCLUDE_FROM_ALL)
+- endif()
++ set(glm_SOURCE_DIR "glm")
++ add_subdirectory(${glm_SOURCE_DIR} ${glm_BINARY_DIR} EXCLUDE_FROM_ALL)
+ endif()
+
+ add_subdirectory(libs/Box2D)
diff --git a/EmptyEpsilon-avoid_meshoptimizer_libs_downloading.patch
b/EmptyEpsilon-avoid_meshoptimizer_libs_downloading.patch
new file mode 100644
index 0000000..c02a4b3
--- /dev/null
+++ b/EmptyEpsilon-avoid_meshoptimizer_libs_downloading.patch
@@ -0,0 +1,43 @@
+--- a/CMakeLists.orig.txt 2023-06-14 09:23:22.000000000 +0200
++++ b/CMakeLists.txt 2024-03-12 18:03:05.165741793 +0100
+@@ -108,36 +108,11 @@
+
+ # Meshoptimizer
+ set(MESHOPTIMIZER_VERSION 0.16)
+-if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.11)
+- include(FetchContent)
+- FetchContent_Declare(
+- meshoptimizer
+- GIT_REPOSITORY
https://github.com/zeux/meshoptimizer/
+- GIT_TAG "v${MESHOPTIMIZER_VERSION}"
+- )
+- FetchContent_GetProperties(meshoptimizer)
+-else()
+- # Poor man's FetchContent.
+- set(MESHOPTIMIZER_BASE_PATH "${EXTERNALS_DIR}")
+- set(meshoptimizer_POPULATED FALSE)
+- if(NOT EXISTS "${MESHOPTIMIZER_BASE_PATH}/meshoptimizer/CMakeLists.txt")
+- set(MESHOPTIMIZER_ZIP "${DOWNLOADS_DIR}/meshoptimizer.zip")
+- file(DOWNLOAD
"https://github.com/zeux/meshoptimizer/archive/refs/tags/v${MESHOPTIMIZER_VERSION}.zip"
"${MESHOPTIMIZER_ZIP}" TIMEOUT 60 TLS_VERIFY ON)
++set(MESHOPTIMIZER_BASE_PATH "./")
++set(meshoptimizer_SOURCE_DIR "${MESHOPTIMIZER_BASE_PATH}/meshoptimizer")
++set(meshoptimizer_BINARY_DIR "${PROJECT_BINARY_DIR}/meshoptimizer")
+
+- execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xf "${MESHOPTIMIZER_ZIP}"
WORKING_DIRECTORY "${MESHOPTIMIZER_BASE_PATH}")
+- execute_process(COMMAND ${CMAKE_COMMAND} -E rename
"meshoptimizer-${MESHOPTIMIZER_VERSION}" meshoptimizer WORKING_DIRECTORY
"${MESHOPTIMIZER_BASE_PATH}")
+- endif()
+-
+- set(meshoptimizer_SOURCE_DIR "${MESHOPTIMIZER_BASE_PATH}/meshoptimizer")
+- set(meshoptimizer_BINARY_DIR
"${PROJECT_BINARY_DIR}/externals/meshoptimizer")
+-endif()
+-
+-if(NOT meshoptimizer_POPULATED)
+- if(COMMAND FetchContent_Populate)
+- FetchContent_Populate(meshoptimizer)
+- endif()
+- add_subdirectory(${meshoptimizer_SOURCE_DIR} ${meshoptimizer_BINARY_DIR}
EXCLUDE_FROM_ALL)
+-endif()
++add_subdirectory(${meshoptimizer_SOURCE_DIR} ${meshoptimizer_BINARY_DIR}
EXCLUDE_FROM_ALL)
+
+ set(GUI_LIB_SOURCES
+ src/gui/colorConfig.cpp
diff --git a/EmptyEpsilon.spec b/EmptyEpsilon.spec
index 58d571e..1b50bb5 100644
--- a/EmptyEpsilon.spec
+++ b/EmptyEpsilon.spec
@@ -1,12 +1,14 @@
-%global version_major 2021
+%global version_major 2023
%global version_minor 06
-%global version_patch 23
+%global version_patch 17
Name: EmptyEpsilon
Summary: Spaceship bridge simulator game
Version: %{version_major}.%{version_minor}.%{version_patch}
-Release: 7%{?dist}
-License: GPLv2
+Release: 1%{?dist}
+# Apache-2.0, BSD-3-Clause and Zlib are used in basis_universal
+# MIT is used by meshoptimizer and GLM
+License: GPL-2.0-only AND Apache-2.0 AND BSD-3-Clause AND Zlib AND MIT
BuildRequires: cmake
BuildRequires: dos2unix
@@ -14,38 +16,27 @@ 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
+%if 0%{?fedora} < 41
BuildRequires: glm-devel >= 0.9.9.8
+%endif
+BuildRequires: SDL2-devel
-ExcludeArch: ppc64 ppc64le
+ExcludeArch: %{power64}
URL:
http://emptyepsilon.org/
-Source0:
https://github.com/daid/EmptyEpsilon/archive/EE-%{version}.zip#/EmptyEpsi...
-Source1:
https://github.com/daid/SeriousProton/archive/EE-%{version}.zip#/SeriousP...
+Source0:
https://github.com/daid/EmptyEpsilon/archive/EE-%{version}/EmptyEpsilon-E...
+Source1:
https://github.com/daid/SeriousProton/archive/EE-2023.06.12/SeriousProton...
+# Upstream wants to download following libraries; we need to bundle them
+Source2:
https://github.com/BinomialLLC/basis_universal/archive/refs/tags/v1_15_up...
+Source3:
https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.16/meshoptimiz...
+# EmptyEpsilon is not compatible with GLM-1.0.1 yet
+Source4:
https://github.com/g-truc/glm/archive/refs/tags/0.9.9.8.tar.gz/glm-0.9.9....
-# EmptyEpsilon downstream patches:
-Patch1: gcc12.patch
-
-# 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
+Patch0: EmptyEpsilon-avoid_basis_libs_downloading.patch
+Patch1: EmptyEpsilon-avoid_meshoptimizer_libs_downloading.patch
+Patch2: EmptyEpsilon-avoid_glm_libs_downloading.patch
%description
EmptyEpsilon places you in the roles of a spaceship's bridge officers, like
@@ -60,39 +51,68 @@ information and follow orders.
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
-
-%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}
-
+%autosetup -a 1 -n EmptyEpsilon-EE-%{version} -N
+
+# basis
+%patch -P 0 -p1 -b .backup_basis
+%if 0%{?fedora} > 40
+%patch -P 2 -p1 -b .backup_glm
+%endif
+pushd SeriousProton-EE-2023.06.12PR/libs/basis_universal
+tar -xf %{SOURCE2}
+mv basis_universal-1_15_update2 basis
+mv basis/LICENSE basis/basis-LICENSE
+# Use CMakeLists.txt from EmptyEpsilon upstream to compile 'basis' static
library
+cp -p CMakeLists.txt basis/
+popd
+
+# GLM
+%if 0%{?fedora} > 40
+tar -xf %{SOURCE4}
+mv glm-0.9.9.8 glm
+mv glm/copying.txt glm/glm-copying.txt
+mv glm SeriousProton-EE-2023.06.12PR/
+%endif
+
+# meshoptimizer
+tar -xf %{SOURCE3}
+mv meshoptimizer-0.16 meshoptimizer
+mv meshoptimizer/LICENSE.md meshoptimizer/meshoptimizer-LICENSE.md
+%patch -P 1 -p1 -b .backup
%build
+%global __cmake_in_source_build 1
+pushd SeriousProton-EE-2023.06.12PR/libs/basis_universal/basis
+export CFLAGS="%{optflags}"
+export CXXFLAGS="%{optflags}"
+%cmake
+%cmake_build
+popd
+
+export CXXFLAGS="%{optflags}
-I../SeriousProton-EE-2023.06.12PR/libs/basis_universal/basis"
+export LDFLAGS="%{__global_ldflags}
-L../SeriousProton-EE-2023.06.12PR/libs/basis_universal/basis"
%cmake \
- -DSERIOUS_PROTON_DIR=SeriousProton-EE-%{version}/ \
+ -DSERIOUS_PROTON_DIR=SeriousProton-EE-2023.06.12PR/ \
-DCPACK_PACKAGE_VERSION_MAJOR=%{version_major} \
-DCPACK_PACKAGE_VERSION_MINOR=%{version_minor} \
-DCPACK_PACKAGE_VERSION_PATCH=%{version_patch} \
+%if 0%{?fedora} > 40
+ -DWITH_GLM="bundled" \
+%else
-DWITH_GLM="system" \
+%endif
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DCONFIG_DIR=%{_sysconfdir}/emptyepsilon/
-
-
%cmake_build
%install
%cmake_install
+rm -f %{buildroot}%{_datadir}/emptyepsilon/scripts/.gitignore
+
+install -pm 644 README.md CHANGELOG.md %{buildroot}%{_docdir}/EmptyEpsilon/
+
# icon to pixmaps
mkdir -p %{buildroot}%{_datadir}/pixmaps
install -p -m 644 ./logo.png %{buildroot}%{_datadir}/pixmaps/EmptyEpsilon.png
@@ -113,14 +133,22 @@ EOF
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
%files
-%doc README.md script_reference.html
-%license LICENSE
-%{_bindir}/EmptyEpsilon
+%license LICENSE meshoptimizer/meshoptimizer-LICENSE.md
+%license SeriousProton-EE-2023.06.12PR/libs/basis_universal/basis/basis-LICENSE
+%if 0%{?fedora} > 40
+%license SeriousProton-EE-2023.06.12PR/glm/glm-copying.txt
+%endif
+%{_bindir}/%{name}
%{_datadir}/emptyepsilon
-%{_datadir}/pixmaps/EmptyEpsilon.png
+%{_datadir}/pixmaps/%{name}.png
+%{_datadir}/icons/hicolor/1024x1024/apps/%{name}.png
%{_datadir}/applications/%{name}.desktop
+%{_docdir}/EmptyEpsilon/
%changelog
+* Sun Mar 10 2024 Antonio Trande <sagitter(a)fedoraproject.org> - 2023.06.17-1
+- Release 2023.06.17
+
* Sun Feb 04 2024 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
2021.06.23-7
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
diff --git a/sources b/sources
index c543d6a..c249817 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,5 @@
-SHA512 (EmptyEpsilon-EE-2021.06.23.zip) =
40efed8eb7433323e1d554f66e5ec1a75c4dab23e42664a46e4758dfcb518f51f1d28e1ff76117b319f963bfc2d810d06bbd25d4c0d1f652adf4990332cd43ce
-SHA512 (SeriousProton-EE-2021.06.23.zip) =
63a7fa7022f58fb1b87de509bd4ab122cd17ce3360d1ff48d50c0a7ad1fa55f1a18c512c3e0910a56ff814540983d62edf44b1a45b4a0054e0a01ce81aa4bea2
+SHA512 (EmptyEpsilon-EE-2023.06.17.tar.gz) =
d03740f5ed59cf0b8e111eb907ea56a6a92076816808a1289352ddc158d28faa692f5a164d23449ff37570adde2552d7f92a7d30caf8584bfdae03c83766872c
+SHA512 (SeriousProton-EE-2023.06.12PR.tar.gz) =
1152fd1246e524ac0f34ad59cc00016e98b20ec8c6ff3634ee0b75b708c944d8e8aa46c456720036d5c12927e5e42a7231dcd14fee9f388061bf2398beb80fc7
+SHA512 (basis_universal-1_15_update2.tar.gz) =
a898a057b57ac64f6c0bf5fce0b599e23421ccdd015ea7bb668bce8b9292ef55b098f3d05854a2fb5363959932b75cd0a842664ae7d4f71f3537dc11301c1b32
+SHA512 (glm-0.9.9.8.tar.gz) =
9484b0c12175414237c5b9486a2990099b1cb727e442f25ecda18b081aa661f7e92a44481f642989553cd3da7992a773441ee5688991bd539ce19fb66a5ce9e8
+SHA512 (meshoptimizer-0.16.tar.gz) =
cc6d28359fb99a615e1046a4af1b247cbc6ea0266d9e7f41ea0516c1fc09fa1e67376071daf138a126c77bca3baf9d565636ed0e3adf045f1a08498c38b7a7e7