From bc260790a70393bc40cf463d01fc249b3ced13e0 Mon Sep 17 00:00:00 2001 From: linrs Date: Thu, 16 Apr 2020 11:05:11 +0000 Subject: games/ppsspp: Updated for version 1.9.4. - add patch for libpng-1.6 - enable sdl2 interface - add option for build with qt5 Signed-off-by: Willy Sudiarto Raharjo --- games/ppsspp/README | 2 + games/ppsspp/patch-system-libpng16.patch | 83 ++++++++++++++++++++++++++++++++ games/ppsspp/ppsspp.SlackBuild | 72 +++++++++++++++++++-------- games/ppsspp/ppsspp.info | 30 +++++++----- 4 files changed, 157 insertions(+), 30 deletions(-) create mode 100644 games/ppsspp/patch-system-libpng16.patch (limited to 'games/ppsspp') diff --git a/games/ppsspp/README b/games/ppsspp/README index fb8d1b3f87..fa2355a9fa 100644 --- a/games/ppsspp/README +++ b/games/ppsspp/README @@ -11,4 +11,6 @@ made for the small screen of the original PSP. snappy is an optional dependency. +QT=on will enable QT GUI and require qt5 installed (default is 'QT=off'). + This builds the application and the Libretro core (for use with RetroArch). diff --git a/games/ppsspp/patch-system-libpng16.patch b/games/ppsspp/patch-system-libpng16.patch new file mode 100644 index 0000000000..442a1c4b81 --- /dev/null +++ b/games/ppsspp/patch-system-libpng16.patch @@ -0,0 +1,83 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dc0676d3d..72bfe8b07 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -658,9 +658,10 @@ else() + set(LIBZIP_LIBRARY libzip) + endif() + +-# FindPNG does a few things we don't want. So do it ourselves. Fixed to libpng17 +-find_path(PNG_PNG_INCLUDE_DIR NAMES "libpng17/png.h") +-find_library(PNG_LIBRARY NAMES png17 libpng17) ++find_package(PkgConfig) ++pkg_check_modules(PNG libpng>=1.6) ++set(PNG_LIBRARY ${PNG_LIBRARIES}) ++set(PNG_PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS}) + find_package(PackageHandleStandardArgs) + find_package_handle_standard_args(PNG REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR) + if(PNG_FOUND) +diff --git a/Core/Debugger/WebSocket/GPUBufferSubscriber.cpp b/Core/Debugger/WebSocket/GPUBufferSubscriber.cpp +index 67b13d85b..aff77aae3 100644 +--- a/Core/Debugger/WebSocket/GPUBufferSubscriber.cpp ++++ b/Core/Debugger/WebSocket/GPUBufferSubscriber.cpp +@@ -17,7 +17,7 @@ + + #include + #ifndef USING_QT_UI +-#include ++#include + #include + #endif + #include "data/base64.h" +diff --git a/Core/Screenshot.cpp b/Core/Screenshot.cpp +index 2a2ddcf27..a90f3c542 100644 +--- a/Core/Screenshot.cpp ++++ b/Core/Screenshot.cpp +@@ -21,7 +21,7 @@ + #ifdef USING_QT_UI + #include + #else +-#include ++#include + #include "ext/jpge/jpge.h" + #endif + +diff --git a/Core/TextureReplacer.cpp b/Core/TextureReplacer.cpp +index 6087c87ae..b9a9a5abd 100644 +--- a/Core/TextureReplacer.cpp ++++ b/Core/TextureReplacer.cpp +@@ -18,7 +18,7 @@ + #ifdef USING_QT_UI + #include + #else +-#include ++#include + #endif + + #include +diff --git a/ext/native/image/png_load.cpp b/ext/native/image/png_load.cpp +index 41e90a88e..0b07801b6 100644 +--- a/ext/native/image/png_load.cpp ++++ b/ext/native/image/png_load.cpp +@@ -5,7 +5,7 @@ + #ifdef USING_QT_UI + #include + #else +-#include "libpng17/png.h" ++#include "png.h" + #endif + + #include "png_load.h" +diff --git a/ext/native/tools/atlastool.cpp b/ext/native/tools/atlastool.cpp +index 804d4198b..e95eb3b56 100644 +--- a/ext/native/tools/atlastool.cpp ++++ b/ext/native/tools/atlastool.cpp +@@ -18,7 +18,7 @@ + // line height + // dist-per-pixel + +-#include ++#include + #include + #include + #include diff --git a/games/ppsspp/ppsspp.SlackBuild b/games/ppsspp/ppsspp.SlackBuild index 67f04c3335..39df217e03 100644 --- a/games/ppsspp/ppsspp.SlackBuild +++ b/games/ppsspp/ppsspp.SlackBuild @@ -3,6 +3,7 @@ # Slackware build script for ppsspp # Copyright 2016 Hunter Sezen California, USA +# Copyright 2019-2020 Ruoh-Shoei LIN # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,7 +24,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=ppsspp -VERSION=${VERSION:-1.6.3} +VERSION=${VERSION:-1.9.4} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -65,13 +66,20 @@ cd $PRGNAM-$VERSION # The submodules are in a separate archive. This is equivalent to # git submodule update --init --recursive -tar xvf $CWD/${PRGNAM}_submodules-${VERSION}.tar.xz -mv ${PRGNAM}_submodules-${VERSION}/ext/* ext -rmdir ${PRGNAM}_submodules-${VERSION}/ext -mv ${PRGNAM}_submodules-${VERSION}/assets/* assets -rmdir ${PRGNAM}_submodules-${VERSION}/assets -mv ${PRGNAM}_submodules-${VERSION}/* . -rmdir ${PRGNAM}_submodules-${VERSION} +tar -xvf $CWD/hrydgard-glslang-2.3.r2575.gf9d08a25.tar.gz \ + -C ext/glslang --strip-components=1 +tar -xvf $CWD/hrydgard-ppsspp-lang-a95fd4974c436a1a07455c5beef4a12f9f47b811.tar.gz \ + -C assets/lang --strip-components=1 +tar -xvf $CWD/KhronosGroup-SPIRV-Cross-2019.05.20.r60.ga1f7c8dc.tar.gz \ + -C ext/SPIRV-Cross --strip-components=1 +tar -xvf $CWD/Kingcom-armips-v0.9.r134.g7885552.tar.gz \ + -C ext/armips --strip-components=1 +tar -xvf $CWD/hrydgard-ppsspp-ffmpeg-90701640c7f458461310b54e7d4041230e2d5d5a.tar.gz \ + --exclude '*/Windows*' --exclude '*/android' \ + --exclude '*/ios' --exclude '*/blackberry'\ + --exclude '*/macosx' --exclude '*/wiiu' \ + --exclude '*/symbian' \ + -C ffmpeg --strip-components=1 chown -R root:root . find -L . \ @@ -86,36 +94,62 @@ sed -i 's/VERSION 3.6/VERSION 3.5.2/' CMakeLists.txt # Don't force explicit ccache invocation. sed -i -e '/include(ccache)/d' CMakeLists.txt -mkdir -p build -cd build +# Make build glue accept libpng 1.6.x and don't hardcode suffix +patch --forward --strip=1 \ + --input=$CWD/patch-system-libpng16.patch + +mkdir -p build-qt build-sdl + +QT=${QT:-off} +if [ "$QT" = "on" ]; then + cd build-qt + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_SKIP_RPATH=TRUE \ + -Wno-dev \ + -DUSING_QT_UI=ON \ + -DLIBRETRO=ON \ + -DUSE_SYSTEM_LIBZIP=ON \ + -DUSE_DISCORD=OFF \ + -DCMAKE_BUILD_TYPE=Release .. + make + cd .. + install -Dm755 build-qt/PPSSPPQt $PKG/usr/games/ppsspp-qt + install -Dm644 $CWD/ppsspp-qt.desktop $PKG/usr/share/applications/ppsspp-qt.desktop +fi + +cd build-sdl cmake \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_SKIP_RPATH=TRUE \ -Wno-dev \ - -DUSING_QT_UI=ON \ + -DUSING_QT_UI=OFF \ + -DHEADLESS='ON' \ -DLIBRETRO=ON \ + -DUSE_SYSTEM_LIBZIP=ON \ + -DUSE_DISCORD=OFF \ -DCMAKE_BUILD_TYPE=Release .. make cd .. - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +install -Dm755 build-sdl/PPSSPPHeadless $PKG/usr/games/ppsspp mkdir -p $PKG/usr/{games,share/{applications,icons/hicolor,pixmaps,ppsspp}} -cp $CWD/ppsspp.desktop $PKG/usr/share/applications +install -Dm644 $CWD/ppsspp.desktop $PKG/usr/share/applications/ppsspp.desktop cp -r assets $PKG/usr/share/ppsspp cp -r icons/hicolor/* $PKG/usr/share/icons/hicolor cp icons/icon-512.svg $PKG/usr/share/pixmaps/ppsspp.svg -cp build/PPSSPPQt $PKG/usr/games/ppsspp-qt -cp $CWD/ppsspp-qt.desktop $PKG/usr/share/applications - mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/libretro/info -cp build/lib/ppsspp_libretro.so $PKG/usr/lib${LIBDIRSUFFIX}/libretro +cp build-sdl/lib/ppsspp_libretro.so $PKG/usr/lib${LIBDIRSUFFIX}/libretro cp $CWD/ppsspp_libretro.info $PKG/usr/lib${LIBDIRSUFFIX}/libretro/info +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a LICENSE.TXT README.md korean.txt chinese.txt $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/games/ppsspp/ppsspp.info b/games/ppsspp/ppsspp.info index 9236266435..f6c3ee43c2 100644 --- a/games/ppsspp/ppsspp.info +++ b/games/ppsspp/ppsspp.info @@ -1,14 +1,22 @@ PRGNAM="ppsspp" -VERSION="1.6.3" -HOMEPAGE="http://www.ppsspp.org/" -DOWNLOAD="https://github.com/hrydgard/ppsspp/archive/v1.6.3/ppsspp-1.6.3.tar.gz \ - https://downloads.sourceforge.net/project/slackbuildsdirectlinks/ppsspp/ppsspp_submodules-1.6.3.tar.xz \ - https://raw.githubusercontent.com/libretro/libretro-super/263e116/dist/info/ppsspp_libretro.info" -MD5SUM="fc667ad6fe5e9c16cc13bbc64da1c99f \ - 0262021e692e0f7ed9ad1ea4cd7c458a \ - 69d0a6ac19d4608225407dff8eb13fa6" +VERSION="1.9.4" +HOMEPAGE="https://www.ppsspp.org/" +DOWNLOAD="https://github.com/hrydgard/ppsspp/archive/v1.9.4/ppsspp-1.9.4.tar.gz \ + https://github.com/hrydgard/glslang/archive/f9d08a25fbe17e0677a89d398f4d7f232339c3f9/hrydgard-glslang-2.3.r2575.gf9d08a25.tar.gz \ + https://github.com/hrydgard/ppsspp-lang/archive/a95fd4974c436a1a07455c5beef4a12f9f47b811/hrydgard-ppsspp-lang-a95fd4974c436a1a07455c5beef4a12f9f47b811.tar.gz \ + https://github.com/KhronosGroup/SPIRV-Cross/archive/a1f7c8dc8ea2f94443951ee27003bffa562c1f13/KhronosGroup-SPIRV-Cross-2019.05.20.r60.ga1f7c8dc.tar.gz \ + https://github.com/Kingcom/armips/archive/7885552b208493a6a0f21663770c446c3ba65576/Kingcom-armips-v0.9.r134.g7885552.tar.gz \ + https://github.com/hrydgard/ppsspp-ffmpeg/archive/90701640c7f458461310b54e7d4041230e2d5d5a/hrydgard-ppsspp-ffmpeg-90701640c7f458461310b54e7d4041230e2d5d5a.tar.gz \ + https://github.com/libretro/libretro-super/raw/master/dist/info/ppsspp_libretro.info" +MD5SUM="3ba5323553084e48ef9af82ec7802e4a \ + a1847ce9e91631969d61bb552c33df1f \ + c7955acb139ccfcf0b14cd7440e88581 \ + 9c0141380c98ccdff95a084ac07d1d48 \ + 4731977e287eee39ddcc247d75095758 \ + c4906081083ee74e3792da166db69b11 \ + 74e1105d45779d3ae32acaea085ee99e" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="SDL2 qt5" -MAINTAINER="Dugan Chen" -EMAIL="thedoogster [at] gmail [dot] com" +REQUIRES="SDL2" +MAINTAINER="Ruoh-Shoei LIN" +EMAIL="lin.ruohshoei [at] gmail [dot] com" -- cgit v1.2.3