summaryrefslogtreecommitdiff
path: root/games-strategy/s25rttr/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-09-16 22:05:01 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-09-16 22:05:01 +0100
commitcc4618c9ba3d974948ebf340b542d8cb01db2f55 (patch)
tree125ee67bb9e0d548771cf7b61d04bb1f0dc57687 /games-strategy/s25rttr/files
parent677b7ba5c317778df2ad7e70df94b9b7eec4adbc (diff)
gentoo resync : 16.09.2021
Diffstat (limited to 'games-strategy/s25rttr/files')
-rw-r--r--games-strategy/s25rttr/files/s25rttr-0.9.0_pre20200723-gcc11-include.patch12
-rw-r--r--games-strategy/s25rttr/files/s25rttr-0.9.1-cxx-std.patch30
-rw-r--r--games-strategy/s25rttr/files/s25rttr-0.9.1-libsamplerate.patch37
3 files changed, 67 insertions, 12 deletions
diff --git a/games-strategy/s25rttr/files/s25rttr-0.9.0_pre20200723-gcc11-include.patch b/games-strategy/s25rttr/files/s25rttr-0.9.0_pre20200723-gcc11-include.patch
deleted file mode 100644
index 31cca620a3fc..000000000000
--- a/games-strategy/s25rttr/files/s25rttr-0.9.0_pre20200723-gcc11-include.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-https://github.com/Return-To-The-Roots/libsiedler2/commit/cb2994d5bb6407d4b12f681268e6b123d9b366f5.patch
-https://bugs.gentoo.org/787299
---- a/external/libsiedler2/include/libsiedler2/XMIDI_TrackConverter.h
-+++ b/external/libsiedler2/include/libsiedler2/XMIDI_TrackConverter.h
-@@ -18,6 +18,7 @@
- #pragma once
-
- #include <array>
-+#include <cstddef>
- #include <cstdint>
- #include <vector>
-
diff --git a/games-strategy/s25rttr/files/s25rttr-0.9.1-cxx-std.patch b/games-strategy/s25rttr/files/s25rttr-0.9.1-cxx-std.patch
new file mode 100644
index 000000000000..cb5ecdf28220
--- /dev/null
+++ b/games-strategy/s25rttr/files/s25rttr-0.9.1-cxx-std.patch
@@ -0,0 +1,30 @@
+From 5db419d044149ab3760c1588b44536febab5d657 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sat, 11 Sep 2021 08:41:57 +0100
+Subject: [PATCH] Set C++ standard (to C++14) using CMake
+
+Not adding the -std flag broke builds with GCC 11 until the code was
+fixed up recently. This should prevent this sort of thing from
+happening in future. It also ensures that the compiler is actually new
+enough.
+---
+ CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8ab991c97..b55c545a2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -22,6 +22,9 @@ if(DEFINED CMAKE_TOOLCHAIN_FILE)
+ message(STATUS "Used Toolchain definition file '${CMAKE_TOOLCHAIN_FILE}'")
+ endif()
+
++set(CMAKE_CXX_STANDARD 14)
++set(CXX_STANDARD_REQUIRED ON)
++
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules" "${CMAKE_SOURCE_DIR}/external/libutil/cmake")
+ if(CMAKE_VERSION VERSION_LESS 3.14)
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/external/libutil/cmake/cmake_3.14")
+--
+2.32.0
+
diff --git a/games-strategy/s25rttr/files/s25rttr-0.9.1-libsamplerate.patch b/games-strategy/s25rttr/files/s25rttr-0.9.1-libsamplerate.patch
new file mode 100644
index 000000000000..41d6d90e5fd8
--- /dev/null
+++ b/games-strategy/s25rttr/files/s25rttr-0.9.1-libsamplerate.patch
@@ -0,0 +1,37 @@
+From 16cb06c99f78a21b1be2bc681c1f1d85a6caddca Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Fri, 10 Sep 2021 22:59:51 +0100
+Subject: [PATCH] Fix bad channel count handling with libsamplerate 0.2.0
+
+Since libsndfile/libsamplerate@26d92c369394bcd0b0cea488890edce1a0d757d5,
+initialising libsamplerate with 0 channels or less causes a SIGABRT. We
+therefore need to handle this in the C++ wrapper classes.
+---
+ libs/libsamplerate/include/samplerate.hpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/libs/libsamplerate/include/samplerate.hpp b/libs/libsamplerate/include/samplerate.hpp
+index d0af34317..23e243d91 100644
+--- a/libs/libsamplerate/include/samplerate.hpp
++++ b/libs/libsamplerate/include/samplerate.hpp
+@@ -152,6 +152,8 @@ class State : public detail::StateBase
+ {
+ static SRC_STATE* createOrThrow(Converter converter, int channels)
+ {
++ if (channels <= 0)
++ throw std::runtime_error("Channel count must be >= 1.");
+ int error;
+ auto* state = src_new(static_cast<int>(converter), channels, &error);
+ if(!state)
+@@ -174,6 +176,8 @@ class StateCallback : public detail::StateBase
+ {
+ static SRC_STATE* createOrThrow(Converter converter, int channels, src_callback_t func, void* data)
+ {
++ if (channels <= 0)
++ throw std::runtime_error("Channel count must be >= 1.");
+ int error;
+ auto* state = src_callback_new(func, static_cast<int>(converter), channels, &error, data);
+ if(!state)
+--
+2.32.0
+