forked from pool/gzdoom
This commit is contained in:
parent
155fd3f2e8
commit
47bf5f3c9b
@ -4,26 +4,38 @@ Date: 2019-04-13 15:02:22.799297208 +0200
|
|||||||
Use Vulkan system libraries instead of bundled code.
|
Use Vulkan system libraries instead of bundled code.
|
||||||
|
|
||||||
---
|
---
|
||||||
CMakeLists.txt | 3 ---
|
CMakeLists.txt | 4 +---
|
||||||
|
libraries/glslang/spirv/CMakeLists.txt | 1 +
|
||||||
src/CMakeLists.txt | 2 +-
|
src/CMakeLists.txt | 2 +-
|
||||||
src/common/rendering/vulkan/shaders/vk_shader.cpp | 2 +-
|
3 files changed, 3 insertions(+), 4 deletions(-)
|
||||||
src/common/rendering/vulkan/system/vk_builders.cpp | 4 ++--
|
|
||||||
4 files changed, 4 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
Index: gzdoom-g4.4.0/CMakeLists.txt
|
Index: gzdoom-g4.4.0/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gzdoom-g4.4.0.orig/CMakeLists.txt
|
--- gzdoom-g4.4.0.orig/CMakeLists.txt
|
||||||
+++ gzdoom-g4.4.0/CMakeLists.txt
|
+++ gzdoom-g4.4.0/CMakeLists.txt
|
||||||
@@ -307,9 +307,6 @@ option(FORCE_INTERNAL_ASMJIT "Use intern
|
@@ -307,9 +307,7 @@ option(FORCE_INTERNAL_ASMJIT "Use intern
|
||||||
mark_as_advanced( FORCE_INTERNAL_ASMJIT )
|
mark_as_advanced( FORCE_INTERNAL_ASMJIT )
|
||||||
|
|
||||||
if (HAVE_VULKAN)
|
if (HAVE_VULKAN)
|
||||||
- add_subdirectory( libraries/glslang/glslang)
|
- add_subdirectory( libraries/glslang/glslang)
|
||||||
- add_subdirectory( libraries/glslang/spirv )
|
- add_subdirectory( libraries/glslang/spirv )
|
||||||
- add_subdirectory( libraries/glslang/OGLCompilersDLL )
|
- add_subdirectory( libraries/glslang/OGLCompilersDLL )
|
||||||
|
+ include_directories(/usr/include/glslang/Public /usr/include/SPIRV)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB )
|
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
|
Index: gzdoom-g4.4.0/src/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gzdoom-g4.4.0.orig/src/CMakeLists.txt
|
--- gzdoom-g4.4.0.orig/src/CMakeLists.txt
|
||||||
@ -37,31 +49,3 @@ Index: gzdoom-g4.4.0/src/CMakeLists.txt
|
|||||||
endif()
|
endif()
|
||||||
include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" "${JPEG_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" )
|
include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" "${JPEG_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" )
|
||||||
|
|
||||||
Index: gzdoom-g4.4.0/src/common/rendering/vulkan/shaders/vk_shader.cpp
|
|
||||||
===================================================================
|
|
||||||
--- gzdoom-g4.4.0.orig/src/common/rendering/vulkan/shaders/vk_shader.cpp
|
|
||||||
+++ gzdoom-g4.4.0/src/common/rendering/vulkan/shaders/vk_shader.cpp
|
|
||||||
@@ -25,7 +25,7 @@
|
|
||||||
#include "hw_shaderpatcher.h"
|
|
||||||
#include "filesystem.h"
|
|
||||||
#include "engineerrors.h"
|
|
||||||
-#include <ShaderLang.h>
|
|
||||||
+#include <glslang/Public/ShaderLang.h>
|
|
||||||
|
|
||||||
VkShaderManager::VkShaderManager(VulkanDevice *device) : device(device)
|
|
||||||
{
|
|
||||||
Index: gzdoom-g4.4.0/src/common/rendering/vulkan/system/vk_builders.cpp
|
|
||||||
===================================================================
|
|
||||||
--- gzdoom-g4.4.0.orig/src/common/rendering/vulkan/system/vk_builders.cpp
|
|
||||||
+++ gzdoom-g4.4.0/src/common/rendering/vulkan/system/vk_builders.cpp
|
|
||||||
@@ -23,8 +23,8 @@
|
|
||||||
#include "vk_builders.h"
|
|
||||||
#include "engineerrors.h"
|
|
||||||
#include "renderstyle.h"
|
|
||||||
-#include <ShaderLang.h>
|
|
||||||
-#include <GlslangToSpv.h>
|
|
||||||
+#include <glslang/Public/ShaderLang.h>
|
|
||||||
+#include <SPIRV/GlslangToSpv.h>
|
|
||||||
|
|
||||||
static const TBuiltInResource DefaultTBuiltInResource = {
|
|
||||||
/* .MaxLights = */ 32,
|
|
||||||
|
20
gzdoom.spec
20
gzdoom.spec
@ -28,15 +28,13 @@ URL: https://zdoom.org/
|
|||||||
Source: https://github.com/coelckers/gzdoom/archive/g%version.tar.gz
|
Source: https://github.com/coelckers/gzdoom/archive/g%version.tar.gz
|
||||||
Patch1: gzdoom-waddir.patch
|
Patch1: gzdoom-waddir.patch
|
||||||
Patch2: gzdoom-lzma.patch
|
Patch2: gzdoom-lzma.patch
|
||||||
Patch3: gzdoom-vulkan.patch
|
Patch3: gzdoom-asmjit.patch
|
||||||
Patch4: gzdoom-asmjit.patch
|
Patch4: gzdoom-vulkan.patch
|
||||||
BuildRequires: cmake >= 2.8.7
|
BuildRequires: cmake >= 2.8.7
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: glslang-devel
|
|
||||||
BuildRequires: libjpeg-devel
|
BuildRequires: libjpeg-devel
|
||||||
BuildRequires: nasm
|
BuildRequires: nasm
|
||||||
BuildRequires: pkg-config
|
BuildRequires: pkg-config
|
||||||
BuildRequires: spirv-tools-devel
|
|
||||||
BuildRequires: unzip
|
BuildRequires: unzip
|
||||||
BuildRequires: zmusic-devel
|
BuildRequires: zmusic-devel
|
||||||
BuildRequires: pkgconfig(bzip2)
|
BuildRequires: pkgconfig(bzip2)
|
||||||
@ -48,6 +46,11 @@ BuildRequires: pkgconfig(openal)
|
|||||||
BuildRequires: pkgconfig(sdl2)
|
BuildRequires: pkgconfig(sdl2)
|
||||||
BuildRequires: pkgconfig(vulkan)
|
BuildRequires: pkgconfig(vulkan)
|
||||||
BuildRequires: pkgconfig(zlib)
|
BuildRequires: pkgconfig(zlib)
|
||||||
|
%if 0%{?sle_version} >= 150200
|
||||||
|
BuildRequires: glslang-devel >= 6.3
|
||||||
|
%else
|
||||||
|
Provides: bundled(glslang) = 8.13.3559
|
||||||
|
%endif
|
||||||
Recommends: freedoom
|
Recommends: freedoom
|
||||||
Recommends: timidity
|
Recommends: timidity
|
||||||
Recommends: timidity-eawpats
|
Recommends: timidity-eawpats
|
||||||
@ -71,8 +74,13 @@ GZDoom is a port (a modification) of the original Doom source code, featuring:
|
|||||||
* Demo record/playback of classic and Boom demos is not supported.
|
* Demo record/playback of classic and Boom demos is not supported.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n %name-g%version
|
%setup -qn %name-g%version
|
||||||
rm -Rfv glslang src/rendering/vulkan/thirdparty/vulkan
|
%patch -P 1 -P 2 -P 3 -p1
|
||||||
|
%if 1 || 0%{?sle_version} >= 150200
|
||||||
|
%patch -P 4 -p1
|
||||||
|
rm -Rf glslang
|
||||||
|
%endif
|
||||||
|
rm -Rf src/common/rendering/vulkan/thirdparty/vulkan
|
||||||
perl -i -pe 's{__DATE__}{""}g' src/posix/sdl/i_main.cpp
|
perl -i -pe 's{__DATE__}{""}g' src/posix/sdl/i_main.cpp
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
Loading…
Reference in New Issue
Block a user