tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
srb2: 2.2.13 -> 2.2.15
Donovan Glover
8 months ago
7f3855ae
b5d5cc76
+7
-74
3 changed files
expand all
collapse all
unified
split
pkgs
by-name
sr
srb2
cmake.patch
package.nix
thirdparty.patch
+2
-50
pkgs/by-name/sr/srb2/cmake.patch
···
1
1
diff --git a/CMakeLists.txt b/CMakeLists.txt
2
2
-
index 80a3bdcd6..380a1573a 100644
2
2
+
index a4c631102..13b5743ca 100644
3
3
--- a/CMakeLists.txt
4
4
+++ b/CMakeLists.txt
5
5
-
@@ -61,7 +61,7 @@ option(
6
6
-
"Link dependencies using CMake's find_package and do not use internal builds"
7
7
-
${SRB2_CONFIG_SYSTEM_LIBRARIES_DEFAULT}
8
8
-
)
9
9
-
-option(SRB2_CONFIG_ENABLE_TESTS "Build the test suite" ON)
10
10
-
+option(SRB2_CONFIG_ENABLE_TESTS "Build the test suite" OFF)
11
11
-
# This option isn't recommended for distribution builds and probably won't work (yet).
12
12
-
cmake_dependent_option(
13
13
-
SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES
14
14
-
@@ -80,25 +80,6 @@ option(SRB2_CONFIG_ZDEBUG "Compile with ZDEBUG defined." OFF)
15
15
-
option(SRB2_CONFIG_PROFILEMODE "Compile for profiling (GCC only)." OFF)
16
16
-
set(SRB2_CONFIG_ASSET_DIRECTORY "" CACHE PATH "Path to directory that contains all asset files for the installer. If set, assets will be part of installation and cpack.")
17
17
-
18
18
-
-if(SRB2_CONFIG_ENABLE_TESTS)
19
19
-
- # https://github.com/catchorg/Catch2
20
20
-
- CPMAddPackage(
21
21
-
- NAME Catch2
22
22
-
- VERSION 3.4.0
23
23
-
- GITHUB_REPOSITORY catchorg/Catch2
24
24
-
- OPTIONS
25
25
-
- "CATCH_INSTALL_DOCS OFF"
26
26
-
- )
27
27
-
- list(APPEND CMAKE_MODULE_PATH "${Catch2_SOURCE_DIR}/extras")
28
28
-
- include(CTest)
29
29
-
- include(Catch)
30
30
-
- add_executable(srb2tests)
31
31
-
- # To add tests, use target_sources to add individual test files to the target in subdirs.
32
32
-
- target_link_libraries(srb2tests PRIVATE Catch2::Catch2 Catch2::Catch2WithMain)
33
33
-
- target_compile_features(srb2tests PRIVATE c_std_11 cxx_std_17)
34
34
-
- catch_discover_tests(srb2tests)
35
35
-
-endif()
36
36
-
-
37
37
-
# Enable CCache
38
38
-
# (Set USE_CCACHE=ON to use, CCACHE_OPTIONS for options)
39
39
-
if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL Windows)
40
40
-
@@ -113,12 +94,6 @@ if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL Windows)
41
41
-
message(WARNING "USE_CCACHE was set but ccache is not found (set CCACHE_TOOL_PATH)")
42
42
-
endif()
43
43
-
endif()
44
44
-
-else()
45
45
-
- CPMAddPackage(
46
46
-
- NAME Ccache.cmake
47
47
-
- GITHUB_REPOSITORY TheLartians/Ccache.cmake
48
48
-
- VERSION 1.2
49
49
-
- )
50
50
-
endif()
51
51
-
52
52
-
# Dependencies
53
53
-
@@ -179,7 +154,7 @@ include(GitUtilities)
5
5
+
@@ -141,7 +141,7 @@ include(GitUtilities)
54
6
if("${SRB2_SDL2_EXE_NAME}" STREQUAL "")
55
7
# cause a reconfigure if the branch changes
56
8
get_git_dir(SRB2_GIT_DIR)
+5
-12
pkgs/by-name/sr/srb2/package.nix
···
7
7
curl,
8
8
nasm,
9
9
libopenmpt,
10
10
+
miniupnpc,
10
11
game-music-emu,
11
11
-
libGLU,
12
12
libpng,
13
13
SDL2,
14
14
SDL2_mixer,
···
20
20
21
21
stdenv.mkDerivation (finalAttrs: {
22
22
pname = "srb2";
23
23
-
version = "2.2.13";
23
23
+
version = "2.2.15";
24
24
25
25
src = fetchFromGitHub {
26
26
owner = "STJr";
27
27
repo = "SRB2";
28
28
rev = "SRB2_release_${finalAttrs.version}";
29
29
-
hash = "sha256-OSkkjCz7ZW5+0vh6l7+TpnHLzXmd/5QvTidRQSHJYX8=";
29
29
+
hash = "sha256-eJ0GYe3Rw6qQXj+jtyt8MkP87DaCiO9ffChg+SpQqaI=";
30
30
};
31
31
32
32
nativeBuildInputs = [
···
41
41
game-music-emu
42
42
libpng
43
43
libopenmpt
44
44
+
miniupnpc
44
45
SDL2
45
46
SDL2_mixer
46
47
zlib
···
53
54
src = fetchgit {
54
55
url = "https://git.do.srb2.org/STJr/srb2assets-public";
55
56
rev = "SRB2_release_${finalAttrs.version}";
56
56
-
hash = "sha256-OXvO5ZlujIYmYevc62Dtx192dxoujQMNFUCrH5quBBg=";
57
57
+
hash = "sha256-1kwhWHzL2TbSx1rhFExbMhXqn0HMBRhR6LZiuoRx+iI=";
57
58
fetchLFS = true;
58
59
};
59
60
···
76
77
];
77
78
78
79
patches = [
79
79
-
# Make the build work without internet connectivity
80
80
-
# See: https://build.opensuse.org/request/show/1109889
81
80
./cmake.patch
82
82
-
./thirdparty.patch
83
81
];
84
84
-
85
85
-
postPatch = ''
86
86
-
substituteInPlace ./src/sdl/ogl_sdl.c \
87
87
-
--replace libGLU.so.1 ${libGLU}/lib/libGLU.so.1
88
88
-
'';
89
82
90
83
desktopItems = [
91
84
(makeDesktopItem rec {
-12
pkgs/by-name/sr/srb2/thirdparty.patch
···
1
1
-
diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt
2
2
-
index f33b3bf3f..1214f179c 100644
3
3
-
--- a/thirdparty/CMakeLists.txt
4
4
-
+++ b/thirdparty/CMakeLists.txt
5
5
-
@@ -16,6 +16,5 @@ if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
6
6
-
include("cpm-png.cmake")
7
7
-
include("cpm-curl.cmake")
8
8
-
include("cpm-openmpt.cmake")
9
9
-
+ include("cpm-libgme.cmake")
10
10
-
endif()
11
11
-
-
12
12
-
-include("cpm-libgme.cmake")