zandronum: 3.0.1 -> 3.1.0

Changes to be committed:
	modified:   pkgs/games/doom-ports/zandronum/add_gitinfo.patch
	modified:   pkgs/games/doom-ports/zandronum/default.nix
	modified:   pkgs/games/doom-ports/zandronum/dont_update_gitinfo.patch
	modified:   pkgs/games/doom-ports/zandronum/sqlite.nix
	modified:   pkgs/games/doom-ports/zandronum/zan_configure_impurity.patch
This commit is contained in:
souxd 2023-12-01 14:45:09 -03:00
parent f5c27c6136
commit 5647d108b3
5 changed files with 91 additions and 66 deletions

View File

@ -1,15 +1,15 @@
diff -Naur blah/src/gitinfo.h blah2/src/gitinfo.h
--- blah/src/gitinfo.h 1969-12-31 16:00:00.000000000 -0800
+++ blah2/src/gitinfo.h 2017-09-15 01:44:43.953562714 -0700
diff -r 4178904d7698 src/gitinfo.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gitinfo.h Fri Dec 01 13:02:42 2023 -0300
@@ -0,0 +1,11 @@
+// dd3c3b57023f64cda84f09ed13e4c03a4ad2b920
+// 4178904d769879e6c2919fb647ee6dd2736399e9
+//
+// This file was automatically generated by the
+// updaterevision tool. Do not edit by hand.
+
+#define GIT_DESCRIPTION "ZA_3.0-0-dd3c3b57023f"
+#define GIT_HASH "dd3c3b57023f64cda84f09ed13e4c03a4ad2b920"
+#define GIT_TIME "2017-09-01 06:40:50 -0500"
+#define HG_REVISION_NUMBER 1504266050
+#define HG_REVISION_HASH_STRING "dd3c3b57023f"
+#define HG_TIME "170901-1140"
+#define GIT_DESCRIPTION "ZA_3.0.1-572-4178904d7698"
+#define GIT_HASH "4178904d769879e6c2919fb647ee6dd2736399e9"
+#define GIT_TIME "2021-12-11 16:35:55 -0500"
+#define HG_REVISION_NUMBER 1639258555
+#define HG_REVISION_HASH_STRING "4178904d7698"
+#define HG_TIME "211211-2135"

View File

@ -1,36 +1,54 @@
{ stdenv, lib, fetchhg, cmake, pkg-config, makeWrapper, callPackage
, soundfont-fluid, SDL, libGL, glew, bzip2, zlib, libjpeg, fluidsynth, openssl, gtk2, python3, game-music-emu
{ stdenv
, lib
, fetchhg
, cmake
, pkg-config
, makeWrapper
, callPackage
, soundfont-fluid
, SDL_compat
, libGL
, glew
, bzip2
, zlib
, libjpeg
, fluidsynth
, fmodex
, openssl
, gtk2
, python3
, game-music-emu
, serverOnly ? false
}:
let
suffix = lib.optionalString serverOnly "-server";
fmod = callPackage ./fmod.nix { };
fmod = fmodex; # fmodex is on nixpkgs now
sqlite = callPackage ./sqlite.nix { };
clientLibPath = lib.makeLibraryPath [ fluidsynth ];
in stdenv.mkDerivation rec {
in
stdenv.mkDerivation rec {
pname = "zandronum${suffix}";
version = "3.0.1";
version = "3.1.0";
src = fetchhg {
url = "https://hg.osdn.net/view/zandronum/zandronum-stable";
rev = "ZA_${version}";
sha256 = "16v5b6wfrmabs3ky6isbfhlrqdjrr1pvfxlxwk0im02kcpxxw9qw";
# expired ssl certificate
url = "http://hg.osdn.net/view/zandronum/zandronum-stable";
rev = "4178904d7698";
hash = "sha256-5t36CoRPPjDKQE0DVSv2Qqpqko6JAXBI53tuAYiylHQ=";
};
# zandronum tries to download sqlite now when running cmake, don't let it
# it also needs the current mercurial revision info embedded in gitinfo.h
# otherwise, the client will fail to connect to servers because the
# protocol version doesn't match.
patches = [ ./zan_configure_impurity.patch ./add_gitinfo.patch ./dont_update_gitinfo.patch ];
patches = [ ./zan_configure_impurity.patch ./dont_update_gitinfo.patch ./add_gitinfo.patch ];
# I have no idea why would SDL and libjpeg be needed for the server part!
# But they are.
buildInputs = [ openssl bzip2 zlib SDL libjpeg sqlite game-music-emu ]
++ lib.optionals (!serverOnly) [ libGL glew fmod fluidsynth gtk2 ];
buildInputs = [ openssl bzip2 zlib SDL_compat libjpeg sqlite game-music-emu ]
++ lib.optionals (!serverOnly) [ libGL glew fmod fluidsynth gtk2 ];
nativeBuildInputs = [ cmake pkg-config makeWrapper python3 ];
@ -53,6 +71,7 @@ in stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
# 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
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/lib/zandronum
@ -61,6 +80,8 @@ in stdenv.mkDerivation rec {
${lib.optionalString (!serverOnly) "liboutput_sdl.so"} \
$out/lib/zandronum
makeWrapper $out/lib/zandronum/zandronum${suffix} $out/bin/zandronum${suffix}
wrapProgram $out/bin/zandronum${suffix} \
--set LC_ALL="C"
'';
postFixup = lib.optionalString (!serverOnly) ''
@ -76,7 +97,7 @@ in stdenv.mkDerivation rec {
homepage = "https://zandronum.com/";
description = "Multiplayer oriented port, based off Skulltag, for Doom and Doom II by id Software";
maintainers = with maintainers; [ lassulus MP2E ];
license = licenses.unfreeRedistributable;
license = licenses.sleepycat;
platforms = platforms.linux;
};
}

View File

@ -1,10 +1,10 @@
diff -r dd3c3b57023f src/CMakeLists.txt
--- a/src/CMakeLists.txt Fri Sep 01 06:40:50 2017 -0500
+++ b/src/CMakeLists.txt Fri Sep 15 01:46:34 2017 -0700
@@ -636,15 +636,6 @@
add_definitions( -DBACKPATCH )
diff -r 4178904d7698 src/CMakeLists.txt
--- a/src/CMakeLists.txt Sat Dec 11 16:35:55 2021 -0500
+++ b/src/CMakeLists.txt Fri Dec 01 13:00:32 2023 -0300
@@ -642,15 +642,6 @@
add_definitions( -DBACKPATCH )
endif( BACKPATCH )
-# Update gitinfo.h
-
-get_target_property( UPDATEREVISION_EXE updaterevision LOCATION )
@ -15,5 +15,5 @@ diff -r dd3c3b57023f src/CMakeLists.txt
- DEPENDS updaterevision )
-
# Libraries ZDoom needs
message( STATUS "Fluid synth libs: ${FLUIDSYNTH_LIBRARIES}" )

View File

@ -8,8 +8,8 @@ stdenv.mkDerivation {
version = "3.0";
src = fetchurl {
url = "https://www.sqlite.org/2017/sqlite-autoconf-3180000.tar.gz";
hash = "sha256-N1dhJGOXbn0IxenwrzAhYT/CS7z+HFEZfWd2uezprFw=";
url = "https://www.sqlite.org/2021/sqlite-autoconf-3360000.tar.gz";
sha256 = "1qxwkfvd185dfcqbakrzikrsw6ffr5jp1gl3dch9dsdyjvmw745x";
};
buildPhase = ''

View File

@ -1,13 +1,13 @@
diff -r 6d5130e4ae52 sqlite/CMakeLists.txt
--- a/sqlite/CMakeLists.txt Sun Sep 10 18:53:00 2017 +0200
+++ b/sqlite/CMakeLists.txt Fri Sep 15 00:12:11 2017 -0700
@@ -1,62 +1,5 @@
diff -r 4178904d7698 sqlite/CMakeLists.txt
--- a/sqlite/CMakeLists.txt Sat Dec 11 16:35:55 2021 -0500
+++ b/sqlite/CMakeLists.txt Fri Dec 01 12:57:55 2023 -0300
@@ -1,65 +1,5 @@
cmake_minimum_required( VERSION 2.4 )
-# [BB/EP] Download SQLite archive and extract the sources if necessary.
-set( ZAN_SQLITE_VERSION 3180000 ) # SQL version 3.18.0
-set( ZAN_SQLITE_YEAR 2017 )
-set( ZAN_SQLITE_SHA1 "74559194e1dd9b9d577cac001c0e9d370856671b" )
-set( ZAN_SQLITE_VERSION 3360000 ) # SQL version 3.36.0
-set( ZAN_SQLITE_YEAR 2021 )
-set( ZAN_SQLITE_SHA1 "a4bcf9e951bfb9745214241ba08476299fc2dc1e" )
-set( ZAN_SQLITE_DOWNLOAD_NAME "sqlite-autoconf-${ZAN_SQLITE_VERSION}" )
-set( ZAN_SQLITE_TEMP_ARCHIVE "${CMAKE_CURRENT_SOURCE_DIR}/${ZAN_SQLITE_DOWNLOAD_NAME}.tar.gz" )
-set( ZAN_SQLITE_HASHED_ARCHIVE "${CMAKE_CURRENT_SOURCE_DIR}/sqlite-${ZAN_SQLITE_SHA1}.tar.gz" )
@ -15,38 +15,41 @@ diff -r 6d5130e4ae52 sqlite/CMakeLists.txt
-if( IS_DIRECTORY ${ZAN_SQLITE_HASHED_ARCHIVE} OR IS_SYMLINK ${ZAN_SQLITE_HASHED_ARCHIVE} )
- message( FATAL_ERROR "SQLite: ${ZAN_SQLITE_HASHED_ARCHIVE} must be a valid file.\n"
- "SQLite: Please remove it and try again." )
-elseif( NOT EXISTS ${ZAN_SQLITE_HASHED_ARCHIVE} )
-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 ) )
-
- if( IS_DIRECTORY ${ZAN_SQLITE_TEMP_ARCHIVE} OR IS_SYMLINK ${ZAN_SQLITE_TEMP_ARCHIVE} )
- message( FATAL_ERROR "SQLite: ${ZAN_SQLITE_TEMP_ARCHIVE} must be a valid file.\n"
- if( NOT EXISTS ${ZAN_SQLITE_HASHED_ARCHIVE} )
- if( IS_DIRECTORY ${ZAN_SQLITE_TEMP_ARCHIVE} OR IS_SYMLINK ${ZAN_SQLITE_TEMP_ARCHIVE} )
- message( FATAL_ERROR "SQLite: ${ZAN_SQLITE_TEMP_ARCHIVE} must be a valid file.\n"
- "SQLite: Please remove it and try again." )
- endif()
- message( STATUS "SQLite: downloading the archive..." )
- endif()
-
- file( DOWNLOAD https://www.sqlite.org/${ZAN_SQLITE_YEAR}/${ZAN_SQLITE_DOWNLOAD_NAME}.tar.gz ${ZAN_SQLITE_TEMP_ARCHIVE}
- SHOW_PROGRESS
- STATUS ZAN_SQLITE_DOWNLOAD_STATUS )
- message( STATUS "SQLite: downloading the archive..." )
-
- # Report any problem if present and abort immediately.
- list( GET ZAN_SQLITE_DOWNLOAD_STATUS 0 ZAN_SQLITE_DOWNLOAD_ERROR_CODE )
- if( ZAN_SQLITE_DOWNLOAD_ERROR_CODE )
- list( GET ZAN_SQLITE_DOWNLOAD_STATUS 1 ZAN_SQLITE_DOWNLOAD_ERROR_MESSAGE )
- message( FATAL_ERROR "SQLite: download failed. Reason: ${ZAN_SQLITE_DOWNLOAD_ERROR_MESSAGE}" )
- endif()
- file( DOWNLOAD https://www.sqlite.org/${ZAN_SQLITE_YEAR}/${ZAN_SQLITE_DOWNLOAD_NAME}.tar.gz ${ZAN_SQLITE_TEMP_ARCHIVE}
- SHOW_PROGRESS
- STATUS ZAN_SQLITE_DOWNLOAD_STATUS )
-
- # Check the hash. Abort immediately if it's not valid (something is wrong with the download)
- file( SHA1 ${ZAN_SQLITE_TEMP_ARCHIVE} ZAN_SQLITE_CURRENT_SHA1 )
- if( NOT ZAN_SQLITE_CURRENT_SHA1 STREQUAL ZAN_SQLITE_SHA1 )
- message( FATAL_ERROR "SQLite: download failed. The downloaded file has a different hash:\n"
- "SQLite: valid: ${ZAN_SQLITE_SHA1}\n"
- "SQLite: downloaded: ${ZAN_SQLITE_CURRENT_SHA1}" )
- # Report any problem if present and abort immediately.
- list( GET ZAN_SQLITE_DOWNLOAD_STATUS 0 ZAN_SQLITE_DOWNLOAD_ERROR_CODE )
- if( ZAN_SQLITE_DOWNLOAD_ERROR_CODE )
- list( GET ZAN_SQLITE_DOWNLOAD_STATUS 1 ZAN_SQLITE_DOWNLOAD_ERROR_MESSAGE )
- message( FATAL_ERROR "SQLite: download failed. Reason: ${ZAN_SQLITE_DOWNLOAD_ERROR_MESSAGE}" )
- endif()
-
- # Check the hash. Abort immediately if it's not valid (something is wrong with the download)
- file( SHA1 ${ZAN_SQLITE_TEMP_ARCHIVE} ZAN_SQLITE_CURRENT_SHA1 )
- if( NOT ZAN_SQLITE_CURRENT_SHA1 STREQUAL ZAN_SQLITE_SHA1 )
- message( FATAL_ERROR "SQLite: download failed. The downloaded file has a different hash:\n"
- "SQLite: valid: ${ZAN_SQLITE_SHA1}\n"
- "SQLite: downloaded: ${ZAN_SQLITE_CURRENT_SHA1}" )
- endif()
-
- # Rename the archive.
- execute_process( COMMAND ${CMAKE_COMMAND} -E rename ${ZAN_SQLITE_TEMP_ARCHIVE} ${ZAN_SQLITE_HASHED_ARCHIVE} )
- endif()
-
- message( STATUS "SQLite: saving the source files into the 'sqlite' directory." )
-
- # Rename the archive.
- execute_process( COMMAND ${CMAKE_COMMAND} -E rename ${ZAN_SQLITE_TEMP_ARCHIVE} ${ZAN_SQLITE_HASHED_ARCHIVE} )
-
- # Extract the archive.
- execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf ${ZAN_SQLITE_HASHED_ARCHIVE} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
-
@ -61,5 +64,6 @@ diff -r 6d5130e4ae52 sqlite/CMakeLists.txt
- message( STATUS "SQLite: done." )
-endif()
-
add_library( sqlite3 sqlite3.c )
target_link_libraries( sqlite3 ${CMAKE_DL_LIBS} )
# [BB] Silence all GCC warnings
IF ( CMAKE_COMPILER_IS_GNUCXX )
ADD_DEFINITIONS ( -w )