2022-03-23 13:16:49 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)
|
|
|
|
|
|
|
|
PKG_NAME="parallel-n64_glide64"
|
2022-08-04 21:01:33 +00:00
|
|
|
PKG_VERSION="28ef8ff960efef4fc3c462ddc52707e140fee3be"
|
|
|
|
PKG_SHA256="25689b7c30a8706979eadbeb971107ea3159d4763f50870d79b4e84548b5ee66"
|
2022-03-23 13:16:49 +00:00
|
|
|
PKG_REV="2"
|
|
|
|
PKG_LICENSE="GPLv2"
|
2022-08-31 23:07:29 +00:00
|
|
|
PKG_ARCH="arm aarch64"
|
2022-03-23 13:16:49 +00:00
|
|
|
PKG_SITE="https://github.com/libretro/parallel-n64"
|
|
|
|
PKG_URL="${PKG_SITE}/archive/${PKG_VERSION}.tar.gz"
|
2022-07-20 23:02:00 +00:00
|
|
|
PKG_DEPENDS_TARGET="toolchain core-info"
|
2022-03-23 13:16:49 +00:00
|
|
|
PKG_SECTION="libretro"
|
|
|
|
PKG_SHORTDESC="Optimized/rewritten Nintendo 64 emulator made specifically for Libretro. Originally based on Mupen64 Plus."
|
|
|
|
PKG_LONGDESC="Optimized/rewritten Nintendo 64 emulator made specifically for Libretro. Originally based on Mupen64 Plus."
|
|
|
|
PKG_TOOLCHAIN="make"
|
|
|
|
PKG_BUILD_FLAGS="-lto"
|
|
|
|
PKG_PATCH_DIRS+="${DEVICE}"
|
|
|
|
|
2022-07-20 23:02:00 +00:00
|
|
|
if [ ! "${OPENGL}" = "no" ]; then
|
2022-08-31 23:07:29 +00:00
|
|
|
PKG_DEPENDS_TARGET+=" ${OPENGL} glu"
|
2022-07-20 23:02:00 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "${OPENGLES_SUPPORT}" = yes ]; then
|
|
|
|
PKG_DEPENDS_TARGET+=" ${OPENGLES}"
|
|
|
|
fi
|
|
|
|
|
2022-08-31 23:07:29 +00:00
|
|
|
|
|
|
|
case ${ARCH} in
|
|
|
|
arm)
|
|
|
|
case ${DEVICE} in
|
|
|
|
RG351P|RG351V|RG351MP)
|
|
|
|
PKG_MAKE_OPTS_TARGET=" platform=RG351x"
|
|
|
|
;;
|
|
|
|
RG503|RG353P)
|
|
|
|
PKG_MAKE_OPTS_TARGET+=" platform=RK3566"
|
|
|
|
;;
|
2022-09-01 21:17:36 +00:00
|
|
|
RG552)
|
|
|
|
PKG_MAKE_OPTS_TARGET=" platform=${DEVICE}"
|
|
|
|
;;
|
2022-08-31 23:07:29 +00:00
|
|
|
esac
|
|
|
|
;;
|
|
|
|
aarch64)
|
|
|
|
make_target() {
|
|
|
|
:
|
|
|
|
}
|
|
|
|
;;
|
|
|
|
esac
|
2022-03-23 13:16:49 +00:00
|
|
|
|
|
|
|
pre_configure_target() {
|
|
|
|
sed -i 's/info->library_name = "ParaLLEl N64";/info->library_name = "ParaLLEl N64 Glide64";/g' ${PKG_BUILD}/libretro/libretro.c
|
|
|
|
sed -i 's/"GFX Plugin; auto|glide64|gln64|rice/"GFX Plugin; glide64|auto|gln64|rice/g' ${PKG_BUILD}/libretro/libretro.c
|
|
|
|
sed -i 's/"Resolution (restart); 320x240|640x480|960x720/"Resolution (restart); 640x480|320x240|960x720/g' ${PKG_BUILD}/libretro/libretro.c
|
|
|
|
sed -i 's/"Framerate (restart); original|fullspeed"/"Framerate (restart); fullspeed|original"/g' ${PKG_BUILD}/libretro/libretro.c
|
|
|
|
sed -i 's/"GFX Accuracy (restart); veryhigh|high|medium|low"/"GFX Accuracy (restart); low|veryhigh|high|medium"/g' ${PKG_BUILD}/libretro/libretro.c
|
|
|
|
sed -i 's/"(Glide64) Texture Filtering; automatic|N64 3-point|bilinear|nearest"/"(Glide64) Texture Filtering; nearest|automatic|N64 3-point|bilinear"/g' ${PKG_BUILD}/libretro/libretro.c
|
|
|
|
}
|
|
|
|
|
|
|
|
makeinstall_target() {
|
|
|
|
mkdir -p ${INSTALL}/usr/lib/libretro
|
2022-08-31 23:07:29 +00:00
|
|
|
case ${ARCH} in
|
|
|
|
arm)
|
|
|
|
cp parallel_n64_libretro.so ${INSTALL}/usr/lib/libretro/parallel_n64_glide64_libretro.so
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
cp -vP ${ROOT}/build.${DISTRO}-${DEVICE}.arm/parallel-n64_glide64-*/.install_pkg/usr/lib/libretro/parallel_n64_glide64_libretro.so ${INSTALL}/usr/lib/libretro/parallel_n64_glide64_libretro.so
|
|
|
|
cp -vP ${PKG_BUILD}/../core-info-*/parallel_n64_libretro.info ${INSTALL}/usr/lib/libretro/parallel_n64_glide64_libretro.info
|
|
|
|
sed -i 's/ParaLLEl N64/ParaLLEl N64 Glide64/g' ${INSTALL}/usr/lib/libretro/parallel_n64_glide64_libretro.info
|
|
|
|
;;
|
|
|
|
esac
|
2022-03-23 13:16:49 +00:00
|
|
|
}
|