summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2019-12-21 13:39:34 +0100
committerRasmus Thomsen <oss@cogitri.dev>2019-12-28 11:43:31 +0100
commitf9ef0077935845237abbefe0bd497fd362492c45 (patch)
treeeb3add0e6f2ff49ac6d74bd561bdf01a744d1121
parentb16919e63d49db4d981e5e5ee67848963c327c7b (diff)
downloadaports-f9ef0077935845237abbefe0bd497fd362492c45.zip
testing/supertuxkart: new aport
-rw-r--r--testing/supertuxkart/APKBUILD53
-rw-r--r--testing/supertuxkart/no-sysctl.patch38
-rw-r--r--testing/supertuxkart/va_list.patch27
3 files changed, 118 insertions, 0 deletions
diff --git a/testing/supertuxkart/APKBUILD b/testing/supertuxkart/APKBUILD
new file mode 100644
index 00000000000..b49f18e54a6
--- /dev/null
+++ b/testing/supertuxkart/APKBUILD
@@ -0,0 +1,53 @@
+# Contributor: Bart Ribbers <bribbers@disroot.org>
+# Maintainer: Bart Ribbers <bribbers@disroot.org>
+pkgname=supertuxkart
+pkgver=1.0
+pkgrel=0
+arch="all"
+url="https://supertuxkart.net/"
+pkgdesc="Kart racing game featuring Tux and his friends"
+license="GPL-3.0-or-later"
+depends="$pkgname-data"
+makedepends="cmake glew-dev jpeg-dev libpng-dev libxrandr-dev wayland-dev libxkbcommon-dev bluez-dev openal-soft-dev libvorbis-dev freetype-dev fribidi-dev curl-dev harfbuzz-dev"
+source="$pkgname-$pkgver.tar.xz::https://downloads.sourceforge.net/supertuxkart/supertuxkart-$pkgver-src.tar.xz
+ no-sysctl.patch
+ va_list.patch"
+subpackages="$pkgname-static $pkgname-data::noarch"
+
+prepare() {
+ default_prepare
+
+ mkdir "$builddir"/build
+}
+
+build() {
+ cd "$builddir"/build
+ cmake "$builddir" \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_RECORDER=0
+ make
+}
+
+check() {
+ cd "$builddir"/build
+ CTEST_OUTPUT_ON_FAILURE=TRUE ctest
+}
+
+package() {
+ cd "$builddir"/build
+ DESTDIR="$pkgdir" make install
+}
+
+data() {
+ pkgdesc="$pkgdesc (data files)"
+
+ mkdir -p "$subpkgdir"/usr/share/supertuxkart
+ mv "$pkgdir"/usr/share/supertuxkart/data \
+ "$subpkgdir"/usr/share/supertuxkart
+}
+
+sha512sums="182754610abd09545630fa1f7fda858ba1731bbacb078bc71597e143f9cb2a1cfcedd3038720760d0471a89b79cc3bb1eb292d38fcd53be05aad7cb17c474ca9 supertuxkart-1.0.tar.xz
+e197cc991e197b2406c40006b3966663b2279eb96872b0f567dfa574c82eb1fa9ebd2101b8e0d9dbc66b766882d2b200a32c75364f1218cdf48e4362f20268f4 no-sysctl.patch
+0a6d713dd7505fd0ac921de0d2584459e271ea88f7088a1333ad1f3c704d84785845f8c9b96d7441a42e5c13225810921f343c163fd077d1868d641afa8cb7f4 va_list.patch"
diff --git a/testing/supertuxkart/no-sysctl.patch b/testing/supertuxkart/no-sysctl.patch
new file mode 100644
index 00000000000..5d456c53d1f
--- /dev/null
+++ b/testing/supertuxkart/no-sysctl.patch
@@ -0,0 +1,38 @@
+From f6ee1ebab1d5fb14dfee70b287c51a77d48a5d55 Mon Sep 17 00:00:00 2001
+From: Bart Ribbers <bribbers@disroot.org>
+Date: Thu, 26 Dec 2019 04:52:46 +0100
+Subject: [PATCH] Include linux/sysctl.h rather than sys/sysctl.h on non-glibc
+ systems (#4174)
+
+---
+ lib/irrlicht/source/Irrlicht/COSOperator.cpp | 2 +-
+ src/network/protocols/lobby_protocol.hpp | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/irrlicht/source/Irrlicht/COSOperator.cpp b/lib/irrlicht/source/Irrlicht/COSOperator.cpp
+index ba9612fc96..1274740057 100644
+--- a/lib/irrlicht/source/Irrlicht/COSOperator.cpp
++++ b/lib/irrlicht/source/Irrlicht/COSOperator.cpp
+@@ -14,7 +14,7 @@
+ #if !defined(_IRR_SOLARIS_PLATFORM_) && !defined(__CYGWIN__)
+ #include <sys/param.h>
+ #include <sys/types.h>
+-#ifdef ANDROID
++#if defined(ANDROID) || (defined(__linux__) && !defined(__GLIBC__))
+ #include <linux/sysctl.h>
+ #else
+ #include <sys/sysctl.h>
+diff --git a/src/network/protocols/lobby_protocol.hpp b/src/network/protocols/lobby_protocol.hpp
+index 0075b8d50..efb61d5ef 100644
+--- a/src/network/protocols/lobby_protocol.hpp
++++ b/src/network/protocols/lobby_protocol.hpp
+@@ -31,6 +31,7 @@ class Track;
+ #include <cassert>
+ #include <map>
+ #include <memory>
++#include <string>
+ #include <thread>
+ #include <vector>
+
+
+
diff --git a/testing/supertuxkart/va_list.patch b/testing/supertuxkart/va_list.patch
new file mode 100644
index 00000000000..29cdd17957b
--- /dev/null
+++ b/testing/supertuxkart/va_list.patch
@@ -0,0 +1,27 @@
+From 32c2798c6bff06071bb61b772e2687946055c44d Mon Sep 17 00:00:00 2001
+From: Bart Ribbers <bribbers@disroot.org>
+Date: Fri, 27 Dec 2019 18:43:37 +0100
+Subject: [PATCH] Define VALIST as va_list rather than char* on non-glibc
+ systems
+
+---
+ src/utils/log.hpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/utils/log.hpp b/src/utils/log.hpp
+index 6959b6cf1f..a3a15f9c5a 100644
+--- a/src/utils/log.hpp
++++ b/src/utils/log.hpp
+@@ -30,10 +30,10 @@
+ #include <vector>
+
+
+-#ifdef __GNUC__
++#if defined(__GLIBC__)
+ # define VALIST __gnuc_va_list
+ #else
+-# define VALIST char*
++# define VALIST va_list
+ #endif
+
+ #if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1800