xorg-3.eclass: Remove only library call man pages if USE=-doc
authorMatt Turner <mattst88@gentoo.org>
Wed, 24 Apr 2019 16:20:00 +0000 (09:20 -0700)
committerMatt Turner <mattst88@gentoo.org>
Wed, 24 Apr 2019 16:57:00 +0000 (09:57 -0700)
Arfrever rightly pointed out that there are some useful man pages, and
that the issue is about installing thousands of *developer* man pages.

Closes: https://bugs.gentoo.org/595936
Signed-off-by: Matt Turner <mattst88@gentoo.org>
eclass/xorg-3.eclass

index d4e52846edf5497eb16725611885a4b6db4dfd2e..f8e6e8b0d01d4b7284a77e9d32679c6489449c4f 100644 (file)
@@ -368,8 +368,12 @@ xorg-3_src_install() {
        fi
 
        # Many X11 libraries unconditionally install developer documentation
+       if [[ -d "${D}"/usr/share/man/man3 ]]; then
+               ! in_iuse doc && eqawarn "ebuild should set XORG_DOC=doc since package installs library documentation"
+       fi
+
        if ! use_if_iuse doc; then
-               rm -rf "${D}"/usr/share/man/*
+               rm -rf "${D}"/usr/share/man/man3
        fi
 
        # Don't install libtool archives (even for modules)