From 21bf09cd219e1266ee6f827cf841771341add958ed460c61f08bd93f08c61d08 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 3 Nov 2023 09:26:46 +0000 Subject: [PATCH 1/4] - Update to release 4.11.3 OBS-URL: https://build.opensuse.org/package/show/games/gzdoom?expand=0&rev=100 --- 0001-Revert-Switch-to-miniz-from-zlib.patch | 331 ++++++++++++++++++++ g4.10.0.tar.gz | 3 - g4.11.3.tar.gz | 3 + gcc13.diff | 19 -- gzdoom-discord.patch | 18 +- gzdoom-lzma.patch | 64 ++-- gzdoom-vulkan.patch | 61 ---- gzdoom.changes | 18 ++ gzdoom.spec | 17 +- 9 files changed, 396 insertions(+), 138 deletions(-) create mode 100644 0001-Revert-Switch-to-miniz-from-zlib.patch delete mode 100644 g4.10.0.tar.gz create mode 100644 g4.11.3.tar.gz delete mode 100644 gcc13.diff delete mode 100644 gzdoom-vulkan.patch diff --git a/0001-Revert-Switch-to-miniz-from-zlib.patch b/0001-Revert-Switch-to-miniz-from-zlib.patch new file mode 100644 index 0000000..5d37499 --- /dev/null +++ b/0001-Revert-Switch-to-miniz-from-zlib.patch @@ -0,0 +1,331 @@ +From b0910739a3fe9ade92356f2ed510049ebbccbec9 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Fri, 27 Oct 2023 09:01:47 +0200 +Subject: [PATCH] Revert "Switch to miniz from zlib" + +This reverts commit ba9ce0e83f6e25e3ddef5000bd51d53f2e3947a2. +--- + CMakeLists.txt | 13 ++++++++++++- + src/CMakeLists.txt | 4 ++-- + src/common/audio/music/i_music.cpp | 2 +- + src/common/engine/serializer.cpp | 2 +- + src/common/filesystem/source/files_decompress.cpp | 2 +- + src/common/filesystem/source/filesystem.cpp | 2 +- + src/common/filesystem/source/resourcefile.cpp | 2 +- + src/common/models/model.cpp | 13 +++++++++++-- + src/common/platform/win32/i_crash.cpp | 2 +- + src/common/textures/m_png.cpp | 2 +- + src/common/thirdparty/m_crc32.h | 5 +++-- + src/g_pch.h | 2 +- + src/g_pch2.h | 2 +- + src/maploader/glnodes.cpp | 2 +- + src/serializer_doom.cpp | 2 +- + tools/zipdir/CMakeLists.txt | 4 ++-- + tools/zipdir/zipdir.c | 2 +- + vcpkg.json | 4 ++++ + 18 files changed, 46 insertions(+), 21 deletions(-) + +Index: gzdoom-g4.11.3/CMakeLists.txt +=================================================================== +--- gzdoom-g4.11.3.orig/CMakeLists.txt ++++ gzdoom-g4.11.3/CMakeLists.txt +@@ -216,6 +216,7 @@ option( NO_OPENAL "Disable OpenAL sound + + find_package( BZip2 ) + find_package( VPX ) ++find_package( ZLIB ) + find_package( WebP ) + if (NOT WebP_FOUND) + include(FindPkgConfig) +@@ -347,6 +348,7 @@ set( CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE + set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${REL_C_FLAGS}" ) + set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${DEB_C_FLAGS} -D_DEBUG" ) + ++option(FORCE_INTERNAL_ZLIB "Use internal zlib") + option(FORCE_INTERNAL_BZIP2 "Use internal bzip2") + option(FORCE_INTERNAL_ASMJIT "Use internal asmjit" ON) + mark_as_advanced( FORCE_INTERNAL_ASMJIT ) +@@ -360,6 +362,16 @@ set( DRPC_INCLUDE_DIR "-I/ignore" ) + set( DRPC_LIBRARIES -ldiscord-rpc ) + set( DRPC_LIBRARY -ldiscord-rpc ) + ++if( ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB ) ++ message( STATUS "Using system zlib, includes found at ${ZLIB_INCLUDE_DIR}" ) ++else() ++ message( STATUS "Using internal zlib" ) ++ set( SKIP_INSTALL_ALL TRUE ) # Avoid installing zlib ++ set( ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libraries/zlib ) ++ set( ZLIB_LIBRARIES z ) ++ set( ZLIB_LIBRARY z ) ++endif() ++ + if( HAVE_VM_JIT AND UNIX ) + check_symbol_exists( "backtrace" "execinfo.h" HAVE_BACKTRACE ) + if( NOT HAVE_BACKTRACE ) +@@ -417,7 +429,6 @@ install(DIRECTORY docs/ + + option( DYN_OPENAL "Dynamically load OpenAL" ON ) + +-add_subdirectory( libraries/miniz ) + add_subdirectory( tools ) + add_subdirectory( wadsrc ) + add_subdirectory( wadsrc_bm ) +Index: gzdoom-g4.11.3/src/CMakeLists.txt +=================================================================== +--- gzdoom-g4.11.3.orig/src/CMakeLists.txt ++++ gzdoom-g4.11.3/src/CMakeLists.txt +@@ -344,7 +344,7 @@ add_custom_target( revision_check ALL + + # required libraries + +-set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} miniz "${BZIP2_LIBRARIES}" "${CMAKE_DL_LIBS}" "${DRPC_LIBRARIES}") ++set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} "${ZLIB_LIBRARIES}" "${BZIP2_LIBRARIES}" "${CMAKE_DL_LIBS}" "${DRPC_LIBRARIES}") + if (HAVE_VULKAN) + list( APPEND PROJECT_LIBRARIES "zvulkan" ) + endif() +@@ -412,7 +412,7 @@ if (TARGET WebP::webp) + endif() + endif() + +-include_directories( SYSTEM "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" "${ZMUSIC_INCLUDE_DIR}" "${DRPC_INCLUDE_DIR}") ++include_directories( SYSTEM "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" "${ZMUSIC_INCLUDE_DIR}" "${DRPC_INCLUDE_DIR}") + + if( ${HAVE_VM_JIT} ) + add_definitions( -DHAVE_VM_JIT ) +Index: gzdoom-g4.11.3/src/common/audio/music/i_music.cpp +=================================================================== +--- gzdoom-g4.11.3.orig/src/common/audio/music/i_music.cpp ++++ gzdoom-g4.11.3/src/common/audio/music/i_music.cpp +@@ -37,7 +37,7 @@ + #include + #endif + +-#include ++#include + + #include + #include "filesystem.h" +Index: gzdoom-g4.11.3/src/common/engine/serializer.cpp +=================================================================== +--- gzdoom-g4.11.3.orig/src/common/engine/serializer.cpp ++++ gzdoom-g4.11.3/src/common/engine/serializer.cpp +@@ -38,7 +38,7 @@ + #define RAPIDJSON_HAS_CXX11_RANGE_FOR 1 + #define RAPIDJSON_PARSE_DEFAULT_FLAGS kParseFullPrecisionFlag + +-#include ++#include + #include "rapidjson/rapidjson.h" + #include "rapidjson/writer.h" + #include "rapidjson/prettywriter.h" +Index: gzdoom-g4.11.3/src/common/filesystem/source/files_decompress.cpp +=================================================================== +--- gzdoom-g4.11.3.orig/src/common/filesystem/source/files_decompress.cpp ++++ gzdoom-g4.11.3/src/common/filesystem/source/files_decompress.cpp +@@ -36,7 +36,7 @@ + // Caution: LzmaDec also pulls in windows.h! + #define NOMINMAX + #include "LzmaDec.h" +-#include ++#include + #include + #include + #include +Index: gzdoom-g4.11.3/src/common/filesystem/source/filesystem.cpp +=================================================================== +--- gzdoom-g4.11.3.orig/src/common/filesystem/source/filesystem.cpp ++++ gzdoom-g4.11.3/src/common/filesystem/source/filesystem.cpp +@@ -36,7 +36,7 @@ + + // HEADER FILES ------------------------------------------------------------ + +-#include ++#include + #include + #include + #include +Index: gzdoom-g4.11.3/src/common/filesystem/source/resourcefile.cpp +=================================================================== +--- gzdoom-g4.11.3.orig/src/common/filesystem/source/resourcefile.cpp ++++ gzdoom-g4.11.3/src/common/filesystem/source/resourcefile.cpp +@@ -34,7 +34,7 @@ + ** + */ + +-#include ++#include + #include "resourcefile_internal.h" + #include "md5.hpp" + #include "fs_stringpool.h" +Index: gzdoom-g4.11.3/src/common/models/model.cpp +=================================================================== +--- gzdoom-g4.11.3.orig/src/common/models/model.cpp ++++ gzdoom-g4.11.3/src/common/models/model.cpp +@@ -25,7 +25,6 @@ + ** General model handling code + ** + **/ +-#include // offsetof() macro. + + #include "filesystem.h" + #include "cmdlib.h" +@@ -133,7 +132,17 @@ FTextureID LoadSkin(const char * path, c + + int ModelFrameHash(FSpriteModelFrame * smf) + { +- return crc32(0, (const unsigned char *)(&smf->type), offsetof(FSpriteModelFrame, hashnext) - offsetof(FSpriteModelFrame, type)); ++ const uint32_t *table = GetCRCTable (); ++ uint32_t hash = 0xffffffff; ++ ++ const char * s = (const char *)(&smf->type); // this uses type, sprite and frame for hashing ++ const char * se= (const char *)(&smf->hashnext); ++ ++ for (; s +-#include ++#include + + // MACROS ------------------------------------------------------------------ + +Index: gzdoom-g4.11.3/src/common/textures/m_png.cpp +=================================================================== +--- gzdoom-g4.11.3.orig/src/common/textures/m_png.cpp ++++ gzdoom-g4.11.3/src/common/textures/m_png.cpp +@@ -36,7 +36,7 @@ + + #include + #include +-#include ++#include + #include + #ifdef _MSC_VER + #include // for alloca() +Index: gzdoom-g4.11.3/src/common/thirdparty/m_crc32.h +=================================================================== +--- gzdoom-g4.11.3.orig/src/common/thirdparty/m_crc32.h ++++ gzdoom-g4.11.3/src/common/thirdparty/m_crc32.h +@@ -32,11 +32,12 @@ + ** + */ + #pragma once +-#include ++#include + #include + +-// miniz includes some CRC32 stuff, so just use that ++// zlib includes some CRC32 stuff, so just use that + ++inline const uint32_t *GetCRCTable () { return (const uint32_t *)get_crc_table(); } + inline uint32_t CalcCRC32 (const uint8_t *buf, unsigned int len) + { + return crc32 (0, buf, len); +Index: gzdoom-g4.11.3/src/g_pch.h +=================================================================== +--- gzdoom-g4.11.3.orig/src/g_pch.h ++++ gzdoom-g4.11.3/src/g_pch.h +@@ -10,7 +10,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +Index: gzdoom-g4.11.3/src/g_pch2.h +=================================================================== +--- gzdoom-g4.11.3.orig/src/g_pch2.h ++++ gzdoom-g4.11.3/src/g_pch2.h +@@ -11,7 +11,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +Index: gzdoom-g4.11.3/src/maploader/glnodes.cpp +=================================================================== +--- gzdoom-g4.11.3.orig/src/maploader/glnodes.cpp ++++ gzdoom-g4.11.3/src/maploader/glnodes.cpp +@@ -42,7 +42,7 @@ + + #endif + +-#include ++#include + + #include "m_argv.h" + #include "c_dispatch.h" +Index: gzdoom-g4.11.3/src/serializer_doom.cpp +=================================================================== +--- gzdoom-g4.11.3.orig/src/serializer_doom.cpp ++++ gzdoom-g4.11.3/src/serializer_doom.cpp +@@ -38,7 +38,7 @@ + #define RAPIDJSON_HAS_CXX11_RANGE_FOR 1 + #define RAPIDJSON_PARSE_DEFAULT_FLAGS kParseFullPrecisionFlag + +-#include ++#include + #include "rapidjson/rapidjson.h" + #include "rapidjson/writer.h" + #include "rapidjson/prettywriter.h" +Index: gzdoom-g4.11.3/tools/zipdir/CMakeLists.txt +=================================================================== +--- gzdoom-g4.11.3.orig/tools/zipdir/CMakeLists.txt ++++ gzdoom-g4.11.3/tools/zipdir/CMakeLists.txt +@@ -1,9 +1,9 @@ + cmake_minimum_required( VERSION 3.16 ) + + if( NOT CMAKE_CROSSCOMPILING ) +- include_directories( SYSTEM "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" ) ++ include_directories( SYSTEM "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" ) + add_executable( zipdir + zipdir.c ) +- target_link_libraries( zipdir miniz ${BZIP2_LIBRARIES} ${LZMA_LDFLAGS} ) ++ target_link_libraries( zipdir ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${LZMA_LDFLAGS} ) + set( CROSS_EXPORTS ${CROSS_EXPORTS} zipdir PARENT_SCOPE ) + endif() +Index: gzdoom-g4.11.3/tools/zipdir/zipdir.c +=================================================================== +--- gzdoom-g4.11.3.orig/tools/zipdir/zipdir.c ++++ gzdoom-g4.11.3/tools/zipdir/zipdir.c +@@ -46,7 +46,7 @@ + #include + #include + #include +-#include ++#include "zlib.h" + #include "bzlib.h" + #include "LzmaEnc.h" + #include "7zVersion.h" +Index: gzdoom-g4.11.3/vcpkg.json +=================================================================== +--- gzdoom-g4.11.3.orig/vcpkg.json ++++ gzdoom-g4.11.3/vcpkg.json +@@ -28,6 +28,10 @@ + }, + "dependencies": [ + { ++ "name": "zlib", ++ "platform": "!windows | (windows & static & staticcrt)" ++ }, ++ { + "name": "bzip2", + "platform": "!windows | (windows & static & staticcrt)" + }, diff --git a/g4.10.0.tar.gz b/g4.10.0.tar.gz deleted file mode 100644 index 95e6b4f..0000000 --- a/g4.10.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8702522c05048dfd4a765c6ac82a270d8bd0942e813d5bc6f4b69795a5d23a20 -size 24319337 diff --git a/g4.11.3.tar.gz b/g4.11.3.tar.gz new file mode 100644 index 0000000..7fa4ae2 --- /dev/null +++ b/g4.11.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5943dba50da20ff94f1fcc415132672d42a15917c571b1c2b7ceefe14935f5d5 +size 24354699 diff --git a/gcc13.diff b/gcc13.diff deleted file mode 100644 index 027ae93..0000000 --- a/gcc13.diff +++ /dev/null @@ -1,19 +0,0 @@ -From: Jan Engelhardt -Date: 2023-03-30 23:52:45.534338531 +0200 -Upstream: https://github.com/ZDoom/gzdoom/pull/2040 - -This is the g4.10.0 version of the change. - -diff --git a/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h b/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h -index fd4472286..db0b94f4e 100644 ---- a/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h -+++ b/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h -@@ -104,6 +104,8 @@ Documentation of all members: vk_mem_alloc.h - - [Source repository on GitHub](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator) - */ - -+#include -+ - #ifdef __cplusplus - extern "C" { - #endif diff --git a/gzdoom-discord.patch b/gzdoom-discord.patch index 094e99a..548285b 100644 --- a/gzdoom-discord.patch +++ b/gzdoom-discord.patch @@ -7,11 +7,11 @@ Unbundle discord-rpc. libraries/discordrpc/src/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) -Index: gzdoom-g4.8.1/CMakeLists.txt +Index: gzdoom-g4.11.3/CMakeLists.txt =================================================================== ---- gzdoom-g4.8.1.orig/CMakeLists.txt -+++ gzdoom-g4.8.1/CMakeLists.txt -@@ -329,9 +329,9 @@ if (HAVE_VULKAN) +--- gzdoom-g4.11.3.orig/CMakeLists.txt ++++ gzdoom-g4.11.3/CMakeLists.txt +@@ -356,9 +356,9 @@ if (HAVE_VULKAN) endif() add_subdirectory( libraries/discordrpc EXCLUDE_FROM_ALL ) @@ -22,12 +22,12 @@ Index: gzdoom-g4.8.1/CMakeLists.txt +set( DRPC_LIBRARIES -ldiscord-rpc ) +set( DRPC_LIBRARY -ldiscord-rpc ) - if( ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB ) - message( STATUS "Using system zlib, includes found at ${ZLIB_INCLUDE_DIR}" ) -Index: gzdoom-g4.8.1/libraries/discordrpc/src/CMakeLists.txt + if( HAVE_VM_JIT AND UNIX ) + check_symbol_exists( "backtrace" "execinfo.h" HAVE_BACKTRACE ) +Index: gzdoom-g4.11.3/libraries/discordrpc/src/CMakeLists.txt =================================================================== ---- gzdoom-g4.8.1.orig/libraries/discordrpc/src/CMakeLists.txt -+++ gzdoom-g4.8.1/libraries/discordrpc/src/CMakeLists.txt +--- gzdoom-g4.11.3.orig/libraries/discordrpc/src/CMakeLists.txt ++++ gzdoom-g4.11.3/libraries/discordrpc/src/CMakeLists.txt @@ -28,7 +28,7 @@ endif(${BUILD_SHARED_LIBS}) if(WIN32) add_definitions(-DDISCORD_WINDOWS) diff --git a/gzdoom-lzma.patch b/gzdoom-lzma.patch index 13a162a..fa37428 100644 --- a/gzdoom-lzma.patch +++ b/gzdoom-lzma.patch @@ -9,11 +9,11 @@ Use LZMA system libraries instead of bundled code. tools/zipdir/CMakeLists.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) -Index: gzdoom-g4.8.0/CMakeLists.txt +Index: gzdoom-g4.11.0/CMakeLists.txt =================================================================== ---- gzdoom-g4.8.0.orig/CMakeLists.txt -+++ gzdoom-g4.8.0/CMakeLists.txt -@@ -17,6 +17,7 @@ endif() +--- gzdoom-g4.11.0.orig/CMakeLists.txt ++++ gzdoom-g4.11.0/CMakeLists.txt +@@ -50,6 +50,7 @@ set(CMAKE_CXX_EXTENSIONS OFF) list( APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ) include( FindPackageHandleStandardArgs ) @@ -21,7 +21,7 @@ Index: gzdoom-g4.8.0/CMakeLists.txt # Support cross compiling option( FORCE_CROSSCOMPILE "Turn on cross compiling." NO ) -@@ -392,7 +393,7 @@ else() +@@ -396,7 +397,7 @@ else() set( BZIP2_LIBRARY bz2 ) endif() @@ -30,49 +30,49 @@ Index: gzdoom-g4.8.0/CMakeLists.txt if( NOT CMAKE_CROSSCOMPILING ) if( NOT CROSS_EXPORTS ) -@@ -412,7 +413,6 @@ install(DIRECTORY docs/ +@@ -416,7 +417,6 @@ install(DIRECTORY docs/ option( DYN_OPENAL "Dynamically load OpenAL" ON ) -add_subdirectory( libraries/lzma ) + add_subdirectory( libraries/miniz ) add_subdirectory( tools ) - add_subdirectory( libraries/gdtoa ) add_subdirectory( wadsrc ) -Index: gzdoom-g4.8.0/src/CMakeLists.txt +Index: gzdoom-g4.11.0/src/CMakeLists.txt =================================================================== ---- gzdoom-g4.8.0.orig/src/CMakeLists.txt -+++ gzdoom-g4.8.0/src/CMakeLists.txt -@@ -427,7 +427,7 @@ else() - message( SEND_ERROR "Could not find libvpx" ) - endif() - --include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${DRPC_INCLUDE_DIR}") -+include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" "${JPEG_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${DRPC_INCLUDE_DIR}") - - if( ${HAVE_VM_JIT} ) - add_definitions( -DHAVE_VM_JIT ) -@@ -1297,7 +1297,7 @@ if( UNIX ) +--- gzdoom-g4.11.0.orig/src/CMakeLists.txt ++++ gzdoom-g4.11.0/src/CMakeLists.txt +@@ -387,7 +387,7 @@ if (TARGET WebP::webp) endif() endif() --target_link_libraries( zdoom ${PROJECT_LIBRARIES} gdtoa lzma ${ZMUSIC_LIBRARIES} ) -+target_link_libraries( zdoom ${PROJECT_LIBRARIES} gdtoa ${LZMA_LIBRARIES} ${ZMUSIC_LIBRARIES} ) +-include_directories( SYSTEM "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${DRPC_INCLUDE_DIR}") ++include_directories( SYSTEM "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" "${ZMUSIC_INCLUDE_DIR}" "${DRPC_INCLUDE_DIR}") - include_directories( . - common/audio/sound -Index: gzdoom-g4.8.0/tools/zipdir/CMakeLists.txt + if( ${HAVE_VM_JIT} ) + add_definitions( -DHAVE_VM_JIT ) +@@ -1252,7 +1252,7 @@ if( UNIX ) + endif() + endif() + +-target_link_libraries( zdoom ${PROJECT_LIBRARIES} lzma ${ZMUSIC_LIBRARIES} ) ++target_link_libraries( zdoom ${PROJECT_LIBRARIES} ${LZMA_LIBRARIES} ${ZMUSIC_LIBRARIES} ) + + include_directories( + BEFORE +Index: gzdoom-g4.11.0/tools/zipdir/CMakeLists.txt =================================================================== ---- gzdoom-g4.8.0.orig/tools/zipdir/CMakeLists.txt -+++ gzdoom-g4.8.0/tools/zipdir/CMakeLists.txt +--- gzdoom-g4.11.0.orig/tools/zipdir/CMakeLists.txt ++++ gzdoom-g4.11.0/tools/zipdir/CMakeLists.txt @@ -1,9 +1,9 @@ - cmake_minimum_required( VERSION 3.1.0 ) + cmake_minimum_required( VERSION 3.16 ) if( NOT CMAKE_CROSSCOMPILING ) -- include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" ) -+ include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" ) +- include_directories( SYSTEM "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" ) ++ include_directories( SYSTEM "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" ) add_executable( zipdir zipdir.c ) -- target_link_libraries( zipdir ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} lzma ) -+ target_link_libraries( zipdir ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${LZMA_LDFLAGS}) +- target_link_libraries( zipdir miniz ${BZIP2_LIBRARIES} lzma ) ++ target_link_libraries( zipdir miniz ${BZIP2_LIBRARIES} ${LZMA_LDFLAGS} ) set( CROSS_EXPORTS ${CROSS_EXPORTS} zipdir PARENT_SCOPE ) endif() diff --git a/gzdoom-vulkan.patch b/gzdoom-vulkan.patch deleted file mode 100644 index a73b44c..0000000 --- a/gzdoom-vulkan.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: Jan Engelhardt -Date: 2019-04-13 15:02:22.799297208 +0200 - -Use Vulkan/glslang/spirv system libraries instead of bundled code. - ---- - CMakeLists.txt | 4 +--- - src/CMakeLists.txt | 2 +- - src/common/rendering/vulkan/system/vk_builders.cpp | 4 ++++ - 3 files changed, 6 insertions(+), 4 deletions(-) - -Index: gzdoom-g4.8.2/CMakeLists.txt -=================================================================== ---- gzdoom-g4.8.2.orig/CMakeLists.txt -+++ gzdoom-g4.8.2/CMakeLists.txt -@@ -325,9 +325,7 @@ option(FORCE_INTERNAL_ASMJIT "Use intern - mark_as_advanced( FORCE_INTERNAL_ASMJIT ) - - if (HAVE_VULKAN) -- add_subdirectory( libraries/glslang/glslang) -- add_subdirectory( libraries/glslang/spirv ) -- add_subdirectory( libraries/glslang/OGLCompilersDLL ) -+ include_directories(/usr/include/glslang/Public /usr/include/SPIRV) - endif() - - add_subdirectory( libraries/discordrpc EXCLUDE_FROM_ALL ) -Index: gzdoom-g4.8.2/src/CMakeLists.txt -=================================================================== ---- gzdoom-g4.8.2.orig/src/CMakeLists.txt -+++ gzdoom-g4.8.2/src/CMakeLists.txt -@@ -368,7 +368,7 @@ add_custom_target( revision_check ALL - - set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_LIBRARIES}" "${CMAKE_DL_LIBS}" "${DRPC_LIBRARIES}") - if (HAVE_VULKAN) -- set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} "glslang" "SPIRV" "OGLCompiler") -+ set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} -lglslang -lSPIRV -lOGLCompiler) - endif() - - # ZMUSIC -Index: gzdoom-g4.8.2/src/common/rendering/vulkan/system/vk_builders.cpp -=================================================================== ---- gzdoom-g4.8.2.orig/src/common/rendering/vulkan/system/vk_builders.cpp -+++ gzdoom-g4.8.2/src/common/rendering/vulkan/system/vk_builders.cpp -@@ -25,6 +25,7 @@ - #include "renderstyle.h" - #include - #include -+#include - - static const TBuiltInResource DefaultTBuiltInResource = { - /* .MaxLights = */ 32, -@@ -119,6 +120,9 @@ static const TBuiltInResource DefaultTBu - /* .maxTaskWorkGroupSizeY_NV = */ 1, - /* .maxTaskWorkGroupSizeZ_NV = */ 1, - /* .maxMeshViewCountNV = */ 4, -+#if (GLSLANG_VERSION_MAJOR == 11 && GLSLANG_VERSION_MINOR >= 12) || GLSLANG_VERSION_MAJOR > 11 -+ 256, 256, 128, 128, 128, 128, 128, 128, 4, -+#endif - /* .maxDualSourceDrawBuffersEXT = */ 1, - - /* .limits = */ { diff --git a/gzdoom.changes b/gzdoom.changes index c666182..1c234b0 100644 --- a/gzdoom.changes +++ b/gzdoom.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Fri Oct 27 04:20:10 UTC 2023 - Jan Engelhardt + +- Update to release 4.11.3 + * Several new languages: Danish, Norwegian, Swedish and Turkish. + * Cleanup of Doom's and Chex Quest's small font to use proper + character heights for international support. + * Extended all fonts to be capable of handling all European + languages which are in common use. + * DSDHacked support. + * WebP and QOI support for textures. + * Sanitized the light mode selection to make it a first class + mapping feature by separating map dependent light mode setup + from performance related user preferences for the default + setting. + * Lots of new ZScript features. +- Delete gzdoom-vulkan.patch + ------------------------------------------------------------------- Thu Mar 30 22:02:53 UTC 2023 - Jan Engelhardt diff --git a/gzdoom.spec b/gzdoom.spec index 9ca3a70..0230206 100644 --- a/gzdoom.spec +++ b/gzdoom.spec @@ -17,7 +17,7 @@ Name: gzdoom -Version: 4.10.0 +Version: 4.11.3 Release: 0 Summary: A DOOM source port with graphic and modding extensions License: GPL-3.0-only @@ -28,11 +28,10 @@ URL: https://zdoom.org/ Source: https://github.com/zdoom/gzdoom/archive/g%version.tar.gz Patch1: gzdoom-waddir.patch Patch2: gzdoom-lzma.patch -Patch5: gzdoom-vulkan.patch Patch6: gzdoom-discord.patch Patch8: 0001-removed-some-32bit-only-CMake-code.patch Patch9: 0001-Revert-use-static_assert-to-make-32-bit-builds-fail.patch -Patch10: gcc13.diff +Patch10: 0001-Revert-Switch-to-miniz-from-zlib.patch BuildRequires: cmake >= 2.8.7 BuildRequires: discord-rpc-devel BuildRequires: gcc-c++ @@ -45,17 +44,13 @@ BuildRequires: pkgconfig(clzma) >= 17.01 BuildRequires: pkgconfig(flac) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(libwebp) BuildRequires: pkgconfig(openal) BuildRequires: pkgconfig(sdl2) >= 2.0.6 BuildRequires: pkgconfig(vpx) BuildRequires: pkgconfig(zlib) -%if 0%{?suse_version} >= 1550 -BuildRequires: glslang-devel >= 11.10 -BuildRequires: pkgconfig(vulkan) >= 1.2.189 -%else Provides: bundled(glslang) = 11.10.0 Provides: bundled(vulkan) = 1.2.189.1 -%endif Suggests: freedoom Provides: qzdoom = 1.3.0 Provides: zdoom = 2.8.1 @@ -79,12 +74,6 @@ The executables hard-require SSE2 on i686 currently. %autosetup -n %name-g%version -p1 perl -i -pe 's{__DATE__}{"does not matter when"}g' src/common/platform/posix/sdl/i_main.cpp perl -i -pe 's{}{%version}g' tools/updaterevision/UpdateRevision.cmake -mkdir -p extra_include/glslang -%if 0%{?suse_version} >= 1550 -rm -Rf glslang src/common/rendering/vulkan/thirdparty/vulkan -%else -%patch -P 5 -R -p1 -%endif %build # There is handcrafted assembler, which LTO does not play nice with. From 574d9f0684ba999ce291dc619ed5c1d166716611e066ad6e0228c6691e85dc48 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 3 Nov 2023 09:26:55 +0000 Subject: [PATCH 2/4] OBS-URL: https://build.opensuse.org/package/show/games/gzdoom?expand=0&rev=101 --- gzdoom.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gzdoom.changes b/gzdoom.changes index 1c234b0..091e665 100644 --- a/gzdoom.changes +++ b/gzdoom.changes @@ -14,7 +14,7 @@ Fri Oct 27 04:20:10 UTC 2023 - Jan Engelhardt from performance related user preferences for the default setting. * Lots of new ZScript features. -- Delete gzdoom-vulkan.patch +- Delete gzdoom-vulkan.patch, gcc13.diff ------------------------------------------------------------------- Thu Mar 30 22:02:53 UTC 2023 - Jan Engelhardt From 335001b6ec498072a14a532f4b14a901aee50e5309a5af7901f2ab3923094775 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 3 Nov 2023 09:53:38 +0000 Subject: [PATCH 3/4] - Add more-32bit.patch OBS-URL: https://build.opensuse.org/package/show/games/gzdoom?expand=0&rev=102 --- gzdoom.changes | 1 + gzdoom.spec | 1 + more-32bit.patch | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 more-32bit.patch diff --git a/gzdoom.changes b/gzdoom.changes index 091e665..ecb80f8 100644 --- a/gzdoom.changes +++ b/gzdoom.changes @@ -15,6 +15,7 @@ Fri Oct 27 04:20:10 UTC 2023 - Jan Engelhardt setting. * Lots of new ZScript features. - Delete gzdoom-vulkan.patch, gcc13.diff +- Add more-32bit.patch ------------------------------------------------------------------- Thu Mar 30 22:02:53 UTC 2023 - Jan Engelhardt diff --git a/gzdoom.spec b/gzdoom.spec index 0230206..9b93e84 100644 --- a/gzdoom.spec +++ b/gzdoom.spec @@ -32,6 +32,7 @@ Patch6: gzdoom-discord.patch Patch8: 0001-removed-some-32bit-only-CMake-code.patch Patch9: 0001-Revert-use-static_assert-to-make-32-bit-builds-fail.patch Patch10: 0001-Revert-Switch-to-miniz-from-zlib.patch +Patch11: more-32bit.patch BuildRequires: cmake >= 2.8.7 BuildRequires: discord-rpc-devel BuildRequires: gcc-c++ diff --git a/more-32bit.patch b/more-32bit.patch new file mode 100644 index 0000000..aa94961 --- /dev/null +++ b/more-32bit.patch @@ -0,0 +1,27 @@ +From: Jan Engelhardt +Date: 2023-11-03 10:46:06.423636287 +0100 + +VkSurfaceKHR is an alias to `struct something *` on 64-bit platforms, but to +`uint64_t` on 32-bit. Using {} will clear it without running into a type error: + +[ 88s] sdlglvideo.cpp:294:54: error: cannot convert 'std::nullptr_t' to +'VkSurfaceKHR' {aka 'long long unsigned int'} in initialization +[ 88s] 294 | VkSurfaceKHR surfacehandle = nullptr; + +--- + src/common/platform/posix/sdl/sdlglvideo.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: gzdoom-g4.11.3/src/common/platform/posix/sdl/sdlglvideo.cpp +=================================================================== +--- gzdoom-g4.11.3.orig/src/common/platform/posix/sdl/sdlglvideo.cpp ++++ gzdoom-g4.11.3/src/common/platform/posix/sdl/sdlglvideo.cpp +@@ -291,7 +291,7 @@ DFrameBuffer *SDLVideo::CreateFrameBuffe + builder.RequireExtension(names[i]); + auto instance = builder.Create(); + +- VkSurfaceKHR surfacehandle = nullptr; ++ VkSurfaceKHR surfacehandle = {}; + if (!I_CreateVulkanSurface(instance->Instance, &surfacehandle)) + VulkanError("I_CreateVulkanSurface failed"); + From 76c5c694748974871ec26667035c1dc96bf482d27748ffc20afe2fd4c3ed52b6 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 3 Nov 2023 13:32:45 +0000 Subject: [PATCH 4/4] OBS-URL: https://build.opensuse.org/package/show/games/gzdoom?expand=0&rev=103 --- gzdoom.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gzdoom.changes b/gzdoom.changes index ecb80f8..6e31743 100644 --- a/gzdoom.changes +++ b/gzdoom.changes @@ -15,7 +15,7 @@ Fri Oct 27 04:20:10 UTC 2023 - Jan Engelhardt setting. * Lots of new ZScript features. - Delete gzdoom-vulkan.patch, gcc13.diff -- Add more-32bit.patch +- Add more-32bit.patch, 0001-Revert-Switch-to-miniz-from-zlib.patch ------------------------------------------------------------------- Thu Mar 30 22:02:53 UTC 2023 - Jan Engelhardt