distribution/packages/emulators/standalone/flycast-sa/package.mk

47 lines
1.6 KiB
Makefile
Raw Normal View History

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)
2023-10-24 13:59:09 +00:00
# Copyright (C) 2022-present - The JELOS Project (https://github.com/JustEnoughLinuxOS)
2023-03-17 16:40:00 +00:00
PKG_NAME="flycast-sa"
2023-10-25 15:17:00 +00:00
PKG_VERSION="e55d70c0e6bc09a0ee6d7b8cae3136bb66af537c"
PKG_LICENSE="GPLv2"
PKG_SITE="https://github.com/flyinghead/flycast"
2022-04-29 08:44:15 +00:00
PKG_URL="${PKG_SITE}.git"
2023-03-27 00:01:25 +00:00
PKG_DEPENDS_TARGET="toolchain alsa SDL2 libzip zip curl miniupnpc lua54 libao"
PKG_LONGDESC="Flycast is a multiplatform Sega Dreamcast, Naomi and Atomiswave emulator"
PKG_TOOLCHAIN="cmake"
2022-05-27 22:33:28 +00:00
PKG_PATCH_DIRS+="${DEVICE}"
if [[ "${OPENGL_SUPPORT}" = "yes" ]] && [[ ! "${DEVICE}" = "S922X" ]]; then
PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd"
PKG_CMAKE_OPTS_TARGET+=" -USE_OPENGL=ON -DUSE_GLES=OFF"
elif [ "${OPENGLES_SUPPORT}" = yes ]; then
PKG_DEPENDS_TARGET+=" ${OPENGLES}"
2023-07-26 03:22:48 +00:00
PKG_CMAKE_OPTS_TARGET+=" -DUSE_GLES=ON"
fi
2022-08-30 00:32:44 +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
pre_configure_target() {
export CXXFLAGS="${CXXFLAGS} -Wno-error=array-bounds"
PKG_CMAKE_OPTS_TARGET+=" -DUSE_OPENMP=ON"
sed -i 's/\-O[23]/-Ofast/' ${PKG_BUILD}/CMakeLists.txt
}
makeinstall_target() {
2022-04-29 08:44:15 +00:00
mkdir -p ${INSTALL}/usr/bin
2023-03-30 23:45:49 +00:00
mkdir -p ${INSTALL}/usr/config/flycast
2022-04-29 08:44:15 +00:00
cp ${PKG_BUILD}/.${TARGET_NAME}/flycast ${INSTALL}/usr/bin/flycast
cp ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin
2023-04-07 13:15:36 +00:00
cp -r ${PKG_DIR}/config/${DEVICE}/* ${INSTALL}/usr/config/flycast
chmod +x ${INSTALL}/usr/bin/start_flycast.sh
}