Merge pull request #254964 from donovanglover/srb2-2.2.13

srb2: 2.2.11 -> 2.2.13

authored by Rick van Schijndel and committed by GitHub 13b29836 612035c4

+68 -11
+49 -7
pkgs/games/srb2/cmake.patch
··· 1 1 diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 915912af5..f5c2cf9cc 100644 2 + index 80a3bdcd6..380a1573a 100644 3 3 --- a/CMakeLists.txt 4 4 +++ b/CMakeLists.txt 5 - @@ -91,11 +91,6 @@ if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL Windows) 5 + @@ -61,7 +61,7 @@ option( 6 + "Link dependencies using CMake's find_package and do not use internal builds" 7 + ${SRB2_CONFIG_SYSTEM_LIBRARIES_DEFAULT} 8 + ) 9 + -option(SRB2_CONFIG_ENABLE_TESTS "Build the test suite" ON) 10 + +option(SRB2_CONFIG_ENABLE_TESTS "Build the test suite" OFF) 11 + # This option isn't recommended for distribution builds and probably won't work (yet). 12 + cmake_dependent_option( 13 + SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES 14 + @@ -80,25 +80,6 @@ option(SRB2_CONFIG_ZDEBUG "Compile with ZDEBUG defined." OFF) 15 + option(SRB2_CONFIG_PROFILEMODE "Compile for profiling (GCC only)." OFF) 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 + 18 + -if(SRB2_CONFIG_ENABLE_TESTS) 19 + - # https://github.com/catchorg/Catch2 20 + - CPMAddPackage( 21 + - NAME Catch2 22 + - VERSION 3.4.0 23 + - GITHUB_REPOSITORY catchorg/Catch2 24 + - OPTIONS 25 + - "CATCH_INSTALL_DOCS OFF" 26 + - ) 27 + - list(APPEND CMAKE_MODULE_PATH "${Catch2_SOURCE_DIR}/extras") 28 + - include(CTest) 29 + - include(Catch) 30 + - add_executable(srb2tests) 31 + - # To add tests, use target_sources to add individual test files to the target in subdirs. 32 + - target_link_libraries(srb2tests PRIVATE Catch2::Catch2 Catch2::Catch2WithMain) 33 + - target_compile_features(srb2tests PRIVATE c_std_11 cxx_std_17) 34 + - catch_discover_tests(srb2tests) 35 + -endif() 36 + - 37 + # Enable CCache 38 + # (Set USE_CCACHE=ON to use, CCACHE_OPTIONS for options) 39 + if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL Windows) 40 + @@ -113,12 +94,6 @@ if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL Windows) 41 + message(WARNING "USE_CCACHE was set but ccache is not found (set CCACHE_TOOL_PATH)") 6 42 endif() 7 43 endif() 8 - else() 44 + -else() 9 45 - CPMAddPackage( 10 46 - NAME Ccache.cmake 11 47 - GITHUB_REPOSITORY TheLartians/Ccache.cmake 12 48 - VERSION 1.2 13 49 - ) 14 50 endif() 15 - 51 + 16 52 # Dependencies 17 - -- 18 - 2.40.1 19 - 53 + @@ -179,7 +154,7 @@ include(GitUtilities) 54 + if("${SRB2_SDL2_EXE_NAME}" STREQUAL "") 55 + # cause a reconfigure if the branch changes 56 + get_git_dir(SRB2_GIT_DIR) 57 + - configure_file("${SRB2_GIT_DIR}/HEAD" HEAD COPYONLY) 58 + + #configure_file("${SRB2_GIT_DIR}/HEAD" HEAD COPYONLY) 59 + 60 + git_current_branch(SRB2_GIT_REVISION) 61 +
+7 -4
pkgs/games/srb2/default.nix
··· 20 20 21 21 stdenv.mkDerivation (finalAttrs: { 22 22 pname = "srb2"; 23 - version = "2.2.11"; 23 + version = "2.2.13"; 24 24 25 25 src = fetchFromGitHub { 26 26 owner = "STJr"; 27 27 repo = "SRB2"; 28 28 rev = "SRB2_release_${finalAttrs.version}"; 29 - hash = "sha256-tyiXivJWjNnL+4YynUV6k6iaMs8o9HkHrp+qFj2+qvQ="; 29 + hash = "sha256-OSkkjCz7ZW5+0vh6l7+TpnHLzXmd/5QvTidRQSHJYX8="; 30 30 }; 31 31 32 32 nativeBuildInputs = [ ··· 57 57 58 58 src = fetchurl { 59 59 url = "https://github.com/STJr/SRB2/releases/download/SRB2_release_${finalAttrs.version}/SRB2-v${lib.replaceStrings ["."] [""] finalAttrs.version}-Full.zip"; 60 - hash = "sha256-KsJIkCczD/HyIwEy5dI3zsHbWFCMBaCoCHizfupFoWM="; 60 + hash = "sha256-g7kaNRE1tjcF5J2v+kTnrDzz4zs5f1b/NH67ce2ifUo="; 61 61 }; 62 62 63 63 sourceRoot = "."; ··· 77 77 ]; 78 78 79 79 patches = [ 80 - # Fix unknown command "CPMAddPackage" by not using Ccache.cmake 80 + # Make the build work without internet connectivity 81 + # See: https://build.opensuse.org/request/show/1109889 81 82 ./cmake.patch 83 + ./thirdparty.patch 82 84 ]; 83 85 84 86 desktopItems = [ ··· 111 113 platforms = platforms.linux; 112 114 license = licenses.gpl2Plus; 113 115 maintainers = with maintainers; [ zeratax donovanglover ]; 116 + mainProgram = "srb2"; 114 117 }; 115 118 })
+12
pkgs/games/srb2/thirdparty.patch
··· 1 + diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt 2 + index f33b3bf3f..1214f179c 100644 3 + --- a/thirdparty/CMakeLists.txt 4 + +++ b/thirdparty/CMakeLists.txt 5 + @@ -16,6 +16,5 @@ if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}") 6 + include("cpm-png.cmake") 7 + include("cpm-curl.cmake") 8 + include("cpm-openmpt.cmake") 9 + + include("cpm-libgme.cmake") 10 + endif() 11 + - 12 + -include("cpm-libgme.cmake")