summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Matteo Bernardini2022-08-22 22:53:15 +0200
committer Matteo Bernardini2024-03-16 09:39:27 +0100
commit34d21d7a76221b36bafc39bd22fabfc9475b2cbe (patch)
tree1d7a149372bf04d195fafbf09a6480256ed05f81
parentf2fd02d810ccafdcb54cd1ce380341a85bbefd77 (diff)
downloadslackbuilds-supertux.tar.gz
games/supertux: Patch for gcc >= 11.x.supertux
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--games/supertux/gcc12.patch11
-rw-r--r--games/supertux/missing-include-for-FLT_EPSILON.patch13
-rw-r--r--games/supertux/supertux.SlackBuild3
3 files changed, 27 insertions, 0 deletions
diff --git a/games/supertux/gcc12.patch b/games/supertux/gcc12.patch
new file mode 100644
index 0000000000..f5e7392c3c
--- /dev/null
+++ b/games/supertux/gcc12.patch
@@ -0,0 +1,11 @@
+diff -upr SuperTux-v0.6.3-Source.orig/external/partio_zip/zip_manager.cpp SuperTux-v0.6.3-Source/external/partio_zip/zip_manager.cpp
+--- SuperTux-v0.6.3-Source.orig/external/partio_zip/zip_manager.cpp 2021-12-23 01:01:58.000000000 +0200
++++ SuperTux-v0.6.3-Source/external/partio_zip/zip_manager.cpp 2022-06-13 15:20:45.305976668 +0300
+@@ -47,6 +47,7 @@ extern "C"{
+ #include <stdexcept>
+ #include <cstring>
+ #include <string>
++#include <memory>
+
+ #include "zip_manager.hpp"
+
diff --git a/games/supertux/missing-include-for-FLT_EPSILON.patch b/games/supertux/missing-include-for-FLT_EPSILON.patch
new file mode 100644
index 0000000000..44bc370a74
--- /dev/null
+++ b/games/supertux/missing-include-for-FLT_EPSILON.patch
@@ -0,0 +1,13 @@
+diff --git a/src/supertux/game_session.cpp b/src/supertux/game_session.cpp
+index 41de52e..a8ebfc9 100644
+--- a/src/supertux/game_session.cpp
++++ b/src/supertux/game_session.cpp
+@@ -14,6 +14,8 @@
+ // You should have received a copy of the GNU General Public License
+ // along with this program. If not, see <http://www.gnu.org/licenses/>.
+
++#include <cfloat>
++
+ #include "supertux/game_session.hpp"
+
+ #include "audio/sound_manager.hpp"
diff --git a/games/supertux/supertux.SlackBuild b/games/supertux/supertux.SlackBuild
index a492e216aa..26795a4bbd 100644
--- a/games/supertux/supertux.SlackBuild
+++ b/games/supertux/supertux.SlackBuild
@@ -84,6 +84,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/gcc12.patch
+patch -p1 < $CWD/missing-include-for-FLT_EPSILON.patch
+
mkdir -p build
cd build
cmake \