diff options
author | David Demelier <markand@malikania.fr> | 2021-05-16 07:26:07 +0200 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2021-05-20 09:45:20 +0000 |
commit | 27b4138391b3e688d9ca3f57c31094b535c7a9c7 (patch) | |
tree | c862f20fcb7f95448c756541476cca47dbd85582 /testing/libretro-ppsspp | |
parent | 0e8f37557411ee873e8728cd038ce0affdfe4a11 (diff) |
testing/libretro-ppsspp: new aport
Diffstat (limited to 'testing/libretro-ppsspp')
-rw-r--r-- | testing/libretro-ppsspp/APKBUILD | 81 | ||||
-rw-r--r-- | testing/libretro-ppsspp/patch-disable-git-version.patch | 25 | ||||
-rw-r--r-- | testing/libretro-ppsspp/patch-unbundle.patch | 178 |
3 files changed, 284 insertions, 0 deletions
diff --git a/testing/libretro-ppsspp/APKBUILD b/testing/libretro-ppsspp/APKBUILD new file mode 100644 index 00000000000..5ff06548935 --- /dev/null +++ b/testing/libretro-ppsspp/APKBUILD @@ -0,0 +1,81 @@ +# Contributor: David Demelier <markand@malikania.fr> +# Maintainer: David Demelier <markand@malikania.fr> +pkgname=libretro-ppsspp +pkgver=0_git20210516 +pkgrel=0 +_vers="v1.11.3-672-gf1bf596f5" +_commit="f1bf596f5c6301a9f757b18b7823fd9f34f235ef" +_commit_armips="7885552b208493a6a0f21663770c446c3ba65576" +_commit_ppsspp_lang="3bf6b18eb0ae68861fbfbb7b43cd764771ca42a9" +_commit_rapidjson="73063f5002612c6bf64fe24f851cd5cc0d83eef9" +_commit_spirv_cross="9acb9ec31f5a8ef80ea6b994bb77be787b08d3d1" +pkgdesc="libretro core for ppsspp" +url="https://github.com/hrydgard/ppsspp" +arch="all !s390x" +license="GPL-2.0-only" +makedepends="cmake + ffmpeg-dev + glslang-dev + glslang-static + libpng-dev + libzip-dev + mesa-dev + miniupnpc-dev + ninja + python3 + snappy-dev + zlib-dev + zstd-dev" +source="$pkgname-$_commit.tar.gz::https://github.com/hrydgard/ppsspp/archive/$_commit.tar.gz + $pkgname-armips-$_commit_armips.tar.gz::https://github.com/Kingcom/armips/archive/$_commit_armips.tar.gz + $pkgname-ppsspp-lang-$_commit_ppsspp_lang.tar.gz::https://github.com/hrydgard/ppsspp-lang/archive/$_commit_ppsspp_lang.tar.gz + $pkgname-rapidjson-$_commit_rapidjson.tar.gz::https://github.com/Tencent/rapidjson/archive/$_commit_rapidjson.tar.gz + $pkgname-spirv-cross-$_commit_spirv_cross.tar.gz::https://github.com/KhronosGroup/spirv-cross/archive/$_commit_spirv_cross.tar.gz + patch-unbundle.patch + patch-disable-git-version.patch + " +builddir="$srcdir/ppsspp-$_commit" +options="!check" # No tests + +prepare() { + default_prepare + rm -rf ext/armips && mv "$srcdir"/armips-$_commit_armips ext/armips + rm -rf ext/rapidjson && mv "$srcdir"/rapidjson-$_commit_rapidjson ext/rapidjson + rm -rf ext/SPIRV-Cross && mv "$srcdir"/SPIRV-Cross-$_commit_spirv_cross ext/SPIRV-Cross + rm -rf assets/lang && mv "$srcdir"/ppsspp-lang-$_commit_ppsspp_lang assets/lang + sed -i -e "s,@VERSION@,$_vers," git-version.cmake +} + +build() { + if [ "$CBUILD" != "$CHOST" ]; then + CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" + fi + cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=None \ + -DCMAKE_SKIP_RPATH=On \ + -DOpenGL_GL_PREFERENCE=GLVND \ + -DHEADLESS=Off \ + -DLIBRETRO=On \ + -DMOBILE_DEVICE=Off \ + -DSIMULATOR=Off \ + -DUNITTEST=Off \ + -DUSE_SYSTEM_LIBZIP=On \ + -DUSE_SYSTEM_SNAPPY=On \ + -DUSE_SYSTEM_ZSTD=On \ + -DUSE_SYSTEM_FFMPEG=On \ + -DUSING_QT_UI=Off \ + $CMAKE_CROSSOPTS . + cmake --build build +} + +package() { + install -Dm644 build/lib/ppsspp_libretro.so "$pkgdir"/usr/lib/libretro/ppsspp_libretro.so +} + +sha512sums="7bc671c8da5e7c77a2609022bbbbecff4b21d65a4c32e4497814b42235a4a870c1aafc66abeb0b875ba7ed42873cdc824f901adb7d090cb583e657ba9b06c641 libretro-ppsspp-f1bf596f5c6301a9f757b18b7823fd9f34f235ef.tar.gz +2a94e2c7b7280c00a39c8fc92d81ed15fc4b3270a124ef882e3cd8878db6ec827aefa06b0e646a60916636a95e4ebfa886e9878ba70c6bcfcd048def457368be libretro-ppsspp-armips-7885552b208493a6a0f21663770c446c3ba65576.tar.gz +691cb38c65ca20700dc5b91c0dc02eec1839f153e042c87f8f4fd480e44c823c0ece9f4752f5e597f2aa4b5cfb22aaf49d76ff990eb2dd5231cc4065dd62566d libretro-ppsspp-ppsspp-lang-3bf6b18eb0ae68861fbfbb7b43cd764771ca42a9.tar.gz +3472e129e710bf5343b8b27a61581a1480c8096493e466440b62702d8b5353745d561931f72b5405a736ad92525be3843ea1cf4b5ea5839721cc6d6b358f19bc libretro-ppsspp-rapidjson-73063f5002612c6bf64fe24f851cd5cc0d83eef9.tar.gz +be77131814691dfbe65de3a2d3ea65de98c7169824997056637bbce39485327ff0f64e7eed8588237615948824e1f9dff1d083472b8cbccd3748a52379411e4e libretro-ppsspp-spirv-cross-9acb9ec31f5a8ef80ea6b994bb77be787b08d3d1.tar.gz +bce348cba279e746b77d3e75bddbdbdbbdb6643385e7a5f9d3f1dcb22a1fd7708acf16cc5e7acc8756e9ab9da9caeaef1a140d245df141acb23c07f9c23080e8 patch-unbundle.patch +859901bd42934b52f82c28c1f5f3b43277f54d79d58c035c063e615de3a5959a373ef8d9c0199ed1326bbd64b7b12f4582957851d57d2dd66b5ba8488bbb8734 patch-disable-git-version.patch" diff --git a/testing/libretro-ppsspp/patch-disable-git-version.patch b/testing/libretro-ppsspp/patch-disable-git-version.patch new file mode 100644 index 00000000000..cf2d9368c77 --- /dev/null +++ b/testing/libretro-ppsspp/patch-disable-git-version.patch @@ -0,0 +1,25 @@ +Don't use git to append version into source code. +--- a/git-version.cmake ++++ b/git-version.cmake +@@ -1,20 +1,6 @@ + set(GIT_VERSION_FILE "${SOURCE_DIR}/git-version.cpp") +-set(GIT_VERSION "unknown") ++set(GIT_VERSION "@VERSION@") + set(GIT_VERSION_UPDATE "1") +- +-find_package(Git) +-if(GIT_FOUND AND EXISTS "${SOURCE_DIR}/.git/") +- execute_process(COMMAND ${GIT_EXECUTABLE} describe --always +- WORKING_DIRECTORY ${SOURCE_DIR} +- RESULT_VARIABLE exit_code +- OUTPUT_VARIABLE GIT_VERSION) +- if(NOT ${exit_code} EQUAL 0) +- message(WARNING "git describe failed, unable to include version.") +- endif() +- string(STRIP ${GIT_VERSION} GIT_VERSION) +-else() +- message(WARNING "git not found, unable to include version.") +-endif() + + if(EXISTS ${GIT_VERSION_FILE}) + # Don't update if marked not to update. diff --git a/testing/libretro-ppsspp/patch-unbundle.patch b/testing/libretro-ppsspp/patch-unbundle.patch new file mode 100644 index 00000000000..00f097edfd9 --- /dev/null +++ b/testing/libretro-ppsspp/patch-unbundle.patch @@ -0,0 +1,178 @@ +https://raw.githubusercontent.com/archlinux/svntogit-community/packages/libretro-ppsspp/trunk/libretro-ppsspp-system-zstd.patch +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -135,6 +135,7 @@ + option(USE_SYSTEM_SNAPPY "Dynamically link against system snappy" ${USE_SYSTEM_SNAPPY}) + option(USE_SYSTEM_FFMPEG "Dynamically link against system FFMPEG" ${USE_SYSTEM_FFMPEG}) + option(USE_SYSTEM_LIBZIP "Dynamically link against system libzip" ${USE_SYSTEM_LIBZIP}) ++option(USE_SYSTEM_ZSTD "Dynamically link against system zstd" ${USE_SYSTEM_ZSTD}) + option(USE_ASAN "Use address sanitizer" OFF) + option(USE_UBSAN "Use undefined behaviour sanitizer" OFF) + +@@ -1892,9 +1893,21 @@ + endif() + endif() + +-set(CoreExtraLibs ${CoreExtraLibs} armips libzstd_static) +-include_directories(ext/zstd/lib) ++set(CoreExtraLibs ${CoreExtraLibs} armips) + ++find_package(PkgConfig) ++if(PKG_CONFIG_FOUND) ++ pkg_check_modules(ZSTD libzstd) ++endif() ++if(ZSTD_FOUND AND USE_SYSTEM_ZSTD) ++ include_directories(${ZSTD_INCLUDE_DIRS}) ++ target_link_libraries(${CoreLibName} ${ZSTD_LIBRARIES}) ++else() ++ add_subdirectory(ext/zstd/build/cmake EXCLUDE_FROM_ALL) ++ include_directories(ext/zstd/lib) ++ set(CoreExtraLibs ${CoreExtraLibs} libzstd_static) ++endif() ++ + # needed for VK_USE_PLATFORM_XCB_KHR only + #if(VULKAN AND NOT WIN32) + # target_link_libraries(native X11-xcb X11) +@@ -1933,73 +1946,7 @@ + + # miniUPnPc integration (MiniUPnPc supposed to works on any POSIX system, not sure if some of these are redundant/not needed tho) + if(USE_MINIUPNPC) +- set (MINIUPNPC_VERSION 2.1) # used by miniupnpcstrings.h.cmake +- set (MINIUPNPC_API_VERSION 17) +- option(UPNPC_BUILD_STATIC "Build static library" TRUE) +- option(NO_GETADDRINFO "Define NO_GETADDRINFO" FALSE) +- mark_as_advanced(NO_GETADDRINFO) +- if (NO_GETADDRINFO) +- add_definitions(-DNO_GETADDRINFO) +- endif() +- +- if (NOT WIN32) +- add_definitions (-DMINIUPNPC_SET_SOCKET_TIMEOUT) +- add_definitions (-D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112L) +- endif() +- if (MACOSX) +- add_definitions (-D_DARWIN_C_SOURCE) +- endif() +- if(WIN32) +- add_definitions(-DWIN32 -DMINIUPNP_EXPORTS ) +- else() +- add_definitions(-fPIC) +- endif() +- +- add_definitions(-DWITH_UPNP -DMINIUPNP_STATICLIB) +- set(MINIUPNP_DIR "ext/miniupnp/miniupnpc") +- include_directories(${CMAKE_CURRENT_BINARY_DIR}) +- configure_file(${MINIUPNP_DIR}/miniupnpcstrings.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/miniupnpcstrings.h) # by default miniupnp repo doesn't contains miniupnpcstrings.h and need to be generated +- set(MINIUPNPC_SOURCES +- # the needed bits of miniupnpc (no python module, no tests, no cli) +- ${MINIUPNP_DIR}/addr_is_reserved.c +- ${MINIUPNP_DIR}/connecthostport.c +- ${MINIUPNP_DIR}/igd_desc_parse.c +- ${MINIUPNP_DIR}/minisoap.c +- ${MINIUPNP_DIR}/minissdpc.c +- ${MINIUPNP_DIR}/miniupnpc.c +- ${MINIUPNP_DIR}/miniwget.c +- ${MINIUPNP_DIR}/minixml.c +- ${MINIUPNP_DIR}/minixmlvalid.c +- ${MINIUPNP_DIR}/portlistingparse.c +- ${MINIUPNP_DIR}/receivedata.c +- #${MINIUPNP_DIR}/upnpc.c # causing an error due to already existing _main() +- ${MINIUPNP_DIR}/upnpcommands.c +- ${MINIUPNP_DIR}/upnpdev.c +- ${MINIUPNP_DIR}/upnperrors.c +- ${MINIUPNP_DIR}/upnpreplyparse.c +- ${CMAKE_CURRENT_BINARY_DIR}/miniupnpcstrings.h +- ) +- if (NOT WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "AmigaOS") +- #set(MINIUPNPC_SOURCES ${MINIUPNPC_SOURCES} minissdpc.c) # causing an error due to duplication in MINIUPNPC_SOURCES? +- endif() +- if (WIN32) +- set_source_files_properties(${MINIUPNPC_SOURCES} PROPERTIES COMPILE_DEFINITIONS "MINIUPNP_STATICLIB;MINIUPNP_EXPORTS") +- set(LDLIBS ws2_32 iphlpapi ${LDLIBS}) +- #elseif (CMAKE_SYSTEM_NAME STREQUAL "Solaris") +- # find_library (SOCKET_LIBRARY NAMES socket) +- # find_library (NSL_LIBRARY NAMES nsl) +- # find_library (RESOLV_LIBRARY NAMES resolv) +- # set (LDLIBS ${SOCKET_LIBRARY} ${NSL_LIBRARY} ${RESOLV_LIBRARY} ${LDLIBS}) +- endif() +- if (UPNPC_BUILD_STATIC) +- add_library(miniupnpc STATIC ${MINIUPNPC_SOURCES}) +- target_link_libraries(${CoreLibName} miniupnpc ${LDLIBS}) +- set(UPNPC_LIBRARY miniupnpc) +- if (MSVC) +- # Suppress noise warnings +- target_compile_definitions(miniupnpc PRIVATE _CRT_SECURE_NO_WARNINGS _WINSOCK_DEPRECATED_NO_WARNINGS) +- endif() +- endif() ++ target_link_libraries(${CoreLibName} miniupnpc) + endif() + + setup_target_project(${CoreLibName} Core) +--- a/Core/Util/PortManager.h ++++ b/Core/Util/PortManager.h +@@ -26,9 +26,9 @@ + #define MINIUPNP_STATICLIB + #endif + +-#include "ext/miniupnp/miniupnpc/miniwget.h" +-#include "ext/miniupnp/miniupnpc/miniupnpc.h" +-#include "ext/miniupnp/miniupnpc/upnpcommands.h" ++#include <miniupnpc/miniwget.h> ++#include <miniupnpc/miniupnpc.h> ++#include <miniupnpc/upnpcommands.h> + + #include <string> + #include <deque> +--- a/ext/CMakeLists.txt ++++ b/ext/CMakeLists.txt +@@ -15,11 +15,9 @@ + set(ENABLE_HLSL OFF CACHE BOOL "let's not build HLSL support we don't need" FORCE) + endif() + +-add_subdirectory(glslang EXCLUDE_FROM_ALL) + add_subdirectory(snappy) + add_subdirectory(udis86) + add_subdirectory(SPIRV-Cross-build) + if(USE_DISCORD AND NOT IOS AND NOT LIBRETRO) + add_subdirectory(discord-rpc-build) + endif() +-add_subdirectory(zstd/build/cmake EXCLUDE_FROM_ALL) +--- a/Common/GPU/Vulkan/VulkanContext.cpp ++++ b/Common/GPU/Vulkan/VulkanContext.cpp +@@ -21,7 +21,7 @@ + #undef new + #endif + +-#include "ext/glslang/SPIRV/GlslangToSpv.h" ++#include <glslang/SPIRV/GlslangToSpv.h> + + #ifdef USE_CRT_DBG + #define new DBG_NEW +--- a/Common/GPU/ShaderTranslation.cpp ++++ b/Common/GPU/ShaderTranslation.cpp +@@ -34,12 +34,13 @@ + #undef free + #endif + ++#include <glslang/SPIRV/GlslangToSpv.h> ++ + #include "Common/Log.h" + #include "Common/StringUtils.h" + #include "Common/GPU/Shader.h" + + #include "Common/GPU/ShaderTranslation.h" +-#include "ext/glslang/SPIRV/GlslangToSpv.h" + #include "Common/GPU/thin3d.h" + #include "Common/GPU/OpenGL/GLFeatures.h" + +--- a/Common/GPU/Shader.cpp ++++ b/Common/GPU/Shader.cpp +@@ -4,7 +4,7 @@ + #undef new + #endif + +-#include "ext/glslang/SPIRV/GlslangToSpv.h" ++#include <glslang/SPIRV/GlslangToSpv.h> + + const char *ShaderLanguageAsString(ShaderLanguage lang) { + switch (lang) { |