summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/pcsxr-find-harfbuzz.patch21
-rw-r--r--gnu/packages/patches/pcsxr-fix-definitions.patch137
2 files changed, 158 insertions, 0 deletions
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);