commit:     9b1277aea49ba42eeb1c82d860a806f0a3998126
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 28 12:35:58 2025 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Mon Apr 28 13:40:44 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b1277ae

app-containers/distrobox: add gui USE flag

Closes: https://bugs.gentoo.org/954818
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 ...-1.8.1.2.ebuild => distrobox-1.8.1.2-r1.ebuild} | 26 +++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/app-containers/distrobox/distrobox-1.8.1.2.ebuild 
b/app-containers/distrobox/distrobox-1.8.1.2-r1.ebuild
similarity index 67%
rename from app-containers/distrobox/distrobox-1.8.1.2.ebuild
rename to app-containers/distrobox/distrobox-1.8.1.2-r1.ebuild
index a0ea3295e1c0..512e088e7170 100644
--- a/app-containers/distrobox/distrobox-1.8.1.2.ebuild
+++ b/app-containers/distrobox/distrobox-1.8.1.2-r1.ebuild
@@ -3,6 +3,8 @@
 
 EAPI=8
 
+inherit xdg-utils
+
 DESCRIPTION="Use any Linux distribution inside your terminal (powered by 
docker/podman)"
 HOMEPAGE="https://distrobox.it/
        https://github.com/89luca89/distrobox/";
@@ -10,7 +12,7 @@ HOMEPAGE="https://distrobox.it/
 if [[ "${PV}" == *9999* ]] ; then
        inherit git-r3
 
-       EGIT_REPO_URI="https://github.com/89luca89/${PN}.git";
+       EGIT_REPO_URI="https://github.com/89luca89/${PN}";
 else
        SRC_URI="https://github.com/89luca89/${PN}/archive/${PV}.tar.gz
                -> ${P}.tar.gz"
@@ -20,6 +22,7 @@ fi
 
 LICENSE="GPL-3"  # GPL-3.0-only !
 SLOT="0"
+IUSE="gui"
 
 RDEPEND="
        || (
@@ -28,8 +31,29 @@ RDEPEND="
        )
 "
 
+_gui_cache_update() {
+       if use gui ; then
+               xdg_icon_cache_update
+               xdg_desktop_database_update
+       fi
+}
+
 src_install() {
        sh ./install --prefix "${ED}/usr" || die "${PN} install script failed"
 
+       if use gui ; then
+               :
+       else
+               rm -r "${ED}/usr/share/icons" || die
+       fi
+
        dodoc *.md
 }
+
+pkg_postinst() {
+       _gui_cache_update
+}
+
+pkg_postrm() {
+       _gui_cache_update
+}

Reply via email to