# Contributor: Bart Ribbers # Maintainer: Bart Ribbers pkgname=supertuxkart pkgver=1.2 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 sdl2-dev" source="$pkgname-$pkgver.tar.xz::https://github.com/supertuxkart/stk-code/releases/download/$pkgver/SuperTuxKart-$pkgver-src.tar.xz find-directfb-include.patch 0001-network_config-use-ns_name_uncompress.patch " subpackages="$pkgname-static $pkgname-data::noarch" builddir="$srcdir/SuperTuxKart-$pkgver-src" prepare() { default_prepare mkdir "$builddir"/build } build() { cd "$builddir"/build case "$CARCH" in arm*|aarch64) GLES2_RENDERER=ON ;; * ) GLES2_RENDERER=OFF ;; esac cmake "$builddir" \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_RECORDER=0 \ -DUSE_GLES2=$GLES2_RENDERER 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="bc7079af9b3d85b3e4839ebb3eee293fb8bfe95450165172caa28b8ad1a9e97c59618d77c2208a86090f1840aa9a4b4b6898c1053fa6f5d7dfbfe17b69536835 supertuxkart-1.2.tar.xz fee686f8eaa72e0ed93c7bf38f2375b3206fcbb914af27228ae27d69311921dd4e43a4de4aed06903364bfeb63cbae344270f3556c553d497296296fb8d6f563 find-directfb-include.patch 15c7c89a3e27164fba680b5e5a1fbcd751f5ea403774edd705601b78b0276b59720f8400e17de2741fe9367dac193bf2a05a8c4f2f94abe9d15b8231e6dbddf8 0001-network_config-use-ns_name_uncompress.patch"