guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 8b1b192359409bcda2de4c8445e7a96d13e8f134
Author: Ada Stevenson <[email protected]>
AuthorDate: Tue Aug 5 14:52:15 2025 +0800
gnu: pcsxr: Update to 1.9.94-1.6666043.
* gnu/packages/emulators.scm (pcsxr): Update to 1.9.94-1.6666043.
[configure-flags]: Prevent compile errors.
[phases]: Remove 'ch-subdir.
[source]<origin>: Change upstream and commit.
<patches>: Add patches.
[home-page]: Change from dead link to active GitHub page.
* gnu/packages/patches/pcsxr-find-harfbuzz.patch: Add it.
* gnu/packages/patches/pcsxr-fix-definitions.patch: Add it.
* gnu/local.mk: Register them.
Change-Id: I5ebc91b3fa44152057cf197c0ab018fa064241a4
---
gnu/local.mk | 2 +
gnu/packages/emulators.scm | 23 ++--
gnu/packages/patches/pcsxr-find-harfbuzz.patch | 21 ++++
gnu/packages/patches/pcsxr-fix-definitions.patch | 137 +++++++++++++++++++++++
4 files changed, 172 insertions(+), 11 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 7aa3f046a7..bd568cc095 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2036,6 +2036,8 @@ dist_patch_DATA =
\
%D%/packages/patches/pango-skip-libthai-test.patch \
%D%/packages/patches/password-store-tree-compat.patch \
%D%/packages/patches/pciutils-hurd64.patch \
+ %D%/packages/patches/pcsxr-find-harfbuzz.patch \
+ %D%/packages/patches/pcsxr-fix-definitions.patch \
%D%/packages/patches/pdl-2.019-glut-bitmap-fonts.patch \
%D%/packages/patches/pdl-2.100-reproducibility.patch \
%D%/packages/patches/petri-foo-0.1.87-fix-recent-file-not-exist.patch
\
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 130b2e0877..72738e7d4f 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -3571,20 +3571,22 @@ assembler, and debugger for the Intel 8085
microprocessor.
(define-public pcsxr
;; No release since 2017.
- (let ((commit "6484236cb0281e8040ff6c8078c87899a3407534"))
+ (let ((commit "666604321bf2d3dd5e5f58b534cfce41e72ad7d1")
+ (revision "1"))
(package
(name "pcsxr")
- ;; Version is tagged here: https://github.com/frealgagu/PCSX-Reloaded
- (version "1.9.95")
+ ;; From CMakeLists.txt.
+ (version (git-version "1.9.94" revision commit))
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/pcsxr/PCSX-Reloaded")
- (commit commit)))
+ (url "https://github.com/MaddTheSane/PCSX-Reloaded")
+ (commit commit)))
+ (patches (search-patches "pcsxr-find-harfbuzz.patch"
+ "pcsxr-fix-definitions.patch"))
(sha256
- (base32
- "138mayp7zi9v4l3lm5f6xxkds619w1fgg769zm8s45c84jbz7dza"))
+ (base32 "0lcypcawnipm02m3wnjsrm9r10llabncx78ramk7iw03a646dngj"))
(file-name (git-file-name name commit))))
(build-system cmake-build-system)
(arguments
@@ -3593,11 +3595,10 @@ assembler, and debugger for the Intel 8085
microprocessor.
(list "-DSND_BACKEND=pulse"
"-DENABLE_CCDDA='ON'"
"-DUSE_LIBARCHIVE='ON'"
- "-DUSE_LIBCDIO='ON'")
+ "-DUSE_LIBCDIO='ON'"
+ "-DCMAKE_C_FLAGS=-Wno-incompatible-pointer-types")
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'cd-subdir
- (lambda _ (chdir "pcsxr") #t))
(add-before 'configure 'fix-cdio-lookup
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "cmake/FindCdio.cmake"
@@ -3623,7 +3624,7 @@ assembler, and debugger for the Intel 8085 microprocessor.
libxv
libarchive
pulseaudio))
- (home-page "https://archive.codeplex.com/?p=pcsxr")
+ (home-page "https://github.com/MaddTheSane/PCSX-Reloaded")
(synopsis "PlayStation emulator")
(description
"A PlayStation emulator based on PCSX-df Project with bugfixes and
diff --git a/gnu/packages/patches/pcsxr-find-harfbuzz.patch
b/gnu/packages/patches/pcsxr-find-harfbuzz.patch
new file mode 100644
index 0000000000..69932d719e
--- /dev/null
+++ b/gnu/packages/patches/pcsxr-find-harfbuzz.patch
@@ -0,0 +1,21 @@
+The .cmake files this project includes don't play well with harfbuzz's
internal .cmake file.
+This patch works around the issues present in the project's CMake
configuration.
+
+diff --git a/cmake/FindPango.cmake b/cmake/FindPango.cmake
+index 2a7da99d..c08fbaab 100644
+--- a/cmake/FindPango.cmake
++++ b/cmake/FindPango.cmake
+@@ -74,6 +74,13 @@ foreach(pango_dep ${Pango_DEPS})
+ set_property (TARGET "${Pango}" APPEND PROPERTY INTERFACE_LINK_LIBRARIES
"${${pango_dep}}")
+ endforeach(pango_dep)
+
++if(NOT HARFBUZZ_INCLUDE_DIR)
++find_package(harfbuzz)
++endif()
++
++list(APPEND Pango_INCLUDE_DIRS ${HARFBUZZ_INCLUDE_DIR})
++set_property (TARGET "${Pango}" APPEND PROPERTY INTERFACE_LINK_LIBRARIES
"harfbuzz::harfbuzz")
++
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(Pango
+ REQUIRED_VARS
diff --git a/gnu/packages/patches/pcsxr-fix-definitions.patch
b/gnu/packages/patches/pcsxr-fix-definitions.patch
new file mode 100644
index 0000000000..8ec389ec09
--- /dev/null
+++ b/gnu/packages/patches/pcsxr-fix-definitions.patch
@@ -0,0 +1,137 @@
+There are a lot of global variable definitions that aren't valid on modern
compilers. According to upstream's Dockerfile,
+this project is meant to compile with GCC 6! So there are some declarations
that need to be changed.
+
+diff --git a/gui/Linux.h b/gui/Linux.h
+index 2a939050..99404d93 100644
+--- a/gui/Linux.h
++++ b/gui/Linux.h
+@@ -44,8 +44,8 @@
+
+ extern gboolean UseGui;
+ extern int StatesC;
+-char cfgfile[MAXPATHLEN]; /* ADB Comment this out - make a local var, or
at least use gchar funcs */
+-char cfgfile_basename[MAXPATHLEN]; /* ADB Comment this out - make a local
var, or at least use gchar funcs */
++extern char cfgfile[MAXPATHLEN]; /* ADB Comment this out - make a local
var, or at least use gchar funcs */
++extern char cfgfile_basename[MAXPATHLEN]; /* ADB Comment this out - make
a local var, or at least use gchar funcs */
+
+ int LoadConfig();
+ void SaveConfig();
+diff --git a/gui/LnxMain.c b/gui/LnxMain.c
+index d6dd9316..02002bc1 100644
+--- a/gui/LnxMain.c
++++ b/gui/LnxMain.c
+@@ -49,6 +49,9 @@ enum {
+
+ gboolean UseGui = TRUE;
+
++char cfgfile[MAXPATHLEN] = {0};
++char cfgfile_basename[MAXPATHLEN] = {0};
++
+ static void CreateMemcard(char *filename, char *conf_mcd) {
+ gchar *mcd;
+ struct stat buf;
+diff --git a/plugins/bladesio1/sio1.c b/plugins/bladesio1/sio1.c
+index 17ac4b65..c6fd585a 100644
+--- a/plugins/bladesio1/sio1.c
++++ b/plugins/bladesio1/sio1.c
+@@ -55,8 +55,6 @@ static const unsigned char build = 1;
+
+ static void (CALLBACK *irqCallback)(void) = 0;
+
+-Settings settings;
+-
+ /* sio status flags.
+ */
+ enum {
+diff --git a/plugins/dfinput/pad.h b/plugins/dfinput/pad.h
+index 8337fe7e..6d44851d 100644
+--- a/plugins/dfinput/pad.h
++++ b/plugins/dfinput/pad.h
+@@ -151,7 +151,7 @@ typedef struct tagKeyDef {
+ enum { ANALOG_XP = 0, ANALOG_XM, ANALOG_YP, ANALOG_YM };
+
+ #if SDL_VERSION_ATLEAST(2,0,0)
+-SDL_GameControllerButton controllerMap[DKEY_TOTAL];
++extern SDL_GameControllerButton controllerMap[DKEY_TOTAL];
+ #endif
+
+ typedef struct tagPadDef {
+diff --git a/plugins/dfnet/cfg.c b/plugins/dfnet/cfg.c
+index 921efbe3..1057426a 100644
+--- a/plugins/dfnet/cfg.c
++++ b/plugins/dfnet/cfg.c
+@@ -11,6 +11,8 @@
+
+ #include "dfnet.h"
+
++Config conf;
++
+ #define CFG_FILENAME "dfnet.cfg"
+
+ void SaveConf() {
+diff --git a/plugins/dfnet/dfnet.c b/plugins/dfnet/dfnet.c
+index 6c6ec5f9..ddc92169 100644
+--- a/plugins/dfnet/dfnet.c
++++ b/plugins/dfnet/dfnet.c
+@@ -24,6 +24,9 @@ const unsigned char build = 3; // increase that with
each version
+
+ static char *libraryName = N_("Socket Driver");
+
++fd_set rset;
++fd_set wset;
++
+ unsigned long CALLBACK PSEgetLibType(void) {
+ return PSE_LT_NET;
+ }
+diff --git a/plugins/dfnet/dfnet.h b/plugins/dfnet/dfnet.h
+index 937814f5..e2699ad3 100644
+--- a/plugins/dfnet/dfnet.h
++++ b/plugins/dfnet/dfnet.h
+@@ -56,7 +56,7 @@ __private_extern char* PLUGLOC(char* toloc);
+
+ typedef void* HWND;
+
+-struct timeval tm;
++extern struct timeval tm;
+
+ #define CALLBACK
+
+@@ -70,24 +70,24 @@ typedef struct {
+ char ipAddress[32];
+ } Config;
+
+-Config conf;
++extern Config conf;
+
+ void LoadConf(void);
+ void SaveConf(void);
+
+-int sock;
+-char *PadSendData;
+-char *PadRecvData;
+-char PadSendSize;
+-char PadRecvSize;
+-char PadSize[2];
+-int PadCount;
+-int PadCountMax;
+-int PadInit;
+-int Ping;
+-volatile int WaitCancel;
+-fd_set rset;
+-fd_set wset;
++extern int sock;
++extern char *PadSendData;
++extern char *PadRecvData;
++extern char PadSendSize;
++extern char PadRecvSize;
++extern char PadSize[2];
++extern int PadCount;
++extern int PadCountMax;
++extern int PadInit;
++extern int Ping;
++extern volatile int WaitCancel;
++extern fd_set rset;
++extern fd_set wset;
+
+ long sockInit(void);
+ long sockShutdown(void);