commit:     22431298efccbc7bd7dcd85a133ec07851316440
Author:     Michael Zavertkin <misha.zavertkin <AT> mail <DOT> ru>
AuthorDate: Thu Sep  5 17:35:01 2024 +0000
Commit:     Michael Zavertkin <misha.zavertkin <AT> mail <DOT> ru>
CommitDate: Thu Sep  5 17:36:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=22431298

gui-apps/hyprshot: optional deps install

Signed-off-by: Michael Zavertkin <misha.zavertkin <AT> mail.ru>

 gui-apps/hyprshot/hyprshot-1.2.3.ebuild |  7 +++----
 gui-apps/hyprshot/hyprshot-1.3.0.ebuild | 10 ++++------
 gui-apps/hyprshot/hyprshot-9999.ebuild  |  9 ++++-----
 gui-apps/hyprshot/metadata.xml          |  6 ++++++
 4 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/gui-apps/hyprshot/hyprshot-1.2.3.ebuild 
b/gui-apps/hyprshot/hyprshot-1.2.3.ebuild
index 3c5782c68..3dee2b087 100644
--- a/gui-apps/hyprshot/hyprshot-1.2.3.ebuild
+++ b/gui-apps/hyprshot/hyprshot-1.2.3.ebuild
@@ -14,6 +14,8 @@ LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS="~amd64"
 
+IUSE="+xdg"
+
 RDEPEND="
        app-misc/jq
        app-shells/bash
@@ -22,13 +24,10 @@ RDEPEND="
        gui-apps/wl-clipboard
        gui-wm/hyprland
        x11-libs/libnotify
+       xdg? ( x11-misc/xdg-user-dirs )
 "
 
 src_install() {
        dobin hyprshot
        einstalldocs
 }
-
-pkg_postinst() {
-       optfeature "XDG user dir support" x11-misc/xdg-user-dirs
-}

diff --git a/gui-apps/hyprshot/hyprshot-1.3.0.ebuild 
b/gui-apps/hyprshot/hyprshot-1.3.0.ebuild
index 267076f49..63eef4051 100644
--- a/gui-apps/hyprshot/hyprshot-1.3.0.ebuild
+++ b/gui-apps/hyprshot/hyprshot-1.3.0.ebuild
@@ -14,6 +14,8 @@ LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS="~amd64"
 
+IUSE="+xdg +freeze"
+
 RDEPEND="
        app-misc/jq
        app-shells/bash
@@ -22,15 +24,11 @@ RDEPEND="
        gui-apps/wl-clipboard
        gui-wm/hyprland
        x11-libs/libnotify
+       xdg? ( x11-misc/xdg-user-dirs )
+       freeze? ( gui-apps/hyprpicker )
 "
 
 src_install() {
        dobin hyprshot
        einstalldocs
 }
-
-pkg_postinst() {
-       optfeature "--freeze option support" gui-apps/hyprpicker
-       optfeature "XDG user dir support" x11-misc/xdg-user-dirs
-
-}

diff --git a/gui-apps/hyprshot/hyprshot-9999.ebuild 
b/gui-apps/hyprshot/hyprshot-9999.ebuild
index 2bdaa19ef..95d75516f 100644
--- a/gui-apps/hyprshot/hyprshot-9999.ebuild
+++ b/gui-apps/hyprshot/hyprshot-9999.ebuild
@@ -11,6 +11,8 @@ EGIT_REPO_URI="https://github.com/Gustash/Hyprshot.git/";
 LICENSE="GPL-3"
 SLOT="0"
 
+IUSE="+xdg +freeze"
+
 RDEPEND="
        app-misc/jq
        app-shells/bash
@@ -19,14 +21,11 @@ RDEPEND="
        gui-apps/wl-clipboard
        gui-wm/hyprland
        x11-libs/libnotify
+       xdg? ( x11-misc/xdg-user-dirs )
+       freeze? ( gui-apps/hyprpicker )
 "
 
 src_install() {
        dobin hyprshot
        einstalldocs
 }
-
-pkg_postinst() {
-       optfeature "--freeze option support" gui-apps/hyprpicker
-       optfeature "XDG user dir support" x11-misc/xdg-user-dirs
-}

diff --git a/gui-apps/hyprshot/metadata.xml b/gui-apps/hyprshot/metadata.xml
index 4deb63664..44001ae8f 100644
--- a/gui-apps/hyprshot/metadata.xml
+++ b/gui-apps/hyprshot/metadata.xml
@@ -8,4 +8,10 @@
        <upstream>
                <remote-id type="github">Gustash/Hyprshot</remote-id>
        </upstream>
+       <use>
+               <flag name="xdg">Pull xdg-home as a dependency to use 
$XDG_PICTURES_DIR</flag>
+       </use>
+       <use>
+               <flag name="freeze">Pull gui-apps/hyprpicker for optional 
freezing screen</flag>
+       </use>
 </pkgmetadata>

Reply via email to