From 00e5749e20e39849d35a2a981b16da751b63c77d Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sun, 2 Nov 2025 21:15:59 +0200 Subject: [PATCH] ports: Add SuperTux port --- ports/SuperTux/build.sh | 32 ++++++++++++ ports/SuperTux/patches/0001-fix-cmake.patch | 52 +++++++++++++++++++ .../0002-fix-partio_zip-includes.patch | 11 ++++ 3 files changed, 95 insertions(+) create mode 100755 ports/SuperTux/build.sh create mode 100644 ports/SuperTux/patches/0001-fix-cmake.patch create mode 100644 ports/SuperTux/patches/0002-fix-partio_zip-includes.patch diff --git a/ports/SuperTux/build.sh b/ports/SuperTux/build.sh new file mode 100755 index 00000000..2d7ad827 --- /dev/null +++ b/ports/SuperTux/build.sh @@ -0,0 +1,32 @@ +#!/bin/bash ../install.sh + +NAME='SuperTux' +VERSION='0.6.3' +DOWNLOAD_URL="https://github.com/SuperTux/supertux/releases/download/v$VERSION/SuperTux-v$VERSION-Source.tar.gz#f7940e6009c40226eb34ebab8ffb0e3a894892d891a07b35d0e5762dd41c79f6" +TAR_CONTENT="SuperTux-v$VERSION-Source" +DEPENDENCIES=('boost' 'SDL2' 'SDL2_image' 'curl' 'openal-soft' 'libvorbis' 'freetype' 'physfs' 'glm') + +configure() { + mkdir -p build + pushd build + $BANAN_CMAKE \ + --toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \ + -G Ninja --fresh .. \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DINSTALL_SUBDIR_BIN=bin \ + -DBUILD_DOCUMENTATION=OFF \ + -DENABLE_OPENGL=OFF \ + -DENABLE_BOOST_STATIC_LIBS=ON \ + || exit 1 + popd + # crashes in `std::ostream::sentry::sentry(std::ostream&)` with shared boost +} + +build() { + $BANAN_CMAKE --build build || exit 1 +} + +install() { + $BANAN_CMAKE --install build || exit 1 +} diff --git a/ports/SuperTux/patches/0001-fix-cmake.patch b/ports/SuperTux/patches/0001-fix-cmake.patch new file mode 100644 index 00000000..1b962263 --- /dev/null +++ b/ports/SuperTux/patches/0001-fix-cmake.patch @@ -0,0 +1,52 @@ +diff -ruN SuperTux-0.6.3/CMakeLists.txt SuperTux-0.6.3-banan_os/CMakeLists.txt +--- SuperTux-0.6.3/CMakeLists.txt 2021-12-23 01:01:57.000000000 +0200 ++++ SuperTux-0.6.3-banan_os/CMakeLists.txt 2025-11-02 20:57:03.725932455 +0200 +@@ -171,7 +171,7 @@ + else(ENABLE_BOOST_STATIC_LIBS) + set(Boost_USE_STATIC_LIBS FALSE) + endif(ENABLE_BOOST_STATIC_LIBS) +-find_package(Boost REQUIRED COMPONENTS filesystem system date_time locale) ++find_package(Boost REQUIRED COMPONENTS filesystem date_time locale) + include_directories(SYSTEM ${Boost_INCLUDE_DIR}) + link_directories(${Boost_LIBRARY_DIRS}) + +@@ -507,6 +507,7 @@ + -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} + -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} + -DCMAKE_INSTALL_PREFIX=${SQUIRREL_PREFIX} ++ -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} + -DINSTALL_INC_DIR=include + -DCMAKE_POSITION_INDEPENDENT_CODE=ON) + +@@ -966,7 +967,7 @@ + endif() + endif() + target_include_directories(supertux2_lib SYSTEM PUBLIC ${SDL_TTF_PREFIX}/include/SDL2) +-target_link_libraries(supertux2_lib PUBLIC SDL_ttf_lib) ++target_link_libraries(supertux2_lib PUBLIC libSDL2_ttf.a) + if(VCPKG_BUILD) + target_link_libraries(supertux2_lib PUBLIC freetype) + else() +@@ -977,9 +978,10 @@ + target_link_libraries(supertux2_lib PUBLIC ${HARFBUZZ_LIBRARY} ${FRIBIDI_LIBRARY} ${RAQM_LIBRARY}) + endif() + +-target_link_libraries(supertux2_lib PUBLIC squirrel_lib) +-target_link_libraries(supertux2_lib PUBLIC sqstdlib_lib) +-target_link_libraries(supertux2_lib PUBLIC tinygettext_lib) ++target_link_libraries(supertux2_lib PUBLIC libsquirrel_static.a) ++target_link_libraries(supertux2_lib PUBLIC libsqstdlib_static.a) ++target_link_libraries(supertux2_lib PUBLIC libtinygettext.a) ++ + target_link_libraries(supertux2_lib PUBLIC sexp) + target_link_libraries(supertux2_lib PUBLIC savepng) + target_link_libraries(supertux2_lib PUBLIC partio_zip_lib) +@@ -1025,7 +1027,7 @@ + if(VCPKG_BUILD) + target_link_libraries(supertux2_lib PUBLIC ${CURL_LIBRARIES}) + else() +- target_link_libraries(supertux2_lib PUBLIC ${CURL_LIBRARY}) ++ target_link_libraries(supertux2_lib PUBLIC ${CURL_LIBRARY} ssl crypto zstd z) + endif() + endif(HAVE_LIBCURL) + endif(NOT EMSCRIPTEN) diff --git a/ports/SuperTux/patches/0002-fix-partio_zip-includes.patch b/ports/SuperTux/patches/0002-fix-partio_zip-includes.patch new file mode 100644 index 00000000..1f66ec3b --- /dev/null +++ b/ports/SuperTux/patches/0002-fix-partio_zip-includes.patch @@ -0,0 +1,11 @@ +diff -ruN SuperTux-0.6.3/external/partio_zip/zip_manager.hpp SuperTux-0.6.3-banan_os/external/partio_zip/zip_manager.hpp +--- SuperTux-0.6.3/external/partio_zip/zip_manager.hpp 2021-12-23 01:01:58.000000000 +0200 ++++ SuperTux-0.6.3-banan_os/external/partio_zip/zip_manager.hpp 2025-11-02 20:16:29.691656288 +0200 +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include + #include + #include + #include