Ports: Add DevilutionX

This commit is contained in:
Tim Ledbetter 2023-08-13 17:17:30 +01:00 committed by Tim Schumacher
parent 576f8e8fa8
commit ba51c7bb7f
2 changed files with 51 additions and 0 deletions

View file

@ -48,6 +48,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
| [`curl`](curl/) | curl | 8.2.0 | https://curl.se/ |
| [`dash`](dash/) | DASH | 0.5.10.2 | http://gondor.apana.org.au/~herbert/dash |
| [`deutex`](deutex/) | DeuTex | 5.2.2 | https://github.com/Doom-Utils/deutex |
| [`devilutionX`](devilutionX/) | DevilutionX | 1.5.0 | https://github.com/diasurgical/devilutionX |
| [`dialog`](dialog/) | Dialog | 1.3-20220526 | https://invisible-island.net/dialog/ |
| [`diffutils`](diffutils/) | GNU Diffutils | 3.8 | https://www.gnu.org/software/diffutils/ |
| [`dmidecode`](dmidecode/) | dmidecode | 3.5 | https://github.com/mirror/dmidecode |

50
Ports/devilutionX/package.sh Executable file
View file

@ -0,0 +1,50 @@
#!/usr/bin/env -S bash ../.port_include.sh
port='devilutionX'
version='1.5.0'
useconfigure='true'
files=(
"https://github.com/diasurgical/devilutionX/archive/refs/tags/${version}.tar.gz 94bd11e05ba53edddfd9df677d30c9f9fdca90f963a3466bf0fb133bd4f8d668"
)
depends=(
'bzip2'
'libpng'
'SDL2'
'SDL2_image'
'SDL2_mixer'
)
configopts=(
'-DCMAKE_BUILD_TYPE=Release'
"-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt"
'-DDEVILUTIONX_SYSTEM_LIBFMT=OFF'
'-DNONET=ON'
)
install_dir='/opt/devilutionx'
launcher_name='DevilutionX'
launcher_category='Games'
launcher_command="${install_dir}/devilutionx"
icon_file='Packaging/resources/icon_32.png'
configure() {
# TODO: Figure out why GCC doesn't autodetect that libgcc_s is needed.
if [ "${SERENITY_TOOLCHAIN}" = "GNU" ]; then
export LDFLAGS="-lgcc_s"
fi
run cmake "${configopts[@]}" .
}
install() {
run_nocd mkdir -p "${SERENITY_INSTALL_ROOT}${install_dir}/"
run cp -r devilutionx assets/ "${SERENITY_INSTALL_ROOT}${install_dir}/"
run_nocd mkdir -p "${SERENITY_INSTALL_ROOT}/usr/local/bin/"
run ln -sf "${install_dir}/devilutionx" "${SERENITY_INSTALL_ROOT}/usr/local/bin/devilutionx"
}
post_install() {
echo
echo 'DevilutionX is installed!'
echo
echo 'Make sure the DIABDAT.MPQ file from your installation CD is in the following directory:'
echo " Inside SerenityOS: ${install_dir}/"
echo " Outside SerenityOS: ${SERENITY_SOURCE_DIR}/Base${install_dir}/"
echo
}