commit 1678ec2c8b5e9f890858fa3997ab1fb20e368138
Author: Hans de Goede <hdegoede(a)redhat.com>
Date: Mon Mar 31 20:00:51 2025 +0200
Fix FTBFS with gcc15
d1x-gcc15.patch | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
d1x.spec | 9 +++++++--
2 files changed, 65 insertions(+), 2 deletions(-)
---
diff --git a/d1x-gcc15.patch b/d1x-gcc15.patch
new file mode 100644
index 0000000..167f934
--- /dev/null
+++ b/d1x-gcc15.patch
@@ -0,0 +1,58 @@
+diff -up dxx-rebirth-7258b7fd5966fc38e53f4d8192b0c810829ada02/common/include/physfsx.h~
dxx-rebirth-7258b7fd5966fc38e53f4d8192b0c810829ada02/common/include/physfsx.h
+---
dxx-rebirth-7258b7fd5966fc38e53f4d8192b0c810829ada02/common/include/physfsx.h~ 2025-03-31
17:51:01.000000000 +0200
++++
dxx-rebirth-7258b7fd5966fc38e53f4d8192b0c810829ada02/common/include/physfsx.h 2025-03-31
18:13:02.522821207 +0200
+@@ -78,9 +78,9 @@ __attribute_always_inline()
+ static inline PHYSFS_sint64 PHYSFSX_check_read(PHYSFS_File *file, V *v, const
PHYSFS_uint32 S, const PHYSFS_uint32 C)
+ {
+ if constexpr (std::is_integral<V>::value)
+- static_assert(std::is_pod<V>::value, "non-POD integral value read");
++ static_assert(std::is_standard_layout<V>::value, "non-POD integral value
read");
+ else
+- static_assert(std::is_pod<V>::value, "non-POD non-integral value
read");
++ static_assert(std::is_standard_layout<V>::value, "non-POD non-integral
value read");
+ DXX_PHYSFS_CHECK_READ_SIZE_OBJECT_SIZE(S, C, v);
+ return PHYSFS_read(file, v, S, C);
+ }
+@@ -89,7 +89,7 @@ template <typename V, std::size_t N>
+ __attribute_always_inline()
+ static inline PHYSFS_sint64 PHYSFSX_check_read(PHYSFS_File *file, std::array<V, N>
&v, PHYSFS_uint32 S, PHYSFS_uint32 C)
+ {
+- static_assert(std::is_pod<V>::value, "C++ array of non-POD elements
read");
++ static_assert(std::is_standard_layout<V>::value, "C++ array of non-POD
elements read");
+ DXX_PHYSFS_CHECK_READ_SIZE_ARRAY_SIZE(S, C);
+ return PHYSFSX_check_read(file, &v[0], S, C);
+ }
+@@ -107,11 +107,11 @@ static inline PHYSFS_sint64 PHYSFSX_chec
+ {
+ if constexpr (std::is_integral<V>::value)
+ {
+- static_assert(std::is_pod<V>::value, "non-POD integral value
written");
++ static_assert(std::is_standard_layout<V>::value, "non-POD integral value
written");
+ DXX_PHYSFS_CHECK_WRITE_ELEMENT_SIZE_CONSTANT(S,C);
+ }
+ else
+- static_assert(std::is_pod<V>::value, "non-POD non-integral value
written");
++ static_assert(std::is_standard_layout<V>::value, "non-POD non-integral
value written");
+ DXX_PHYSFS_CHECK_WRITE_SIZE_OBJECT_SIZE(S, C, v);
+ return PHYSFS_write(file, v, S, C);
+ }
+@@ -120,7 +120,7 @@ template <typename V, std::size_t N>
+ __attribute_always_inline()
+ static inline PHYSFS_sint64 PHYSFSX_check_write(PHYSFS_File *file, const
std::array<V, N> &v, PHYSFS_uint32 S, PHYSFS_uint32 C)
+ {
+- static_assert(std::is_pod<V>::value, "C++ array of non-POD elements
written");
++ static_assert(std::is_standard_layout<V>::value, "C++ array of non-POD
elements written");
+ DXX_PHYSFS_CHECK_WRITE_CONSTANTS(S,C);
+ return PHYSFSX_check_write(file, &v[0], S, C);
+ }
+diff -up dxx-rebirth-7258b7fd5966fc38e53f4d8192b0c810829ada02/d2x-rebirth/main/libmve.h~
dxx-rebirth-7258b7fd5966fc38e53f4d8192b0c810829ada02/d2x-rebirth/main/libmve.h
+---
dxx-rebirth-7258b7fd5966fc38e53f4d8192b0c810829ada02/d2x-rebirth/main/libmve.h~ 2022-01-30
05:40:54.000000000 +0100
++++
dxx-rebirth-7258b7fd5966fc38e53f4d8192b0c810829ada02/d2x-rebirth/main/libmve.h 2025-03-31
19:09:29.816801945 +0200
+@@ -11,6 +11,7 @@
+
+ #ifdef __cplusplus
+ #include <memory>
++#include <cstdint>
+
+ enum class MVE_StepStatus
+ {
diff --git a/d1x.spec b/d1x.spec
index 25a7e06..23e21a2 100644
--- a/d1x.spec
+++ b/d1x.spec
@@ -6,7 +6,7 @@
Summary: Descent 1 game and shareware data files (d1x-rebirth version)
Name: d1x
Version: 1.43
-Release: 36.rebirth.%{snapshotdate}git%{shortcommit}%{?dist}
+Release: 37.rebirth.%{snapshotdate}git%{shortcommit}%{?dist}
License: non-commercial
Source0:
https://github.com/dxx-rebirth/dxx-rebirth/archive/%{commit}/dxx-rebirth-...
Source1: d1x-rebirth.sh
@@ -20,7 +20,8 @@ Patch1: d1x-gcc12.patch
Patch2: d1x-window_icon_bitmap.patch
# Fix compilation on armv7hl, can be dropped when we drop armv7hl support
Patch3: d1x-disable-Werror-useless-cast.patch
-Patch4: fix_scons_issue.patch
+Patch4: fix_scons_issue.patch
+Patch5: d1x-gcc15.patch
URL:
https://www.dxx-rebirth.com/
BuildRequires: gcc gcc-c++ libpng-devel
BuildRequires: SDL2-devel SDL2_mixer-devel SDL2_image-devel
@@ -74,6 +75,7 @@ robots-h.mvl files to the dir.
%patch 2 -p1
%patch 3 -p1
%patch 4 -p1
+%patch 5 -p1
# Fixup encoding and CTRL+Z at the end of the orderfrm.txt files
iconv -f CP850 -t UTF-8 d1shar/ORDERFRM.TXT | head -n-3 > ORDERFRM.TXT
touch -r d1shar/ORDERFRM.TXT ORDERFRM.TXT
@@ -160,6 +162,9 @@ appstream-util validate-relax --nonet \
%changelog
+* Mon Mar 31 2025 Hans de Goede <j.w.r.degoede(a)gmail.com> -
1.43-37.rebirth.20220222git7258b7f
+- Fix FTBFS with gcc15
+
* Wed Jan 29 2025 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
1.43-36.rebirth.20220222git7258b7f
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild