From 15b66df477958dd092121c4f15794239ff806870 Mon Sep 17 00:00:00 2001 From: fewtarius Date: Mon, 11 Jul 2022 18:23:00 -0400 Subject: [PATCH] Emulator updates to support opengl/gles/vulkan. --- packages/games/emulators/flycastsa/package.mk | 21 +++++++++++++--- .../mupen64plussa-audio-sdl/package.mk | 15 ++++++++--- .../mupen64plussa-core/package.mk | 15 ++++++++--- .../mupen64plussa-input-sdl/package.mk | 15 ++++++++--- .../mupen64plussa-rsp-hle/package.mk | 15 ++++++++--- .../mupen64plussa-ui-console/package.mk | 15 ++++++++--- .../mupen64plussa-video-glide64mk2/package.mk | 15 ++++++++--- .../mupen64plussa-video-rice/package.mk | 11 ++++++-- packages/games/emulators/pico-8/package.mk | 10 +++++++- packages/games/emulators/retroarch/package.mk | 2 +- packages/games/emulators/vicesa/package.mk | 10 +++++++- .../games/emulators/yabasanshiroSA/package.mk | 10 +++++++- packages/games/libretro/flycast/package.mk | 25 +++++++++++++++---- .../libretro/flycast_libretro/package.mk | 13 ++++++++-- packages/games/libretro/melonds/package.mk | 10 +++++++- 15 files changed, 160 insertions(+), 42 deletions(-) diff --git a/packages/games/emulators/flycastsa/package.mk b/packages/games/emulators/flycastsa/package.mk index 8052e5376..1988189a9 100644 --- a/packages/games/emulators/flycastsa/package.mk +++ b/packages/games/emulators/flycastsa/package.mk @@ -8,16 +8,29 @@ PKG_VERSION="c77c3ab015ae0b7bf6e411aa15c52bd3a71e99ef" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/flyinghead/flycast" PKG_URL="${PKG_SITE}.git" -PKG_DEPENDS_TARGET="toolchain ${OPENGLES} alsa SDL2 libzip zip" +PKG_DEPENDS_TARGET="toolchain alsa SDL2 libzip zip" PKG_LONGDESC="Flycast is a multiplatform Sega Dreamcast, Naomi and Atomiswave emulator" PKG_TOOLCHAIN="cmake" PKG_PATCH_DIRS+="${DEVICE}" +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_GLES=ON" +fi + +if [ "${ARCH}" = "x86_64" ] +then + PKG_DEPENDS_TARGET+=" vulkan-loader vulkan-headers" + PKG_CMAKE_OPTS_TARGET+=" -DUSE_VULKAN=ON" +fi + pre_configure_target() { export CXXFLAGS="${CXXFLAGS} -Wno-error=array-bounds" -PKG_CMAKE_OPTS_TARGET+="-DUSE_GLES=ON \ - -DUSE_VULKAN=OFF \ - -DUSE_OPENMP=ON" +PKG_CMAKE_OPTS_TARGET+=" -DUSE_OPENMP=ON" } makeinstall_target() { diff --git a/packages/games/emulators/mupen64plussa/mupen64plussa-audio-sdl/package.mk b/packages/games/emulators/mupen64plussa/mupen64plussa-audio-sdl/package.mk index b18fdbc44..63410fb83 100644 --- a/packages/games/emulators/mupen64plussa/mupen64plussa-audio-sdl/package.mk +++ b/packages/games/emulators/mupen64plussa/mupen64plussa-audio-sdl/package.mk @@ -8,20 +8,27 @@ PKG_ARCH="any" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/mupen64plus/mupen64plus-audio-sdl" PKG_URL="https://github.com/mupen64plus/mupen64plus-audio-sdl/archive/${PKG_VERSION}.tar.gz" -PKG_DEPENDS_TARGET="toolchain ${OPENGLES} libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core" +PKG_DEPENDS_TARGET="toolchain libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core" PKG_SHORTDESC="mupen64plus-audio-sdl" PKG_LONGDESC="Mupen64Plus Standalone Audio SDL" PKG_TOOLCHAIN="manual" -PKG_MAKE_OPTS_TARGET+="USE_GLES=1" +if [ ! "${OPENGL}" = "no" ]; then + PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd" +fi + +if [ "${OPENGLES_SUPPORT}" = yes ]; then + PKG_DEPENDS_TARGET+=" ${OPENGLES}" + PKG_MAKE_OPTS_TARGET+="USE_GLES=1" +fi make_target() { export HOST_CPU=aarch64 export APIDIR=$(get_build_dir mupen64plussa-core)/.install_pkg/usr/local/include/mupen64plus export USE_GLES=1 - export SDL_CFLAGS="-I$SYSROOT_PREFIX/usr/include/SDL2 -D_REENTRANT" + export SDL_CFLAGS="-I${SYSROOT_PREFIX}/usr/include/SDL2 -D_REENTRANT" export SDL_LDLIBS="-lSDL2_net -lSDL2" - export CROSS_COMPILE="$TARGET_PREFIX" + export CROSS_COMPILE="${TARGET_PREFIX}" export V=1 export VC=0 BINUTILS="$(get_build_dir binutils)/.aarch64-libreelec-linux-gnueabi" diff --git a/packages/games/emulators/mupen64plussa/mupen64plussa-core/package.mk b/packages/games/emulators/mupen64plussa/mupen64plussa-core/package.mk index 92561dd78..12705c766 100644 --- a/packages/games/emulators/mupen64plussa/mupen64plussa-core/package.mk +++ b/packages/games/emulators/mupen64plussa/mupen64plussa-core/package.mk @@ -8,19 +8,26 @@ PKG_ARCH="any" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/mupen64plus/mupen64plus-core" PKG_URL="https://github.com/mupen64plus/mupen64plus-core/archive/${PKG_VERSION}.tar.gz" -PKG_DEPENDS_TARGET="toolchain ${OPENGLES} boost libpng SDL2 SDL2_net zlib freetype nasm:host" +PKG_DEPENDS_TARGET="toolchain boost libpng SDL2 SDL2_net zlib freetype nasm:host" PKG_SHORTDESC="mupen64plus" PKG_LONGDESC="Mupen64Plus Standalone" PKG_TOOLCHAIN="manual" -PKG_MAKE_OPTS_TARGET+="USE_GLES=1" +if [ ! "${OPENGL}" = "no" ]; then + PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd" +fi + +if [ "${OPENGLES_SUPPORT}" = yes ]; then + PKG_DEPENDS_TARGET+=" ${OPENGLES}" + PKG_MAKE_OPTS_TARGET+="USE_GLES=1" +fi make_target() { export HOST_CPU=aarch64 export USE_GLES=1 - export SDL_CFLAGS="-I$SYSROOT_PREFIX/usr/include/SDL2 -D_REENTRANT" + export SDL_CFLAGS="-I${SYSROOT_PREFIX}/usr/include/SDL2 -D_REENTRANT" export SDL_LDLIBS="-lSDL2_net -lSDL2" - export CROSS_COMPILE="$TARGET_PREFIX" + export CROSS_COMPILE="${TARGET_PREFIX}" export V=1 export VC=0 BINUTILS="$(get_build_dir binutils)/.aarch64-libreelec-linux-gnueabi" diff --git a/packages/games/emulators/mupen64plussa/mupen64plussa-input-sdl/package.mk b/packages/games/emulators/mupen64plussa/mupen64plussa-input-sdl/package.mk index cc12ae208..37a1f39ad 100644 --- a/packages/games/emulators/mupen64plussa/mupen64plussa-input-sdl/package.mk +++ b/packages/games/emulators/mupen64plussa/mupen64plussa-input-sdl/package.mk @@ -8,20 +8,27 @@ PKG_ARCH="any" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/mupen64plus/mupen64plus-input-sdl" PKG_URL="https://github.com/mupen64plus/mupen64plus-input-sdl/archive/${PKG_VERSION}.tar.gz" -PKG_DEPENDS_TARGET="toolchain ${OPENGLES} libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core" +PKG_DEPENDS_TARGET="toolchain libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core" PKG_SHORTDESC="mupen64plus-input-sdl" PKG_LONGDESC="Mupen64Plus Standalone Input SDL" PKG_TOOLCHAIN="manual" -PKG_MAKE_OPTS_TARGET+="USE_GLES=1" +if [ ! "${OPENGL}" = "no" ]; then + PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd" +fi + +if [ "${OPENGLES_SUPPORT}" = yes ]; then + PKG_DEPENDS_TARGET+=" ${OPENGLES}" + PKG_MAKE_OPTS_TARGET+="USE_GLES=1" +fi make_target() { export HOST_CPU=aarch64 export APIDIR=$(get_build_dir mupen64plussa-core)/.install_pkg/usr/local/include/mupen64plus export USE_GLES=1 - export SDL_CFLAGS="-I$SYSROOT_PREFIX/usr/include/SDL2 -D_REENTRANT" + export SDL_CFLAGS="-I${SYSROOT_PREFIX}/usr/include/SDL2 -D_REENTRANT" export SDL_LDLIBS="-lSDL2_net -lSDL2" - export CROSS_COMPILE="$TARGET_PREFIX" + export CROSS_COMPILE="${TARGET_PREFIX}" export V=1 export VC=0 BINUTILS="$(get_build_dir binutils)/.aarch64-libreelec-linux-gnueabi" diff --git a/packages/games/emulators/mupen64plussa/mupen64plussa-rsp-hle/package.mk b/packages/games/emulators/mupen64plussa/mupen64plussa-rsp-hle/package.mk index 8194d5413..dbe10646b 100644 --- a/packages/games/emulators/mupen64plussa/mupen64plussa-rsp-hle/package.mk +++ b/packages/games/emulators/mupen64plussa/mupen64plussa-rsp-hle/package.mk @@ -8,20 +8,27 @@ PKG_ARCH="any" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/mupen64plus/mupen64plus-rsp-hle" PKG_URL="https://github.com/mupen64plus/mupen64plus-rsp-hle/archive/${PKG_VERSION}.tar.gz" -PKG_DEPENDS_TARGET="toolchain ${OPENGLES} libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core" +PKG_DEPENDS_TARGET="toolchain libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core" PKG_SHORTDESC="mupen64plus-rsp-hle" PKG_LONGDESC="Mupen64Plus Standalone RSP HLE" PKG_TOOLCHAIN="manual" -PKG_MAKE_OPTS_TARGET+="USE_GLES=1" +if [ ! "${OPENGL}" = "no" ]; then + PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd" +fi + +if [ "${OPENGLES_SUPPORT}" = yes ]; then + PKG_DEPENDS_TARGET+=" ${OPENGLES}" + PKG_MAKE_OPTS_TARGET+="USE_GLES=1" +fi make_target() { export HOST_CPU=aarch64 export APIDIR=$(get_build_dir mupen64plussa-core)/.install_pkg/usr/local/include/mupen64plus export USE_GLES=1 - export SDL_CFLAGS="-I$SYSROOT_PREFIX/usr/include/SDL2 -D_REENTRANT" + export SDL_CFLAGS="-I${SYSROOT_PREFIX}/usr/include/SDL2 -D_REENTRANT" export SDL_LDLIBS="-lSDL2_net -lSDL2" - export CROSS_COMPILE="$TARGET_PREFIX" + export CROSS_COMPILE="${TARGET_PREFIX}" export V=1 export VC=0 BINUTILS="$(get_build_dir binutils)/.aarch64-libreelec-linux-gnueabi" diff --git a/packages/games/emulators/mupen64plussa/mupen64plussa-ui-console/package.mk b/packages/games/emulators/mupen64plussa/mupen64plussa-ui-console/package.mk index dc45d83b8..22e3707a8 100644 --- a/packages/games/emulators/mupen64plussa/mupen64plussa-ui-console/package.mk +++ b/packages/games/emulators/mupen64plussa/mupen64plussa-ui-console/package.mk @@ -8,20 +8,27 @@ PKG_ARCH="any" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/mupen64plus/mupen64plus-ui-console" PKG_URL="https://github.com/mupen64plus/mupen64plus-ui-console/archive/${PKG_VERSION}.tar.gz" -PKG_DEPENDS_TARGET="toolchain ${OPENGLES} libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core" +PKG_DEPENDS_TARGET="toolchain libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core" PKG_SHORTDESC="mupen64plus-ui-console" PKG_LONGDESC="Mupen64Plus Standalone Console" PKG_TOOLCHAIN="manual" -PKG_MAKE_OPTS_TARGET+="USE_GLES=1" +if [ ! "${OPENGL}" = "no" ]; then + PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd" +fi + +if [ "${OPENGLES_SUPPORT}" = yes ]; then + PKG_DEPENDS_TARGET+=" ${OPENGLES}" + PKG_MAKE_OPTS_TARGET+="USE_GLES=1" +fi make_target() { export HOST_CPU=aarch64 export APIDIR=$(get_build_dir mupen64plussa-core)/.install_pkg/usr/local/include/mupen64plus export USE_GLES=1 - export SDL_CFLAGS="-I$SYSROOT_PREFIX/usr/include/SDL2 -D_REENTRANT" + export SDL_CFLAGS="-I${SYSROOT_PREFIX}/usr/include/SDL2 -D_REENTRANT" export SDL_LDLIBS="-lSDL2_net -lSDL2" - export CROSS_COMPILE="$TARGET_PREFIX" + export CROSS_COMPILE="${TARGET_PREFIX}" export V=1 export VC=0 BINUTILS="$(get_build_dir binutils)/.aarch64-libreelec-linux-gnueabi" diff --git a/packages/games/emulators/mupen64plussa/mupen64plussa-video-glide64mk2/package.mk b/packages/games/emulators/mupen64plussa/mupen64plussa-video-glide64mk2/package.mk index 0285e9008..cbebded84 100644 --- a/packages/games/emulators/mupen64plussa/mupen64plussa-video-glide64mk2/package.mk +++ b/packages/games/emulators/mupen64plussa/mupen64plussa-video-glide64mk2/package.mk @@ -8,20 +8,27 @@ PKG_ARCH="any" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/mupen64plus/mupen64plus-video-glide64mk2" PKG_URL="https://github.com/mupen64plus/mupen64plus-video-glide64mk2/archive/${PKG_VERSION}.tar.gz" -PKG_DEPENDS_TARGET="toolchain ${OPENGLES} boost libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core" +PKG_DEPENDS_TARGET="toolchain boost libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core" PKG_SHORTDESC="mupen64plus-video-glide64mk2" PKG_LONGDESC="Mupen64Plus Standalone Glide64 Video Driver" PKG_TOOLCHAIN="manual" -PKG_MAKE_OPTS_TARGET+="USE_GLES=1" +if [ ! "${OPENGL}" = "no" ]; then + PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd" +fi + +if [ "${OPENGLES_SUPPORT}" = yes ]; then + PKG_DEPENDS_TARGET+=" ${OPENGLES}" + PKG_MAKE_OPTS_TARGET+="USE_GLES=1" +fi make_target() { export HOST_CPU=aarch64 export APIDIR=$(get_build_dir mupen64plussa-core)/.install_pkg/usr/local/include/mupen64plus export USE_GLES=1 - export SDL_CFLAGS="-I$SYSROOT_PREFIX/usr/include/SDL2 -D_REENTRANT" + export SDL_CFLAGS="-I${SYSROOT_PREFIX}/usr/include/SDL2 -D_REENTRANT" export SDL_LDLIBS="-lSDL2_net -lSDL2" - export CROSS_COMPILE="$TARGET_PREFIX" + export CROSS_COMPILE="${TARGET_PREFIX}" export V=1 export VC=0 BINUTILS="$(get_build_dir binutils)/.aarch64-libreelec-linux-gnueabi" diff --git a/packages/games/emulators/mupen64plussa/mupen64plussa-video-rice/package.mk b/packages/games/emulators/mupen64plussa/mupen64plussa-video-rice/package.mk index 221547516..d0a19f8e6 100644 --- a/packages/games/emulators/mupen64plussa/mupen64plussa-video-rice/package.mk +++ b/packages/games/emulators/mupen64plussa/mupen64plussa-video-rice/package.mk @@ -8,12 +8,19 @@ PKG_ARCH="any" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/mupen64plus/mupen64plus-video-rice" PKG_URL="https://github.com/mupen64plus/mupen64plus-video-rice/archive/${PKG_VERSION}.tar.gz" -PKG_DEPENDS_TARGET="toolchain ${OPENGLES} libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core" +PKG_DEPENDS_TARGET="toolchain libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core" PKG_SHORTDESC="mupen64plus-video-rice" PKG_LONGDESC="Mupen64Plus Standalone Rice Video Driver" PKG_TOOLCHAIN="manual" -PKG_MAKE_OPTS_TARGET+="USE_GLES=1" +if [ ! "${OPENGL}" = "no" ]; then + PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd" +fi + +if [ "${OPENGLES_SUPPORT}" = yes ]; then + PKG_DEPENDS_TARGET+=" ${OPENGLES}" + PKG_MAKE_OPTS_TARGET+="USE_GLES=1" +fi make_target() { export HOST_CPU=aarch64 diff --git a/packages/games/emulators/pico-8/package.mk b/packages/games/emulators/pico-8/package.mk index 9508d4fe7..223bd1f76 100644 --- a/packages/games/emulators/pico-8/package.mk +++ b/packages/games/emulators/pico-8/package.mk @@ -8,11 +8,19 @@ PKG_ARCH="any" PKG_LICENSE="GPLv2" PKG_SITE="" PKG_URL="" -PKG_DEPENDS_TARGET="toolchain SDL2 ${OPENGLES}" +PKG_DEPENDS_TARGET="toolchain SDL2" PKG_SECTION="emulators" PKG_SHORTDESC="PICO-8 Fantasy Console" PKG_TOOLCHAIN="manual" +if [ ! "${OPENGL}" = "no" ]; then + PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd" +fi + +if [ "${OPENGLES_SUPPORT}" = yes ]; then + PKG_DEPENDS_TARGET+=" ${OPENGLES}" +fi + makeinstall_target() { mkdir -p ${INSTALL}/usr/bin cp ${PKG_DIR}/sources/start_pico8.sh ${INSTALL}/usr/bin diff --git a/packages/games/emulators/retroarch/package.mk b/packages/games/emulators/retroarch/package.mk index fa510ce23..6fb87cfa3 100644 --- a/packages/games/emulators/retroarch/package.mk +++ b/packages/games/emulators/retroarch/package.mk @@ -34,7 +34,7 @@ pre_configure_target() { PKG_DEPENDS_TARGET+=" librga ${OPENGLES}" PKG_CONFIGURE_OPTS_TARGET+=" --enable-opengles --enable-opengles3 --enable-opengles3_2 --enable-kms --disable-mali_fbdev --enable-odroidgo2" else - PKG_DEPENDS_TARGET+=" ${OPENGL}" + PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd vulkan-loader vulkan-headers" PKG_CONFIGURE_OPTS_TARGET+=" --enable-opengl --enable-vulkan --enable-vulkan_display" fi diff --git a/packages/games/emulators/vicesa/package.mk b/packages/games/emulators/vicesa/package.mk index 066bf6eb7..0e61879d6 100644 --- a/packages/games/emulators/vicesa/package.mk +++ b/packages/games/emulators/vicesa/package.mk @@ -8,13 +8,21 @@ PKG_ARCH="any" PKG_LICENSE="GPLv2" PKG_SITE="https://sourceforge.net/projects/vice-emu" PKG_URL="${PKG_SITE}/files/releases/vice-${PKG_VERSION}.tar.gz" -PKG_DEPENDS_TARGET="toolchain xa:host SDL2 SDL2_image ${OPENGLES}" +PKG_DEPENDS_TARGET="toolchain xa:host SDL2 SDL2_image" PKG_PRIORITY="optional" PKG_SECTION="emulators" PKG_SHORTDESC="Commodore 8-bit Emulator" PKG_LONGDESC="Commodore 8-bit Emulator" PKG_CONFIGURE_OPTS_TARGET+="--disable-pdf-docs" +if [ ! "${OPENGL}" = "no" ]; then + PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd" +fi + +if [ "${OPENGLES_SUPPORT}" = yes ]; then + PKG_DEPENDS_TARGET+=" ${OPENGLES}" +fi + post_makeinstall_target() { mkdir -p ${INSTALL}/usr/config/vice if [ -d "${PKG_DIR}/config/${DEVICE}" ] diff --git a/packages/games/emulators/yabasanshiroSA/package.mk b/packages/games/emulators/yabasanshiroSA/package.mk index 71d6817ff..0fd454d23 100644 --- a/packages/games/emulators/yabasanshiroSA/package.mk +++ b/packages/games/emulators/yabasanshiroSA/package.mk @@ -4,7 +4,7 @@ PKG_ARCH="any" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/devmiyax/yabause" PKG_URL="${PKG_SITE}.git" -PKG_DEPENDS_TARGET="toolchain SDL2 boost openal-soft ${OPENGLES} zlib" +PKG_DEPENDS_TARGET="toolchain SDL2 boost openal-soft zlib" PKG_LONGDESC="Yabause is a Sega Saturn emulator and took over as Yaba Sanshiro" PKG_TOOLCHAIN="cmake-make" GET_HANDLER_SUPPORT="git" @@ -12,6 +12,14 @@ PKG_GIT_CLONE_BRANCH="pi4-1-9-0" PKG_BUILD_FLAGS="+speed" PKG_PATCH_DIRS+="${DEVICE}" +if [ ! "${OPENGL}" = "no" ]; then + PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd" +fi + +if [ "${OPENGLES_SUPPORT}" = yes ]; then + PKG_DEPENDS_TARGET+=" ${OPENGLES}" +fi + post_unpack() { # use host versions sed -i "s|COMMAND m68kmake|COMMAND ${PKG_BUILD}/m68kmake_host|" ${PKG_BUILD}/yabause/src/musashi/CMakeLists.txt diff --git a/packages/games/libretro/flycast/package.mk b/packages/games/libretro/flycast/package.mk index 9b4dc1ea9..c7f56e29d 100644 --- a/packages/games/libretro/flycast/package.mk +++ b/packages/games/libretro/flycast/package.mk @@ -6,17 +6,32 @@ PKG_NAME="flycast" PKG_VERSION="c77c3ab015ae0b7bf6e411aa15c52bd3a71e99ef" PKG_SITE="https://github.com/flyinghead/flycast" PKG_URL="${PKG_SITE}.git" -PKG_DEPENDS_TARGET="toolchain ${OPENGLES} libzip" +PKG_DEPENDS_TARGET="toolchain libzip" PKG_LONGDESC="Flycast is a multi-platform Sega Dreamcast, Naomi and Atomiswave emulator" PKG_TOOLCHAIN="cmake" +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 + pre_configure_target() { sed -i 's/"reicast"/"flycast"/g' ${PKG_BUILD}/shell/libretro/libretro_core_option_defines.h - PKG_CMAKE_OPTS_TARGET="-Wno-dev -DLIBRETRO=ON \ + PKG_CMAKE_OPTS_TARGET="${PKG_CMAKE_OPTS_TARGET} \ + -Wno-dev -DLIBRETRO=ON \ -DWITH_SYSTEM_ZLIB=ON \ - -DUSE_OPENMP=ON \ - -DUSE_VULKAN=OFF - -DUSE_GLES=ON" + -DUSE_OPENMP=ON" } makeinstall_target() { diff --git a/packages/games/libretro/flycast_libretro/package.mk b/packages/games/libretro/flycast_libretro/package.mk index 00379a1a6..3dd6c2064 100644 --- a/packages/games/libretro/flycast_libretro/package.mk +++ b/packages/games/libretro/flycast_libretro/package.mk @@ -25,15 +25,24 @@ PKG_SHA256="7ce0bd97b095907fd4960c771364c549a54547877b5128af42c73a9257fbec6b" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/libretro/flycast" PKG_URL="${PKG_SITE}/archive/${PKG_VERSION}.tar.gz" -PKG_DEPENDS_TARGET="toolchain ${OPENGLES}" +PKG_DEPENDS_TARGET="toolchain" PKG_LONGDESC="Flycast is a multiplatform Sega Dreamcast emulator " PKG_TOOLCHAIN="make" PKG_BUILD_FLAGS="-gold" PKG_PATCH_DIRS+="${DEVICE}" +if [ ! "${OPENGL}" = "no" ]; then + PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd" +fi + +if [ "${OPENGLES_SUPPORT}" = yes ]; then + PKG_DEPENDS_TARGET+=" ${OPENGLES}" + PKG_MAKE_OPTS_TARGET+=" FORCE_GLES=1" +fi + pre_configure_target() { sed -i 's/define CORE_OPTION_NAME "reicast"/define CORE_OPTION_NAME "flycast"/g' core/libretro/libretro_core_option_defines.h - PKG_MAKE_OPTS_TARGET="ARCH=${TARGET_ARCH} HAVE_OPENMP=1 GIT_VERSION=${PKG_VERSION:0:7} FORCE_GLES=1 HAVE_LTCG=0" + PKG_MAKE_OPTS_TARGET="${PKG_MAKE_OPTS_TARGET} ARCH=${TARGET_ARCH} HAVE_OPENMP=1 GIT_VERSION=${PKG_VERSION:0:7} HAVE_LTCG=0" } diff --git a/packages/games/libretro/melonds/package.mk b/packages/games/libretro/melonds/package.mk index 5ff073915..6e9f11fd3 100644 --- a/packages/games/libretro/melonds/package.mk +++ b/packages/games/libretro/melonds/package.mk @@ -8,12 +8,20 @@ PKG_ARCH="any" PKG_LICENSE="GPLv3" PKG_SITE="https://git.libretro.com/libretro/melonDS" PKG_URL="$PKG_SITE.git" -PKG_DEPENDS_TARGET="toolchain $OPENGLES" +PKG_DEPENDS_TARGET="toolchain" PKG_PRIORITY="optional" PKG_SECTION="libretro" PKG_SHORTDESC="MelonDS - Nintendo DS emulator for libretro" PKG_TOOLCHAIN="make" +if [ ! "${OPENGL}" = "no" ]; then + PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd" +fi + +if [ "${OPENGLES_SUPPORT}" = yes ]; then + PKG_DEPENDS_TARGET+=" ${OPENGLES}" +fi + pre_make_target() { cd ${PKG_BUILD}