Merge pull request #271498 from souxd/update-zandronum

zandronum: 3.0.1 -> 3.1.0

authored by Lassulus and committed by GitHub c8fe76d8 e04c93d4

+91 -66
+10 -10
pkgs/games/doom-ports/zandronum/add_gitinfo.patch
··· 1 - diff -Naur blah/src/gitinfo.h blah2/src/gitinfo.h 2 - --- blah/src/gitinfo.h 1969-12-31 16:00:00.000000000 -0800 3 - +++ blah2/src/gitinfo.h 2017-09-15 01:44:43.953562714 -0700 1 + diff -r 4178904d7698 src/gitinfo.h 2 + --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3 + +++ b/src/gitinfo.h Fri Dec 01 13:02:42 2023 -0300 4 4 @@ -0,0 +1,11 @@ 5 - +// dd3c3b57023f64cda84f09ed13e4c03a4ad2b920 5 + +// 4178904d769879e6c2919fb647ee6dd2736399e9 6 6 +// 7 7 +// This file was automatically generated by the 8 8 +// updaterevision tool. Do not edit by hand. 9 9 + 10 - +#define GIT_DESCRIPTION "ZA_3.0-0-dd3c3b57023f" 11 - +#define GIT_HASH "dd3c3b57023f64cda84f09ed13e4c03a4ad2b920" 12 - +#define GIT_TIME "2017-09-01 06:40:50 -0500" 13 - +#define HG_REVISION_NUMBER 1504266050 14 - +#define HG_REVISION_HASH_STRING "dd3c3b57023f" 15 - +#define HG_TIME "170901-1140" 10 + +#define GIT_DESCRIPTION "ZA_3.0.1-572-4178904d7698" 11 + +#define GIT_HASH "4178904d769879e6c2919fb647ee6dd2736399e9" 12 + +#define GIT_TIME "2021-12-11 16:35:55 -0500" 13 + +#define HG_REVISION_NUMBER 1639258555 14 + +#define HG_REVISION_HASH_STRING "4178904d7698" 15 + +#define HG_TIME "211211-2135"
+35 -14
pkgs/games/doom-ports/zandronum/default.nix
··· 1 - { stdenv, lib, fetchhg, cmake, pkg-config, makeWrapper, callPackage 2 - , soundfont-fluid, SDL, libGL, glew, bzip2, zlib, libjpeg, fluidsynth, openssl, gtk2, python3, game-music-emu 1 + { stdenv 2 + , lib 3 + , fetchhg 4 + , cmake 5 + , pkg-config 6 + , makeWrapper 7 + , callPackage 8 + , soundfont-fluid 9 + , SDL_compat 10 + , libGL 11 + , glew 12 + , bzip2 13 + , zlib 14 + , libjpeg 15 + , fluidsynth 16 + , fmodex 17 + , openssl 18 + , gtk2 19 + , python3 20 + , game-music-emu 3 21 , serverOnly ? false 4 22 }: 5 23 6 24 let 7 25 suffix = lib.optionalString serverOnly "-server"; 8 - fmod = callPackage ./fmod.nix { }; 26 + fmod = fmodex; # fmodex is on nixpkgs now 9 27 sqlite = callPackage ./sqlite.nix { }; 10 28 clientLibPath = lib.makeLibraryPath [ fluidsynth ]; 11 29 12 - in stdenv.mkDerivation rec { 30 + in 31 + stdenv.mkDerivation rec { 13 32 pname = "zandronum${suffix}"; 14 - version = "3.0.1"; 33 + version = "3.1.0"; 15 34 16 35 src = fetchhg { 17 - url = "https://hg.osdn.net/view/zandronum/zandronum-stable"; 18 - rev = "ZA_${version}"; 19 - sha256 = "16v5b6wfrmabs3ky6isbfhlrqdjrr1pvfxlxwk0im02kcpxxw9qw"; 36 + # expired ssl certificate 37 + url = "http://hg.osdn.net/view/zandronum/zandronum-stable"; 38 + rev = "4178904d7698"; 39 + hash = "sha256-5t36CoRPPjDKQE0DVSv2Qqpqko6JAXBI53tuAYiylHQ="; 20 40 }; 21 41 22 42 # zandronum tries to download sqlite now when running cmake, don't let it 23 - 24 43 # it also needs the current mercurial revision info embedded in gitinfo.h 25 44 # otherwise, the client will fail to connect to servers because the 26 45 # protocol version doesn't match. 27 - 28 - patches = [ ./zan_configure_impurity.patch ./add_gitinfo.patch ./dont_update_gitinfo.patch ]; 46 + patches = [ ./zan_configure_impurity.patch ./dont_update_gitinfo.patch ./add_gitinfo.patch ]; 29 47 30 48 # I have no idea why would SDL and libjpeg be needed for the server part! 31 49 # But they are. 32 - buildInputs = [ openssl bzip2 zlib SDL libjpeg sqlite game-music-emu ] 33 - ++ lib.optionals (!serverOnly) [ libGL glew fmod fluidsynth gtk2 ]; 50 + buildInputs = [ openssl bzip2 zlib SDL_compat libjpeg sqlite game-music-emu ] 51 + ++ lib.optionals (!serverOnly) [ libGL glew fmod fluidsynth gtk2 ]; 34 52 35 53 nativeBuildInputs = [ cmake pkg-config makeWrapper python3 ]; 36 54 ··· 53 71 54 72 hardeningDisable = [ "format" ]; 55 73 74 + # Won't work well without C or en_US. Setting LANG might not be enough if the user is making use of LC_* so wrap with LC_ALL instead 56 75 installPhase = '' 57 76 mkdir -p $out/bin 58 77 mkdir -p $out/lib/zandronum ··· 61 80 ${lib.optionalString (!serverOnly) "liboutput_sdl.so"} \ 62 81 $out/lib/zandronum 63 82 makeWrapper $out/lib/zandronum/zandronum${suffix} $out/bin/zandronum${suffix} 83 + wrapProgram $out/bin/zandronum${suffix} \ 84 + --set LC_ALL="C" 64 85 ''; 65 86 66 87 postFixup = lib.optionalString (!serverOnly) '' ··· 76 97 homepage = "https://zandronum.com/"; 77 98 description = "Multiplayer oriented port, based off Skulltag, for Doom and Doom II by id Software"; 78 99 maintainers = with maintainers; [ lassulus MP2E ]; 79 - license = licenses.unfreeRedistributable; 100 + license = licenses.sleepycat; 80 101 platforms = platforms.linux; 81 102 }; 82 103 }
+7 -7
pkgs/games/doom-ports/zandronum/dont_update_gitinfo.patch
··· 1 - diff -r dd3c3b57023f src/CMakeLists.txt 2 - --- a/src/CMakeLists.txt Fri Sep 01 06:40:50 2017 -0500 3 - +++ b/src/CMakeLists.txt Fri Sep 15 01:46:34 2017 -0700 4 - @@ -636,15 +636,6 @@ 5 - add_definitions( -DBACKPATCH ) 1 + diff -r 4178904d7698 src/CMakeLists.txt 2 + --- a/src/CMakeLists.txt Sat Dec 11 16:35:55 2021 -0500 3 + +++ b/src/CMakeLists.txt Fri Dec 01 13:00:32 2023 -0300 4 + @@ -642,15 +642,6 @@ 5 + add_definitions( -DBACKPATCH ) 6 6 endif( BACKPATCH ) 7 - 7 + 8 8 -# Update gitinfo.h 9 9 - 10 10 -get_target_property( UPDATEREVISION_EXE updaterevision LOCATION ) ··· 15 15 - DEPENDS updaterevision ) 16 16 - 17 17 # Libraries ZDoom needs 18 - 18 + 19 19 message( STATUS "Fluid synth libs: ${FLUIDSYNTH_LIBRARIES}" )
+2 -2
pkgs/games/doom-ports/zandronum/sqlite.nix
··· 8 8 version = "3.0"; 9 9 10 10 src = fetchurl { 11 - url = "https://www.sqlite.org/2017/sqlite-autoconf-3180000.tar.gz"; 12 - hash = "sha256-N1dhJGOXbn0IxenwrzAhYT/CS7z+HFEZfWd2uezprFw="; 11 + url = "https://www.sqlite.org/2021/sqlite-autoconf-3360000.tar.gz"; 12 + sha256 = "1qxwkfvd185dfcqbakrzikrsw6ffr5jp1gl3dch9dsdyjvmw745x"; 13 13 }; 14 14 15 15 buildPhase = ''
+37 -33
pkgs/games/doom-ports/zandronum/zan_configure_impurity.patch
··· 1 - diff -r 6d5130e4ae52 sqlite/CMakeLists.txt 2 - --- a/sqlite/CMakeLists.txt Sun Sep 10 18:53:00 2017 +0200 3 - +++ b/sqlite/CMakeLists.txt Fri Sep 15 00:12:11 2017 -0700 4 - @@ -1,62 +1,5 @@ 1 + diff -r 4178904d7698 sqlite/CMakeLists.txt 2 + --- a/sqlite/CMakeLists.txt Sat Dec 11 16:35:55 2021 -0500 3 + +++ b/sqlite/CMakeLists.txt Fri Dec 01 12:57:55 2023 -0300 4 + @@ -1,65 +1,5 @@ 5 5 cmake_minimum_required( VERSION 2.4 ) 6 - 6 + 7 7 -# [BB/EP] Download SQLite archive and extract the sources if necessary. 8 - -set( ZAN_SQLITE_VERSION 3180000 ) # SQL version 3.18.0 9 - -set( ZAN_SQLITE_YEAR 2017 ) 10 - -set( ZAN_SQLITE_SHA1 "74559194e1dd9b9d577cac001c0e9d370856671b" ) 8 + -set( ZAN_SQLITE_VERSION 3360000 ) # SQL version 3.36.0 9 + -set( ZAN_SQLITE_YEAR 2021 ) 10 + -set( ZAN_SQLITE_SHA1 "a4bcf9e951bfb9745214241ba08476299fc2dc1e" ) 11 11 -set( ZAN_SQLITE_DOWNLOAD_NAME "sqlite-autoconf-${ZAN_SQLITE_VERSION}" ) 12 12 -set( ZAN_SQLITE_TEMP_ARCHIVE "${CMAKE_CURRENT_SOURCE_DIR}/${ZAN_SQLITE_DOWNLOAD_NAME}.tar.gz" ) 13 13 -set( ZAN_SQLITE_HASHED_ARCHIVE "${CMAKE_CURRENT_SOURCE_DIR}/sqlite-${ZAN_SQLITE_SHA1}.tar.gz" ) ··· 15 15 -if( IS_DIRECTORY ${ZAN_SQLITE_HASHED_ARCHIVE} OR IS_SYMLINK ${ZAN_SQLITE_HASHED_ARCHIVE} ) 16 16 - message( FATAL_ERROR "SQLite: ${ZAN_SQLITE_HASHED_ARCHIVE} must be a valid file.\n" 17 17 - "SQLite: Please remove it and try again." ) 18 - -elseif( NOT EXISTS ${ZAN_SQLITE_HASHED_ARCHIVE} ) 18 + -elseif( ( NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/sqlite3.c ) OR ( NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/sqlite3.h ) OR ( NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/sqlite3ext.h ) ) 19 19 - 20 - - if( IS_DIRECTORY ${ZAN_SQLITE_TEMP_ARCHIVE} OR IS_SYMLINK ${ZAN_SQLITE_TEMP_ARCHIVE} ) 21 - - message( FATAL_ERROR "SQLite: ${ZAN_SQLITE_TEMP_ARCHIVE} must be a valid file.\n" 20 + - if( NOT EXISTS ${ZAN_SQLITE_HASHED_ARCHIVE} ) 21 + - if( IS_DIRECTORY ${ZAN_SQLITE_TEMP_ARCHIVE} OR IS_SYMLINK ${ZAN_SQLITE_TEMP_ARCHIVE} ) 22 + - message( FATAL_ERROR "SQLite: ${ZAN_SQLITE_TEMP_ARCHIVE} must be a valid file.\n" 22 23 - "SQLite: Please remove it and try again." ) 23 - - endif() 24 - - message( STATUS "SQLite: downloading the archive..." ) 24 + - endif() 25 25 - 26 - - file( DOWNLOAD https://www.sqlite.org/${ZAN_SQLITE_YEAR}/${ZAN_SQLITE_DOWNLOAD_NAME}.tar.gz ${ZAN_SQLITE_TEMP_ARCHIVE} 27 - - SHOW_PROGRESS 28 - - STATUS ZAN_SQLITE_DOWNLOAD_STATUS ) 26 + - message( STATUS "SQLite: downloading the archive..." ) 29 27 - 30 - - # Report any problem if present and abort immediately. 31 - - list( GET ZAN_SQLITE_DOWNLOAD_STATUS 0 ZAN_SQLITE_DOWNLOAD_ERROR_CODE ) 32 - - if( ZAN_SQLITE_DOWNLOAD_ERROR_CODE ) 33 - - list( GET ZAN_SQLITE_DOWNLOAD_STATUS 1 ZAN_SQLITE_DOWNLOAD_ERROR_MESSAGE ) 34 - - message( FATAL_ERROR "SQLite: download failed. Reason: ${ZAN_SQLITE_DOWNLOAD_ERROR_MESSAGE}" ) 35 - - endif() 28 + - file( DOWNLOAD https://www.sqlite.org/${ZAN_SQLITE_YEAR}/${ZAN_SQLITE_DOWNLOAD_NAME}.tar.gz ${ZAN_SQLITE_TEMP_ARCHIVE} 29 + - SHOW_PROGRESS 30 + - STATUS ZAN_SQLITE_DOWNLOAD_STATUS ) 31 + - 32 + - # Report any problem if present and abort immediately. 33 + - list( GET ZAN_SQLITE_DOWNLOAD_STATUS 0 ZAN_SQLITE_DOWNLOAD_ERROR_CODE ) 34 + - if( ZAN_SQLITE_DOWNLOAD_ERROR_CODE ) 35 + - list( GET ZAN_SQLITE_DOWNLOAD_STATUS 1 ZAN_SQLITE_DOWNLOAD_ERROR_MESSAGE ) 36 + - message( FATAL_ERROR "SQLite: download failed. Reason: ${ZAN_SQLITE_DOWNLOAD_ERROR_MESSAGE}" ) 37 + - endif() 38 + - 39 + - # Check the hash. Abort immediately if it's not valid (something is wrong with the download) 40 + - file( SHA1 ${ZAN_SQLITE_TEMP_ARCHIVE} ZAN_SQLITE_CURRENT_SHA1 ) 41 + - if( NOT ZAN_SQLITE_CURRENT_SHA1 STREQUAL ZAN_SQLITE_SHA1 ) 42 + - message( FATAL_ERROR "SQLite: download failed. The downloaded file has a different hash:\n" 43 + - "SQLite: valid: ${ZAN_SQLITE_SHA1}\n" 44 + - "SQLite: downloaded: ${ZAN_SQLITE_CURRENT_SHA1}" ) 45 + - endif() 36 46 - 37 - - # Check the hash. Abort immediately if it's not valid (something is wrong with the download) 38 - - file( SHA1 ${ZAN_SQLITE_TEMP_ARCHIVE} ZAN_SQLITE_CURRENT_SHA1 ) 39 - - if( NOT ZAN_SQLITE_CURRENT_SHA1 STREQUAL ZAN_SQLITE_SHA1 ) 40 - - message( FATAL_ERROR "SQLite: download failed. The downloaded file has a different hash:\n" 41 - - "SQLite: valid: ${ZAN_SQLITE_SHA1}\n" 42 - - "SQLite: downloaded: ${ZAN_SQLITE_CURRENT_SHA1}" ) 47 + - # Rename the archive. 48 + - execute_process( COMMAND ${CMAKE_COMMAND} -E rename ${ZAN_SQLITE_TEMP_ARCHIVE} ${ZAN_SQLITE_HASHED_ARCHIVE} ) 43 49 - endif() 44 50 - 45 51 - message( STATUS "SQLite: saving the source files into the 'sqlite' directory." ) 46 52 - 47 - - # Rename the archive. 48 - - execute_process( COMMAND ${CMAKE_COMMAND} -E rename ${ZAN_SQLITE_TEMP_ARCHIVE} ${ZAN_SQLITE_HASHED_ARCHIVE} ) 49 - - 50 53 - # Extract the archive. 51 54 - execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf ${ZAN_SQLITE_HASHED_ARCHIVE} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) 52 55 - ··· 61 64 - message( STATUS "SQLite: done." ) 62 65 -endif() 63 66 - 64 - add_library( sqlite3 sqlite3.c ) 65 - target_link_libraries( sqlite3 ${CMAKE_DL_LIBS} ) 67 + # [BB] Silence all GCC warnings 68 + IF ( CMAKE_COMPILER_IS_GNUCXX ) 69 + ADD_DEFINITIONS ( -w )