commit:     29744120a6b62882342edc5400bf8b17600e52ed
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue May  4 14:35:53 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue May  4 20:12:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29744120

gui-libs/gtk: Install docs to html/

Suggested by Chris Mayo to avoid compressing included SVGs and fonts.
Thanks for David Michael for the initial patch.

Closes: https://bugs.gentoo.org/788082
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 gui-libs/gtk/gtk-4.2.1.ebuild | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gui-libs/gtk/gtk-4.2.1.ebuild b/gui-libs/gtk/gtk-4.2.1.ebuild
index 2ab650d33e3..0b4e9dad9c1 100644
--- a/gui-libs/gtk/gtk-4.2.1.ebuild
+++ b/gui-libs/gtk/gtk-4.2.1.ebuild
@@ -161,7 +161,19 @@ src_test() {
 
 src_install() {
        meson_src_install
-       mv "${ED}"/usr/share/doc/{gtk4,${P}} || die
+
+       if use gtk-doc ; then
+               mkdir "${ED}"/usr/share/doc/${PF}/html || die
+
+               local docdirs=( gdk4 gsk4 gtk4 )
+               use wayland && docdirs+=( gdk4-wayland )
+               use X && docdirs+=( gdk4-x11 )
+
+               local d
+               for d in "${docdirs[@]}"; do
+                       mv "${ED}"/usr/share/doc/{${d},${PF}/html/} || die
+               done
+       fi
 }
 
 pkg_preinst() {

Reply via email to