summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolic <jakov.smolic@sartura.hr>2020-11-25 18:37:26 +0100
committerDavid Seifert <soap@gentoo.org>2020-11-25 18:37:26 +0100
commit3e0cc5d786d6d56e8eb145e515b461a6073ce169 (patch)
tree2af56d3ad37e944c838a124342b4434f6fe4c88c /x11-misc/spacefm
parentx11-plugins/purple-libnotify-plus: port to EAPI 7 (diff)
downloadgentoo-3e0cc5d786d6d56e8eb145e515b461a6073ce169.tar.gz
gentoo-3e0cc5d786d6d56e8eb145e515b461a6073ce169.tar.bz2
gentoo-3e0cc5d786d6d56e8eb145e515b461a6073ce169.zip
x11-misc/spacefm: port to EAPI 7
Closes: https://bugs.gentoo.org/708384 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'x11-misc/spacefm')
-rw-r--r--x11-misc/spacefm/files/spacefm-fno-common.patch86
-rw-r--r--x11-misc/spacefm/metadata.xml2
-rw-r--r--x11-misc/spacefm/spacefm-1.0.6-r1.ebuild68
-rw-r--r--x11-misc/spacefm/spacefm-1.0.6.ebuild88
-rw-r--r--x11-misc/spacefm/spacefm-9999.ebuild60
5 files changed, 174 insertions, 130 deletions
diff --git a/x11-misc/spacefm/files/spacefm-fno-common.patch b/x11-misc/spacefm/files/spacefm-fno-common.patch
new file mode 100644
index 000000000000..4cdc834a8277
--- /dev/null
+++ b/x11-misc/spacefm/files/spacefm-fno-common.patch
@@ -0,0 +1,86 @@
+--- a/src/settings.c
++++ b/src/settings.c
+@@ -52,6 +52,24 @@
+ /* Dirty hack: check whether we are under LXDE or not */
+ #define is_under_LXDE() (g_getenv( "_LXSESSION_PID" ) != NULL)
+
++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;
+--- 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
+ {
diff --git a/x11-misc/spacefm/metadata.xml b/x11-misc/spacefm/metadata.xml
index 35fc0bff16f7..f5c9eb81f009 100644
--- a/x11-misc/spacefm/metadata.xml
+++ b/x11-misc/spacefm/metadata.xml
@@ -14,8 +14,6 @@
<remote-id type="github">ignorantguru/spacefm</remote-id>
</upstream>
<use>
- <flag name="gtk2">Support GTK+ 2.x instead of GTK+ 3.x</flag>
- <flag name="gtk3">Support GTK+ 3.x instead of GTK+ 2.x</flag>
<flag name="video-thumbnails">Support video thumbnails with <pkg>media-video/ffmpegthumbnailer</pkg></flag>
</use>
<longdescription lang="en">
diff --git a/x11-misc/spacefm/spacefm-1.0.6-r1.ebuild b/x11-misc/spacefm/spacefm-1.0.6-r1.ebuild
new file mode 100644
index 000000000000..b206e28490ad
--- /dev/null
+++ b/x11-misc/spacefm/spacefm-1.0.6-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-info optfeature xdg
+
+DESCRIPTION="A multi-panel tabbed file manager"
+HOMEPAGE="https://ignorantguru.github.com/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
+)
+
+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]
+ optfeature "other optional dependencies" sys-apps/dbus sys-process/lsof virtual/eject
+
+ 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
+}
diff --git a/x11-misc/spacefm/spacefm-1.0.6.ebuild b/x11-misc/spacefm/spacefm-1.0.6.ebuild
deleted file mode 100644
index f1c2cea9d53c..000000000000
--- a/x11-misc/spacefm/spacefm-1.0.6.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit gnome2-utils linux-info xdg-utils
-
-DESCRIPTION="A multi-panel tabbed file manager"
-HOMEPAGE="https://ignorantguru.github.com/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/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-fi
-
-LICENSE="GPL-2 LGPL-2.1"
-SLOT="0"
-IUSE="gtk2 +gtk3 +startup-notification +video-thumbnails"
-
-RDEPEND="dev-libs/glib:2
- dev-util/desktop-file-utils
- >=virtual/udev-143
- virtual/freedesktop-icon-theme
- x11-libs/cairo
- x11-libs/gdk-pixbuf
- x11-libs/pango
- x11-libs/libX11
- x11-misc/shared-mime-info
- gtk2? ( gtk3? ( x11-libs/gtk+:3 ) !gtk3? ( x11-libs/gtk+:2 ) )
- !gtk2? ( x11-libs/gtk+:3 )
- startup-notification? ( x11-libs/startup-notification )
- video-thumbnails? ( media-video/ffmpegthumbnailer )"
-DEPEND="${RDEPEND}
- dev-util/intltool
- sys-devel/gettext
- virtual/pkgconfig"
-
-PATCHES=( "${FILESDIR}"/${PN}-9999-include-sysmacros.patch )
-
-src_configure() {
- econf \
- $(use_enable startup-notification) \
- $(use_enable video-thumbnails) \
- --disable-hal \
- --enable-inotify \
- --disable-pixmaps \
- $(use_with gtk3 gtk3 "yes")
-}
-
-pkg_postinst() {
- xdg_desktop_database_update
- xdg_mimeinfo_database_update
- gnome2_icon_cache_update
-
- einfo
- elog "To mount as non-root user you need one of the following:"
- elog " sys-apps/udevil (recommended, see below)"
- elog " sys-apps/pmount"
- elog " sys-fs/udisks:0"
- elog " sys-fs/udisks:2"
- elog "To support ftp/nfs/smb/ssh URLs in the path bar you need:"
- elog " sys-apps/udevil"
- elog "To perform as root functionality you need one of the following:"
- elog " x11-misc/ktsuss"
- elog " kde-plasma/kde-cli-tools[kdesu]"
- elog "Other optional dependencies:"
- elog " sys-apps/dbus"
- elog " sys-process/lsof (device processes)"
- elog " virtual/eject (eject media)"
- einfo
- 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"
- has_version '<virtual/udev-173' && ewarn "You need at least udev-173"
- kernel_is lt 2 6 38 && ewarn "You need at least kernel 2.6.38"
- einfo
- fi
-}
-
-pkg_postrm() {
- xdg_desktop_database_update
- xdg_mimeinfo_database_update
- gnome2_icon_cache_update
-}
diff --git a/x11-misc/spacefm/spacefm-9999.ebuild b/x11-misc/spacefm/spacefm-9999.ebuild
index 31647a6d0f80..b206e28490ad 100644
--- a/x11-misc/spacefm/spacefm-9999.ebuild
+++ b/x11-misc/spacefm/spacefm-9999.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit gnome2-utils linux-info xdg-utils
+inherit linux-info optfeature xdg
DESCRIPTION="A multi-panel tabbed file manager"
HOMEPAGE="https://ignorantguru.github.com/spacefm/"
@@ -12,33 +12,35 @@ if [[ ${PV} == *9999* ]]; then
EGIT_BRANCH="next"
inherit git-r3
else
- KEYWORDS="~amd64 ~x86"
- SRC_URI="https://github.com/IgnorantGuru/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ 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="gtk2 +gtk3 +startup-notification +video-thumbnails"
+IUSE="+startup-notification +video-thumbnails"
RDEPEND="dev-libs/glib:2
dev-util/desktop-file-utils
- >=virtual/udev-143
+ 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
- gtk2? ( gtk3? ( x11-libs/gtk+:3 ) !gtk3? ( x11-libs/gtk+:2 ) )
- !gtk2? ( x11-libs/gtk+:3 )
startup-notification? ( x11-libs/startup-notification )
video-thumbnails? ( media-video/ffmpegthumbnailer )"
-DEPEND="${RDEPEND}
- dev-util/intltool
+DEPEND="${RDEPEND}"
+BDEPEND="dev-util/intltool
sys-devel/gettext
virtual/pkgconfig"
-PATCHES=( "${FILESDIR}"/${PN}-9999-include-sysmacros.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-9999-include-sysmacros.patch
+ "${FILESDIR}"/${PN}-fno-common.patch
+)
src_configure() {
econf \
@@ -47,42 +49,20 @@ src_configure() {
--disable-hal \
--enable-inotify \
--disable-pixmaps \
- $(use_with gtk3 gtk3 "yes")
+ --with-gtk3
}
pkg_postinst() {
- xdg_desktop_database_update
- xdg_mimeinfo_database_update
- gnome2_icon_cache_update
+ 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]
+ optfeature "other optional dependencies" sys-apps/dbus sys-process/lsof virtual/eject
- einfo
- elog "To mount as non-root user you need one of the following:"
- elog " sys-apps/udevil (recommended, see below)"
- elog " sys-apps/pmount"
- elog " sys-fs/udisks:0"
- elog " sys-fs/udisks:2"
- elog "To support ftp/nfs/smb/ssh URLs in the path bar you need:"
- elog " sys-apps/udevil"
- elog "To perform as root functionality you need one of the following:"
- elog " x11-misc/ktsuss"
- elog " kde-plasma/kde-cli-tools[kdesu]"
- elog "Other optional dependencies:"
- elog " sys-apps/dbus"
- elog " sys-process/lsof (device processes)"
- elog " virtual/eject (eject media)"
- einfo
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"
- has_version '<virtual/udev-173' && ewarn "You need at least udev-173"
- kernel_is lt 2 6 38 && ewarn "You need at least kernel 2.6.38"
- einfo
fi
}
-
-pkg_postrm() {
- xdg_desktop_database_update
- xdg_mimeinfo_database_update
- gnome2_icon_cache_update
-}