games/gzdoom: Fix build on -current.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2023-08-10 15:12:23 -04:00 committed by Willy Sudiarto Raharjo
parent b833d3a925
commit 686c91379d
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
2 changed files with 65 additions and 1 deletions

View File

@ -0,0 +1,60 @@
From ee8c12eac62349f4524229370da20915624485ef Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Thu, 30 Mar 2023 23:41:22 +0200
Subject: [PATCH] build: resolve missing includes under gcc-13
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
$ make
...
~/gzdoom/libraries/ZVulkan/src/vulkanbuilders.cpp: In member function std::unique_ptr<VulkanShader> ShaderBuilder::Create(const char*, VulkanDevice*):
~/gzdoom/libraries/ZVulkan/src/vulkanbuilders.cpp:168:28: error: runtime_error is not a member of std
~/gzdoom/libraries/ZVulkan/include/zvulkan/vk_mem_alloc/vk_mem_alloc.h: In function void VmaUint32ToStr(char*, size_t, uint32_t):
~/gzdoom/libraries/ZVulkan/include/zvulkan/vk_mem_alloc/vk_mem_alloc.h:2410:9: error: snprint was not declared in this scope
---
src/common/rendering/vulkan/system/vk_builders.cpp | 1 +
src/common/rendering/vulkan/system/vk_swapchain.cpp | 1 +
.../rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h | 2 ++
3 files changed, 4 insertions(+)
diff --git a/src/common/rendering/vulkan/system/vk_builders.cpp b/src/common/rendering/vulkan/system/vk_builders.cpp
index aff0de50a9..b8d4a13de9 100644
--- a/src/common/rendering/vulkan/system/vk_builders.cpp
+++ b/src/common/rendering/vulkan/system/vk_builders.cpp
@@ -20,6 +20,7 @@
**
*/
+#include <stdexcept>
#include "vk_builders.h"
#include "engineerrors.h"
#include "renderstyle.h"
diff --git a/src/common/rendering/vulkan/system/vk_swapchain.cpp b/src/common/rendering/vulkan/system/vk_swapchain.cpp
index f44139b1f5..e89a6bd823 100644
--- a/src/common/rendering/vulkan/system/vk_swapchain.cpp
+++ b/src/common/rendering/vulkan/system/vk_swapchain.cpp
@@ -20,6 +20,7 @@
**
*/
+#include <stdexcept>
#include "vk_swapchain.h"
#include "vk_objects.h"
#include "c_cvars.h"
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 fd4472286b..db0b94f4e8 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 <stdio.h>
+
#ifdef __cplusplus
extern "C" {
#endif
--
2.40.1

View File

@ -6,10 +6,10 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20230810 bkw: add patch to fix build on -current (does no harm on 15.0).
# 20230109 bkw: Updated for 4.10.0. Many thanks to fourtysixandtwo for
# testing this on more capable hardware than I have, and for finding
# the "-glversion 3.3" argument.
# 20201115 bkw: Add missing fix_zipdir.diff. Dammit.
# 20201107 bkw: Updated for 4.5.0.
# 20201027 bkw:
@ -88,6 +88,10 @@ chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# 20230810 bkw: patch for gcc 13 (Slackware -current), from AUR, by
# way of biker_rat on LQ, delivered C/O ponce.
patch -p1 < $CWD/gcc13-missing-includes.diff
# 20201027 bkw: fix the '<unknown version>' in the window title. This
# used to be done in an uglier way (with a patch that occasionally broke
# when applied against new gzdooms).