aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2021-01-21 14:35:45 +0100
committerRobby Workman <rworkman@slackbuilds.org>2021-04-17 23:58:06 -0500
commit52428c230afb0ad55ab0a5e53f74b69f2a33e8a6 (patch)
tree7e704b9a793cf83c8e92573585fc1f693071b79d /system
parent07a7a7a3efed2f5e14e19760a8a609af8a400f87 (diff)
system/spacefm: Patch for glibc >= 2.28 and gcc >= 10.x.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/spacefm/gcc10.patch92
-rw-r--r--system/spacefm/glibc-2.28.patch12
-rw-r--r--system/spacefm/spacefm.SlackBuild5
3 files changed, 109 insertions, 0 deletions
diff --git a/system/spacefm/gcc10.patch b/system/spacefm/gcc10.patch
new file mode 100644
index 000000000000..1e8c1e52d7bc
--- /dev/null
+++ b/system/spacefm/gcc10.patch
@@ -0,0 +1,92 @@
+https://github.com/IgnorantGuru/spacefm/issues/770
+
+diff --git a/src/settings.c b/src/settings.c
+index 280196f..9d8e880 100644
+--- a/src/settings.c
++++ b/src/settings.c
+@@ -52,6 +52,24 @@
+ /* Dirty hack: check whether we are under LXDE or not */
+ #define is_under_LXDE() (g_getenv( "_LXSESSION_PID" ) != NULL)
+
++/* GCC 10.1+ */
++char* settings_terminal_su = NULL;
++char* settings_graphical_su = NULL;
++GList* xset_cmd_history = NULL;
++XSet* evt_win_focus = NULL;
++XSet* evt_win_move = NULL;
++XSet* evt_win_click = NULL;
++XSet* evt_win_key = NULL;
++XSet* evt_win_close = NULL;
++XSet* evt_pnl_show = NULL;
++XSet* evt_pnl_focus = NULL;
++XSet* evt_pnl_sel = NULL;
++XSet* evt_tab_new = NULL;
++XSet* evt_tab_chdir = NULL;
++XSet* evt_tab_focus = NULL;
++XSet* evt_tab_close = NULL;
++XSet* evt_device = NULL;
++
+ AppSettings app_settings = {0};
+ /* const gboolean singleInstance_default = TRUE; */
+ const gboolean show_hidden_files_default = FALSE;
+diff --git a/src/settings.h b/src/settings.h
+index 07419b8..4591d48 100644
+--- a/src/settings.h
++++ b/src/settings.h
+@@ -130,7 +130,7 @@ const char* xset_get_user_tmp_dir();
+ ///////////////////////////////////////////////////////////////////////////////
+ //MOD extra settings below
+
+-GList* xsets;
++extern GList* xsets;
+
+ enum {
+ XSET_B_UNSET,
+@@ -333,22 +333,22 @@ typedef struct
+ } XMenuItem;
+
+ // cache these for speed in event handlers
+-XSet* evt_win_focus;
+-XSet* evt_win_move;
+-XSet* evt_win_click;
+-XSet* evt_win_key;
+-XSet* evt_win_close;
+-XSet* evt_pnl_show;
+-XSet* evt_pnl_focus;
+-XSet* evt_pnl_sel;
+-XSet* evt_tab_new;
+-XSet* evt_tab_chdir;
+-XSet* evt_tab_focus;
+-XSet* evt_tab_close;
+-XSet* evt_device;
++extern XSet* evt_win_focus;
++extern XSet* evt_win_move;
++extern XSet* evt_win_click;
++extern XSet* evt_win_key;
++extern XSet* evt_win_close;
++extern XSet* evt_pnl_show;
++extern XSet* evt_pnl_focus;
++extern XSet* evt_pnl_sel;
++extern XSet* evt_tab_new;
++extern XSet* evt_tab_chdir;
++extern XSet* evt_tab_focus;
++extern XSet* evt_tab_close;
++extern XSet* evt_device;
+
+ // instance-wide command history
+-GList* xset_cmd_history;
++extern GList* xset_cmd_history;
+
+ static const char* terminal_programs[] = //for pref-dialog.c
+ {
+@@ -396,8 +396,8 @@ static const char* gsu_commands[] = // order and contents must match prefdlg.ui
+ };
+
+ // These will contain the su and gsu settings from /etc/spacefm/spacefm.conf
+-char* settings_terminal_su;
+-char* settings_graphical_su;
++extern char* settings_terminal_su;
++extern char* settings_graphical_su;
+
+ typedef struct
+ {
diff --git a/system/spacefm/glibc-2.28.patch b/system/spacefm/glibc-2.28.patch
new file mode 100644
index 000000000000..324bc43b9353
--- /dev/null
+++ b/system/spacefm/glibc-2.28.patch
@@ -0,0 +1,12 @@
+diff --git a/src/main.c b/src/main.c
+index 645e2ec..9453a3b 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -23,6 +23,7 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
++#include <sys/sysmacros.h>
+
+ #include <signal.h>
+
diff --git a/system/spacefm/spacefm.SlackBuild b/system/spacefm/spacefm.SlackBuild
index c8a93b7eaa4e..3254423cf58e 100644
--- a/system/spacefm/spacefm.SlackBuild
+++ b/system/spacefm/spacefm.SlackBuild
@@ -81,6 +81,11 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# https://github.com/IgnorantGuru/spacefm/issues/727
+patch -p1 < $CWD/glibc-2.28.patch
+# https://github.com/IgnorantGuru/spacefm/issues/770
+patch -p1 < $CWD/gcc10.patch
+
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \