Friday, June 23, 2023

Re: UPDATE: ppsspp

On Sun, Jun 18, 2023 at 10:27:37PM -0400, Brad Smith wrote:
> On Sun, Jun 18, 2023 at 08:09:58PM -0400, Brad Smith wrote:
> > Some tweaking and tuning of the ppsspp port.
> >
> > - Remove use of DIST_SUBDIR now that the port uses a single archive instead of pulling
> > a bunch of different pieces together.
> > - Use a system copy of zstd.
> > - Further improvements to the header path handling. Don't do anything port specific and
> > just use the pkg-config file paths.
> >
> > Looking at upstream I noted a few things. There appears to be RISC-V support. Big endian
> > support seems to be fixed. There was a build issue with Mips that was fixed. and it looks
> > like the FakeJit support was also fixed.
> >
> > So, testing on riscv64 and powerpc/powerpc64 welcome.
>
> An updated diff. Upstream merged my CMake bits.

One more rev. I'm going to leave the BE support disabled for now. I haven't had any feedback.

But the rest I am Ok with.


Index: Makefile
===================================================================
RCS file: /home/cvs/ports/emulators/ppsspp/Makefile,v
retrieving revision 1.21
diff -u -p -u -p -r1.21 Makefile
--- Makefile 18 Jun 2023 21:14:58 -0000 1.21
+++ Makefile 24 Jun 2023 02:28:45 -0000
@@ -1,57 +1,49 @@
# See https://github.com/hrydgard/ppsspp/issues/8823
NOT_FOR_ARCHS = ${BE_ARCHS}

-# FakeJit fallback broken in (at least) 1.10.3
-# ppsspp-1.10.3/Core/MIPS/JitCommon/JitCommon.cpp:75:10: error: cannot initialize return object of type 'MIPSComp::JitInterface *' with an rvalue of type 'MIPSComp::FakeJit *'
-PPSSPP_JIT_ARCHS = aarch64 amd64 arm i386
-ONLY_FOR_ARCHS = ${PPSSPP_JIT_ARCHS}
+COMMENT = Sony PlayStation Portable emulator

V = 1.15.4
DISTNAME = ppsspp-$V
-
-COMMENT = Sony PlayStation Portable emulator
-
-EXTRACT_SUFX = .tar.xz
-
-MASTER_SITES = https://github.com/hrydgard/ppsspp/releases/download/v$V/
-
+REVISION = 0
CATEGORIES = emulators
+MASTER_SITES = https://github.com/hrydgard/ppsspp/releases/download/v$V/
+EXTRACT_SUFX = .tar.xz

HOMEPAGE = https://www.ppsspp.org/

# GPLv2+
PERMIT_PACKAGE = Yes

-DIST_SUBDIR = ppsspp
-
-WANTLIB += ${COMPILER_LIBCXX}
-WANTLIB += GL GLEW GLU SDL2 avcodec avformat avutil c m png snappy
-WANTLIB += swresample swscale z zip
+WANTLIB += ${COMPILER_LIBCXX} GL GLEW GLU ICE SDL2 SM X11 Xext
+WANTLIB += avcodec avformat avutil c m png snappy swresample swscale
+WANTLIB += z zip zstd

MODULES = devel/cmake \
lang/python
MODPY_RUNDEP = No

-LIB_DEPENDS = archivers/snappy \
- archivers/libzip \
+LIB_DEPENDS = archivers/libzip \
+ archivers/snappy \
+ archivers/zstd \
devel/sdl2 \
graphics/ffmpeg \
graphics/glew \
graphics/png
+
COMPILER = base-clang ports-gcc

CONFIGURE_ARGS = -DUSE_SYSTEM_FFMPEG=ON \
-DUSE_SYSTEM_LIBZIP=ON \
-DUSE_SYSTEM_SNAPPY=ON \
+ -DUSE_SYSTEM_ZSTD=ON \
-DUSE_DISCORD=OFF \
-DUSING_EGL=OFF

-CXXFLAGS += -I${X11BASE}/include
-
NO_TEST = Yes

pre-configure:
- ${SUBST_CMD} ${WRKSRC}/CMakeLists.txt ${WRKSRC}/UI/NativeApp.cpp
+ ${SUBST_CMD} ${WRKSRC}/UI/NativeApp.cpp

do-install:
${INSTALL_PROGRAM} ${WRKBUILD}/PPSSPPSDL ${PREFIX}/bin
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/emulators/ppsspp/distinfo,v
retrieving revision 1.11
diff -u -p -u -p -r1.11 distinfo
--- distinfo 18 Jun 2023 21:14:58 -0000 1.11
+++ distinfo 18 Jun 2023 21:46:55 -0000
@@ -1,2 +1,2 @@
-SHA256 (ppsspp/ppsspp-1.15.4.tar.xz) = ogvSe0zagR1s0hgvv80W9wktal0H/LvQDMcjBTC99ow=
-SIZE (ppsspp/ppsspp-1.15.4.tar.xz) = 51947468
+SHA256 (ppsspp-1.15.4.tar.xz) = ogvSe0zagR1s0hgvv80W9wktal0H/LvQDMcjBTC99ow=
+SIZE (ppsspp-1.15.4.tar.xz) = 51947468
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /home/cvs/ports/emulators/ppsspp/patches/patch-CMakeLists_txt,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 18 Jun 2023 21:14:58 -0000 1.10
+++ patches/patch-CMakeLists_txt 19 Jun 2023 02:20:56 -0000
@@ -1,24 +1,26 @@
-- Fix building on OpenBSD
- 94aed7a1011ef48e6524fb16bfb7dfb025dc0746
+- CMake: Include X11 Xlib header path
+ 5acbc4af78c9129c4cf2bfcd1305e8cfa2f2a10f
+- Fix building on OpenBSD
+ 94aed7a1011ef48e6524fb16bfb7dfb025dc0746
+- CMake: Include system libzip header path
+ 089a700d3e92a38060a186c5fcc0b089c4d1a59d

-- Fix includes
- Honor CFLAGS and DEBUG
- Use system libpng on arm platforms

Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
-@@ -258,6 +258,9 @@ if(MACOSX AND NOT IOS)
- endif()
- endif()
-
-+include_directories(${X11BASE}/include)
-+include_directories(${LOCALBASE}/lib/libzip/include)
-+
- include(FindThreads)
-
- if(APPLE)
-@@ -358,13 +361,13 @@ if(NOT MSVC)
+@@ -174,6 +174,8 @@ option(USE_UBSAN "Use undefined behaviour sanitizer" O
+ if(UNIX AND NOT (APPLE OR ANDROID) AND VULKAN)
+ if(USING_X11_VULKAN)
+ message("Using X11 for Vulkan")
++ find_package(X11)
++ include_directories(${X11_Xlib_INCLUDE_PATH})
+ add_definitions(-DVK_USE_PLATFORM_XLIB_KHR)
+ else()
+ message("NOT using X11 for Vulkan")
+@@ -358,13 +360,13 @@ if(NOT MSVC)
endif()
endif()

@@ -36,7 +38,7 @@ Index: CMakeLists.txt
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O2 -g -D_NDEBUG")

# Enable checking printf-like format strings (also works for logging functions)
-@@ -404,7 +407,7 @@ if(NOT MSVC)
+@@ -404,7 +406,7 @@ if(NOT MSVC)
add_definitions(-Wno-psabi)
endif()
add_definitions(-D_XOPEN_SOURCE=700)
@@ -45,15 +47,15 @@ Index: CMakeLists.txt
add_definitions(-D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64)
elseif(ANDROID)
add_definitions(-fsigned-char)
-@@ -933,6 +936,7 @@ endif()
+@@ -932,6 +934,7 @@ endif()
+
find_package(LIBZIP)
if(LIBZIP_FOUND AND USE_SYSTEM_LIBZIP)
- add_definitions(-DSHARED_LIBZIP)
+ include_directories(${LIBZIP_INCLUDE_DIRS})
+ add_definitions(-DSHARED_LIBZIP)
else()
add_library(libzip STATIC
- ext/libzip/zip_add.c
-@@ -1070,7 +1074,7 @@ else()
+@@ -1070,7 +1073,7 @@ else()
endif()

# Arm platforms require at least libpng17.

No comments:

Post a Comment