$ git show --format=fuller --patch-with-stat --summary 3a147ed2ef07a9a4aa2af94fca633c498e8da6e2
commit 3a147ed2ef07a9a4aa2af94fca633c498e8da6e2
Author: mandian <mandian@users.noreply.github.com>
AuthorDate: Tue Apr 11 13:52:34 2023 +0100
Commit: mandian <mandian@users.noreply.github.com>
CommitDate: Tue Apr 11 13:52:34 2023 +0100
fix build
---
.abf.yml | 2 +-
spacefm-1.0.5-force-x11-backend.patch | 12 ++++
spacefm-1.0.6-fix_link.patch | 110 ++++++++++++++++++++++++++++++++++
spacefm-sysmacros.patch | 4 +-
spacefm.spec | 51 +++++++++-------
5 files changed, 155 insertions(+), 24 deletions(-)
create mode 100644 spacefm-1.0.5-force-x11-backend.patch
create mode 100644 spacefm-1.0.6-fix_link.patch
diff --git a/.abf.yml b/.abf.yml
index 4d20226..b585c30 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,2 @@
sources:
- "spacefm-1.0.6.tar.gz": 88b6d4570f2be008c669e667d07ef82c3cf9802e
+ spacefm-1.0.6.tar.gz: 88b6d4570f2be008c669e667d07ef82c3cf9802e
diff --git a/spacefm-1.0.5-force-x11-backend.patch b/spacefm-1.0.5-force-x11-backend.patch
new file mode 100644
index 0000000..d8a9751
--- /dev/null
+++ b/spacefm-1.0.5-force-x11-backend.patch
@@ -0,0 +1,12 @@
+--- spacefm-1.0.5/src/main.c.x11 2016-01-20 22:22:23.000000000 +0900
++++ spacefm-1.0.5/src/main.c 2017-04-04 18:27:28.487452290 +0900
+@@ -1327,6 +1327,9 @@
+ bind_textdomain_codeset ( GETTEXT_PACKAGE, "UTF-8" );
+ textdomain ( GETTEXT_PACKAGE );
+ #endif
++#if GTK_CHECK_VERSION(3,10,0)
++ gdk_set_allowed_backends ("x11");
++#endif
+
+ // load spacefm.conf
+ load_conf();
diff --git a/spacefm-1.0.6-fix_link.patch b/spacefm-1.0.6-fix_link.patch
new file mode 100644
index 0000000..075b318
--- /dev/null
+++ b/spacefm-1.0.6-fix_link.patch
@@ -0,0 +1,110 @@
+From 169338091100045316f5cb5ad22c4af748efdd2f Mon Sep 17 00:00:00 2001
+From: CartoonFan <jeremiahwilson777@gmail.com>
+Date: Thu, 11 Jun 2020 13:40:39 -0700
+Subject: [PATCH] Update settings.h
+
+---
+ src/settings.h | 34 +++++++++++++++++-----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/src/settings.h b/src/settings.h
+index e25bdc328..e608ebfe5 100644
+--- a/src/settings.h
++++ b/src/settings.h
+@@ -120,7 +120,7 @@ const char* xset_get_user_tmp_dir();
+ ///////////////////////////////////////////////////////////////////////////////
+ //MOD extra settings below
+
+-GList* xsets;
++extern GList* xsets;
+
+ enum {
+ XSET_B_UNSET,
+@@ -311,22 +311,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
+ {
+@@ -374,8 +374,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
+ {
+From 581d54035d3b1f35a77afdd1c3be92a7acfc6b90 Mon Sep 17 00:00:00 2001
+From: CartoonFan <jeremiahwilson777@gmail.com>
+Date: Thu, 11 Jun 2020 13:22:29 -0700
+Subject: [PATCH] Fix compilation with GCC 10.1+
+
+Patch settings.c with @vp1981's changes
+---
+ src/settings.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/src/settings.c b/src/settings.c
+index b8687a23b..28f9ce0b8 100644
+--- a/src/settings.c
++++ b/src/settings.c
+@@ -52,6 +52,25 @@
+ /* 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/spacefm-sysmacros.patch b/spacefm-sysmacros.patch
index e85c238..b15f9b1 100644
--- a/spacefm-sysmacros.patch
+++ b/spacefm-sysmacros.patch
@@ -1,7 +1,7 @@
Index: src/main.c
===================================================================
---- src/main.c
-+++ src/main.c 2019-03-19 18:33:53.945274989 +0100
+--- a/src/main.c
++++ b/src/main.c 2019-03-19 18:33:53.945274989 +0100
@@ -23,6 +23,7 @@
#include <sys/types.h>
#include <sys/socket.h>
diff --git a/spacefm.spec b/spacefm.spec
index 9186dc2..f68fc1a 100644
--- a/spacefm.spec
+++ b/spacefm.spec
@@ -1,21 +1,28 @@
Summary: A multi-panel tabbed file manager
Name: spacefm
Version: 1.0.6
-Release: 1
+Release: 2
License: GPLv3+
Group: File tools
-Url: http://ignorantguru.github.com/spacefm/
-Source0: http://download.sourceforge.net/spacefm/%{name}-%{version}.tar.gz
-Patch0: spacefm-sysmacros.patch
+Url: https://ignorantguru.github.io/spacefm/
+Source0: https://github.com/IgnorantGuru/spacefm/archive/%{version}/%{name}-%{version}.tar.gz
+Patch0: spacefm-sysmacros.patch
+# (upstream) https://github.com/IgnorantGuru/spacefm/pull/772
+Patch1: spacefm-1.0.6-fix_link.patch
+#Patch1: https://github.com/IgnorantGuru/spacefm/pull/772/commits/581d54035d3b1f35a77afdd1c3be92a7acfc6b90.patch
+#Patch2: https://github.com/IgnorantGuru/spacefm/commit/169338091100045316f5cb5ad22c4af748efdd2f.patch
+# (fedora)
+Patch4: spacefm-1.0.5-force-x11-backend.patch
+
BuildRequires: intltool
-# It's possible to build with GTK2 as well
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(libstartup-notification-1.0)
BuildRequires: pkgconfig(libudev)
-BuildRequires: pkgconfig(libffmpegthumbnailer)
+BuildRequires: pkgconfig(libffmpegthumbnailer)
+BuildRequires: pkgconfig(x11)
# To perform 'run as root' functions
-Requires: gksu
+#Requires: gksu
# Eject media
Requires: util-linux
# For device processes
@@ -29,13 +36,25 @@ Requires: wget
SpaceFM is a multi-panel tabbed file manager with built-in VFS, udev-based
device manager, customizable menu system, and bash integration.
+%files -f %{name}.lang
+%doc data/spacefm-manual-en.html
+%{_bindir}/%{name}*
+%dir %{_sysconfdir}/%{name}/
+%{_sysconfdir}/spacefm/spacefm.conf
+%{_datadir}/%{name}/
+%{_datadir}/applications/*.desktop
+%{_datadir}/mime/packages/spacefm-mime.xml
+%{_iconsdir}/hicolor/*/apps/%{name}*.png
+%{_iconsdir}/Faenza/apps/*/spacefm*.png
+
+#-----------------------------------------------------------------------
+
%prep
-%setup -q
-%autopatch -p0
+%autosetup -p1
%build
-autoreconf -vfi
-%configure2_5x --with-gtk3
+#autoreconf -fiv
+%configure --with-gtk3
%make_build
%install
@@ -49,13 +68,3 @@ rm -rf %{buildroot}%{_defaultdocdir}
%find_lang %{name}
-%files -f %{name}.lang
-%doc data/spacefm-manual-en.html
-%{_bindir}/%{name}*
-%dir %{_sysconfdir}/%{name}/
-%{_sysconfdir}/spacefm/spacefm.conf
-%{_datadir}/%{name}/
-%{_datadir}/applications/*.desktop
-%{_datadir}/mime/packages/spacefm-mime.xml
-%{_iconsdir}/hicolor/*/apps/%{name}*.png
-%{_iconsdir}/Faenza/apps/*/spacefm*.png