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

61 lines
2.1 KiB
Makefile
Raw Normal View History

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)
# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech)
PKG_NAME="duckstationsa"
2022-07-28 15:07:14 +00:00
PKG_VERSION="f6ff7e48c1dbd7e798a5fe8f770ae16a1f2085e0"
PKG_LICENSE="GPLv3"
PKG_SITE="https://github.com/stenzek/duckstation"
PKG_URL="${PKG_SITE}.git"
2022-07-22 14:07:19 +00:00
PKG_DEPENDS_TARGET="toolchain SDL2 nasm:host"
PKG_SECTION="libretro"
PKG_SHORTDESC="Fast PlayStation 1 emulator for x86-64/AArch32/AArch64 "
PKG_TOOLCHAIN="cmake"
PKG_PATCH_DIRS+="${DEVICE}"
2022-07-20 23:02:00 +00:00
if [ ! "${OPENGL}" = "no" ]; then
PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd"
fi
if [ "${OPENGLES_SUPPORT}" = yes ]; then
PKG_DEPENDS_TARGET+=" ${OPENGLES}"
PKG_CMAKE_OPTS_TARGET+=" -DHAVE_EGL=ON -DUSE_DRMKMS=ON -DUSE_MALI=ON"
2022-07-20 23:02:00 +00:00
fi
pre_configure_target() {
PKG_CMAKE_OPTS_TARGET+=" -DANDROID=OFF \
-DBUILD_LIBRETRO_CORE=OFF \
-DENABLE_DISCORD_PRESENCE=OFF \
-DUSE_X11=OFF \
-DBUILD_GO2_FRONTEND=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 \
2022-07-22 14:07:19 +00:00
-DUSE_EVDEV=OFF"
}
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
cp -rf ${PKG_DIR}/config/* ${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/duckstation.sh
if [[ "${DEVICE}" != RG351P ]] | [[ "${DEVICE}" != RG552 ]]
then
sed -i '/Rotate = 1/d' ${INSTALL}/usr/config/duckstation/settings.ini
fi
}