From c5791f1796741e79bc65f4e38d20854d998459b4 Mon Sep 17 00:00:00 2001 From: dataCobra Date: Thu, 3 Oct 2024 16:31:53 +0200 Subject: [PATCH] supertuxkart: revbump + patches --- srcpkgs/supertuxkart/patches/fix-crash.patch | 36 ++++ .../patches/fix-missing-rotation.patch | 27 +++ .../supertuxkart/patches/gcc13-fix-1.patch | 72 ++++++++ .../supertuxkart/patches/gcc13-fix-2.patch | 155 ++++++++++++++++++ srcpkgs/supertuxkart/template | 2 +- 5 files changed, 291 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/supertuxkart/patches/fix-crash.patch create mode 100644 srcpkgs/supertuxkart/patches/fix-missing-rotation.patch create mode 100644 srcpkgs/supertuxkart/patches/gcc13-fix-1.patch create mode 100644 srcpkgs/supertuxkart/patches/gcc13-fix-2.patch diff --git a/srcpkgs/supertuxkart/patches/fix-crash.patch b/srcpkgs/supertuxkart/patches/fix-crash.patch new file mode 100644 index 00000000000..5d5afd43ad0 --- /dev/null +++ b/srcpkgs/supertuxkart/patches/fix-crash.patch @@ -0,0 +1,36 @@ +From 8544f19b59208ae93fc3db0cf41bd386c6aefbcb Mon Sep 17 00:00:00 2001 +From: Benau +Date: Thu, 5 Jan 2023 10:33:39 +0800 +Subject: [PATCH] Fix #4834 + +--- + src/race/race_manager.hpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/race/race_manager.hpp b/src/race/race_manager.hpp +index 67a6ebd5016..63c39f0f677 100644 +--- a/src/race/race_manager.hpp ++++ b/src/race/race_manager.hpp +@@ -28,6 +28,7 @@ + + #include + #include ++#include + #include + + #include "network/remote_kart_info.hpp" +@@ -644,11 +645,14 @@ class RaceManager + // ---------------------------------------------------------------------------------------- + int getKartLocalPlayerId(int k) const + { ++ assert(k < (int)m_kart_status.size()); + return m_kart_status[k].m_local_player_id; + } // getKartLocalPlayerId + // ---------------------------------------------------------------------------------------- + int getKartGlobalPlayerId(int k) const + { ++ if (k >= (int)m_kart_status.size()) ++ return -1; + return m_kart_status[k].m_global_player_id; + } // getKartGlobalPlayerId + // ---------------------------------------------------------------------------------------- diff --git a/srcpkgs/supertuxkart/patches/fix-missing-rotation.patch b/srcpkgs/supertuxkart/patches/fix-missing-rotation.patch new file mode 100644 index 00000000000..c240ac58a9d --- /dev/null +++ b/srcpkgs/supertuxkart/patches/fix-missing-rotation.patch @@ -0,0 +1,27 @@ +From 0c2b81ac1f9ff29f5012a98f530880b87f416337 Mon Sep 17 00:00:00 2001 +From: Benau +Date: Thu, 3 Nov 2022 11:39:25 +0800 +Subject: [PATCH] Fix missing rotation when lto is used, see #4811 + +--- + src/physics/physical_object.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/physics/physical_object.cpp b/src/physics/physical_object.cpp +index c389b7a28b2..09d57034ece 100644 +--- a/src/physics/physical_object.cpp ++++ b/src/physics/physical_object.cpp +@@ -637,10 +637,12 @@ void PhysicalObject::updateGraphics(float dt) + + Vec3 hpr; + hpr.setHPR(SmoothNetworkBody::getSmoothedTrans().getRotation()); ++ // Fix missing rotation when lto is used, see #4811 ++ hpr *= RAD_TO_DEGREE; + + // This will only update the visual position, so it can be + // called in updateGraphics() +- m_object->move(xyz.toIrrVector(), hpr.toIrrVector()*RAD_TO_DEGREE, ++ m_object->move(xyz.toIrrVector(), hpr.toIrrVector(), + m_init_scale, /*updateRigidBody*/false, + /* isAbsoluteCoord */true); + } // updateGraphics diff --git a/srcpkgs/supertuxkart/patches/gcc13-fix-1.patch b/srcpkgs/supertuxkart/patches/gcc13-fix-1.patch new file mode 100644 index 00000000000..789934d3f63 --- /dev/null +++ b/srcpkgs/supertuxkart/patches/gcc13-fix-1.patch @@ -0,0 +1,72 @@ +From 27eb0f3116921492e183ad3aa685ddb147ed7183 Mon Sep 17 00:00:00 2001 +From: Gwyn Ciesla +Date: Thu, 23 Feb 2023 08:56:27 -0600 +Subject: [PATCH] gcc13 fixes + +--- + lib/graphics_engine/include/vk_mem_alloc.h | 2 ++ + lib/graphics_engine/src/ge_vulkan_command_loader.cpp | 1 + + lib/graphics_engine/src/ge_vulkan_depth_texture.cpp | 2 ++ + lib/graphics_engine/src/ge_vulkan_mesh_cache.cpp | 1 + + lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp | 1 + + 5 files changed, 7 insertions(+) + +diff --git a/lib/graphics_engine/include/vk_mem_alloc.h b/lib/graphics_engine/include/vk_mem_alloc.h +index d4b683a7551..ac82aedb15b 100644 +--- a/lib/graphics_engine/include/vk_mem_alloc.h ++++ b/lib/graphics_engine/include/vk_mem_alloc.h +@@ -20,6 +20,8 @@ + // THE SOFTWARE. + // + ++#include ++ + #ifndef AMD_VULKAN_MEMORY_ALLOCATOR_H + #define AMD_VULKAN_MEMORY_ALLOCATOR_H + +diff --git a/lib/graphics_engine/src/ge_vulkan_command_loader.cpp b/lib/graphics_engine/src/ge_vulkan_command_loader.cpp +index a1e5b3a71b8..13cadd63daf 100644 +--- a/lib/graphics_engine/src/ge_vulkan_command_loader.cpp ++++ b/lib/graphics_engine/src/ge_vulkan_command_loader.cpp +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + #include "../source/Irrlicht/os.h" + +diff --git a/lib/graphics_engine/src/ge_vulkan_depth_texture.cpp b/lib/graphics_engine/src/ge_vulkan_depth_texture.cpp +index 4a5d3d391b1..0411c617df6 100644 +--- a/lib/graphics_engine/src/ge_vulkan_depth_texture.cpp ++++ b/lib/graphics_engine/src/ge_vulkan_depth_texture.cpp +@@ -1,3 +1,5 @@ ++#include ++ + #include "ge_vulkan_depth_texture.hpp" + + #include "ge_main.hpp" +diff --git a/lib/graphics_engine/src/ge_vulkan_mesh_cache.cpp b/lib/graphics_engine/src/ge_vulkan_mesh_cache.cpp +index f510f91813a..a821ee4a962 100644 +--- a/lib/graphics_engine/src/ge_vulkan_mesh_cache.cpp ++++ b/lib/graphics_engine/src/ge_vulkan_mesh_cache.cpp +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + + namespace GE + { +diff --git a/lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp b/lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp +index fe7fcc45515..82977f00785 100644 +--- a/lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp ++++ b/lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + namespace GE + { diff --git a/srcpkgs/supertuxkart/patches/gcc13-fix-2.patch b/srcpkgs/supertuxkart/patches/gcc13-fix-2.patch new file mode 100644 index 00000000000..21fad1ae65a --- /dev/null +++ b/srcpkgs/supertuxkart/patches/gcc13-fix-2.patch @@ -0,0 +1,155 @@ +From 0163e3fa88b72634c3ddff5304c9086b649f53b1 Mon Sep 17 00:00:00 2001 +From: Heiko Becker +Date: Thu, 26 Jan 2023 16:35:54 +0100 +Subject: [PATCH] Add missing includes to fix the build with gcc 13 + +Like other versions before, gcc 13 moved some includes around and as a +result and are no longer transitively included. +Explicitly include them for std::runtime_error and snprintf. +--- + lib/graphics_engine/include/vk_mem_alloc.h | 1 + + lib/graphics_engine/src/ge_spm_buffer.cpp | 1 + + lib/graphics_engine/src/ge_vulkan_array_texture.cpp | 1 + + lib/graphics_engine/src/ge_vulkan_command_loader.cpp | 1 + + lib/graphics_engine/src/ge_vulkan_depth_texture.cpp | 2 ++ + lib/graphics_engine/src/ge_vulkan_draw_call.cpp | 1 + + lib/graphics_engine/src/ge_vulkan_fbo_texture.cpp | 1 + + lib/graphics_engine/src/ge_vulkan_mesh_cache.cpp | 1 + + lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp | 1 + + lib/graphics_engine/src/ge_vulkan_texture.cpp | 1 + + lib/graphics_engine/src/ge_vulkan_texture_descriptor.cpp | 1 + + 11 files changed, 12 insertions(+) + +diff --git a/lib/graphics_engine/include/vk_mem_alloc.h b/lib/graphics_engine/include/vk_mem_alloc.h +index bdb4ff57610..d4b683a7551 100644 +--- a/lib/graphics_engine/include/vk_mem_alloc.h ++++ b/lib/graphics_engine/include/vk_mem_alloc.h +@@ -2563,6 +2563,7 @@ VMA_CALL_PRE void VMA_CALL_POST vmaFreeStatsString( + #undef VMA_IMPLEMENTATION + + #include ++#include + #include + #include + #include +diff --git a/lib/graphics_engine/src/ge_spm_buffer.cpp b/lib/graphics_engine/src/ge_spm_buffer.cpp +index fe4f4758adf..1179a732566 100644 +--- a/lib/graphics_engine/src/ge_spm_buffer.cpp ++++ b/lib/graphics_engine/src/ge_spm_buffer.cpp +@@ -5,6 +5,7 @@ + #include "ge_vulkan_features.hpp" + + #include ++#include + + #include "mini_glm.hpp" + +diff --git a/lib/graphics_engine/src/ge_vulkan_array_texture.cpp b/lib/graphics_engine/src/ge_vulkan_array_texture.cpp +index f3361478c3b..0f817dc40fd 100644 +--- a/lib/graphics_engine/src/ge_vulkan_array_texture.cpp ++++ b/lib/graphics_engine/src/ge_vulkan_array_texture.cpp +@@ -12,6 +12,7 @@ + + #include + #include ++#include + + namespace GE + { +diff --git a/lib/graphics_engine/src/ge_vulkan_command_loader.cpp b/lib/graphics_engine/src/ge_vulkan_command_loader.cpp +index 358cf9ab6ec..a1e5b3a71b8 100644 +--- a/lib/graphics_engine/src/ge_vulkan_command_loader.cpp ++++ b/lib/graphics_engine/src/ge_vulkan_command_loader.cpp +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + #include + + #include "../source/Irrlicht/os.h" +diff --git a/lib/graphics_engine/src/ge_vulkan_depth_texture.cpp b/lib/graphics_engine/src/ge_vulkan_depth_texture.cpp +index 25cb2429638..4a5d3d391b1 100644 +--- a/lib/graphics_engine/src/ge_vulkan_depth_texture.cpp ++++ b/lib/graphics_engine/src/ge_vulkan_depth_texture.cpp +@@ -3,6 +3,8 @@ + #include "ge_main.hpp" + #include "ge_vulkan_driver.hpp" + ++#include ++ + namespace GE + { + GEVulkanDepthTexture::GEVulkanDepthTexture(GEVulkanDriver* vk, +diff --git a/lib/graphics_engine/src/ge_vulkan_draw_call.cpp b/lib/graphics_engine/src/ge_vulkan_draw_call.cpp +index 2c2bc57513f..c8a1ddffb5e 100644 +--- a/lib/graphics_engine/src/ge_vulkan_draw_call.cpp ++++ b/lib/graphics_engine/src/ge_vulkan_draw_call.cpp +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include "../source/Irrlicht/os.h" + #include "quaternion.h" +diff --git a/lib/graphics_engine/src/ge_vulkan_fbo_texture.cpp b/lib/graphics_engine/src/ge_vulkan_fbo_texture.cpp +index 9413a04bb00..834a0b43b1e 100644 +--- a/lib/graphics_engine/src/ge_vulkan_fbo_texture.cpp ++++ b/lib/graphics_engine/src/ge_vulkan_fbo_texture.cpp +@@ -6,6 +6,7 @@ + + #include + #include ++#include + + namespace GE + { +diff --git a/lib/graphics_engine/src/ge_vulkan_mesh_cache.cpp b/lib/graphics_engine/src/ge_vulkan_mesh_cache.cpp +index 380f348dffb..f510f91813a 100644 +--- a/lib/graphics_engine/src/ge_vulkan_mesh_cache.cpp ++++ b/lib/graphics_engine/src/ge_vulkan_mesh_cache.cpp +@@ -10,6 +10,7 @@ + + #include + #include ++#include + #include + + namespace GE +diff --git a/lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp b/lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp +index 2543b16086f..fe7fcc45515 100644 +--- a/lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp ++++ b/lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp +@@ -11,6 +11,7 @@ + + #include + #include ++#include + #include + + namespace GE +diff --git a/lib/graphics_engine/src/ge_vulkan_texture.cpp b/lib/graphics_engine/src/ge_vulkan_texture.cpp +index 500eb65fc62..611a24171d4 100644 +--- a/lib/graphics_engine/src/ge_vulkan_texture.cpp ++++ b/lib/graphics_engine/src/ge_vulkan_texture.cpp +@@ -21,6 +21,7 @@ extern "C" + #include + #include + #include ++#include + + namespace GE + { +diff --git a/lib/graphics_engine/src/ge_vulkan_texture_descriptor.cpp b/lib/graphics_engine/src/ge_vulkan_texture_descriptor.cpp +index 4fd8a2e8800..c64d1bdbaa1 100644 +--- a/lib/graphics_engine/src/ge_vulkan_texture_descriptor.cpp ++++ b/lib/graphics_engine/src/ge_vulkan_texture_descriptor.cpp +@@ -6,6 +6,7 @@ + + #include + #include ++#include + + namespace GE + { diff --git a/srcpkgs/supertuxkart/template b/srcpkgs/supertuxkart/template index 0bd25b7cfc9..c563cdb2ecf 100644 --- a/srcpkgs/supertuxkart/template +++ b/srcpkgs/supertuxkart/template @@ -1,7 +1,7 @@ # Template file for 'supertuxkart' pkgname=supertuxkart version=1.4 -revision=2 +revision=3 build_style=cmake hostmakedepends="pkg-config" makedepends="libgomp-devel libjpeg-turbo-devel libpng-devel