# Contributor: Adrian Siekierka # Maintainer: Adrian Siekierka pkgname=openttd pkgver=1.9.3 pkgrel=0 pkgdesc="Open source version of the Transport Tycoon Deluxe simulator" url="https://www.openttd.org" arch="all" license="GPL-2.0-or-later" makedepends="fontconfig-dev freetype-dev icu-dev libpng-dev lzo-dev sdl-dev xz-dev zlib-dev" checkdepends="openttd-opengfx" subpackages="$pkgname-doc $pkgname-lang::noarch" source="https://cdn.openttd.org/openttd-releases/$pkgver/openttd-$pkgver-source.tar.xz fix-pthread-stacksize.patch " build() { # OpenTTD's builtin strip does not work when cross-compiling, # but it will be done automatically later in the package build. ./configure \ --build="$CBUILD" \ --host="$CHOST" \ --disable-strip \ --prefix-dir=/usr \ --binary-dir=bin \ --install-dir="$pkgdir" \ --with-sdl \ --with-zlib \ --with-liblzma \ --with-liblzo2 \ --with-freetype \ --with-fontconfig \ --without-icu make } check() { make test } package() { make install } lang() { pkgdesc="$pkgdesc (localizations)" cd "$pkgdir" mkdir -p "$subpkgdir"/usr/share/games/openttd/lang local i for i in $(find usr/share/games/openttd/lang/ ! -name 'english.lng' -type f); do mv "$i" "$subpkgdir"/"$i" done } sha512sums="e2208f730cf26c2df9b1950e885e20471060217dd47f2483db3f1cc86b40658d71208f27caab38a9fa513cfddb33c791a0972336dfa902a6d110ef246d936a34 openttd-1.9.3-source.tar.xz b6dcf89c515b199c8e585ffcfab166346074e1e6df8976f0630ceaee1d5411f57c0319e6afd1bc8608aa21a8cddae9e758de8b8c3d582a2b26a9037e4b6a704a fix-pthread-stacksize.patch"