[arch-commits] Commit in ppsspp/trunk (PKGBUILD ppsspp-system-zstd.patch)

Maxime Gauduin alucryd at gemini.archlinux.org
Thu Oct 7 10:05:33 UTC 2021


    Date: Thursday, October 7, 2021 @ 10:05:33
  Author: alucryd
Revision: 1027919

upgpkg: ppsspp 1.12-1

Added:
  ppsspp/trunk/ppsspp-system-zstd.patch
Modified:
  ppsspp/trunk/PKGBUILD

--------------------------+
 PKGBUILD                 |   15 +++++++++++----
 ppsspp-system-zstd.patch |   42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-10-07 09:23:12 UTC (rev 1027918)
+++ PKGBUILD	2021-10-07 10:05:33 UTC (rev 1027919)
@@ -9,8 +9,8 @@
   ppsspp
   ppsspp-assets
 )
-pkgver=1.11.3
-pkgrel=2
+pkgver=1.12
+pkgrel=1
 pkgdesc='A PSP emulator written in C++'
 arch=(x86_64)
 url=https://www.ppsspp.org/
@@ -31,7 +31,7 @@
   snappy
   zlib
 )
-_tag=f7ace3b8ee33e97e156f3b07f416301e885472c5
+_tag=3b8cab724fc3685e52b63532472fde1b04b31acf
 source=(
   git+https://github.com/hrydgard/ppsspp.git#tag=${_tag}
   git+https://github.com/Kingcom/armips.git
@@ -45,6 +45,7 @@
   armips-tinyformat::git+https://github.com/Kingcom/tinyformat.git
   ppsspp-sdl.desktop
   ppsspp-qt.desktop
+  ppsspp-system-zstd.patch
 )
 b2sums=('SKIP'
         'SKIP'
@@ -57,7 +58,8 @@
         'SKIP'
         'SKIP'
         'c6bcdfedee866dfdcc82a8c333c31ff73ed0beec65b63acec8bc8186383c0bc9f0912f21bb9715b665e8dc1793b1a85599761f9037856fa54ad8aa3bfdbfd468'
-        '328e2ba47b78d242b0ec6ba6bfa039c77a36d1ef7246e5c2c2432d8e976e9360baf505eb05f48408ede1a30545cbbb7f875bf5ebd0252cef35523d449b8254a0')
+        '328e2ba47b78d242b0ec6ba6bfa039c77a36d1ef7246e5c2c2432d8e976e9360baf505eb05f48408ede1a30545cbbb7f875bf5ebd0252cef35523d449b8254a0'
+        'c9fefb1456341f8bdc66ff787dd45e849c44a927dea7d9453ae507ed8d03e440651afe5795f929995a4e55a3b44ffb19fc1105b5621ec4917c8d17250dda1259')
 
 pkgver() {
   cd ppsspp
@@ -67,6 +69,8 @@
 prepare() {
   cd ppsspp
 
+  patch -Np1 -i ../ppsspp-system-zstd.patch
+
   for submodule in assets/lang ext/{glslang,miniupnp} ffmpeg; do
     git submodule init ${submodule}
     git config submodule.${submodule}.url ../ppsspp-${submodule#*/}
@@ -98,6 +102,7 @@
     -DOpenGL_GL_PREFERENCE=GLVND \
     -DUSE_SYSTEM_LIBZIP=ON \
     -DUSE_SYSTEM_SNAPPY=ON \
+    -DUSE_SYSTEM_ZSTD=ON \
     -DUSING_QT_UI=OFF
   cmake --build build-sdl
   cmake -S ppsspp -B build-qt -G Ninja \
@@ -107,6 +112,7 @@
     -DOpenGL_GL_PREFERENCE=GLVND \
     -DUSE_SYSTEM_LIBZIP=ON \
     -DUSE_SYSTEM_SNAPPY=ON \
+    -DUSE_SYSTEM_ZSTD=ON \
     -DUSING_QT_UI=ON
   cmake --build build-qt
 }
@@ -124,6 +130,7 @@
     sdl2
     snappy
     zlib
+    zstd
   )
 
   install -Dm 755 build-sdl/PPSSPPSDL -t "${pkgdir}"/usr/bin/

Added: ppsspp-system-zstd.patch
===================================================================
--- ppsspp-system-zstd.patch	                        (rev 0)
+++ ppsspp-system-zstd.patch	2021-10-07 10:05:33 UTC (rev 1027919)
@@ -0,0 +1,42 @@
+diff '--color=auto' -rupN libretro-ppsspp.orig/CMakeLists.txt libretro-ppsspp/CMakeLists.txt
+--- libretro-ppsspp.orig/CMakeLists.txt	2021-10-01 17:28:30.046655852 +0200
++++ libretro-ppsspp/CMakeLists.txt	2021-10-01 17:30:38.698699237 +0200
+@@ -151,6 +151,7 @@ option(USE_MINIUPNPC "Build with miniUPn
+ 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_SYSTEM_LIBSDL2 "Dynamically link against system SDL2" ON)
+ option(USE_SYSTEM_LIBPNG "Dynamically link against system libpng" ON)
+ option(USE_ASAN "Use address sanitizer" OFF)
+@@ -1976,8 +1977,20 @@ if(ANDROID)
+ 	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)
+diff '--color=auto' -rupN libretro-ppsspp.orig/ext/CMakeLists.txt libretro-ppsspp/ext/CMakeLists.txt
+--- libretro-ppsspp.orig/ext/CMakeLists.txt	2021-10-01 17:28:30.136664237 +0200
++++ libretro-ppsspp/ext/CMakeLists.txt	2021-10-01 17:30:45.282654341 +0200
+@@ -22,4 +22,3 @@ 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)



More information about the arch-commits mailing list