From d1899593255e5d41e9be883717faba9f5cf1361cb5383a868fd917482df9edfb Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 23 Apr 2022 01:05:51 +0000 Subject: [PATCH] - Reenable use of system vulkan libraries on Tumbleweed. OBS-URL: https://build.opensuse.org/package/show/games/gzdoom?expand=0&rev=63 --- gzdoom-vulkan.patch | 37 ++++++++++++++++++++++++++----------- gzdoom.changes | 5 +++++ gzdoom.spec | 15 +++------------ 3 files changed, 34 insertions(+), 23 deletions(-) diff --git a/gzdoom-vulkan.patch b/gzdoom-vulkan.patch index 42c7bc7..88eae79 100644 --- a/gzdoom-vulkan.patch +++ b/gzdoom-vulkan.patch @@ -4,15 +4,16 @@ 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 +- - 2 files changed, 2 insertions(+), 4 deletions(-) + CMakeLists.txt | 4 +--- + src/CMakeLists.txt | 2 +- + src/common/rendering/vulkan/system/vk_builders.cpp | 3 +++ + 3 files changed, 5 insertions(+), 4 deletions(-) -Index: gzdoom-g4.4.0/CMakeLists.txt +Index: gzdoom-g4.7.1/CMakeLists.txt =================================================================== ---- gzdoom-g4.4.0.orig/CMakeLists.txt -+++ gzdoom-g4.4.0/CMakeLists.txt -@@ -307,9 +307,7 @@ option(FORCE_INTERNAL_ASMJIT "Use intern +--- gzdoom-g4.7.1.orig/CMakeLists.txt ++++ gzdoom-g4.7.1/CMakeLists.txt +@@ -324,9 +324,7 @@ option(FORCE_INTERNAL_ASMJIT "Use intern mark_as_advanced( FORCE_INTERNAL_ASMJIT ) if (HAVE_VULKAN) @@ -23,11 +24,11 @@ Index: gzdoom-g4.4.0/CMakeLists.txt endif() if( ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB ) -Index: gzdoom-g4.4.0/src/CMakeLists.txt +Index: gzdoom-g4.7.1/src/CMakeLists.txt =================================================================== ---- gzdoom-g4.4.0.orig/src/CMakeLists.txt -+++ gzdoom-g4.4.0/src/CMakeLists.txt -@@ -435,7 +435,7 @@ add_custom_target( revision_check ALL +--- gzdoom-g4.7.1.orig/src/CMakeLists.txt ++++ gzdoom-g4.7.1/src/CMakeLists.txt +@@ -404,7 +404,7 @@ add_custom_target( revision_check ALL set( ZDOOM_LIBS ${ZDOOM_LIBS} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_LIBRARIES}" "${CMAKE_DL_LIBS}" ) if (HAVE_VULKAN) @@ -36,3 +37,17 @@ Index: gzdoom-g4.4.0/src/CMakeLists.txt endif() include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" "${JPEG_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" ) +Index: gzdoom-g4.7.1/src/common/rendering/vulkan/system/vk_builders.cpp +=================================================================== +--- gzdoom-g4.7.1.orig/src/common/rendering/vulkan/system/vk_builders.cpp ++++ gzdoom-g4.7.1/src/common/rendering/vulkan/system/vk_builders.cpp +@@ -119,6 +119,9 @@ static const TBuiltInResource DefaultTBu + /* .maxTaskWorkGroupSizeY_NV = */ 1, + /* .maxTaskWorkGroupSizeZ_NV = */ 1, + /* .maxMeshViewCountNV = */ 4, ++#if GLSLANG_VERSION_MAJOR > 11 || (GLSLANG_VERSION_MAJOR == 11 && GLSLANG_VERSION_MINOR >= 9) ++ /* .maxDualSourceDrawBuffersEXT = */ 4, ++#endif + + /* .limits = */ { + /* .nonInductiveForLoops = */ 1, diff --git a/gzdoom.changes b/gzdoom.changes index 730dccb..15debc8 100644 --- a/gzdoom.changes +++ b/gzdoom.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Apr 23 01:04:05 UTC 2022 - Jan Engelhardt + +- Reenable use of system vulkan libraries on Tumbleweed. + ------------------------------------------------------------------- Fri Apr 15 23:08:58 UTC 2022 - Cristian Rodríguez diff --git a/gzdoom.spec b/gzdoom.spec index 28615f2..c5833d3 100644 --- a/gzdoom.spec +++ b/gzdoom.spec @@ -33,6 +33,7 @@ Patch4: gzdoom-sdlbug.patch Patch5: gzdoom-vulkan.patch BuildRequires: cmake >= 2.8.7 BuildRequires: gcc-c++ +BuildRequires: glslang-devel BuildRequires: libjpeg-devel BuildRequires: pkg-config BuildRequires: unzip @@ -44,14 +45,8 @@ BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(openal) BuildRequires: pkgconfig(sdl2) >= 2.0.6 +BuildRequires: pkgconfig(vulkan) BuildRequires: pkgconfig(zlib) -%if 0%{?sle_version} >= 150200 -BuildRequires: glslang-devel >= 6.3 -BuildRequires: pkgconfig(vulkan) >= 1.1.77 -%else -Provides: bundled(glslang) = 8.13.3559 -Provides: bundled(vulkan) = 1.1.114 -%endif Suggests: freedoom Provides: qzdoom = 1.3.0 Provides: zdoom = 2.8.1 @@ -73,12 +68,8 @@ GZDoom is a port (a modification) of the original Doom source code, featuring: * Demo record/playback of classic and Boom demos is not supported. %prep -%setup -qn %name-g%version -%patch -P 1 -P 2 -P 3 -P 4 -p1 -%if 0%{?sle_version} >= 150200 -%patch -P 5 -p1 +%autosetup -n %name-g%version -p1 rm -Rf glslang src/common/rendering/vulkan/thirdparty/vulkan -%endif perl -i -pe 's{__DATE__}{""}g' src/common/platform/posix/sdl/i_main.cpp %build