From bc46c7f8b0b882e500cf47c298c5c88f8c4229b9e2d938d5f618aacea79b93e0 Mon Sep 17 00:00:00 2001 From: c unix Date: Thu, 9 Mar 2023 21:00:57 +0000 Subject: [PATCH 1/3] Accepting request 1070400 from home:marxin:branches:games - Include upstream fix for GCC 13: VMA-fix-gcc13.patch. OBS-URL: https://build.opensuse.org/request/show/1070400 OBS-URL: https://build.opensuse.org/package/show/games/godot?expand=0&rev=54 --- VMA-fix-gcc13.patch | 59 +++++++++++++++++++++++++++++++++++++++++++++ godot.changes | 5 ++++ godot.spec | 12 +++++---- 3 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 VMA-fix-gcc13.patch diff --git a/VMA-fix-gcc13.patch b/VMA-fix-gcc13.patch new file mode 100644 index 0000000..b2ba9c2 --- /dev/null +++ b/VMA-fix-gcc13.patch @@ -0,0 +1,59 @@ +From b113e6d4ff18dc1b1e6f4ec1bd0e307fd1d8623d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= +Date: Thu, 9 Mar 2023 10:46:35 +0100 +Subject: [PATCH] Vulkan: Fix VMA build with GCC 13 + +Fixes #74647. +--- + thirdparty/vulkan/patches/VMA-fix-gcc13.patch | 26 +++++++++++++++++++ + thirdparty/vulkan/vk_mem_alloc.h | 4 +++ + 2 files changed, 30 insertions(+) + create mode 100644 thirdparty/vulkan/patches/VMA-fix-gcc13.patch + +diff --git a/thirdparty/vulkan/patches/VMA-fix-gcc13.patch b/thirdparty/vulkan/patches/VMA-fix-gcc13.patch +new file mode 100644 +index 000000000000..08928503a768 +--- /dev/null ++++ b/thirdparty/vulkan/patches/VMA-fix-gcc13.patch +@@ -0,0 +1,26 @@ ++From 29d492b60c84ca784ea0943efc7d2e6e0f3bdaac Mon Sep 17 00:00:00 2001 ++From: Adam Sawicki ++Date: Thu, 19 Jan 2023 13:19:55 +0100 ++Subject: [PATCH] Added missing #include ++ ++For snprintf, for compatibility with GCC 13. ++Fixes #312 - thanks @marxin ! ++--- ++ thirdparty/vulkan/vk_mem_alloc.h | 4 ++++ ++ 1 file changed, 4 insertions(+) ++ ++diff --git a/thirdparty/vulkan/vk_mem_alloc.h b/thirdparty/vulkan/vk_mem_alloc.h ++index b787c36..0fe459b 100644 ++--- a/thirdparty/vulkan/vk_mem_alloc.h +++++ b/thirdparty/vulkan/vk_mem_alloc.h ++@@ -2614,6 +2614,10 @@ VMA_CALL_PRE void VMA_CALL_POST vmaFreeStatsString( ++ #include // For std::popcount ++ #endif ++ +++#if VMA_STATS_STRING_ENABLED +++ #include // For snprintf +++#endif +++ ++ /******************************************************************************* ++ CONFIGURATION SECTION ++ +diff --git a/thirdparty/vulkan/vk_mem_alloc.h b/thirdparty/vulkan/vk_mem_alloc.h +index 184ee005d827..ea30060649f2 100644 +--- a/thirdparty/vulkan/vk_mem_alloc.h ++++ b/thirdparty/vulkan/vk_mem_alloc.h +@@ -2582,6 +2582,10 @@ VMA_CALL_PRE void VMA_CALL_POST vmaFreeStatsString( + #include // For std::popcount + #endif + ++#if VMA_STATS_STRING_ENABLED ++ #include // For snprintf ++#endif ++ + /******************************************************************************* + CONFIGURATION SECTION + diff --git a/godot.changes b/godot.changes index c5e8922..83be65a 100644 --- a/godot.changes +++ b/godot.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 9 11:54:06 UTC 2023 - Martin Liška + +- Include upstream fix for GCC 13: VMA-fix-gcc13.patch. + ------------------------------------------------------------------- Fri Mar 3 12:00:00 UTC 2023 - cunix@mail.de diff --git a/godot.spec b/godot.spec index e30820e..753067d 100644 --- a/godot.spec +++ b/godot.spec @@ -1,7 +1,7 @@ # # spec file for package godot # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2017 Luke Jones, luke.nukem.jones@gmail.com # # All modifications and additions to the file contributed by third parties @@ -36,6 +36,7 @@ Source1: https://downloads.tuxfamily.org/godotengine/%{version}/%{name}-% Patch0: certs_fallback.patch # Heap-buffer-overflow in bundled tinyexr Patch1: tinyexr_thirdparty_upstream.patch +Patch2: VMA-fix-gcc13.patch BuildRequires: Mesa-devel BuildRequires: desktop-file-utils BuildRequires: fdupes @@ -62,11 +63,11 @@ BuildRequires: pkgconfig(theoradec) BuildRequires: pkgconfig(vorbis) BuildRequires: pkgconfig(vorbisfile) BuildRequires: pkgconfig(x11) -BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(xcursor) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xinerama) +BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(xrender) @@ -86,10 +87,10 @@ BuildRequires: pkgconfig(freetype2) >= 2.10.2 # Using bundled freetype2 throws build errors, if # we don't use bundled libpng and zlib as well. BuildRequires: pkgconfig(libpng) -BuildRequires: pkgconfig(graphite2) -BuildRequires: pkgconfig(harfbuzz) BuildRequires: glslang-devel BuildRequires: mbedtls-devel +BuildRequires: pkgconfig(graphite2) +BuildRequires: pkgconfig(harfbuzz) BuildRequires: pkgconfig(libwslay) BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(miniupnpc) @@ -126,6 +127,7 @@ Provides: bundled(minizip) = 1.2.13 Provides: bundled(FastLZ) Provides: bundled(FastNoiseLite) +Provides: bundled(JetBrainsMono_Regular) Provides: bundled(RVO2-3D) Provides: bundled(Tangent_Space_Normal_Maps) Provides: bundled(amd-fsr) = 1.0.2 @@ -137,7 +139,6 @@ Provides: bundled(doctest) = 2.4.9 Provides: bundled(etcpak) = 1.0 Provides: bundled(glad) = 2.0.2 Provides: bundled(google-droid-fonts) -Provides: bundled(JetBrainsMono_Regular) Provides: bundled(hqx) Provides: bundled(icu4c) = 72.1 Provides: bundled(ifaddrs-android) @@ -232,6 +233,7 @@ Bash command line completion support for %{name} and %{name}-runner %setup -q -n %{name}-%{version}-stable %patch0 -p1 %patch1 -p1 +%patch2 -p1 cp thirdparty/README.md thirdparty_README.md From 04a313aaae14ce802b29a1416ddee02563fb52db5ff81077a9f2c7964ba7b669 Mon Sep 17 00:00:00 2001 From: c unix Date: Thu, 9 Mar 2023 21:05:36 +0000 Subject: [PATCH 2/3] added scons_regression.patch for scons 4.5.1 until 4.5.2 OBS-URL: https://build.opensuse.org/package/show/games/godot?expand=0&rev=55 --- godot.changes | 5 +++++ godot.spec | 2 ++ scons_regression.patch | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 scons_regression.patch diff --git a/godot.changes b/godot.changes index 83be65a..914156b 100644 --- a/godot.changes +++ b/godot.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 9 12:00:00 UTC 2023 - cunix@mail.de + +- added scons_regression.patch for scons 4.5.1 until 4.5.2 + ------------------------------------------------------------------- Thu Mar 9 11:54:06 UTC 2023 - Martin Liška diff --git a/godot.spec b/godot.spec index 753067d..80486e6 100644 --- a/godot.spec +++ b/godot.spec @@ -37,6 +37,7 @@ Patch0: certs_fallback.patch # Heap-buffer-overflow in bundled tinyexr Patch1: tinyexr_thirdparty_upstream.patch Patch2: VMA-fix-gcc13.patch +Patch3: scons_regression.patch BuildRequires: Mesa-devel BuildRequires: desktop-file-utils BuildRequires: fdupes @@ -234,6 +235,7 @@ Bash command line completion support for %{name} and %{name}-runner %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 cp thirdparty/README.md thirdparty_README.md diff --git a/scons_regression.patch b/scons_regression.patch new file mode 100644 index 0000000..9708160 --- /dev/null +++ b/scons_regression.patch @@ -0,0 +1,20 @@ +From: cunix@mail.de +Date: 2023-03-09 22:00:00 +Subject: scons 4.5.1 regression +References: https://github.com/godotengine/godot/issues/74683 + +work around regression of scons 4.5.1 +expected to be fixed with 4.5.2 + +diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py +index 549319a750..0214ebd8bd 100644 +--- a/platform/linuxbsd/detect.py ++++ b/platform/linuxbsd/detect.py +@@ -306,6 +306,7 @@ def configure(env: "Environment"): + if env["pulseaudio"]: + if not env["use_sowrap"]: + if os.system("pkg-config --exists libpulse") == 0: # 0 means found ++ env["CPPDEFINES"] = list(env["CPPDEFINES"]) + env.ParseConfig("pkg-config libpulse --cflags --libs") + env.Append(CPPDEFINES=["PULSEAUDIO_ENABLED", "_REENTRANT"]) + else: \ No newline at end of file From 37be0b74de45e1a43925676c48b851a4be6aaa37d4cf85ce236e20aac44f44b6 Mon Sep 17 00:00:00 2001 From: c unix Date: Thu, 9 Mar 2023 21:12:06 +0000 Subject: [PATCH 3/3] OBS-URL: https://build.opensuse.org/package/show/games/godot?expand=0&rev=56 --- scons_regression.patch | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scons_regression.patch b/scons_regression.patch index 9708160..79a87d7 100644 --- a/scons_regression.patch +++ b/scons_regression.patch @@ -6,15 +6,20 @@ References: https://github.com/godotengine/godot/issues/74683 work around regression of scons 4.5.1 expected to be fixed with 4.5.2 -diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py -index 549319a750..0214ebd8bd 100644 +--- + +diff -r -U 5 a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py --- a/platform/linuxbsd/detect.py +++ b/platform/linuxbsd/detect.py -@@ -306,6 +306,7 @@ def configure(env: "Environment"): +@@ -305,10 +305,11 @@ + env.Append(CPPDEFINES=["ALSA_ENABLED", "ALSAMIDI_ENABLED"]) + if env["pulseaudio"]: if not env["use_sowrap"]: if os.system("pkg-config --exists libpulse") == 0: # 0 means found + env["CPPDEFINES"] = list(env["CPPDEFINES"]) env.ParseConfig("pkg-config libpulse --cflags --libs") env.Append(CPPDEFINES=["PULSEAUDIO_ENABLED", "_REENTRANT"]) - else: \ No newline at end of file + else: + print("Warning: PulseAudio development libraries not found. Disabling the PulseAudio audio driver.") + env["pulseaudio"] = False