distribution/packages/emulators/libretro/flycast-lr/package.mk

65 lines
1.8 KiB
Makefile
Raw Normal View History

# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2022-present AmberELEC (https://github.com/AmberELEC)
# Copyright (C) 2022-present Fewtarius
2022-02-05 14:23:32 +00:00
2023-03-17 21:06:43 +00:00
PKG_NAME="flycast-lr"
2023-05-29 10:43:27 +00:00
PKG_VERSION="a21b79c"
PKG_SITE="https://github.com/flyinghead/flycast"
PKG_URL="${PKG_SITE}.git"
2023-05-24 23:56:55 +00:00
PKG_DEPENDS_TARGET="toolchain zlib libzip"
PKG_LONGDESC="Flycast is a multi-platform Sega Dreamcast, Naomi and Atomiswave emulator"
PKG_TOOLCHAIN="cmake"
2022-02-05 14:23:32 +00:00
if [ ! "${OPENGL}" = "no" ]; then
PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd"
PKG_CMAKE_OPTS_TARGET+=" USE_OPENGL=ON"
else
PKG_CMAKE_OPTS_TARGET+=" USE_OPENGL=OFF"
fi
2023-05-24 23:56:55 +00:00
if [ "${OPENGLES_SUPPORT}" = yes ] && \
[ ! "${TARGET_ARCH}" = "x86_64" ]
then
PKG_DEPENDS_TARGET+=" ${OPENGLES}"
PKG_CMAKE_OPTS_TARGET+=" -DUSE_GLES=ON"
else
PKG_CMAKE_OPTS_TARGET+=" -DUSE_GLES=OFF"
fi
2022-08-30 00:33:53 +00:00
if [ "${VULKAN_SUPPORT}" = "yes" ]
then
PKG_DEPENDS_TARGET+=" vulkan-loader vulkan-headers"
PKG_CMAKE_OPTS_TARGET+=" -DUSE_VULKAN=ON"
else
PKG_CMAKE_OPTS_TARGET+=" -DUSE_VULKAN=OFF"
fi
2022-02-05 14:23:32 +00:00
pre_configure_target() {
sed -i 's/"reicast"/"flycast"/g' ${PKG_BUILD}/shell/libretro/libretro_core_option_defines.h
PKG_CMAKE_OPTS_TARGET="${PKG_CMAKE_OPTS_TARGET} \
-Wno-dev -DLIBRETRO=ON \
-DWITH_SYSTEM_ZLIB=ON \
-DUSE_OPENMP=ON"
2022-02-05 14:23:32 +00:00
}
makeinstall_target32() {
case ${ARCH} in
aarch64)
if [ "${ENABLE_32BIT}" == "true" ]
then
cp -vP ${ROOT}/build.${DISTRO}-${DEVICE}.arm/${PKG_NAME}-*/.install_pkg/usr/lib/libretro/${1}_libretro.so ${INSTALL}/usr/lib/libretro/${1}32_libretro.so
fi
;;
esac
}
2022-02-05 14:23:32 +00:00
makeinstall_target() {
mkdir -p ${INSTALL}/usr/lib/libretro
2023-05-24 23:56:55 +00:00
cp flycast_libretro.so ${INSTALL}/usr/lib/libretro/flycast_libretro.so
case ${TARGET_ARCH} in
aarch64)
makeinstall_target32 flycast
;;
esac
2022-02-05 14:23:32 +00:00
}