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

87 lines
2.8 KiB
Makefile
Raw Normal View History

2022-08-05 14:08:26 +00:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech)
2022-08-04 18:19:53 +00:00
PKG_NAME="dolphinsa"
PKG_LICENSE="GPLv2"
2022-08-05 14:20:49 +00:00
PKG_DEPENDS_TARGET="toolchain libevdev libdrm ffmpeg zlib libpng lzo libusb"
2022-08-04 18:19:53 +00:00
PKG_LONGDESC="Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements. "
2022-09-02 12:04:24 +00:00
case ${DEVICE} in
RG552|handheld)
PKG_SITE="https://github.com/dolphin-emu/dolphin"
PKG_URL="${PKG_SITE}.git"
PKG_VERSION="d0ed09ab6fe8e19a64e8f1bb2867f9c439616d4c"
PKG_PATCH_DIRS+=" new"
2022-09-02 12:04:24 +00:00
;;
*)
PKG_SITE="https://github.com/rtissera/dolphin"
PKG_URL="${PKG_SITE}.git"
PKG_VERSION="0b160db48796f727311cea16072174d96b784f80"
PKG_GIT_CLONE_BRANCH="egldrm"
2022-09-02 12:07:17 +00:00
PKG_PATCH_DIRS+=" legacy"
2022-09-02 12:04:24 +00:00
;;
esac
2022-09-02 01:54:45 +00:00
if [ ! "${OPENGL}" = "no" ]; then
2022-09-03 00:15:55 +00:00
PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd"
PKG_CONFIGURE_OPTS_TARGET+=" -DENABLE_X11=OFF \
-DENABLE_EGL=ON"
2022-09-02 01:54:45 +00:00
fi
if [ "${OPENGLES_SUPPORT}" = yes ]; then
PKG_DEPENDS_TARGET+=" ${OPENGLES}"
PKG_CONFIGURE_OPTS_TARGET+=" -DENABLE_X11=OFF \
-DENABLE_EGL=ON"
2022-09-02 01:54:45 +00:00
fi
if [ "${DISPLAYSERVER}" = "wl" ]; then
PKG_DEPENDS_TARGET+=" wayland ${WINDOWMANAGER} xorg-server xrandr libXi"
PKG_CONFIGURE_OPTS_TARGET+=" -DENABLE_X11=ON \
2022-09-02 21:46:22 +00:00
-DENABLE_EGL=ON"
fi
if [ "${VULKAN_SUPPORT}" = "yes" ]
then
PKG_DEPENDS_TARGET+=" vulkan-loader vulkan-headers"
PKG_CONFIGURE_OPTS_TARGET+=" -DENABLE_VULKAN=ON"
2022-09-02 01:54:45 +00:00
fi
PKG_CMAKE_OPTS_TARGET+=" -DENABLE_HEADLESS=ON \
2022-09-02 12:04:24 +00:00
-DENABLE_EVDEV=ON \
-DTHREADS_PTHREAD_ARG=OFF \
-DUSE_DISCORD_PRESENCE=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DUSE_MGBA=OFF \
2022-09-02 12:04:24 +00:00
-DLINUX_LOCAL_DEV=ON \
-DENABLE_TESTS=OFF \
-DENABLE_LLVM=OFF \
-DENABLE_ANALYTICS=OFF \
-DENABLE_LTO=ON \
-DENABLE_QT=OFF \
-DENCODE_FRAMEDUMPS=OFF"
2022-08-04 18:19:53 +00:00
makeinstall_target() {
2022-09-02 12:04:24 +00:00
mkdir -p ${INSTALL}/usr/bin
cp -rf ${PKG_BUILD}/.${TARGET_NAME}/Binaries/dolphin* ${INSTALL}/usr/bin
cp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin
2022-08-05 14:08:26 +00:00
2022-09-02 12:04:24 +00:00
chmod +x ${INSTALL}/usr/bin/start_dolphin.sh
2022-08-04 18:19:53 +00:00
2022-09-02 12:04:24 +00:00
mkdir -p ${INSTALL}/usr/config/dolphin-emu
cp -rf ${PKG_BUILD}/Data/Sys/* ${INSTALL}/usr/config/dolphin-emu
2022-09-03 00:33:59 +00:00
cp -rf ${PKG_DIR}/config/${DEVICE}/* ${INSTALL}/usr/config/dolphin-emu
2022-08-04 18:19:53 +00:00
}
post_install() {
case ${DEVICE} in
RG503|RG353P)
DOLPHIN_PLATFORM="drm"
;;
*)
DOLPHIN_PLATFORM="x11"
;;
esac
sed -e "s/@DOLPHIN_PLATFORM@/${DOLPHIN_PLATFORM}/g" \
-i ${INSTALL}/usr/bin/start_dolphin.sh
}