* [gentoo-commits] repo/gentoo:master commit in: x11-misc/spacefm/, x11-misc/spacefm/files/
@ 2023-05-09 17:51 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-05-09 17:51 UTC (permalink / raw
To: gentoo-commits
commit: b31f46d29ecff5e3fea842985631f37448a60284
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun May 7 14:39:12 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 9 17:50:53 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b31f46d2
x11-misc/spacefm: fix bad substitutions with dash
Also update EAPI 7 -> 8.
Closes: https://bugs.gentoo.org/891181
Upstream-PR: https://github.com/IgnorantGuru/spacefm/pull/813
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
x11-misc/spacefm/files/spacefm-dash.patch | 47 +++++++++++++++++++
x11-misc/spacefm/spacefm-1.0.6-r2.ebuild | 76 +++++++++++++++++++++++++++++++
2 files changed, 123 insertions(+)
diff --git a/x11-misc/spacefm/files/spacefm-dash.patch b/x11-misc/spacefm/files/spacefm-dash.patch
new file mode 100644
index 000000000000..7b99fee4c320
--- /dev/null
+++ b/x11-misc/spacefm/files/spacefm-dash.patch
@@ -0,0 +1,47 @@
+https://github.com/IgnorantGuru/spacefm/pull/813
+
+From 30fc0024a8f023277537db1e168294c21ca3b9b0 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Sun, 7 May 2023 07:31:56 -0700
+Subject: [PATCH] configure.ac: fix bad substitutions with dash
+
+Uses POSIX compatible substitutions that is not specific to bash.
+
+Gentoo-Issue: https://bugs.gentoo.org/891181
+---
+ configure.ac | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 035da60e2..ec080e03f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -40,11 +40,11 @@ bash_path="$withval"
+ # bash v4. SpaceFM runs bash as root and you WILL open root exploits if you
+ # disable this check, or run bash based on $PATH.
+ if test ! -z "$bash_path"; then
+- if test ! "${bash_path:0:1}" = "/"; then
++ if test "${bash_path%"${bash_path#?}"}" != "/"; then
+ AC_MSG_ERROR([Fatal Error: Option --with-bash-path requires absolute path.])
+ fi
+ echo "Modifying spacefm-auth to use bash path..."
+- bash_esc="${bash_path//\//\\/}"
++ bash_esc="$(printf %s "$bash_path" | sed "s|/|\\\/|g")"
+ sed "s/\(\/bin\/bash\)/$bash_esc/" src/spacefm-auth.bash > src/spacefm-auth
+ else
+ cp -pf src/spacefm-auth.bash src/spacefm-auth
+@@ -308,12 +308,12 @@ data/Makefile
+ ])
+
+ resolve_datadir="$(eval echo "$datadir")"
+-while [[ "${resolve_datadir:0:1}" == "$" ]]; do
++while test "${resolve_datadir%"${resolve_datadir#?}"}" = "\$"; do
+ resolve_datadir="$(eval echo "$resolve_datadir")"
+ done
+
+ resolve_htmldir="$(eval echo "$htmldir")"
+-while [[ "${resolve_htmldir:0:1}" == "$" ]]; do
++while test "${resolve_htmldir%"${resolve_htmldir#?}"}" = "\$"; do
+ resolve_htmldir="$(eval echo "$resolve_htmldir")"
+ done
+
diff --git a/x11-misc/spacefm/spacefm-1.0.6-r2.ebuild b/x11-misc/spacefm/spacefm-1.0.6-r2.ebuild
new file mode 100644
index 000000000000..75f2ba9b252c
--- /dev/null
+++ b/x11-misc/spacefm/spacefm-1.0.6-r2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools linux-info optfeature xdg
+
+DESCRIPTION="A multi-panel tabbed file manager"
+HOMEPAGE="https://ignorantguru.github.io/spacefm/"
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/IgnorantGuru/${PN}.git"
+ EGIT_BRANCH="next"
+ inherit git-r3
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="https://github.com/IgnorantGuru/spacefm/archive/${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+IUSE="+startup-notification +video-thumbnails"
+
+RDEPEND="dev-libs/glib:2
+ dev-util/desktop-file-utils
+ virtual/udev
+ virtual/freedesktop-icon-theme
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf
+ x11-libs/gtk+:3
+ x11-libs/pango
+ x11-libs/libX11
+ x11-misc/shared-mime-info
+ startup-notification? ( x11-libs/startup-notification )
+ video-thumbnails? ( media-video/ffmpegthumbnailer )"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-9999-include-sysmacros.patch
+ "${FILESDIR}"/${PN}-fno-common.patch
+ "${FILESDIR}"/${PN}-dash.patch #891181
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable startup-notification) \
+ $(use_enable video-thumbnails) \
+ --disable-hal \
+ --enable-inotify \
+ --disable-pixmaps \
+ --with-gtk3
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ optfeature "mounting as non-root user" sys-apps/udevil sys-apps/pmount sys-fs/udisks
+ optfeature "supporting ftp/nfs/smb/ssh URLs in the path bar" sys-apps/udevil
+ optfeature "performing as root" x11-misc/ktsuss kde-plasma/kde-cli-tools[kdesu]
+ # sys-apps/util-linux is required for eject
+ optfeature "other optional dependencies" sys-apps/dbus sys-process/lsof sys-apps/util-linux
+
+ if ! has_version 'sys-fs/udisks' ; then
+ elog "When using SpaceFM without udisks, and without the udisks-daemon running,"
+ elog "you may need to enable kernel polling for device media changes to be detected."
+ elog "See /usr/share/doc/${PF}/html/spacefm-manual-en.html#devices-kernpoll"
+ fi
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-misc/spacefm/, x11-misc/spacefm/files/
@ 2024-06-02 8:13 Joonas Niilola
0 siblings, 0 replies; 4+ messages in thread
From: Joonas Niilola @ 2024-06-02 8:13 UTC (permalink / raw
To: gentoo-commits
commit: a82c6759b0c0ed31e4fbc9e2cf384820849e8023
Author: Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Sun Apr 21 20:47:16 2024 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Jun 2 08:13:28 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a82c6759
x11-misc/spacefm: Fix incompatible pointer type assignment
Closes: https://bugs.gentoo.org/928492
Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36348
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
.../spacefm/files/spacefm-gcc14-build-fix.patch | 76 +++++++++++++++++++++
x11-misc/spacefm/spacefm-1.0.6-r3.ebuild | 77 ++++++++++++++++++++++
2 files changed, 153 insertions(+)
diff --git a/x11-misc/spacefm/files/spacefm-gcc14-build-fix.patch b/x11-misc/spacefm/files/spacefm-gcc14-build-fix.patch
new file mode 100644
index 000000000000..7212241c68e0
--- /dev/null
+++ b/x11-misc/spacefm/files/spacefm-gcc14-build-fix.patch
@@ -0,0 +1,76 @@
+https://github.com/IgnorantGuru/spacefm/pull/816
+From: Brahmajit Das <brahmajit.xyz@gmail.com>
+Date: Mon, 22 Apr 2024 02:09:09 +0530
+Subject: [PATCH 1/1] Fix build issues with GCC 14
+
+GCC 14 enables -Wincompatible-pointer-types by default thus resulting in
+build error such as:
+exo-icon-view.c:2686:27: error: assignment to GdkWindow {aka struct _GdkWindow } from incompatible pointer type GObject {aka struct _GObject } [-Wincompatible-pointer-types]
+
+Much of the code changes are borrowed from older code segments.
+
+First reported on Gentoo linux, for more reference please bug:
+https://bugs.gentoo.org/928492
+
+Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
+--- a/src/exo/exo-gdk-pixbuf-extensions.c
++++ b/src/exo/exo-gdk-pixbuf-extensions.c
+@@ -492,7 +492,10 @@ exo_gdk_pixbuf_scale_down (GdkPixbuf *source,
+
+ /* check if we need to scale */
+ if (G_UNLIKELY (source_width <= dest_width && source_height <= dest_height))
+- return g_object_ref (G_OBJECT (source));
++ {
++ g_object_ref (G_OBJECT (source));
++ return source;
++ }
+
+ /* check if aspect ratio should be preserved */
+ if (G_LIKELY (preserve_aspect_ratio))
+--- a/src/exo/exo-icon-chooser-model.c
++++ b/src/exo/exo-icon-chooser-model.c
+@@ -671,7 +671,8 @@ _exo_icon_chooser_model_get_for_icon_theme (GtkIconTheme *icon_theme)
+ g_object_set_data (G_OBJECT (icon_theme), "exo-icon-chooser-default-model", model);
+
+ /* associated the model with the icon theme */
+- model->icon_theme = g_object_ref (G_OBJECT (icon_theme));
++ model->icon_theme = icon_theme;
++ g_object_ref (G_OBJECT (icon_theme));
+ exo_icon_chooser_model_icon_theme_changed (icon_theme, model);
+ g_signal_connect (G_OBJECT (icon_theme), "changed", G_CALLBACK (exo_icon_chooser_model_icon_theme_changed), model);
+ }
+--- a/src/exo/exo-icon-view.c
++++ b/src/exo/exo-icon-view.c
+@@ -2683,7 +2683,8 @@ exo_icon_view_key_press_event (GtkWidget *widget,
+ /* allocate a new event to forward */
+ new_event = gdk_event_copy ((GdkEvent *) event);
+ g_object_unref (G_OBJECT (new_event->key.window));
+- new_event->key.window = g_object_ref (G_OBJECT (gtk_widget_get_window (GTK_WIDGET(icon_view->priv->search_entry))));
++ new_event->key.window = gtk_widget_get_window (GTK_WIDGET(icon_view->priv->search_entry));
++ g_object_ref (G_OBJECT (gtk_widget_get_window (GTK_WIDGET(new_event->key.window))));
+
+ /* send the event to the search entry. If the "preedit-changed" signal is
+ * emitted during this event, priv->search_imcontext_changed will be set.
+@@ -3082,7 +3083,8 @@ exo_icon_view_set_hadjustment (ExoIconView *icon_view,
+ if (!hadj)
+ hadj = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+
+- icon_view->priv->hadjustment = g_object_ref_sink (G_OBJECT (hadj));
++ icon_view->priv->hadjustment = hadj;
++ g_object_ref_sink (G_OBJECT (icon_view->priv->hadjustment));
+
+ g_signal_connect (icon_view->priv->hadjustment, "value-changed",
+ G_CALLBACK (exo_icon_view_adjustment_changed),
+@@ -3109,7 +3111,8 @@ exo_icon_view_set_vadjustment (ExoIconView *icon_view,
+ if (!vadj)
+ vadj = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+
+- icon_view->priv->vadjustment = g_object_ref_sink (G_OBJECT (vadj));
++ icon_view->priv->vadjustment = vadj;
++ g_object_ref_sink(G_OBJECT (icon_view->priv->vadjustment));
+
+ g_signal_connect (icon_view->priv->vadjustment, "value-changed",
+ G_CALLBACK (exo_icon_view_adjustment_changed),
+--
+2.44.0
+
diff --git a/x11-misc/spacefm/spacefm-1.0.6-r3.ebuild b/x11-misc/spacefm/spacefm-1.0.6-r3.ebuild
new file mode 100644
index 000000000000..d1aa89083b4b
--- /dev/null
+++ b/x11-misc/spacefm/spacefm-1.0.6-r3.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools linux-info optfeature xdg
+
+DESCRIPTION="A multi-panel tabbed file manager"
+HOMEPAGE="https://ignorantguru.github.io/spacefm/"
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/IgnorantGuru/${PN}.git"
+ EGIT_BRANCH="next"
+ inherit git-r3
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="https://github.com/IgnorantGuru/spacefm/archive/${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+IUSE="+startup-notification +video-thumbnails"
+
+RDEPEND="dev-libs/glib:2
+ dev-util/desktop-file-utils
+ virtual/udev
+ virtual/freedesktop-icon-theme
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf
+ x11-libs/gtk+:3
+ x11-libs/pango
+ x11-libs/libX11
+ x11-misc/shared-mime-info
+ startup-notification? ( x11-libs/startup-notification )
+ video-thumbnails? ( media-video/ffmpegthumbnailer )"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-9999-include-sysmacros.patch
+ "${FILESDIR}"/${PN}-fno-common.patch
+ "${FILESDIR}"/${PN}-dash.patch #891181
+ "${FILESDIR}"/${PN}-gcc14-build-fix.patch #928492
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable startup-notification) \
+ $(use_enable video-thumbnails) \
+ --disable-hal \
+ --enable-inotify \
+ --disable-pixmaps \
+ --with-gtk3
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ optfeature "mounting as non-root user" sys-apps/udevil sys-apps/pmount sys-fs/udisks
+ optfeature "supporting ftp/nfs/smb/ssh URLs in the path bar" sys-apps/udevil
+ optfeature "performing as root" x11-misc/ktsuss kde-plasma/kde-cli-tools[kdesu]
+ # sys-apps/util-linux is required for eject
+ optfeature "other optional dependencies" sys-apps/dbus sys-process/lsof sys-apps/util-linux
+
+ if ! has_version 'sys-fs/udisks' ; then
+ elog "When using SpaceFM without udisks, and without the udisks-daemon running,"
+ elog "you may need to enable kernel polling for device media changes to be detected."
+ elog "See /usr/share/doc/${PF}/html/spacefm-manual-en.html#devices-kernpoll"
+ fi
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-misc/spacefm/, x11-misc/spacefm/files/
@ 2025-08-27 5:57 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2025-08-27 5:57 UTC (permalink / raw
To: gentoo-commits
commit: 1c3bb8baebb46b63898cee8ef1b7f3ac3aab1df2
Author: Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Wed Aug 20 11:11:51 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Aug 27 05:56:09 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c3bb8ba
x11-misc/spacefm: fix gcc15, force X11 backend
update URL for changelog in metadata
fix c23 with two patches from fedora
force X11 backend because wayland is not supported
use array for econfargs
Closes: https://bugs.gentoo.org/944089
Closes: https://bugs.gentoo.org/944191
Closes: https://bugs.gentoo.org/944277
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/43505
Closes: https://github.com/gentoo/gentoo/pull/43505
Signed-off-by: Sam James <sam <AT> gentoo.org>
x11-misc/spacefm/files/spacefm-1.0.6-fix_c23.patch | 319 +++++++++++++++++++++
.../spacefm/files/spacefm-1.0.6-force_X11.patch | 15 +
x11-misc/spacefm/metadata.xml | 2 +-
x11-misc/spacefm/spacefm-1.0.6-r5.ebuild | 82 ++++++
4 files changed, 417 insertions(+), 1 deletion(-)
diff --git a/x11-misc/spacefm/files/spacefm-1.0.6-fix_c23.patch b/x11-misc/spacefm/files/spacefm-1.0.6-fix_c23.patch
new file mode 100644
index 000000000000..95a789762140
--- /dev/null
+++ b/x11-misc/spacefm/files/spacefm-1.0.6-fix_c23.patch
@@ -0,0 +1,319 @@
+Fix unprototyped functions and bool key
+patches from fedora, reported https://github.com/IgnorantGuru/spacefm/pull/828
+https://src.fedoraproject.org/rpms/spacefm/blob/rawhide/f/spacefm-1.0.6-c23-function-proto.patch
+https://src.fedoraproject.org/rpms/spacefm/blob/rawhide/f/spacefm-1.0.6-c23-bool-keyword.patch
+
+commit 52260c8dbc45c4493aea6e458f486a18f7ff8b96
+Author: Mamoru TASAKA <mtasaka@fedoraproject.org>
+Date: Tue Jan 21 16:10:54 2025 +0900
+--- a/src/main-window.c
++++ b/src/main-window.c
+@@ -6250,7 +6250,7 @@ GtkWidget* main_task_view_new( FMMainWindow* main_window )
+
+ // ============== socket commands
+
+-gboolean bool( const char* value )
++gboolean truthy( const char* value )
+ {
+ return ( !( value && value[0] ) || !strcmp( value, "1") ||
+ !strcmp( value, "true") ||
+@@ -6441,14 +6441,14 @@ _missing_arg:
+ }
+ else if ( !strcmp( argv[i], "window_maximized" ) )
+ {
+- if ( bool( argv[i+1] ) )
++ if ( truthy( argv[i+1] ) )
+ gtk_window_maximize( GTK_WINDOW( main_window ) );
+ else
+ gtk_window_unmaximize( GTK_WINDOW( main_window ) );
+ }
+ else if ( !strcmp( argv[i], "window_fullscreen" ) )
+ {
+- xset_set_b( "main_full", bool( argv[i+1] ) );
++ xset_set_b( "main_full", truthy( argv[i+1] ) );
+ on_fullscreen_activate( NULL, main_window );
+ }
+ else if ( !strcmp( argv[i], "screen_size" ) )
+@@ -6591,7 +6591,7 @@ _missing_arg:
+ argv[i] );
+ return 2;
+ }
+- xset_set_b_panel( j, "show", bool( argv[i+1] ) );
++ xset_set_b_panel( j, "show", truthy( argv[i+1] ) );
+ show_panels_all_windows( NULL, main_window );
+ return 0;
+ }
+@@ -6602,9 +6602,9 @@ _missing_arg:
+ if ( use_mode )
+ xset_set_b_panel_mode( panel, str,
+ main_window->panel_context[panel-1],
+- bool( argv[i+1] ) );
++ truthy( argv[i+1] ) );
+ else
+- xset_set_b_panel( panel, str, bool( argv[i+1] ) );
++ xset_set_b_panel( panel, str, truthy( argv[i+1] ) );
+ update_views_all_windows( NULL, file_browser );
+ }
+ else if ( !strcmp( argv[i], "panel_hslider_top" ) ||
+@@ -6709,23 +6709,23 @@ _missing_arg:
+ {
+ if ( !strcmp( argv[i] + 5, "ascend" ) )
+ {
+- ptk_file_browser_set_sort_type( file_browser, bool( argv[i+1] ) ?
++ ptk_file_browser_set_sort_type( file_browser, truthy( argv[i+1] ) ?
+ GTK_SORT_ASCENDING : GTK_SORT_DESCENDING );
+ return 0;
+ }
+ else if ( !strcmp( argv[i] + 5, "natural" ) )
+ {
+ str = "sortx_natural";
+- xset_set_b( str, bool( argv[i+1] ) );
++ xset_set_b( str, truthy( argv[i+1] ) );
+ }
+ else if ( !strcmp( argv[i] + 5, "case" ) )
+ {
+ str = "sortx_case";
+- xset_set_b( str, bool( argv[i+1] ) );
++ xset_set_b( str, truthy( argv[i+1] ) );
+ }
+ else if ( !strcmp( argv[i] + 5, "hidden_first" ) )
+ {
+- str = bool( argv[i+1] ) ? "sortx_hidfirst" : "sortx_hidlast";
++ str = truthy( argv[i+1] ) ? "sortx_hidfirst" : "sortx_hidlast";
+ xset_set_b( str, TRUE );
+ }
+ else if ( !strcmp( argv[i] + 5, "first" ) )
+@@ -6748,7 +6748,7 @@ _missing_arg:
+ }
+ else if ( !strcmp( argv[i], "show_thumbnails" ) )
+ {
+- if ( app_settings.show_thumbnail != bool( argv[i+1] ) )
++ if ( app_settings.show_thumbnail != truthy( argv[i+1] ) )
+ main_window_toggle_thumbnails_all_windows();
+ }
+ else if ( !strcmp( argv[i], "large_icons" ) )
+@@ -6757,7 +6757,7 @@ _missing_arg:
+ {
+ xset_set_b_panel_mode( panel, "list_large",
+ main_window->panel_context[panel-1],
+- bool( argv[i+1] ) );
++ truthy( argv[i+1] ) );
+ update_views_all_windows( NULL, file_browser );
+ }
+ }
+--- a/src/settings.c
++++ b/src/settings.c
+@@ -2731,9 +2731,9 @@ gboolean xset_get_bool( const char* name, const char* var )
+ gboolean xset_get_bool_panel( int panel, const char* name, const char* var )
+ {
+ char* fullname = g_strdup_printf( "panel%d_%s", panel, name );
+- gboolean bool = xset_get_bool( fullname, var );
++ gboolean truthy = xset_get_bool( fullname, var );
+ g_free( fullname );
+- return bool;
++ return truthy;
+ }
+
+ int xset_get_int_set( XSet* set, const char* var )
+commit 86364a17a3146e23a52fcf86f748dd99b3b1cf93
+Author: Mamoru TASAKA <mtasaka@fedoraproject.org>
+Date: Tue Jan 21 16:10:30 2025 +0900
+--- a/src/cust-dialog.c
++++ b/src/cust-dialog.c
+@@ -3806,7 +3806,7 @@ static void show_help()
+ fprintf( f, " %s\n\n", DEFAULT_MANUAL );
+ }
+
+-void signal_handler()
++void signal_handler(int signal)
+ {
+ if ( signal_dialog )
+ {
+--- a/src/ptk/ptk-dir-tree-view.c
++++ b/src/ptk/ptk-dir-tree-view.c
+@@ -357,7 +357,7 @@ GtkTreeModel* get_dir_tree_model()
+
+ if ( G_UNLIKELY( ! dir_tree_model ) )
+ {
+- dir_tree_model = ptk_dir_tree_new( TRUE );
++ dir_tree_model = ptk_dir_tree_new();
+ g_object_add_weak_pointer( G_OBJECT( dir_tree_model ),
+ ( gpointer * ) (GtkWidget *) & dir_tree_model );
+ }
+--- a/src/ptk/ptk-file-misc.c
++++ b/src/ptk/ptk-file-misc.c
+@@ -1338,7 +1338,7 @@ void on_opt_toggled( GtkMenuItem* item, MoveSet* mset )
+ void on_toggled( GtkMenuItem* item, MoveSet* mset )
+ {
+ //int (*show) () = NULL;
+- void (*show) () = NULL;
++ void (*show) (GtkWidget *) = NULL;
+ gboolean someone_is_visible = FALSE;
+ gboolean opts_visible = FALSE;
+
+@@ -1406,54 +1406,54 @@ void on_toggled( GtkMenuItem* item, MoveSet* mset )
+ // entries
+ if ( xset_get_b( "move_name" ) )
+ {
+- show = (GFunc)gtk_widget_show;
++ show = gtk_widget_show;
+ someone_is_visible = TRUE;
+ }
+ else
+- show = (GFunc)gtk_widget_hide;
+- show( mset->label_name );
++ show = gtk_widget_hide;
++ show( GTK_WIDGET(mset->label_name) );
+ show( mset->scroll_name );
+ show( mset->hbox_ext );
+- show( mset->blank_name );
++ show( GTK_WIDGET(mset->blank_name) );
+
+ if ( xset_get_b( "move_filename" ) )
+ {
+- show = (GFunc)gtk_widget_show;
++ show = gtk_widget_show;
+ someone_is_visible = TRUE;
+ }
+ else
+- show = (GFunc)gtk_widget_hide;
+- show( mset->label_full_name );
++ show = gtk_widget_hide;
++ show( GTK_WIDGET(mset->label_full_name) );
+ show( mset->scroll_full_name );
+- show( mset->blank_full_name );
++ show( GTK_WIDGET(mset->blank_full_name) );
+
+ if ( xset_get_b( "move_parent" ) )
+ {
+- show = (GFunc)gtk_widget_show;
++ show = gtk_widget_show;
+ someone_is_visible = TRUE;
+ }
+ else
+- show = (GFunc)gtk_widget_hide;
+- show( mset->label_path );
++ show = gtk_widget_hide;
++ show( GTK_WIDGET(mset->label_path) );
+ show( mset->scroll_path );
+- show( mset->blank_path );
++ show( GTK_WIDGET(mset->blank_path) );
+
+ if ( xset_get_b( "move_path" ) )
+ {
+- show = (GFunc)gtk_widget_show;
++ show = gtk_widget_show;
+ someone_is_visible = TRUE;
+ }
+ else
+- show = (GFunc)gtk_widget_hide;
+- show( mset->label_full_path );
++ show = gtk_widget_hide;
++ show( GTK_WIDGET(mset->label_full_path) );
+ show( mset->scroll_full_path );
+
+ if ( !mset->is_link && !mset->create_new && xset_get_b( "move_type" ) )
+ {
+- show = (GFunc)gtk_widget_show;
++ show = gtk_widget_show;
+ }
+ else
+- show = (GFunc)gtk_widget_hide;
++ show = gtk_widget_hide;
+ show( mset->hbox_type );
+
+ gboolean new_file = FALSE;
+@@ -1468,15 +1468,15 @@ void on_toggled( GtkMenuItem* item, MoveSet* mset )
+
+ if ( new_link || ( mset->is_link && xset_get_b( "move_target" ) ) )
+ {
+- show = (GFunc)gtk_widget_show;
++ show = gtk_widget_show;
+ }
+ else
+- show = (GFunc)gtk_widget_hide;
++ show = gtk_widget_hide;
+ show( mset->hbox_target );
+
+ if ( ( new_file || new_folder ) && xset_get_b( "move_template" ) )
+ {
+- show = (GFunc)gtk_widget_show;
++ show = gtk_widget_show;
+ if ( new_file )
+ {
+ gtk_widget_show( GTK_WIDGET( mset->combo_template ) );
+@@ -1493,7 +1493,7 @@ void on_toggled( GtkMenuItem* item, MoveSet* mset )
+ }
+ }
+ else
+- show = (GFunc)gtk_widget_hide;
++ show = gtk_widget_hide;
+ show( mset->hbox_template );
+
+ if ( !someone_is_visible )
+--- a/src/settings.c
++++ b/src/settings.c
+@@ -2987,7 +2987,7 @@ void xset_parse( char* line )
+ }
+ }
+
+-XSet* xset_set_cb( const char* name, void (*cb_func) (), gpointer cb_data )
++XSet* xset_set_cb_internal( const char* name, void (*cb_func) (GtkWidget*, gpointer), gpointer cb_data )
+ {
+ XSet* set = xset_get( name );
+ set->cb_func = cb_func;
+@@ -2995,10 +2995,10 @@ XSet* xset_set_cb( const char* name, void (*cb_func) (), gpointer cb_data )
+ return set;
+ }
+
+-XSet* xset_set_cb_panel( int panel, const char* name, void (*cb_func) (), gpointer cb_data )
++XSet* xset_set_cb_panel_internal( int panel, const char* name, void (*cb_func) (GtkWidget*, gpointer), gpointer cb_data )
+ {
+ char* fullname = g_strdup_printf( "panel%d_%s", panel, name );
+- XSet* set = xset_set_cb( fullname, cb_func, cb_data );
++ XSet* set = xset_set_cb_internal( fullname, cb_func, cb_data );
+ g_free( fullname );
+ return set;
+ }
+@@ -8587,7 +8587,7 @@ gboolean xset_menu_keypress( GtkWidget* widget, GdkEventKey* event,
+ void xset_menu_cb( GtkWidget* item, XSet* set )
+ {
+ GtkWidget* parent;
+- void (*cb_func) () = NULL;
++ void (*cb_func) (GtkWidget*, gpointer) = NULL;
+ gpointer cb_data = NULL;
+ char* title;
+ XSet* mset; // mirror set or set
+--- a/src/settings.h
++++ b/src/settings.h
+@@ -261,7 +261,7 @@ typedef struct
+ char* menu_label;
+ int menu_style; // not saved or read if locked
+ char* icon;
+- void (*cb_func) (); // not saved
++ void (*cb_func) (GtkWidget*, gpointer); // not saved
+ gpointer cb_data; // not saved
+ char* ob1; // not saved
+ gpointer ob1_data; // not saved
+@@ -415,7 +415,9 @@ XSet* xset_set_b_panel( int panel, const char* name, gboolean bval );
+ int xset_get_int( const char* name, const char* var );
+ int xset_get_int_panel( int panel, const char* name, const char* var );
+ XSet* xset_set_panel( int panel, const char* name, const char* var, const char* value );
+-XSet* xset_set_cb_panel( int panel, const char* name, void (*cb_func) (), gpointer cb_data );
++XSet* xset_set_cb_panel_internal( int panel, const char* name, void (*cb_func) (GtkWidget*, gpointer), gpointer cb_data );
++#define xset_set_cb_panel(panel, name, cb_func, cb_data) \
++ xset_set_cb_panel_internal(panel, name, (void(*)(GtkWidget*, gpointer))(cb_func), cb_data)
+ gboolean xset_get_b_set( XSet* set );
+ XSet* xset_get_panel_mode( int panel, const char* name, char mode );
+ gboolean xset_get_b_panel_mode( int panel, const char* name, char mode );
+@@ -450,7 +452,9 @@ GtkWidget* xset_add_menuitem( DesktopWindow* desktop, PtkFileBrowser* file_brows
+ GtkWidget* menu, GtkAccelGroup *accel_group,
+ XSet* set );
+ GtkWidget* xset_get_image( const char* icon, int icon_size );
+-XSet* xset_set_cb( const char* name, void (*cb_func) (), gpointer cb_data );
++XSet* xset_set_cb_internal( const char* name, void (*cb_func) (GtkWidget*, gpointer), gpointer cb_data );
++#define xset_set_cb(name, cb_func, cb_data) \
++ xset_set_cb_internal(name, (void(*)(GtkWidget*, gpointer))(cb_func), cb_data)
+ XSet* xset_set_ob1_int( XSet* set, const char* ob1, int ob1_int );
+ XSet* xset_set_ob1( XSet* set, const char* ob1, gpointer ob1_data );
+ XSet* xset_set_ob2( XSet* set, const char* ob2, gpointer ob2_data );
diff --git a/x11-misc/spacefm/files/spacefm-1.0.6-force_X11.patch b/x11-misc/spacefm/files/spacefm-1.0.6-force_X11.patch
new file mode 100644
index 000000000000..acaa925263a8
--- /dev/null
+++ b/x11-misc/spacefm/files/spacefm-1.0.6-force_X11.patch
@@ -0,0 +1,15 @@
+Force X11 for gtk-3
+patch from fedora :
+https://src.fedoraproject.org/rpms/spacefm/blob/rawhide/f/spacefm-1.0.5-force-x11-backend.patch
+--- 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/x11-misc/spacefm/metadata.xml b/x11-misc/spacefm/metadata.xml
index a279d4604523..539e5b0457ec 100644
--- a/x11-misc/spacefm/metadata.xml
+++ b/x11-misc/spacefm/metadata.xml
@@ -7,7 +7,7 @@
<email>ignorantguru@users.sourceforge.net</email>
<name>IgnorantGuru</name>
</maintainer>
- <changelog>https://ignorantguru.github.com/spacefm/news.html</changelog>
+ <changelog>https://ignorantguru.github.io/spacefm/news.html</changelog>
<doc lang="en">https://github.com/IgnorantGuru/spacefm/wiki/</doc>
<bugs-to>https://github.com/IgnorantGuru/spacefm/issues</bugs-to>
<remote-id type="sourceforge">spacefm</remote-id>
diff --git a/x11-misc/spacefm/spacefm-1.0.6-r5.ebuild b/x11-misc/spacefm/spacefm-1.0.6-r5.ebuild
new file mode 100644
index 000000000000..7f4bb3f8788a
--- /dev/null
+++ b/x11-misc/spacefm/spacefm-1.0.6-r5.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools linux-info optfeature xdg
+
+DESCRIPTION="A multi-panel tabbed file manager"
+HOMEPAGE="https://ignorantguru.github.io/spacefm/"
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/IgnorantGuru/${PN}.git"
+ EGIT_BRANCH="next"
+ inherit git-r3
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="https://github.com/IgnorantGuru/spacefm/archive/${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+IUSE="+startup-notification +video-thumbnails"
+
+RDEPEND="dev-libs/glib:2
+ dev-util/desktop-file-utils
+ virtual/udev
+ virtual/freedesktop-icon-theme
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:3[X]
+ x11-libs/pango
+ x11-libs/libX11
+ x11-misc/shared-mime-info
+ startup-notification? ( x11-libs/startup-notification )
+ video-thumbnails? ( media-video/ffmpegthumbnailer )"
+DEPEND="${RDEPEND}
+ x11-base/xorg-proto"
+BDEPEND="dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-9999-include-sysmacros.patch
+ "${FILESDIR}"/${PN}-fno-common.patch
+ "${FILESDIR}"/${PN}-dash.patch #891181
+ "${FILESDIR}"/${PN}-gcc14-build-fix.patch #928492
+ "${FILESDIR}"/${P}-force_X11.patch
+ "${FILESDIR}"/${P}-fix_c23.patch #944277 #944191 #944089
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable startup-notification)
+ $(use_enable video-thumbnails)
+ --disable-hal
+ --enable-inotify
+ --disable-pixmaps
+ --with-gtk3
+ )
+ econf "${myeconfargs[@]}"
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ optfeature "mounting as non-root user" sys-apps/udevil sys-apps/pmount sys-fs/udisks
+ optfeature "supporting ftp/nfs/smb/ssh URLs in the path bar" sys-apps/udevil
+ optfeature "performing as root" x11-misc/ktsuss kde-plasma/kdesu-gui
+ # sys-apps/util-linux is required for eject
+ optfeature "other optional dependencies" sys-apps/dbus sys-process/lsof sys-apps/util-linux
+
+ if ! has_version 'sys-fs/udisks' ; then
+ elog "When using SpaceFM without udisks, and without the udisks-daemon running,"
+ elog "you may need to enable kernel polling for device media changes to be detected."
+ elog "See /usr/share/doc/${PF}/html/spacefm-manual-en.html#devices-kernpoll"
+ fi
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-misc/spacefm/, x11-misc/spacefm/files/
@ 2025-10-22 11:43 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2025-10-22 11:43 UTC (permalink / raw
To: gentoo-commits
commit: c545383fd1692cff30f98d6f251404174e9b7dd9
Author: Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Wed Oct 22 04:17:32 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 22 11:41:41 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c545383f
x11-misc/spacefm: fix segfault, remove linux-info unused
Apply a patch merged in the 1.0.6alpha branch but not released.
From the issue 670 in upstream, 1.0.6 should have fixed it,
but obviously it's not the case.
minor changes for style
remove linux-info, used before to check kernel version
Closes: https://bugs.gentoo.org/964932
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/44282
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../spacefm-1.0.6-fix_segfault_treeview.patch | 67 ++++++++++++++++
x11-misc/spacefm/spacefm-1.0.6-r6.ebuild | 89 ++++++++++++++++++++++
2 files changed, 156 insertions(+)
diff --git a/x11-misc/spacefm/files/spacefm-1.0.6-fix_segfault_treeview.patch b/x11-misc/spacefm/files/spacefm-1.0.6-fix_segfault_treeview.patch
new file mode 100644
index 000000000000..a7b9c081b3da
--- /dev/null
+++ b/x11-misc/spacefm/files/spacefm-1.0.6-fix_segfault_treeview.patch
@@ -0,0 +1,67 @@
+see https://bugs.gentoo.org/964932 and https://github.com/IgnorantGuru/spacefm/issues/670
+patch from upstream but not released
+https://github.com/IgnorantGuru/spacefm/pull/704.patch
+--- a/src/ptk/ptk-dir-tree-view.c
++++ b/src/ptk/ptk-dir-tree-view.c
+@@ -812,6 +812,12 @@ gboolean on_dir_tree_view_drag_motion ( GtkWidget *widget,
+ GdkAtom target;
+ GtkTargetList* target_list;
+
++ /* Don't call the default handler */
++ g_signal_stop_emission_by_name( widget, "drag-motion" );
++
++ /* We actually want it to run first, and then override the selected action */
++ GTK_WIDGET_GET_CLASS (widget)->drag_motion( widget, drag_context, x, y, time );
++
+ target_list = gtk_target_list_new( drag_targets, G_N_ELEMENTS(drag_targets) );
+ target = gtk_drag_dest_find_target( widget, drag_context, target_list );
+ gtk_target_list_unref( target_list );
+@@ -850,47 +856,9 @@ gboolean on_dir_tree_view_drag_motion ( GtkWidget *widget,
+ suggested_action = gdk_drag_context_get_selected_action( drag_context );
+ }
+ }
+-#if GTK_CHECK_VERSION (3, 0, 0)
+- /* hack to be able to call the default handler with the correct suggested_action */
+- struct _GdkDragContext {
+- GObject parent_instance;
+-
+- /*< private >*/
+- GdkDragProtocol protocol;
+-#if GTK_CHECK_VERSION (3, 22, 0)
+- /* 1.0.6 per Teklad: _GdkDragContext appears to change between
+- * different versions of GTK3 which causes the crash. It appears they
+- * added/removed some variables from that struct.
+- * https://github.com/IgnorantGuru/spacefm/issues/670 */
+- GdkDisplay *display;
+-#endif
+- gboolean is_source;
+- GdkWindow *source_window;
+- GdkWindow *dest_window;
+-
+- GList *targets;
+- GdkDragAction actions;
+- GdkDragAction suggested_action;
+- GdkDragAction action;
+-
+- guint32 start_time;
+-
+- GdkDevice *device;
+-#if GTK_CHECK_VERSION (3, 22, 0)
+- /* 1.0.6 per Teklad: _GdkDragContext appears to change between
+- * different versions of GTK3 which causes the crash. It appears they
+- * added/removed some variables from that struct.
+- * https://github.com/IgnorantGuru/spacefm/issues/670 */
+- guint drop_done : 1; /* Whether gdk_drag_drop_done() was performed */
+-#endif
+- };
+- ((struct _GdkDragContext *)drag_context)->suggested_action = suggested_action;
+-#else
+- drag_context->suggested_action = suggested_action; // needed for default handler
+-#endif
+ gdk_drag_status( drag_context, suggested_action, gtk_get_current_event_time() );
+ }
+- return FALSE;
++ return TRUE;
+ }
+
+ static gboolean on_dir_tree_view_drag_leave ( GtkWidget *widget,
diff --git a/x11-misc/spacefm/spacefm-1.0.6-r6.ebuild b/x11-misc/spacefm/spacefm-1.0.6-r6.ebuild
new file mode 100644
index 000000000000..a6e4021d197f
--- /dev/null
+++ b/x11-misc/spacefm/spacefm-1.0.6-r6.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools optfeature xdg
+
+DESCRIPTION="Multi-panel tabbed file manager"
+HOMEPAGE="https://ignorantguru.github.io/spacefm/"
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/IgnorantGuru/${PN}.git"
+ EGIT_BRANCH="next"
+ inherit git-r3
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="https://github.com/IgnorantGuru/spacefm/archive/${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+IUSE="+startup-notification +video-thumbnails"
+
+RDEPEND="
+ dev-libs/glib:2
+ dev-util/desktop-file-utils
+ virtual/udev
+ virtual/freedesktop-icon-theme
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:3[X]
+ x11-libs/pango
+ x11-libs/libX11
+ x11-misc/shared-mime-info
+ startup-notification? ( x11-libs/startup-notification )
+ video-thumbnails? ( media-video/ffmpegthumbnailer )
+"
+DEPEND="
+ ${RDEPEND}
+ x11-base/xorg-proto
+"
+BDEPEND="
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-9999-include-sysmacros.patch
+ "${FILESDIR}"/${PN}-fno-common.patch
+ "${FILESDIR}"/${PN}-dash.patch #891181
+ "${FILESDIR}"/${PN}-gcc14-build-fix.patch #928492
+ "${FILESDIR}"/${P}-force_X11.patch
+ "${FILESDIR}"/${P}-fix_c23.patch #944277 #944191 #944089
+ "${FILESDIR}"/${P}-fix_segfault_treeview.patch #964932
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable startup-notification)
+ $(use_enable video-thumbnails)
+ --disable-hal
+ --enable-inotify
+ --disable-pixmaps
+ --with-gtk3
+ )
+ econf "${myeconfargs[@]}"
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ optfeature "mounting as non-root user" sys-apps/udevil sys-apps/pmount sys-fs/udisks
+ optfeature "supporting ftp/nfs/smb/ssh URLs in the path bar" sys-apps/udevil
+ optfeature "performing as root" x11-misc/ktsuss kde-plasma/kdesu-gui
+ # sys-apps/util-linux is required for eject
+ optfeature "other optional dependencies" sys-apps/dbus sys-process/lsof sys-apps/util-linux
+
+ if ! has_version 'sys-fs/udisks' ; then
+ elog "When using SpaceFM without udisks, and without the udisks-daemon running,"
+ elog "you may need to enable kernel polling for device media changes to be detected."
+ elog "See /usr/share/doc/${PF}/html/spacefm-manual-en.html#devices-kernpoll"
+ fi
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-10-22 11:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-27 5:57 [gentoo-commits] repo/gentoo:master commit in: x11-misc/spacefm/, x11-misc/spacefm/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2025-10-22 11:43 Sam James
2024-06-02 8:13 Joonas Niilola
2023-05-09 17:51 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox