summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbea <orbea@riseup.net>2023-05-07 07:39:12 -0700
committerSam James <sam@gentoo.org>2023-05-09 18:50:53 +0100
commitb31f46d29ecff5e3fea842985631f37448a60284 (patch)
tree3b99b5a6c1a205156fd5650712da12d516517313 /x11-misc/spacefm
parentsys-kernel/gentoo-sources: drop 6.2.11 (diff)
downloadgentoo-b31f46d29ecff5e3fea842985631f37448a60284.tar.gz
gentoo-b31f46d29ecff5e3fea842985631f37448a60284.tar.bz2
gentoo-b31f46d29ecff5e3fea842985631f37448a60284.zip
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@riseup.net> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'x11-misc/spacefm')
-rw-r--r--x11-misc/spacefm/files/spacefm-dash.patch47
-rw-r--r--x11-misc/spacefm/spacefm-1.0.6-r2.ebuild76
2 files changed, 123 insertions, 0 deletions
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
+}