public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [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; 2+ 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] 2+ 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; 2+ 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] 2+ messages in thread

end of thread, other threads:[~2024-06-02  8:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-09 17:51 [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 --
2024-06-02  8:13 Joonas Niilola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox