summaryrefslogtreecommitdiff
path: root/user/supertux
diff options
context:
space:
mode:
Diffstat (limited to 'user/supertux')
-rw-r--r--user/supertux/APKBUILD48
-rw-r--r--user/supertux/cmake32.patch22
-rw-r--r--user/supertux/find-sdl2.patch11
-rw-r--r--user/supertux/zip-header.patch30
4 files changed, 111 insertions, 0 deletions
diff --git a/user/supertux/APKBUILD b/user/supertux/APKBUILD
new file mode 100644
index 000000000..4e6b1c20d
--- /dev/null
+++ b/user/supertux/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=supertux
+pkgver=0.6.3
+pkgrel=1
+pkgdesc="Platform game featuring Tux the Penugin"
+url="https://www.supertux.org/"
+arch="all"
+license="GPL-3.0+"
+depends=""
+makedepends="boost-dev cmake curl-dev glew-dev libogg-dev libvorbis-dev zlib-dev
+ libglvnd-dev openal-soft-dev physfs-dev sdl2-dev sdl2_image-dev doxygen
+ freetype-dev glm libpng-dev"
+subpackages="$pkgname-doc"
+source="https://github.com/SuperTux/supertux/releases/download/v$pkgver/SuperTux-v$pkgver-Source.tar.gz
+ find-sdl2.patch
+ cmake32.patch
+ zip-header.patch
+ "
+builddir="$srcdir"/SuperTux-v$pkgver-Source
+
+build() {
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ ${CMAKE_CROSSOPTS} \
+ .
+ make
+}
+
+check() {
+ CTEST_OUTPUT_ON_FAILURE=TRUE ctest
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="c6540bab1b3befbd975756031c4587e5569d9613d9539dc829c728b574d1a4da92816d6a7e68947b32963cc13d9b8b52312701c199138640e9f89e5885433798 SuperTux-v0.6.3-Source.tar.gz
+9e229d837d8006d618320ef3f7465ef88f8903853ed1ef3e291373d25f8542010f7dad6c1c5859e857db48e1447337ddbed0619228f5eac6aba916b69567fd94 find-sdl2.patch
+c0e6cdd52e07e04ef67edc8b7f3d3c37dd2ffd35381b704b43512a01bbd0a5a35fbeae7ec225be8e4643dbcaac3eae427d7ea5217dc1e676f2991ee46f5bf513 cmake32.patch
+038a00697db1533154d1664a58516827d1574c3b79712c72e3bbb92b23943a9ac3a198e20705a7ca470eb34be605d5765ef2a4ebc53694e28543b609a2f2444b zip-header.patch"
diff --git a/user/supertux/cmake32.patch b/user/supertux/cmake32.patch
new file mode 100644
index 000000000..bc31de62c
--- /dev/null
+++ b/user/supertux/cmake32.patch
@@ -0,0 +1,22 @@
+There is no reason to special-case finding SDL2 for 32-bit, and it doesn't
+work effectively anyway.
+
+--- SuperTux-v0.6.3-Source/CMakeLists.txt.old 2021-12-22 23:01:57.000000000 +0000
++++ SuperTux-v0.6.3-Source/CMakeLists.txt 2022-12-04 00:59:27.057071029 +0000
+@@ -232,16 +232,6 @@
+ find_library(SDL2_LIBRARIES SDL2)
+ find_library(SDL2IMAGE_LIBRARIES SDL2_image)
+ message(STATUS "SDL2_INCLUDE_DIR is ${SDL2_INCLUDE_DIRS}")
+- elseif (CMAKE_SIZEOF_VOID_P EQUAL 4)
+- # 32-bit
+- find_library(SDL2_LIBRARIES SDL2)
+- find_library(SDL2IMAGE_LIBRARIES SDL2_image)
+- find_path(SDL2_INCLUDE_DIRS SDL2/SDL.h)
+- find_path(SDL2IMAGE_INCLUDE_DIRS SDL2/SDL_image.h)
+- set(SDL2_INCLUDE_DIRS ${SDL2_INCLUDE_DIRS}/SDL2)
+- set(SDL2IMAGE_INCLUDE_DIRS ${SDL2IMAGE_INCLUDE_DIRS}/SDL2)
+- message(STATUS "SDL LIBS: ${SDL2_LIBRARIES}")
+- message(STATUS "SDL INCL: ${SDL2_INCLUDE_DIRS}")
+ else()
+ # 64-bit
+ include(FindPkgConfig)
diff --git a/user/supertux/find-sdl2.patch b/user/supertux/find-sdl2.patch
new file mode 100644
index 000000000..ec9fbd32d
--- /dev/null
+++ b/user/supertux/find-sdl2.patch
@@ -0,0 +1,11 @@
+--- SuperTux-v0.6.3-Source/external/SDL_ttf/CMakeLists.txt.old 2021-12-22 17:02:04.000000000 -0600
++++ SuperTux-v0.6.3-Source/external/SDL_ttf/CMakeLists.txt 2022-06-12 16:39:33.440000000 -0500
+@@ -4,7 +4,7 @@
+ project(SDL2_TTF C)
+
+ find_path(SDL_INCLUDE_DIR SDL2/SDL.h)
+-find_library(SDL_LIBRARY NAMES SDL2d SDL2)
++find_library(SDL_LIBRARY NAMES SDL2d SDL2-2.0)
+ find_package(Freetype REQUIRED)
+
+ add_library(SDL2_ttf SDL_ttf.c version.rc)
diff --git a/user/supertux/zip-header.patch b/user/supertux/zip-header.patch
new file mode 100644
index 000000000..b02e74d0e
--- /dev/null
+++ b/user/supertux/zip-header.patch
@@ -0,0 +1,30 @@
+From 81809dd5e6f611b1d64d952f6d96310bcc9c5fca Mon Sep 17 00:00:00 2001
+From: Semphris <semphris@protonmail.com>
+Date: Fri, 17 Jun 2022 12:36:26 -0400
+Subject: [PATCH] Fix problem with GCC 11 and Partio's ZIP manager (missing
+ #include <memory>)
+
+Closes #2219 on GitHub. Same fix, but puts the include closer to the copyright header.
+---
+ external/partio_zip/zip_manager.hpp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/external/partio_zip/zip_manager.hpp b/external/partio_zip/zip_manager.hpp
+index 666884dda53..245303c76be 100644
+--- a/external/partio_zip/zip_manager.hpp
++++ b/external/partio_zip/zip_manager.hpp
+@@ -1,8 +1,12 @@
+ // SOURCE: https://github.com/wdas/partio/blob/main/src/lib/io/ZIP.h
++// NOTE: This file was edited for purposes of compatibility with SuperTux.
+
+-/*
++// This include has been added to fix a problem with GCC 11+ (and maybe 10)
++#include <memory>
++
++// =============================================================================
+
+-NOTE: This file was edited for purposes of compatibility with SuperTux.
++/*
+
+ PARTIO SOFTWARE
+ Copyright 2010 Disney Enterprises, Inc. All rights reserved