summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrahmajit Das <brahmajit.xyz@gmail.com>2024-04-22 02:17:16 +0530
committerJoonas Niilola <juippis@gentoo.org>2024-06-02 11:13:28 +0300
commita82c6759b0c0ed31e4fbc9e2cf384820849e8023 (patch)
tree9edd167f7509b2d63690e8e1c5e7c38067b3593d /x11-misc
parentnet-ftp/ncftp: Stabilize 3.2.7-r2 arm, #933395 (diff)
downloadgentoo-a82c6759b0c0ed31e4fbc9e2cf384820849e8023.tar.gz
gentoo-a82c6759b0c0ed31e4fbc9e2cf384820849e8023.tar.bz2
gentoo-a82c6759b0c0ed31e4fbc9e2cf384820849e8023.zip
x11-misc/spacefm: Fix incompatible pointer type assignment
Closes: https://bugs.gentoo.org/928492 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/36348 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'x11-misc')
-rw-r--r--x11-misc/spacefm/files/spacefm-gcc14-build-fix.patch76
-rw-r--r--x11-misc/spacefm/spacefm-1.0.6-r3.ebuild77
2 files changed, 153 insertions, 0 deletions
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
+}