distribution/packages/games/emulators/duckstationsa/package.mk

73 lines
2.2 KiB
Makefile
Raw Normal View History

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech)
PKG_NAME="duckstationsa"
PKG_LICENSE="GPLv3"
2022-10-28 21:51:39 +00:00
PKG_DEPENDS_TARGET="toolchain SDL2 nasm:host pulseaudio openssl libidn2 nghttp2 zlib curl libevdev ecm"
PKG_SITE="https://github.com/stenzek/duckstation"
PKG_URL="${PKG_SITE}.git"
PKG_SHORTDESC="Fast PlayStation 1 emulator for x86-64/AArch32/AArch64 "
2022-09-16 19:02:49 +00:00
case ${DEVICE} in
RG552|handheld)
2022-11-23 14:05:35 +00:00
PKG_VERSION="11559c18e3f3a1b19991cc7d5b841d7c7b8e8cf2"
2022-09-16 19:02:49 +00:00
PKG_PATCH_DIRS+=" new"
;;
*)
PKG_VERSION="5ab5070d73f1acc51e064bd96be4ba6ce3c06f5c"
PKG_PATCH_DIRS+=" legacy"
;;
esac
2022-07-20 23:02:00 +00:00
if [ ! "${OPENGL}" = "no" ]; then
PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd"
2022-09-17 02:32:57 +00:00
PKG_CMAKE_OPTS_TARGET+=" -DUSE_X11=OFF"
2022-07-20 23:02:00 +00:00
fi
if [ "${OPENGLES_SUPPORT}" = yes ]; then
PKG_DEPENDS_TARGET+=" ${OPENGLES}"
2022-09-17 02:32:57 +00:00
PKG_CMAKE_OPTS_TARGET+=" -DUSE_X11=OFF \
2022-09-16 19:02:49 +00:00
-DUSE_DRMKMS=ON \
-DENABLE_EGL=ON \
2022-10-28 21:51:39 +00:00
-DUSE_MALI=OFF \
-DENABLE_VULKAN=OFF"
2022-07-20 23:02:00 +00:00
fi
2022-09-16 19:02:49 +00:00
if [ "${DISPLAYSERVER}" = "wl" ]; then
PKG_DEPENDS_TARGET+=" wayland ${WINDOWMANAGER} xorg-server xrandr libXi"
2022-10-28 21:51:39 +00:00
PKG_CMAKE_OPTS_TARGET+=" -DUSE_X11=OFF -DUSE_WAYLAND=ON"
fi
if [ "${VULKAN_SUPPORT}" = "yes" ]; then
PKG_DEPENDS_TARGET+=" vulkan-loader vulkan-headers"
PKG_CMAKE_OPTS_TARGET+=" -DENABLE_VULKAN=ON"
2022-09-16 19:02:49 +00:00
fi
2022-07-20 23:02:00 +00:00
pre_configure_target() {
2022-09-16 19:02:49 +00:00
PKG_CMAKE_OPTS_TARGET+=" -DANDROID=OFF \
-DENABLE_DISCORD_PRESENCE=OFF \
-DBUILD_QT_FRONTEND=OFF \
-DBUILD_NOGUI_FRONTEND=ON \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DUSE_SDL2=ON \
-DENABLE_CHEEVOS=ON \
-DUSE_FBDEV=OFF \
-DUSE_EVDEV=ON"
}
makeinstall_target() {
mkdir -p ${INSTALL}/usr/bin
cp -rf ${PKG_BUILD}/.${TARGET_NAME}/bin/duckstation-nogui ${INSTALL}/usr/bin
cp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin
mkdir -p ${INSTALL}/usr/config/duckstation
cp -rf ${PKG_BUILD}/.${TARGET_NAME}/bin/* ${INSTALL}/usr/config/duckstation
2022-09-16 19:02:49 +00:00
cp -rf ${PKG_DIR}/config/${DEVICE}/* ${INSTALL}/usr/config/duckstation
rm -rf ${INSTALL}/usr/config/duckstation/duckstation-nogui
rm -rf ${INSTALL}/usr/config/duckstation/common-tests
chmod +x ${INSTALL}/usr/bin/start_duckstation.sh
}