PPSSPP: bump version

This commit is contained in:
Gerasim Troeglazov
2021-02-28 20:45:54 +10:00
parent 620a2f0a74
commit 68b5ec7d9d
2 changed files with 140 additions and 52 deletions

View File

@@ -1,23 +1,50 @@
From dfb812541ded38bcc9dfd7de36528eb8059a8f8e Mon Sep 17 00:00:00 2001
From 52c8a1df7ba4f70c4d72664d058efe6fba54106c Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 17 Aug 2020 20:44:23 +1000
Date: Sun, 28 Feb 2021 20:30:33 +1000
Subject: Fixes for Haiku
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ee98014..5784bf7 100644
index f71e066..aae4a10 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -124,7 +124,7 @@ option(USE_SYSTEM_FFMPEG "Dynamically link against system FFMPEG" ${USE_SYSTEM_F
option(USE_SYSTEM_LIBZIP "Dynamically link against system libzip" ${USE_SYSTEM_LIBZIP})
option(USE_ADDRESS_SANITIZER "Use Clang memory sanitizer" ${USE_ADDRESS_SANITIZER})
@@ -86,7 +86,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Android")
endif()
# We only support Vulkan on Unix, macOS (by MoltenVK), Android and Windows.
-if(ANDROID OR WIN32 OR (UNIX AND NOT ARM_NO_VULKAN))
+if(ANDROID OR WIN32 OR (UNIX AND NOT HAIKU AND NOT ARM_NO_VULKAN))
set(VULKAN ON)
endif()
@@ -137,7 +137,7 @@ option(USE_SYSTEM_LIBZIP "Dynamically link against system libzip" ${USE_SYSTEM_L
option(USE_ASAN "Use address sanitizer" OFF)
option(USE_UBSAN "Use undefined behaviour sanitizer" OFF)
-if(UNIX AND NOT (APPLE OR ANDROID) AND VULKAN)
+if(UNIX AND NOT (APPLE OR ANDROID OR HAIKU) AND VULKAN)
if(USING_X11_VULKAN)
message("Using X11 for Vulkan")
add_definitions(-DVK_USE_PLATFORM_XLIB_KHR)
@@ -1812,7 +1812,7 @@ if(FFmpeg_FOUND)
@@ -1113,7 +1113,7 @@ add_library(native STATIC
ext/jpge/jpge.h
)
-if(LINUX AND NOT ANDROID)
+if(LINUX AND NOT ANDROID AND NOT HAIKU)
set(RT_LIB rt)
endif()
@@ -1131,6 +1131,8 @@ if(ANDROID)
target_link_libraries(native log EGL OpenSLES)
elseif(WIN32)
target_link_libraries(native ws2_32 winmm)
+elseif(HAIKU)
+ target_link_libraries(native network)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "^(DragonFly|FreeBSD|NetBSD)$")
target_link_libraries(native execinfo)
endif()
@@ -1855,12 +1857,15 @@ if(FFmpeg_FOUND)
endif()
# Discord integration
@@ -26,7 +53,23 @@ index ee98014..5784bf7 100644
add_definitions(-DUSE_DISCORD=1)
target_link_libraries(${CoreLibName} discord-rpc)
endif()
@@ -1932,6 +1932,10 @@ set(WindowsFiles
# miniUPnPc integration (MiniUPnPc supposed to works on any POSIX system, not sure if some of these are redundant/not needed tho)
+if(HAIKU)
+ target_link_libraries(${CoreLibName} miniupnpc)
+else()
if(USE_MINIUPNPC)
set (MINIUPNPC_VERSION 2.1) # used by miniupnpcstrings.h.cmake
set (MINIUPNPC_API_VERSION 17)
@@ -1931,6 +1936,7 @@ if(USE_MINIUPNPC)
endif()
endif()
endif()
+endif()
setup_target_project(${CoreLibName} Core)
@@ -2053,6 +2059,10 @@ set(WindowsFiles
list(APPEND LinkCommon ${CoreLibName} ${CMAKE_THREAD_LIBS_INIT})
@@ -51,10 +94,10 @@ index 3a5d8ac..f68142f 100644
#define bswap16 swap16
#define bswap32 swap32
diff --git a/Core/Config.cpp b/Core/Config.cpp
index 9ff2635..0088851 100644
index 1c53e8e..c1758bc 100644
--- a/Core/Config.cpp
+++ b/Core/Config.cpp
@@ -519,7 +519,7 @@ static ConfigSetting cpuSettings[] = {
@@ -534,7 +534,7 @@ static ConfigSetting cpuSettings[] = {
static int DefaultInternalResolution() {
// Auto on Windows and Linux, 2x on large screens, 1x elsewhere.
@@ -63,7 +106,7 @@ index 9ff2635..0088851 100644
return 0;
#else
int longestDisplaySide = std::max(System_GetPropertyInt(SYSPROP_DISPLAY_XRES), System_GetPropertyInt(SYSPROP_DISPLAY_YRES));
@@ -729,7 +729,11 @@ static ConfigSetting graphicsSettings[] = {
@@ -761,7 +761,11 @@ static ConfigSetting graphicsSettings[] = {
ReportedConfigSetting("InternalResolution", &g_Config.iInternalResolution, &DefaultInternalResolution, true, true),
ReportedConfigSetting("AndroidHwScale", &g_Config.iAndroidHwScale, &DefaultAndroidHwScale),
ReportedConfigSetting("HighQualityDepth", &g_Config.bHighQualityDepth, true, true, true),
@@ -75,7 +118,7 @@ index 9ff2635..0088851 100644
ReportedConfigSetting("FrameSkipType", &g_Config.iFrameSkipType, 0, true, true),
ReportedConfigSetting("AutoFrameSkip", &g_Config.bAutoFrameSkip, false, true, true),
ConfigSetting("FrameRate", &g_Config.iFpsLimit1, 0, true, true),
@@ -740,10 +744,17 @@ static ConfigSetting graphicsSettings[] = {
@@ -772,10 +776,17 @@ static ConfigSetting graphicsSettings[] = {
#endif
// Most low-performance (and many high performance) mobile GPUs do not support aniso anyway so defaulting to 4 is fine.
@@ -94,8 +137,8 @@ index 9ff2635..0088851 100644
ReportedConfigSetting("TextureSecondaryCache", &g_Config.bTextureSecondaryCache, false, true, true),
ReportedConfigSetting("VertexDecJit", &g_Config.bVertexDecoderJit, &DefaultCodeGen, false),
@@ -777,7 +788,11 @@ static ConfigSetting graphicsSettings[] = {
ReportedConfigSetting("PostShader", &g_Config.sPostShaderName, "Off", true, true),
@@ -810,7 +821,11 @@ static ConfigSetting graphicsSettings[] = {
ConfigSetting("ShaderChainRequires60FPS", &g_Config.bShaderChainRequires60FPS, false, true, true),
ReportedConfigSetting("MemBlockTransferGPU", &g_Config.bBlockTransferGPU, true, true, true),
+#ifdef __HAIKU__
@@ -106,11 +149,57 @@ index 9ff2635..0088851 100644
ReportedConfigSetting("FragmentTestCache", &g_Config.bFragmentTestCache, true, true, true),
ConfigSetting("GfxDebugOutput", &g_Config.bGfxDebugOutput, false, false, false),
diff --git a/Core/HLE/proAdhoc.cpp b/Core/HLE/proAdhoc.cpp
index dda1f66..8ce8b22 100644
--- a/Core/HLE/proAdhoc.cpp
+++ b/Core/HLE/proAdhoc.cpp
@@ -2013,7 +2013,7 @@ int setUDPConnReset(int udpsock, bool enabled) {
return -1;
}
-#if !defined(TCP_KEEPIDLE)
+#if !defined(TCP_KEEPIDLE) && !defined(__HAIKU__)
#define TCP_KEEPIDLE TCP_KEEPALIVE //TCP_KEEPIDLE on Linux is equivalent to TCP_KEEPALIVE on macOS
#endif
// VS 2017 compatibility
@@ -2032,12 +2032,14 @@ int setSockKeepAlive(int sock, bool keepalive, const int keepinvl, const int kee
if (result == 0 && keepalive) {
if (getsockopt(sock, SOL_SOCKET, SO_TYPE, (char*)&optval, (socklen_t*)&optlen) == 0 && optval == SOCK_STREAM) {
optlen = sizeof(optval);
+#ifndef __HAIKU__
optval = keepidle; //180 sec
- setsockopt(sock, IPPROTO_TCP, TCP_KEEPIDLE, (char*)&optval, optlen);
+ setsockopt(sock, IPPROTO_TCP, TCP_KEEPIDLE, (char*)&optval, optlen);
optval = keepinvl; //60 sec
setsockopt(sock, IPPROTO_TCP, TCP_KEEPINTVL, (char*)&optval, optlen);
optval = keepcnt; //20
setsockopt(sock, IPPROTO_TCP, TCP_KEEPCNT, (char*)&optval, optlen);
+#endif
}
}
return result;
diff --git a/Core/Util/PortManager.h b/Core/Util/PortManager.h
index a4c7df6..78bcf01 100644
--- 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>
diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp
index a5928d4..e0267fe 100644
index 98b56fe..a175b4b 100644
--- a/SDL/SDLMain.cpp
+++ b/SDL/SDLMain.cpp
@@ -210,7 +210,7 @@ void LaunchBrowser(const char *url) {
@@ -209,7 +209,7 @@ void LaunchBrowser(const char *url) {
#elif defined(_WIN32)
std::wstring wurl = ConvertUTF8ToWString(url);
ShellExecute(NULL, L"open", wurl.c_str(), NULL, NULL, SW_SHOWNORMAL);
@@ -119,7 +208,7 @@ index a5928d4..e0267fe 100644
std::string command = std::string("open ") + url;
system(command.c_str());
#else
@@ -233,7 +233,7 @@ void LaunchMarket(const char *url) {
@@ -232,7 +232,7 @@ void LaunchMarket(const char *url) {
#elif defined(_WIN32)
std::wstring wurl = ConvertUTF8ToWString(url);
ShellExecute(NULL, L"open", wurl.c_str(), NULL, NULL, SW_SHOWNORMAL);
@@ -128,7 +217,7 @@ index a5928d4..e0267fe 100644
std::string command = std::string("open ") + url;
system(command.c_str());
#else
@@ -251,7 +251,7 @@ void LaunchEmail(const char *email_address) {
@@ -250,7 +250,7 @@ void LaunchEmail(const char *email_address) {
#elif defined(_WIN32)
std::wstring mailto = std::wstring(L"mailto:") + ConvertUTF8ToWString(email_address);
ShellExecute(NULL, L"open", mailto.c_str(), NULL, NULL, SW_SHOWNORMAL);
@@ -137,7 +226,7 @@ index a5928d4..e0267fe 100644
std::string command = std::string("open mailto:") + email_address;
system(command.c_str());
#else
@@ -270,6 +270,8 @@ std::string System_GetProperty(SystemProperty prop) {
@@ -269,6 +269,8 @@ std::string System_GetProperty(SystemProperty prop) {
return "SDL:Windows";
#elif __linux__
return "SDL:Linux";
@@ -146,7 +235,7 @@ index a5928d4..e0267fe 100644
#elif __APPLE__
return "SDL:macOS";
#elif PPSSPP_PLATFORM(SWITCH)
@@ -465,6 +467,16 @@ int main(int argc, char *argv[]) {
@@ -489,6 +491,16 @@ int main(int argc, char *argv[]) {
nxlinkStdio();
#endif // HAVE_LIBNX
@@ -164,10 +253,10 @@ index a5928d4..e0267fe 100644
#if PPSSPP_PLATFORM(RPI)
diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp
index 4420a5a..04a9b7a 100644
index f7b7b13..9addbc7 100644
--- a/UI/NativeApp.cpp
+++ b/UI/NativeApp.cpp
@@ -505,6 +505,9 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
@@ -507,6 +507,9 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
g_Config.memStickDirectory = memstickDir + "/";
}
}
@@ -178,7 +267,7 @@ index 4420a5a..04a9b7a 100644
g_Config.memStickDirectory = user_data_path;
g_Config.flash0Directory = std::string(external_dir) + "/flash0/";
diff --git a/cmake/Modules/FindFFmpeg.cmake b/cmake/Modules/FindFFmpeg.cmake
index a8c482d..a1b76e1 100644
index 648c0ba..03bcac6 100644
--- a/cmake/Modules/FindFFmpeg.cmake
+++ b/cmake/Modules/FindFFmpeg.cmake
@@ -33,7 +33,6 @@ set(_FFmpeg_ALL_COMPONENTS
@@ -197,6 +286,15 @@ index a8c482d..a1b76e1 100644
set(_FFmpeg_DEPS_swresample avutil)
set(_FFmpeg_DEPS_swscale avutil)
@@ -68,6 +66,8 @@ function(find_ffmpeg LIBNAME)
${FFMPEG_DIR}/include/lib${LIBNAME}
${FFMPEG_DIR}/include/ffmpeg
${FFMPEG_DIR}/include
+ ${FFMPEG_DIR}/headers/x86
+ ${FFMPEG_DIR}/headers
NO_DEFAULT_PATH
NO_CMAKE_FIND_ROOT_PATH
)
diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt
index 16b4adb..92c723d 100644
--- a/ext/CMakeLists.txt
@@ -209,24 +307,6 @@ index 16b4adb..92c723d 100644
+if(USE_DISCORD AND NOT IOS AND NOT LIBRETRO AND NOT HAIKU)
add_subdirectory(discord-rpc-build)
endif()
diff --git a/ext/native/ext/cityhash/city.h b/ext/native/ext/cityhash/city.h
index 94499ce..e5249cc 100644
--- a/ext/native/ext/cityhash/city.h
+++ b/ext/native/ext/cityhash/city.h
@@ -66,9 +66,13 @@
#include <stdint.h>
#include <utility>
+#ifdef __HAIKU__
+#include <SupportDefs.h>
+#else
typedef uint8_t uint8;
typedef uint32_t uint32;
typedef uint64_t uint64;
+#endif
typedef std::pair<uint64, uint64> uint128;
inline uint64 Uint128Low64(const uint128& x) { return x.first; }
--
2.28.0
2.30.0

View File

@@ -3,11 +3,11 @@ DESCRIPTION="PPSSPP is a PSP (PlayStation Portable) emulator capable of playing
majority of the games made for Sonys first portable console right on your favorite \
Android or PC device."
HOMEPAGE="https://www.ppsspp.org/"
COPYRIGHT="2012-2020 PPSSPP Project"
COPYRIGHT="2012-2021 PPSSPP Project"
LICENSE="GNU GPL v2"
REVISION="3"
REVISION="1"
SOURCE_URI="https://github.com/hrydgard/ppsspp/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="92a0931c0817529202679f926632510658f3aeea83e2a1663f9cce595b505421"
CHECKSUM_SHA256="0b70e4ae8000b0f8b2ef5e6110d406f6d2cbf8e597c1f594a643b10ce940ee6c"
SOURCE_FILENAME="ppsspp-$portVersion.tar.gz"
SOURCE_DIR="ppsspp-$portVersion"
srcGitRev_2="7885552b208493a6a0f21663770c446c3ba65576"
@@ -15,19 +15,19 @@ SOURCE_URI_2="https://github.com/Kingcom/armips/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="f8a03906135fb6f2932b80b7ef5991f39ccac46b36ec3690776fb38c69775c3d"
SOURCE_FILENAME_2="armips-$srcGitRev_2.tar.gz"
SOURCE_DIR_2="armips-$srcGitRev_2"
srcGitRev_3="d0850f875ec392a130ccf00018dab458b546f27c"
srcGitRev_3="dc11adde23c455a24e13dd54de9b4ede8bdd7db8"
SOURCE_URI_3="https://github.com/hrydgard/glslang/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="699e177e0022f17c204e3542bbf7fcb6843923095968edc1ebbc5124e85a2bdf"
CHECKSUM_SHA256_3="32edc362238d5b1136b2b40b0abdeef5a832e599554d2fcf75d7b08e4b0ed0bb"
SOURCE_FILENAME_3="glslang-$srcGitRev_3.tar.gz"
SOURCE_DIR_3="glslang-$srcGitRev_3"
srcGitRev_4="a1f7c8dc8ea2f94443951ee27003bffa562c1f13"
srcGitRev_4="9acb9ec31f5a8ef80ea6b994bb77be787b08d3d1"
SOURCE_URI_4="https://github.com/KhronosGroup/SPIRV-Cross/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="456b1e2a75a8e82985ce22f4707570c7aa1fc50d4119cba1a641e8b233ecde26"
CHECKSUM_SHA256_4="9423aebd6ea4251c6ea736f0291066eb2b99b6f923151edd1a78ce9c29b46757"
SOURCE_FILENAME_4="SPIRV-Cross-$srcGitRev_4.tar.gz"
SOURCE_DIR_4="SPIRV-Cross-$srcGitRev_4"
srcGitRev_5="1c64b8fbd3cb6bd87935eb53f302f7de6f86e209"
srcGitRev_5="6bd5b4bc983917ea8402f73c726b46e36f3de0b4"
SOURCE_URI_5="https://github.com/hrydgard/ppsspp-lang/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="2e8a96867471a1e169176e561b06670d5aa460d49a2b074d84ae6378e91f6ef9"
CHECKSUM_SHA256_5="b6e9fe4a7daa2dd8d4f3cc74cbafc5382f7df90303af3a3c18d25ec4492d8899"
SOURCE_FILENAME_5="ppsspp-lang-$srcGitRev_5.tar.gz"
SOURCE_DIR_5="ppsspp-lang-$srcGitRev_5"
PATCHES="ppsspp-$portVersion.patchset"
@@ -49,6 +49,7 @@ REQUIRES="
lib:libglew$secondaryArchSuffix
lib:libGLU$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libminiupnpc$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libSDL2_2.0$secondaryArchSuffix
lib:libSDL2_image_2.0$secondaryArchSuffix
@@ -66,6 +67,7 @@ BUILD_REQUIRES="
devel:libglew$secondaryArchSuffix >= 2.2
devel:libGLU$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:libminiupnpc$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libSDL2_2.0$secondaryArchSuffix
devel:libSDL2_image_2.0$secondaryArchSuffix
@@ -77,8 +79,8 @@ BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
@@ -94,6 +96,12 @@ BUILD()
cd build
cmake .. \
-DUSE_SYSTEM_FFMPEG=ON \
-DUSE_SYSTEM_SNAPPY=ON \
-DUSE_SYSTEM_LIBZIP=ON \
-DUSE_MINIUPNPC=ON \
-DUSE_DISCORD=OFF \
-DFFMPEG_DIR=/system/develop \
-DCMAKE_C_FLAGS="-D_BSD_SOURCE" \
-DCMAKE_CXX_FLAGS="-D_BSD_SOURCE"
make $jobArgs