commit:     59f3201a56736044307aae9df17f4c4d09cf553d
Author:     Gonçalo Duarte <gonegrier.duarte <AT> gmail <DOT> com>
AuthorDate: Sun Nov 26 09:30:08 2023 +0000
Commit:     Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
CommitDate: Sun Nov 26 17:09:19 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=59f3201a

gui-apps/swww: add man useflag
* generate and install man pages
* fix some pkgscan error

Signed-off-by: Gonçalo Duarte <gonegrier.duarte <AT> gmail.com>

 gui-apps/swww/metadata.xml      |  3 +++
 gui-apps/swww/swww-0.7.3.ebuild | 16 +++++++++++++++-
 gui-apps/swww/swww-0.8.1.ebuild | 16 +++++++++++++++-
 3 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/gui-apps/swww/metadata.xml b/gui-apps/swww/metadata.xml
index c09d6ac842..bce44f3147 100644
--- a/gui-apps/swww/metadata.xml
+++ b/gui-apps/swww/metadata.xml
@@ -9,4 +9,7 @@
         <remote-id type="github">Horus645/swww</remote-id>
         <bugs-to>https://github.com/Horus645/swww/issues</bugs-to>
     </upstream>
+    <use>
+        <flag name="man">Build and install man pages</flag>
+      </use>
 </pkgmetadata>

diff --git a/gui-apps/swww/swww-0.7.3.ebuild b/gui-apps/swww/swww-0.7.3.ebuild
index dfd5c7fbb7..656fb7343f 100644
--- a/gui-apps/swww/swww-0.7.3.ebuild
+++ b/gui-apps/swww/swww-0.7.3.ebuild
@@ -208,10 +208,11 @@ inherit cargo shell-completion
 
 DESCRIPTION="Efficient animated wallpaper daemon for wayland, controlled at 
runtime"
 HOMEPAGE="https://github.com/Horus645/swww";
-SRC_URI="https://github.com/Horus645/swww/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz $(cargo_crate_uris)"
+SRC_URI="https://github.com/Horus645/swww/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz ${CARGO_CRATE_URIS}"
 
 LICENSE="0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD ISC MIT 
Unicode-DFS-2016 Unlicense ZLIB"
 SLOT="0"
+IUSE="debug +man"
 KEYWORDS="~amd64"
 
 DEPEND="app-arch/lz4
@@ -229,6 +230,19 @@ src_install() {
        dobashcomp "${WORKDIR}/swww-${PV}/completions/swww.bash"
        dofishcomp "${WORKDIR}/swww-${PV}/completions/swww.fish"
 
+       if use man ; then
+               for FILE in "${WORKDIR}/swww-${PV}/doc/*scd"; do
+                       scdoc < "$FILE" > "${WORKDIR}/swww-${PV}/doc/"
+               done
+               doman "${WORKDIR}/swww-${PV}/doc/swww.1"
+               doman "${WORKDIR}/swww-${PV}/doc/swww-clear.1"
+               doman "${WORKDIR}/swww-${PV}/doc/swww-daemon.1"
+               doman "${WORKDIR}/swww-${PV}/doc/swww-img.1"
+               doman "${WORKDIR}/swww-${PV}/doc/swww-init.1"
+               doman "${WORKDIR}/swww-${PV}/doc/swww-kill.1"
+               doman "${WORKDIR}/swww-${PV}/doc/swww-query.1"
+       fi
+
        if use debug ; then
                cd target/debug || die
        else

diff --git a/gui-apps/swww/swww-0.8.1.ebuild b/gui-apps/swww/swww-0.8.1.ebuild
index 132de4e0a4..4526052f81 100644
--- a/gui-apps/swww/swww-0.8.1.ebuild
+++ b/gui-apps/swww/swww-0.8.1.ebuild
@@ -210,10 +210,11 @@ inherit cargo shell-completion
 
 DESCRIPTION="Efficient animated wallpaper daemon for wayland, controlled at 
runtime"
 HOMEPAGE="https://github.com/Horus645/swww";
-SRC_URI="https://github.com/Horus645/swww/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz $(cargo_crate_uris)"
+SRC_URI="https://github.com/Horus645/swww/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz ${CARGO_CRATE_URIS}"
 
 LICENSE="0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD ISC MIT 
Unicode-DFS-2016 Unlicense ZLIB"
 SLOT="0"
+IUSE="debug +man"
 KEYWORDS="~amd64"
 
 DEPEND="
@@ -232,6 +233,19 @@ src_install() {
        dobashcomp "${WORKDIR}/swww-${PV}/completions/swww.bash"
        dofishcomp "${WORKDIR}/swww-${PV}/completions/swww.fish"
 
+       if use man ; then
+               for FILE in "${WORKDIR}/swww-${PV}/doc/*scd"; do
+                       scdoc < "$FILE" > "${WORKDIR}/swww-${PV}/doc/"
+               done
+               doman "${WORKDIR}/swww-${PV}/doc/swww.1"
+               doman "${WORKDIR}/swww-${PV}/doc/swww-clear.1"
+               doman "${WORKDIR}/swww-${PV}/doc/swww-daemon.1"
+               doman "${WORKDIR}/swww-${PV}/doc/swww-img.1"
+               doman "${WORKDIR}/swww-${PV}/doc/swww-init.1"
+               doman "${WORKDIR}/swww-${PV}/doc/swww-kill.1"
+               doman "${WORKDIR}/swww-${PV}/doc/swww-query.1"
+       fi
+
        if use debug ; then
                cd target/debug || die
        else

Reply via email to