1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:57:45 +00:00

Ports/openttd: Update formatting to be consistent with other ports

This commit is contained in:
Tim Ledbetter 2023-08-12 22:17:57 +01:00 committed by Tim Schumacher
parent c8dbed09d8
commit bf5a17dedb

View file

@ -1,52 +1,63 @@
#!/usr/bin/env -S bash ../.port_include.sh #!/usr/bin/env -S bash ../.port_include.sh
port=openttd port='openttd'
version='13.4' version='13.4'
depends=("freetype" "SDL2" "libicu" "libpng" "zlib" "xz" "openttd-opengfx" "openttd-opensfx") depends=(
'freetype'
'libicu'
'libpng'
'openttd-opengfx'
'openttd-opensfx'
'SDL2'
'xz'
'zlib'
)
files=( files=(
"https://cdn.openttd.org/openttd-releases/${version}/openttd-${version}-source.tar.xz 2a1deba01bfe58e2188879f450c3fa4f3819271ab49bf348dd66545f040d146f" "https://cdn.openttd.org/openttd-releases/${version}/openttd-${version}-source.tar.xz 2a1deba01bfe58e2188879f450c3fa4f3819271ab49bf348dd66545f040d146f"
) )
useconfigure=true useconfigure='true'
configopts=("-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt") configopts=(
launcher_name=OpenTTD "-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt"
launcher_category=Games )
launcher_command=/usr/local/games/openttd launcher_name='OpenTTD'
launcher_category='Games'
launcher_command='/usr/local/games/openttd'
icon_file='media/openttd.32.png' icon_file='media/openttd.32.png'
configure() { configure() {
host_env host_env
mkdir -p $workdir/host-build mkdir -p "${workdir}/host-build"
( (
cd $workdir/host-build cd "${workdir}/host-build"
cmake .. -DOPTION_TOOLS_ONLY=1 cmake .. -DOPTION_TOOLS_ONLY=1
) )
target_env target_env
mkdir -p $workdir/build mkdir -p "${workdir}/build"
( (
cd $workdir/build cd "${workdir}/build"
cmake .. "${configopts[@]}" -DHOST_BINARY_DIR=$(pwd)/../host-build cmake .. "${configopts[@]}" -DHOST_BINARY_DIR="$(pwd)/../host-build"
) )
} }
build() { build() {
host_env host_env
( (
cd $workdir/host-build cd "${workdir}/host-build"
make "${makeopts[@]}" make "${makeopts[@]}"
) )
target_env target_env
( (
cd $workdir/build cd "${workdir}/build"
make "${makeopts[@]}" make "${makeopts[@]}"
) )
} }
install() { install() {
( (
cd $workdir/build cd "${workdir}/build"
make install make install
) )
ln -sf /usr/local/games/openttd $DESTDIR/usr/local/bin/openttd ln -sf /usr/local/games/openttd "${SERENITY_INSTALL_ROOT}/usr/local/bin/openttd"
} }