From 293071bb11d45b0c026056149cdb90701f203c1b Mon Sep 17 00:00:00 2001 From: Garrett Brown Date: Sat, 3 Aug 2024 05:32:32 +0000 Subject: [PATCH] Updated by kodi-game-scripting https://github.com/kodi-game/kodi-game-scripting/ --- depends/common/vbam/CMakeLists.txt | 60 ++++++++++++++++++++++++------ depends/common/vbam/vbam.txt | 2 +- game.libretro.vbam/addon.xml.in | 2 +- 3 files changed, 50 insertions(+), 14 deletions(-) diff --git a/depends/common/vbam/CMakeLists.txt b/depends/common/vbam/CMakeLists.txt index f309605..91f660b 100644 --- a/depends/common/vbam/CMakeLists.txt +++ b/depends/common/vbam/CMakeLists.txt @@ -7,6 +7,21 @@ include(ExternalProject) string(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) +# Jenkins CI jobs can have this env var set +# Use it if available +if(DEFINED ENV{BUILDTHREADS}) + set(build_job_count -j$ENV{BUILDTHREADS}) + message(STATUS "Using $ENV{BUILDTHREADS} threads from ENV var BUILDTHREADS") +else() + # Most likely a non CI build, so do a best attempt just using ProcessorCount + include(ProcessorCount) + ProcessorCount(cpu_count) + if(NOT cpu_count EQUAL 0) + set(build_job_count -j${cpu_count}) + message(STATUS "Using ${cpu_count} threads deduced by ProcessorCount") + endif() +endif() + set(LIBRETRO_BINARY_DIR src/libretro) set(LIBRETRO_SONAME vbam_libretro${CMAKE_SHARED_LIBRARY_SUFFIX}) set(LIBRETRO_JNISONAME libretro${CMAKE_SHARED_LIBRARY_SUFFIX}) @@ -23,18 +38,23 @@ if(CORE_SYSTEM_NAME STREQUAL windows) set(MSYSTEM MINGW32) endif() set(BUILD_COMMAND ${MINGW_MAKE} - -j$ENV{NUMBER_OF_PROCESSORS} -C src/libretro -f Makefile - platform=win + ${build_job_count} + ${LIBRETRO_DEBUG} + GIT_VERSION= MSYSTEM=${MSYSTEM} - ${LIBRETRO_DEBUG} GIT_VERSION=) + platform=win + ) elseif(CORE_SYSTEM_NAME STREQUAL linux) set(BUILD_COMMAND $(MAKE) -C src/libretro -f Makefile + ${build_job_count} + ${LIBRETRO_DEBUG} + GIT_VERSION= platform=unix - ${LIBRETRO_DEBUG} GIT_VERSION=) + ) elseif(CORE_SYSTEM_NAME STREQUAL osx) if(CPU STREQUAL arm64) set(ARCH arm) @@ -44,12 +64,15 @@ elseif(CORE_SYSTEM_NAME STREQUAL osx) set(BUILD_COMMAND $(MAKE) -C src/libretro -f Makefile - platform=osx + ${build_job_count} + ${LIBRETRO_DEBUG} arch=${ARCH} CROSS_COMPILE=1 - LIBRETRO_APPLE_PLATFORM=${CPU}-apple-macos + GIT_VERSION= LIBRETRO_APPLE_ISYSROOT=${CMAKE_OSX_SYSROOT} - ${LIBRETRO_DEBUG} GIT_VERSION=) + LIBRETRO_APPLE_PLATFORM=${CPU}-apple-macos + platform=osx + ) elseif(CORE_SYSTEM_NAME STREQUAL ios OR CORE_SYSTEM_NAME STREQUAL darwin_embedded) if(CORE_PLATFORM_NAME STREQUAL ios) set(LIBRETRO_SONAME vbam_libretro_ios${CMAKE_SHARED_LIBRARY_SUFFIX}) @@ -61,15 +84,21 @@ elseif(CORE_SYSTEM_NAME STREQUAL ios OR CORE_SYSTEM_NAME STREQUAL darwin_embedde set(BUILD_COMMAND IOSSDK=${CMAKE_OSX_SYSROOT} $(MAKE) -C src/libretro -f Makefile + ${build_job_count} + ${LIBRETRO_DEBUG} + GIT_VERSION= platform=${PLATFORM} - ${LIBRETRO_DEBUG} GIT_VERSION=) + ) elseif(CORE_PLATFORM_NAME STREQUAL tvos) set(LIBRETRO_SONAME vbam_libretro_tvos${CMAKE_SHARED_LIBRARY_SUFFIX}) set(BUILD_COMMAND IOSSDK=${CMAKE_OSX_SYSROOT} $(MAKE) -C src/libretro -f Makefile + ${build_job_count} + ${LIBRETRO_DEBUG} + GIT_VERSION= platform=tvos-arm64 - ${LIBRETRO_DEBUG} GIT_VERSION=) + ) endif() elseif(CORE_SYSTEM_NAME STREQUAL android) if(NOT NDKROOT) @@ -84,11 +113,15 @@ elseif(CORE_SYSTEM_NAME STREQUAL android) endif() set(BUILD_COMMAND GNUMAKE=$(MAKE) ${NDKROOT}/ndk-build -C src/libretro/jni + ${build_job_count} + ${LIBRETRO_DEBUG} APP_ABI=${PLATFORM} - V7NEONOPTIMIZATION=1 + APP_SHORT_COMMANDS=true + GIT_VERSION= NDK_LIBS_OUT=${PROJECT_SOURCE_DIR}/${LIBRETRO_BINARY_DIR} V=1 - ${LIBRETRO_DEBUG} GIT_VERSION= + V7NEONOPTIMIZATION=1 + && cp ${PROJECT_SOURCE_DIR}/${LIBRETRO_BINARY_DIR}/${PLATFORM}/${LIBRETRO_JNISONAME} ${PROJECT_SOURCE_DIR}/${LIBRETRO_BINARY_DIR}/${LIBRETRO_SONAME}) elseif(CORE_SYSTEM_NAME STREQUAL rbpi) message(FATAL_ERROR "${PROJECT_NAME} needs RPi build command in CMakeLists.txt!") @@ -96,8 +129,11 @@ elseif(CORE_SYSTEM_NAME STREQUAL freebsd) set(BUILD_COMMAND $(MAKE) -C src/libretro -f Makefile + ${build_job_count} + ${LIBRETRO_DEBUG} + GIT_VERSION= platform=unix - ${LIBRETRO_DEBUG} GIT_VERSION=) + ) else() message(FATAL_ERROR "${PROJECT_NAME} - Unknown system: ${CORE_SYSTEM_NAME}") endif() diff --git a/depends/common/vbam/vbam.txt b/depends/common/vbam/vbam.txt index 41e97e1..79b3536 100644 --- a/depends/common/vbam/vbam.txt +++ b/depends/common/vbam/vbam.txt @@ -1 +1 @@ -vbam https://github.com/visualboyadvance-m/visualboyadvance-m/archive/a7b545ab1a5ce0f7f38f63ef923c8fc4db3fe044.tar.gz +vbam https://github.com/visualboyadvance-m/visualboyadvance-m/archive/e4ef4aa625c45aa2c1aae07d5472e6b3f48e70f6.tar.gz diff --git a/game.libretro.vbam/addon.xml.in b/game.libretro.vbam/addon.xml.in index 5caac84..be47d82 100644 --- a/game.libretro.vbam/addon.xml.in +++ b/game.libretro.vbam/addon.xml.in @@ -1,7 +1,7 @@