From 22b2122ebfa9569083b7e1ac3ec5eb363f04fa00 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Tue, 1 Jul 2025 19:47:47 +0100 Subject: [PATCH] x11-libs/pango: optionally build and install documentation Signed-off-by: Chris Mayo Part-of: https://github.com/gentoo/gentoo/pull/42304 Closes: https://github.com/gentoo/gentoo/pull/42304 Signed-off-by: Sam James --- x11-libs/pango/pango-1.56.4-r1.ebuild | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/x11-libs/pango/pango-1.56.4-r1.ebuild b/x11-libs/pango/pango-1.56.4-r1.ebuild index 70f176db64853..ec3f68b0a1229 100644 --- a/x11-libs/pango/pango-1.56.4-r1.ebuild +++ b/x11-libs/pango/pango-1.56.4-r1.ebuild @@ -13,7 +13,8 @@ LICENSE="LGPL-2+" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="debug examples +introspection sysprof test X" +IUSE="debug examples gtk-doc +introspection sysprof test X" +REQUIRED_USE="gtk-doc? ( introspection )" RESTRICT="!test? ( test )" RDEPEND=" @@ -38,6 +39,7 @@ BDEPEND=" dev-util/glib-utils virtual/pkgconfig dev-python/docutils + gtk-doc? ( dev-util/gi-docgen ) test? ( media-fonts/cantarell ) " @@ -61,7 +63,7 @@ multilib_src_configure() { # Never use gi-docgen subproject --wrap-mode nofallback - -Ddocumentation=false # we ship pregenerated docs + $(meson_use gtk-doc documentation) $(meson_native_use_feature introspection) -Dman-pages=true $(meson_use test build-testsuite) @@ -80,6 +82,11 @@ multilib_src_install_all() { if use examples; then dodoc -r examples fi + + if use gtk-doc; then + mkdir -p "${ED}"/usr/share/gtk-doc/html/ || die + mv "${ED}"/usr/share/doc/Pango* "${ED}"/usr/share/gtk-doc/html/ || die + fi } pkg_postinst() {