mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 05:47:13 +02:00
community/widelands: fix build on gcc15
This commit is contained in:
parent
177c9d1456
commit
d8c07b5146
@ -2,7 +2,7 @@
|
||||
# Maintainer: Clayton Craft <clayton@craftyguy.net>
|
||||
pkgname=widelands
|
||||
pkgver=1.2.1
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="realtime strategy game with emphasis on economy and transport"
|
||||
url="https://widelands.org"
|
||||
arch="all !s390x" # nobody will use s390x to place widelands
|
||||
@ -33,6 +33,7 @@ source="https://github.com/widelands/widelands/archive/v$pkgver/widelands-v$pkgv
|
||||
0001-link-libintl.patch
|
||||
gcc12-no-werror.patch
|
||||
sdl-use-x11.patch
|
||||
gcc15.patch
|
||||
"
|
||||
subpackages="$pkgname-doc"
|
||||
|
||||
@ -70,4 +71,5 @@ sha512sums="
|
||||
80b3ae89f39635c25e2ff86eb5d281029c5b0a389ede5cdaad70a5a22b3298ba1c74a34fb56c1ae3cfe0681b492603e423e6f4a4f410df44adbbd24ae68bd03c 0001-link-libintl.patch
|
||||
6c9b93ca12b9bdb13acd49027d672a46fac0c30511167d8ae3adc2ce0d4a2c6457fde22bc4bcf9d093542a306c829afabaa4066d679c95eb9441187789ed3051 gcc12-no-werror.patch
|
||||
94a69e35f1bb9a83cca26ac96ca100fccad4b8ebbb7c2db1727591b03e73e82ecec940c6dd42fa9d6369bbee2b4b238df4eb879ab084e92e0642b89a37dff2e3 sdl-use-x11.patch
|
||||
9e443a77d474015b8ed87238cb861c0d552ba8025ea2f0a9a52fb0738e772e8f324d25be65a54eca3ea390474b5d15184d534efcbdf7ecbb5347ed9ce44c25c1 gcc15.patch
|
||||
"
|
||||
|
51
community/widelands/gcc15.patch
Normal file
51
community/widelands/gcc15.patch
Normal file
@ -0,0 +1,51 @@
|
||||
diff --git a/src/base/format/abstract_node.h b/src/base/format/abstract_node.h
|
||||
index 92782a08..bc31a137 100644
|
||||
--- a/src/base/format/abstract_node.h
|
||||
+++ b/src/base/format/abstract_node.h
|
||||
@@ -19,6 +19,8 @@
|
||||
#ifndef WL_BASE_FORMAT_ABSTRACT_NODE_H
|
||||
#define WL_BASE_FORMAT_ABSTRACT_NODE_H
|
||||
|
||||
+#include <cstdint>
|
||||
+
|
||||
namespace format_impl {
|
||||
|
||||
enum Flags : uint8_t {
|
||||
diff --git a/src/logic/map_objects/tribes/requirements.h b/src/logic/map_objects/tribes/requirements.h
|
||||
index d9b787a2..4eaf2738 100644
|
||||
--- a/src/logic/map_objects/tribes/requirements.h
|
||||
+++ b/src/logic/map_objects/tribes/requirements.h
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
+#include <cstdint>
|
||||
|
||||
#include "logic/map_objects/tribes/training_attribute.h"
|
||||
|
||||
diff --git a/src/logic/map_objects/tribes/training_attribute.h b/src/logic/map_objects/tribes/training_attribute.h
|
||||
index 5db0ae4f..579f85a4 100644
|
||||
--- a/src/logic/map_objects/tribes/training_attribute.h
|
||||
+++ b/src/logic/map_objects/tribes/training_attribute.h
|
||||
@@ -25,7 +25,7 @@ namespace Widelands {
|
||||
* Indices for specific, individual attributes that \ref MapObject instances
|
||||
* may have. Used in conjunction with \ref Requirements.
|
||||
*/
|
||||
-enum class TrainingAttribute : uint8_t { kHealth = 0, kAttack, kDefense, kEvade, kTotal = 100 };
|
||||
+enum TrainingAttribute : uint8_t { kHealth = 0, kAttack, kDefense, kEvade, kTotal = 100 };
|
||||
} // namespace Widelands
|
||||
|
||||
#endif // end of include guard: WL_LOGIC_MAP_OBJECTS_TRIBES_TRAINING_ATTRIBUTE_H
|
||||
diff --git a/src/third_party/eris/eris.c b/src/third_party/eris/eris.c
|
||||
index 4858b5a9..647e493d 100644
|
||||
--- a/src/third_party/eris/eris.c
|
||||
+++ b/src/third_party/eris/eris.c
|
||||
@@ -29,7 +29,7 @@ THE SOFTWARE.
|
||||
#include <string.h>
|
||||
|
||||
/* Not using stdbool because Visual Studio lives in the past... */
|
||||
-#ifndef __cplusplus
|
||||
+#if !defined(__cplusplus) && !(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L)
|
||||
typedef int bool;
|
||||
#define false 0
|
||||
#define true 1
|
Loading…
Reference in New Issue
Block a user