2022-04-05 15:32:51 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
# Copyright (C) 2022-present AmberELEC (https://github.com/AmberELEC)
|
2022-04-07 11:34:44 +00:00
|
|
|
# Copyright (C) 2022-present Fewtarius
|
2022-02-05 14:23:32 +00:00
|
|
|
|
|
|
|
PKG_NAME="flycast"
|
2022-07-28 15:07:14 +00:00
|
|
|
PKG_VERSION="75ff5409f4025aa896119f6b5c901794f4e23eeb"
|
2022-04-05 15:32:51 +00:00
|
|
|
PKG_SITE="https://github.com/flyinghead/flycast"
|
2022-04-07 11:34:44 +00:00
|
|
|
PKG_URL="${PKG_SITE}.git"
|
2022-07-11 22:23:00 +00:00
|
|
|
PKG_DEPENDS_TARGET="toolchain libzip"
|
2022-04-05 15:32:51 +00:00
|
|
|
PKG_LONGDESC="Flycast is a multi-platform Sega Dreamcast, Naomi and Atomiswave emulator"
|
|
|
|
PKG_TOOLCHAIN="cmake"
|
2022-02-05 14:23:32 +00:00
|
|
|
|
2022-07-11 22:23: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+="-DUSE_VULKAN=OFF \
|
|
|
|
-DUSE_GLES=ON"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "${ARCH}" = "x86_64" ]
|
|
|
|
then
|
|
|
|
PKG_DEPENDS_TARGET+=" vulkan-loader vulkan-headers"
|
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DUSE_VULKAN=ON"
|
|
|
|
fi
|
|
|
|
|
2022-02-05 14:23:32 +00:00
|
|
|
pre_configure_target() {
|
2022-04-07 11:34:44 +00:00
|
|
|
sed -i 's/"reicast"/"flycast"/g' ${PKG_BUILD}/shell/libretro/libretro_core_option_defines.h
|
2022-07-11 22:23:00 +00:00
|
|
|
PKG_CMAKE_OPTS_TARGET="${PKG_CMAKE_OPTS_TARGET} \
|
|
|
|
-Wno-dev -DLIBRETRO=ON \
|
2022-04-05 15:32:51 +00:00
|
|
|
-DWITH_SYSTEM_ZLIB=ON \
|
2022-07-11 22:23:00 +00:00
|
|
|
-DUSE_OPENMP=ON"
|
2022-02-05 14:23:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
makeinstall_target() {
|
2022-04-07 11:34:44 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/lib/libretro
|
2022-06-09 12:53:47 +00:00
|
|
|
if [ "${TARGET_ARCH}" = "aarch64" ]
|
|
|
|
then
|
2022-07-13 21:59:42 +00:00
|
|
|
cp -vP ${ROOT}/build.${DISTRO}-${DEVICE}.arm/flycast-*/.install_pkg/usr/lib/libretro/flycast32_libretro.so ${INSTALL}/usr/lib/libretro
|
2022-06-09 12:53:47 +00:00
|
|
|
cp flycast_libretro.so ${INSTALL}/usr/lib/libretro/flycast_libretro.so
|
|
|
|
else
|
|
|
|
cp flycast_libretro.so ${INSTALL}/usr/lib/libretro/flycast32_libretro.so
|
|
|
|
fi
|
2022-02-05 14:23:32 +00:00
|
|
|
}
|