2023-10-26 13:09:22 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2023-11-05 14:17:52 +00:00
|
|
|
# Copyright (C) 2023-present sydarn (https://github.com/asoderq)
|
2023-10-26 13:09:22 +00:00
|
|
|
|
|
|
|
PKG_NAME="mednafen"
|
|
|
|
PKG_VERSION="1.31.0-UNSTABLE"
|
|
|
|
PKG_LICENSE="mixed"
|
|
|
|
PKG_SITE="https://mednafen.github.io/"
|
|
|
|
PKG_URL="${PKG_SITE}/releases/files/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
2023-10-28 15:02:11 +00:00
|
|
|
PKG_DEPENDS_TARGET="toolchain SDL2 libegl"
|
2023-10-26 13:09:22 +00:00
|
|
|
PKG_TOOLCHAIN="configure"
|
|
|
|
|
|
|
|
pre_configure_target() {
|
|
|
|
|
|
|
|
# unsupported modules
|
|
|
|
DISABLED_MODULES+=" --disable-apple2 \
|
2023-11-05 14:17:52 +00:00
|
|
|
--disable-sasplay \
|
2023-10-26 13:09:22 +00:00
|
|
|
--disable-ssfplay"
|
|
|
|
|
|
|
|
case ${DEVICE} in
|
2023-11-05 14:17:52 +00:00
|
|
|
RK3326|RK3566)
|
2023-10-26 13:09:22 +00:00
|
|
|
DISABLED_MODULES+=" --disable-snes \
|
|
|
|
--disable-ss \
|
|
|
|
--disable-psx"
|
|
|
|
;;
|
2023-11-05 14:17:52 +00:00
|
|
|
S922X|RK3399|RK3588)
|
|
|
|
DISABLED_MODULES+=" --disable-ss"
|
2023-10-26 13:09:22 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
PKG_CONFIGURE_OPTS_TARGET="${DISABLED_MODULES}"
|
|
|
|
}
|
|
|
|
|
|
|
|
makeinstall_target() {
|
|
|
|
mkdir -p ${INSTALL}/usr/bin
|
|
|
|
cp -rf ${PKG_BUILD}/.${TARGET_NAME}/src/mednafen ${INSTALL}/usr/bin
|
|
|
|
cp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin
|
|
|
|
|
|
|
|
chmod +x ${INSTALL}/usr/bin/start_mednafen.sh
|
2023-11-05 14:17:52 +00:00
|
|
|
chmod +x ${INSTALL}/usr/bin/mednafen_gen_config.sh
|
2023-10-26 13:09:22 +00:00
|
|
|
|
2023-10-28 15:02:11 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/config/${PKG_NAME}
|
2023-11-05 14:17:52 +00:00
|
|
|
cp ${PKG_DIR}/config/common/* ${INSTALL}/usr/config/${PKG_NAME}
|
2023-10-26 13:09:22 +00:00
|
|
|
}
|
2023-10-28 15:02:11 +00:00
|
|
|
|
|
|
|
post_install() {
|
|
|
|
case ${DEVICE} in
|
|
|
|
S922X)
|
|
|
|
LIBEGL="export SDL_VIDEO_GL_DRIVER=\/usr\/lib\/egl\/libGL.so.1 SDL_VIDEO_EGL_DRIVER=\/usr\/lib\/egl\/libEGL.so.1"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
LIBEGL=""
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
sed -e "s/@LIBEGL@/${LIBEGL}/g" \
|
|
|
|
-i ${INSTALL}/usr/bin/start_mednafen.sh
|
|
|
|
}
|