sys-fs/btrfs-progs: add USE=doc, bug #627418
authorSergei Trofimovich <slyfox@gentoo.org>
Sat, 1 Jun 2019 17:20:56 +0000 (18:20 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Sat, 1 Jun 2019 17:21:14 +0000 (18:21 +0100)
USE=-doc will install manpages shipped in tarball,
USE=doc will regenerate manpages locally.

Reported-by: Holger Hoffstätte
Closes: https://bugs.gentoo.org/627418
Package-Manager: Portage-2.3.67, Repoman-2.3.13
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
sys-fs/btrfs-progs/btrfs-progs-5.1-r1.ebuild
sys-fs/btrfs-progs/btrfs-progs-9999.ebuild

index 572fe0d9fecaf87e85b6aa360885c8b6c2929e02..033e0ad66d1c4dd284d744573fa8abcc8e39123b 100644 (file)
@@ -27,7 +27,7 @@ HOMEPAGE="https://btrfs.wiki.kernel.org"
 
 LICENSE="GPL-2"
 SLOT="0/${libbtrfs_soname}"
-IUSE="+convert python reiserfs static static-libs +zstd"
+IUSE="+convert doc python reiserfs static static-libs +zstd"
 
 RESTRICT=test # tries to mount repared filesystems
 
@@ -63,9 +63,11 @@ DEPEND="${RDEPEND}
        )
 "
 BDEPEND="
-       || ( >=app-text/asciidoc-8.6.0 dev-ruby/asciidoctor )
-       app-text/docbook-xml-dtd:4.5
-       app-text/xmlto
+       doc? (
+               || ( >=app-text/asciidoc-8.6.0 dev-ruby/asciidoctor )
+               app-text/docbook-xml-dtd:4.5
+               app-text/xmlto
+       )
 "
 
 if [[ ${PV} == 9999 ]]; then
@@ -99,6 +101,7 @@ src_configure() {
        local myeconfargs=(
                --bindir="${EPREFIX}"/sbin
                $(use_enable convert)
+               $(use_enable doc documentation)
                $(use_enable elibc_glibc backtrace)
                $(use_enable python)
                $(use_enable static-libs static)
@@ -120,4 +123,7 @@ src_install() {
        emake V=1 DESTDIR="${D}" install "${makeargs[@]}"
        newbashcomp btrfs-completion btrfs
        use python && python_optimize
+
+       # install prebuilt subset of manuals
+       use doc || doman Documentation/*.[58]
 }
index 35aaf524c9164837c8200106e3a40488fb8a0f41..4680b387969c0c4a663668a76438dd2410da17b8 100644 (file)
@@ -27,7 +27,7 @@ HOMEPAGE="https://btrfs.wiki.kernel.org"
 
 LICENSE="GPL-2"
 SLOT="0/${libbtrfs_soname}"
-IUSE="+convert python reiserfs static static-libs +zstd"
+IUSE="+convert doc python reiserfs static static-libs +zstd"
 
 RESTRICT=test # tries to mount repared filesystems
 
@@ -63,9 +63,11 @@ DEPEND="${RDEPEND}
        )
 "
 BDEPEND="
-       || ( >=app-text/asciidoc-8.6.0 dev-ruby/asciidoctor )
-       app-text/docbook-xml-dtd:4.5
-       app-text/xmlto
+       doc? (
+               || ( >=app-text/asciidoc-8.6.0 dev-ruby/asciidoctor )
+               app-text/docbook-xml-dtd:4.5
+               app-text/xmlto
+       )
 "
 
 if [[ ${PV} == 9999 ]]; then
@@ -95,6 +97,7 @@ src_configure() {
        local myeconfargs=(
                --bindir="${EPREFIX}"/sbin
                $(use_enable convert)
+               $(use_enable doc documentation)
                $(use_enable elibc_glibc backtrace)
                $(use_enable python)
                $(use_enable static-libs static)
@@ -116,4 +119,7 @@ src_install() {
        emake V=1 DESTDIR="${D}" install "${makeargs[@]}"
        newbashcomp btrfs-completion btrfs
        use python && python_optimize
+
+       # install prebuilt subset of manuals
+       use doc || doman Documentation/*.[58]
 }