distribution/packages/emulators/standalone/gzdoom-sa/package.mk

65 lines
2.2 KiB
Makefile
Raw Normal View History

2023-06-14 16:49:04 +00:00
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2021-present 351ELEC (https://github.com/351ELEC)
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
2023-06-14 16:49:04 +00:00
PKG_NAME="gzdoom-sa"
2024-01-02 13:57:37 +00:00
PKG_VERSION="6ce809e"
2023-06-14 16:49:04 +00:00
PKG_LICENSE="GPLv3"
PKG_SITE="https://github.com/ZDoom/gzdoom"
PKG_URL="${PKG_SITE}.git"
2024-01-02 13:57:37 +00:00
PKG_GIT_CLONE_BRANCH="4.11"
2023-12-27 11:42:35 +00:00
PKG_DEPENDS_HOST="toolchain SDL2:host zmusic:host libvpx:host libwebp:host"
PKG_DEPENDS_TARGET="toolchain SDL2 gzdoom-sa:host zmusic libvpx libwebp"
2023-06-14 16:49:04 +00:00
PKG_LONGDESC="GZDoom is a modder-friendly OpenGL and Vulkan source port based on the DOOM engine"
GET_HANDLER_SUPPORT="git"
PKG_TOOLCHAIN="cmake-make"
2023-06-17 00:55:20 +00:00
pre_configure_host() {
unset HOST_CMAKE_OPTS
2023-12-27 11:42:35 +00:00
PKG_CMAKE_OPTS_HOST+=" -DZMUSIC_LIBRARIES=${TOOLCHAIN}/usr/lib/libzmusic.so \
-DZMUSIC_INCLUDE_DIR=${TOOLCHAIN}/usr/include \
2023-12-27 12:07:37 +00:00
-DNO_GTK=ON \
-DHAVE_VULKAN=OFF \
-DHAVE_GLES2=OFF"
2023-06-17 00:55:20 +00:00
}
makeinstall_host() {
:
}
2023-06-17 00:19:29 +00:00
pre_configure_target() {
2023-12-27 11:07:14 +00:00
PKG_CMAKE_OPTS_TARGET+=" -DNO_GTK=ON \
-DFORCE_CROSSCOMPILE=ON \
-DIMPORT_EXECUTABLES=${PKG_BUILD}/.${HOST_NAME}/ImportExecutables.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DZMUSIC_LIBRARIES=${SYSROOT_PREFIX}/usr/lib/libzmusic.so -DZMUSIC_INCLUDE_DIR=${SYSROOT_PREFIX}/usr/include"
### Enable GLES on devices that don't support OpenGL.
if [ ! "${OPENGL_SUPPORT}" = "yes" ]
then
2024-01-02 13:57:37 +00:00
PKG_CMAKE_OPTS_TARGET+=" -DHAVE_GLES2=ON"
fi
2023-12-27 12:07:37 +00:00
### Enable vulkan support on devices that have it available.
if [ "${VULKAN_SUPPORT}" = "yes" ]
then
PKG_CMAKE_OPTS_TARGET+=" -DHAVE_VULKAN=ON"
2024-01-02 13:57:37 +00:00
else
PKG_CMAKE_OPTS_TARGET+=" -DHAVE_VULKAN=OFF"
2023-12-27 12:07:37 +00:00
fi
2023-06-14 16:49:04 +00:00
}
makeinstall_target() {
2023-06-17 00:19:29 +00:00
2023-06-14 16:49:04 +00:00
mkdir -p ${INSTALL}/usr/bin
cp ${PKG_BUILD}/.${TARGET_NAME}/gzdoom ${INSTALL}/usr/bin
2023-06-14 16:49:04 +00:00
cp ${PKG_DIR}/scripts/start_gzdoom.sh ${INSTALL}/usr/bin/
chmod +x ${INSTALL}/usr/bin/*
mkdir -p ${INSTALL}/usr/config/gzdoom
cp ${PKG_DIR}/config/* ${INSTALL}/usr/config/gzdoom
cp ${PKG_BUILD}/.${TARGET_NAME}/*.pk3 ${INSTALL}/usr/config/gzdoom
cp -r ${PKG_BUILD}/.${TARGET_NAME}/soundfonts ${INSTALL}/usr/config/gzdoom
cp -r ${PKG_BUILD}/.${TARGET_NAME}/fm_banks ${INSTALL}/usr/config/gzdoom
2023-06-14 16:49:04 +00:00
}