From f4dc07095ce1fd3cefbccb01ebeed2b33761cae96b8404264798fc22420012f6 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 11 Jun 2020 15:19:08 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/games/gzdoom?expand=0&rev=46 --- gzdoom-spirv.patch | 23 +++++++++++++++++++++++ gzdoom-vulkan.patch | 21 ++++----------------- gzdoom.changes | 2 +- gzdoom.spec | 15 ++++++++------- 4 files changed, 36 insertions(+), 25 deletions(-) create mode 100644 gzdoom-spirv.patch diff --git a/gzdoom-spirv.patch b/gzdoom-spirv.patch new file mode 100644 index 0000000..456408b --- /dev/null +++ b/gzdoom-spirv.patch @@ -0,0 +1,23 @@ +From: Jan Engelhardt +Date: 2020-06-11 15:48:28.422839234 +0200 + +gzdoom is the only user of its own libSPIRV.so, so there is no need for a +shared library. + +--- + libraries/glslang/spirv/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: gzdoom-g4.4.0/libraries/glslang/spirv/CMakeLists.txt +=================================================================== +--- gzdoom-g4.4.0.orig/libraries/glslang/spirv/CMakeLists.txt ++++ gzdoom-g4.4.0/libraries/glslang/spirv/CMakeLists.txt +@@ -49,7 +49,7 @@ set(SPVREMAP_HEADERS + SPVRemapper.h + doc.h) + +-add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS}) ++add_library(SPIRV STATIC ${LIB_TYPE} ${SOURCES} ${HEADERS}) + set_property(TARGET SPIRV PROPERTY FOLDER glslang) + set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON) + target_include_directories(SPIRV PUBLIC diff --git a/gzdoom-vulkan.patch b/gzdoom-vulkan.patch index bdc8a3a..42c7bc7 100644 --- a/gzdoom-vulkan.patch +++ b/gzdoom-vulkan.patch @@ -1,13 +1,12 @@ From: Jan Engelhardt Date: 2019-04-13 15:02:22.799297208 +0200 -Use Vulkan system libraries instead of bundled code. +Use Vulkan/glslang/spirv system libraries instead of bundled code. --- - CMakeLists.txt | 4 +--- - libraries/glslang/spirv/CMakeLists.txt | 1 + - src/CMakeLists.txt | 2 +- - 3 files changed, 3 insertions(+), 4 deletions(-) + CMakeLists.txt | 4 +--- + src/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 4 deletions(-) Index: gzdoom-g4.4.0/CMakeLists.txt =================================================================== @@ -24,18 +23,6 @@ Index: gzdoom-g4.4.0/CMakeLists.txt endif() if( ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB ) -Index: gzdoom-g4.4.0/libraries/glslang/spirv/CMakeLists.txt -=================================================================== ---- gzdoom-g4.4.0.orig/libraries/glslang/spirv/CMakeLists.txt -+++ gzdoom-g4.4.0/libraries/glslang/spirv/CMakeLists.txt -@@ -50,6 +50,7 @@ set(SPVREMAP_HEADERS - doc.h) - - add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS}) -+set_property(TARGET SPIRV OUTPUT_NAME libSPIRV-zdoom) - set_property(TARGET SPIRV PROPERTY FOLDER glslang) - set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON) - target_include_directories(SPIRV PUBLIC Index: gzdoom-g4.4.0/src/CMakeLists.txt =================================================================== --- gzdoom-g4.4.0.orig/src/CMakeLists.txt diff --git a/gzdoom.changes b/gzdoom.changes index 07ac10e..11ddc00 100644 --- a/gzdoom.changes +++ b/gzdoom.changes @@ -13,7 +13,7 @@ Sun Jun 7 23:39:42 UTC 2020 - Jan Engelhardt * Attenuated lights for Strife. * Added MTF_NOCOUNT to spawn flags. - Drop gzdoom-system-gme.patch (moved to zmusic.spec), - gzdoom-dl.patch (unnecessary) + gzdoom-dl.patch (unnecessary). Add gzdoom-spirv.patch. ------------------------------------------------------------------- Wed Jan 29 17:43:59 UTC 2020 - Michael Scafidi diff --git a/gzdoom.spec b/gzdoom.spec index 720905d..e21e7d1 100644 --- a/gzdoom.spec +++ b/gzdoom.spec @@ -29,7 +29,8 @@ Source: https://github.com/coelckers/gzdoom/archive/g%version.tar.gz Patch1: gzdoom-waddir.patch Patch2: gzdoom-lzma.patch Patch3: gzdoom-asmjit.patch -Patch4: gzdoom-vulkan.patch +Patch4: gzdoom-spirv.patch +Patch5: gzdoom-vulkan.patch BuildRequires: cmake >= 2.8.7 BuildRequires: gcc-c++ BuildRequires: libjpeg-devel @@ -44,12 +45,13 @@ BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(openal) BuildRequires: pkgconfig(sdl2) -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 Recommends: freedoom Recommends: timidity @@ -75,12 +77,11 @@ GZDoom is a port (a modification) of the original Doom source code, featuring: %prep %setup -qn %name-g%version -%patch -P 1 -P 2 -P 3 -p1 -%if 1 || 0%{?sle_version} >= 150200 -%patch -P 4 -p1 -rm -Rf glslang +%patch -P 1 -P 2 -P 3 -P 4 -p1 +%if 0%{?sle_version} >= 150200 +%patch -P 5 -p1 +rm -Rf glslang src/common/rendering/vulkan/thirdparty/vulkan %endif -rm -Rf src/common/rendering/vulkan/thirdparty/vulkan perl -i -pe 's{__DATE__}{""}g' src/posix/sdl/i_main.cpp %build