aboutsummaryrefslogblamecommitdiffstats
path: root/community/supertux/APKBUILD
blob: cfb7e8ff50cbfb299fa18d97a2748b17a298b1a8 (plain) (tree)
1
2
3
4
5
6
7
8


                                                 
            
        

                                                             
                                             




                                                                                                                                        


                                                                                                       





                                                                                          
                        


                                             
                                         


                                               

                                


           
                                                              








                                                                 

                                                                                                                                                                           
# Contributor: alpterry <alpterry@protonmail.com>
# Maintainer: alpterry <alpterry@protonmail.com>
pkgname=supertux
pkgver=0.6.2
pkgrel=2
pkgdesc="Open-source classic 2D jump'n run sidescroller game"
url="https://www.supertux.org/"
arch="all !s390x !mips !mips64" # build fails
license="GPL-3.0-or-later"
depends="$pkgname-data"
makedepends="boost-dev cmake curl-dev freetype-dev glew-dev libpng-dev libvorbis-dev openal-soft-dev physfs-dev sdl2-dev sdl2_image-dev"
subpackages="$pkgname-doc $pkgname-data::noarch"
options="!check" # no test suite
source="https://github.com/SuperTux/supertux/releases/download/v$pkgver/SuperTux-v$pkgver-Source.tar.gz
	missing-include-for-FLT_EPSILON.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 -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		-DINSTALL_SUBDIR_BIN=bin \
		$CMAKE_CROSSOPTS
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

data() {
	pkgdesc="$pkgdesc (data files)"

	mkdir -p "$subpkgdir"/usr/share
	mv "$pkgdir"/usr/share/games "$subpkgdir"/usr/share/games
}

sha512sums="5baa783ee589b42a9bbce3740659dbb7b617ebfcc00c0a038c03d31b56700e3923c8548700ccebe42b325ca03bd85186bc5edef9f6580d93dc48d8aca88cbf74  SuperTux-v0.6.2-Source.tar.gz
4e4116cb0dc7f996cdb96484eac99bd7f5a16829f6b082cc2e4c17b22e6e2f34501b8e3e4caf3c956369c5cd6caa12179b8a4cb1f93c2c8c8b014e3829272cb3  missing-include-for-FLT_EPSILON.patch"