summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-action/astromenace/files/astromenace-1.4.2-gcc13.patch')
-rw-r--r--games-action/astromenace/files/astromenace-1.4.2-gcc13.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/games-action/astromenace/files/astromenace-1.4.2-gcc13.patch b/games-action/astromenace/files/astromenace-1.4.2-gcc13.patch
new file mode 100644
index 000000000000..e9615431ca5d
--- /dev/null
+++ b/games-action/astromenace/files/astromenace-1.4.2-gcc13.patch
@@ -0,0 +1,49 @@
+https://github.com/viewizard/astromenace/pull/35
+
+From e5ec662f520621cc5cf685de974a265fc78b3c8e Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 13 Apr 2023 03:33:27 +0100
+Subject: [PATCH] Fix build with GCC 13
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GCC 13 (as usual for new compiler releases) shuffles around some internal includes and so etc is no longer transitively included:
+```
+/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp: In member function ‘bool viewizard::cModel3DWrapper::LoadVW3D(const std::string&)’:
+/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp:602:10: error: ‘uint32_t’ is not a member of ‘std’; did you mean ‘wint_t’?
+ 602 | std::uint32_t ChunkArraySize;
+ | ^~~~~~~~
+ | wint_t
+/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp:603:18: error: ‘ChunkArraySize’ was not declared in this scope
+ 603 | File->fread(&ChunkArraySize, sizeof(ChunkArraySize), 1);
+ | ^~~~~~~~~~~~~~
+/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp: In member function ‘bool viewizard::cModel3DWrapper::SaveVW3D(const std::string&)’:
+/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp:681:10: error: ‘uint32_t’ is not a member of ‘std’; did you mean ‘wint_t’?
+ 681 | std::uint32_t ChunkArraySize = static_cast<std::uint32_t>(Chunks.size());
+ | ^~~~~~~~
+ | wint_t
+/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp:682:45: error: ‘ChunkArraySize’ was not declared in this scope
+ 682 | FileVW3D.write(reinterpret_cast<char*>(&ChunkArraySize), sizeof(ChunkArraySize));
+ | ^~~~~~~~~~~~~~
+```
+
+See https://gnu.org/software/gcc/gcc-13/porting_to.html.
+
+Bug: https://bugs.gentoo.org/895760
+---
+ src/core/model3d/model3d.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/core/model3d/model3d.cpp b/src/core/model3d/model3d.cpp
+index 29b302d5..6f81cab2 100644
+--- a/src/core/model3d/model3d.cpp
++++ b/src/core/model3d/model3d.cpp
+@@ -29,6 +29,7 @@
+ #include "../vfs/vfs.h"
+ #include "model3d.h"
+ #include <cmath>
++#include <cstdint>
+ #include <cstring>
+ #include <fstream>
+