Ports/openttd: Update formatting to be consistent with other ports
This commit is contained in:
parent
c8dbed09d8
commit
bf5a17dedb
Notes:
sideshowbarker
2024-07-16 23:34:49 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/bf5a17dedb Pull-request: https://github.com/SerenityOS/serenity/pull/20534 Reviewed-by: https://github.com/timschumi ✅
1 changed files with 27 additions and 16 deletions
|
@ -1,52 +1,63 @@
|
|||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
port=openttd
|
||||
port='openttd'
|
||||
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=(
|
||||
"https://cdn.openttd.org/openttd-releases/${version}/openttd-${version}-source.tar.xz 2a1deba01bfe58e2188879f450c3fa4f3819271ab49bf348dd66545f040d146f"
|
||||
)
|
||||
useconfigure=true
|
||||
configopts=("-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt")
|
||||
launcher_name=OpenTTD
|
||||
launcher_category=Games
|
||||
launcher_command=/usr/local/games/openttd
|
||||
useconfigure='true'
|
||||
configopts=(
|
||||
"-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt"
|
||||
)
|
||||
launcher_name='OpenTTD'
|
||||
launcher_category='Games'
|
||||
launcher_command='/usr/local/games/openttd'
|
||||
icon_file='media/openttd.32.png'
|
||||
|
||||
configure() {
|
||||
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
|
||||
)
|
||||
|
||||
target_env
|
||||
mkdir -p $workdir/build
|
||||
mkdir -p "${workdir}/build"
|
||||
(
|
||||
cd $workdir/build
|
||||
cmake .. "${configopts[@]}" -DHOST_BINARY_DIR=$(pwd)/../host-build
|
||||
cd "${workdir}/build"
|
||||
cmake .. "${configopts[@]}" -DHOST_BINARY_DIR="$(pwd)/../host-build"
|
||||
)
|
||||
}
|
||||
|
||||
build() {
|
||||
host_env
|
||||
(
|
||||
cd $workdir/host-build
|
||||
cd "${workdir}/host-build"
|
||||
make "${makeopts[@]}"
|
||||
)
|
||||
|
||||
target_env
|
||||
(
|
||||
cd $workdir/build
|
||||
cd "${workdir}/build"
|
||||
make "${makeopts[@]}"
|
||||
)
|
||||
}
|
||||
|
||||
install() {
|
||||
(
|
||||
cd $workdir/build
|
||||
cd "${workdir}/build"
|
||||
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"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue