Merge pull request #255481 from janalemke/update-empty-epsilon

EmptyEpsilon 2021.06.23 -> 2023.06.17
This commit is contained in:
Linus Heckemann 2023-09-18 16:58:33 +02:00 committed by GitHub
commit 5a99c5b168
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 75 deletions

View file

@ -1,34 +0,0 @@
From 9718cdb4bdaf7203d07789b2dc5eec4060538889 Mon Sep 17 00:00:00 2001
From: Maximilian Bosch <maximilian@mbosch.me>
Date: Fri, 9 Jul 2021 11:37:22 +0200
Subject: [PATCH] bundle system-glm in seriousproton
---
CMakeLists.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cbd68ca..730df82 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,6 +81,9 @@ if(NOT ${SFML_FOUND})
)
endif()
+
+find_package(glm)
+
add_subdirectory(src/Box2D)
add_subdirectory(src/lua)
add_subdirectory(src/GL)
@@ -205,7 +208,7 @@ target_compile_options(seriousproton_deps
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>"
--
2.31.1

View file

@ -1,45 +1,40 @@
{ lib, stdenv, fetchFromGitHub, cmake, sfml, libX11, glew, python3, fetchpatch, applyPatches, glm}: { lib, stdenv, fetchFromGitHub, cmake, sfml, libX11, glew, python3, fetchpatch, applyPatches, glm, meshoptimizer, SDL2, ninja}:
let let
major = "2021"; major = "2023";
minor = "06"; minor = "06";
patch.seriousproton = "23"; patch.seriousproton = "17";
patch.emptyepsilon = "23"; patch.emptyepsilon = "17";
version.seriousproton = "${major}.${minor}.${patch.seriousproton}"; version.seriousproton = "${major}.${minor}.${patch.seriousproton}";
version.emptyepsilon = "${major}.${minor}.${patch.emptyepsilon}"; version.emptyepsilon = "${major}.${minor}.${patch.emptyepsilon}";
version.basis-universal = "v1_15_update2";
basis-universal = fetchFromGitHub {
owner = "BinomialLLC";
repo = "basis_universal";
rev = version.basis-universal;
sha256 = "sha256-2snzq/SnhWHIgSbUUgh24B6tka7EfkGO+nwKEObRkU4=";
};
serious-proton = stdenv.mkDerivation { serious-proton = stdenv.mkDerivation {
pname = "serious-proton"; pname = "serious-proton";
version = version.seriousproton; version = version.seriousproton;
src = applyPatches { src = fetchFromGitHub {
src = fetchFromGitHub { owner = "daid";
owner = "daid"; repo = "SeriousProton";
repo = "SeriousProton"; rev = "EE-${version.seriousproton}";
rev = "EE-${version.seriousproton}"; sha256 = "sha256-5ifYb5dX8ihQmJB1RHyzMsZJeXZ+m27JmA+W+XA/XwI=";
sha256 = "sha256-02cHHWKoe99257qLgxtMjeXnhi0UYajh4v87B57felM=";
};
patches = [
# Various CMake fixes for `json11`. Can be removed on the next release.
(fetchpatch {
url = "https://github.com/daid/SeriousProton/commit/adbba45fd9ae5e020e43e5d7f9326f1355391209.patch";
sha256 = "sha256-gMTpIGPGCREmZ/ZxvEc7RVsVUxWXbu2BPUCE3A62sCI=";
})
# Simplified variant of
# * https://github.com/daid/SeriousProton/commit/0d1ac45b738195db5e2785531db713328f547e60
# * https://github.com/daid/SeriousProton/commit/32509f2db91a58b9528aeb1bb505e9426b52b825
#
# To fix configure errors when building EmptyEpsilon, can be removed on the next release.
./0001-bundle-system-glm-in-seriousproton.patch
];
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
buildInputs = [ sfml libX11 glm ]; buildInputs = [ sfml libX11 glm SDL2 ];
cmakeFlags = [
"-DFETCHCONTENT_SOURCE_DIR_BASIS=${basis-universal}"
];
meta = with lib; { meta = with lib; {
description = "C++ game engine coded on top of SFML used for EmptyEpsilon"; description = "C++ game engine coded on top of SFML used for EmptyEpsilon";
@ -61,23 +56,11 @@ stdenv.mkDerivation {
owner = "daid"; owner = "daid";
repo = "EmptyEpsilon"; repo = "EmptyEpsilon";
rev = "EE-${version.emptyepsilon}"; rev = "EE-${version.emptyepsilon}";
sha256 = "sha256-dc/Ic1/DULTQO6y9xSop2HxFvUh4kN57oSF/HBmbmF4="; sha256 = "sha256-zuXbCBlv6URndbB0aA+3bli0cSeUBf3LT/7/jcPITnc=";
}; };
patches = [
# Various CMake fixes that can be removed when upgrading to the next release.
(fetchpatch {
url = "https://github.com/daid/EmptyEpsilon/commit/ee0cd42bfe5fd20b8339e8e02eb7f69766168d57.patch";
sha256 = "sha256-8dXtl/izfzqbwHtjuugjH34vYP+d4AobqZhxL2GXTzw=";
})
(fetchpatch {
url = "https://github.com/daid/EmptyEpsilon/commit/69d93e6acdae3259755924f9d35e7e5ae949d377.patch";
sha256 = "sha256-30AGo4mi73GrW9GNS3vF3mTOS7J5/41LvjOzNjeFhOg=";
})
];
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
buildInputs = [ serious-proton sfml glew libX11 python3 glm ]; buildInputs = [ serious-proton sfml glew libX11 python3 glm SDL2 ninja ];
cmakeFlags = [ cmakeFlags = [
"-DSERIOUS_PROTON_DIR=${serious-proton.src}" "-DSERIOUS_PROTON_DIR=${serious-proton.src}"
@ -85,6 +68,11 @@ stdenv.mkDerivation {
"-DCPACK_PACKAGE_VERSION_MAJOR=${major}" "-DCPACK_PACKAGE_VERSION_MAJOR=${major}"
"-DCPACK_PACKAGE_VERSION_MINOR=${minor}" "-DCPACK_PACKAGE_VERSION_MINOR=${minor}"
"-DCPACK_PACKAGE_VERSION_PATCH=${patch.emptyepsilon}" "-DCPACK_PACKAGE_VERSION_PATCH=${patch.emptyepsilon}"
"-DFETCHCONTENT_SOURCE_DIR_BASIS=${basis-universal}"
"-DFETCHCONTENT_SOURCE_DIR_MESHOPTIMIZER=${meshoptimizer.src}"
"-DCMAKE_AR=${stdenv.cc.cc}/bin/gcc-ar"
"-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib"
"-G Ninja"
]; ];
meta = with lib; { meta = with lib; {