0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-27 06:18:57 +00:00
termux-packages/x11-packages/openttd/build.sh
Chongyun Lee 51ffe57c05 libicu: revbump revdeps (3)
packages: music-file-organizer, tectonic, libical, libraptor2
x11-packages: gw, openttd
2024-11-23 15:54:57 +08:00

34 lines
1.1 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://www.openttd.org/
TERMUX_PKG_DESCRIPTION="An engine for running Transport Tycoon Deluxe"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="14.1"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=git+https://github.com/OpenTTD/OpenTTD
TERMUX_PKG_GIT_BRANCH="$TERMUX_PKG_VERSION"
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="fontconfig, freetype, libc++, libicu, liblzma, liblzo, libpng, openttd-gfx, openttd-msx, openttd-sfx, sdl2, zlib"
TERMUX_PKG_RECOMMENDS="desktop-file-utils, hicolor-icon-theme"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DBINARY_NAME=openttd
-DCMAKE_INSTALL_DATADIR=share
-DCMAKE_INSTALL_BINDIR=bin
"
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_EXTRA_HOSTBUILD_CONFIGURE_ARGS="
-DOPTION_DEDICATED=ON
"
termux_step_host_build() {
termux_setup_cmake
cmake "$TERMUX_PKG_SRCDIR" $TERMUX_PKG_EXTRA_HOSTBUILD_CONFIGURE_ARGS
make -j $TERMUX_PKG_MAKE_PROCESSES
}
termux_step_pre_configure() {
if [ "$TERMUX_ON_DEVICE_BUILD" = "false" ]; then
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DHOST_BINARY_DIR=$TERMUX_PKG_HOSTBUILD_DIR"
fi
CXXFLAGS+=" -DU_USING_ICU_NAMESPACE=1"
}