From: Michał Górny Date: Sat, 21 Dec 2019 08:12:27 +0000 (+0100) Subject: sys-devel/clang: Support pregenerated manpages X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e5772aa46e02f2560985fb19e9795018ca6643d5;p=gentoo.git sys-devel/clang: Support pregenerated manpages Signed-off-by: Michał Górny --- diff --git a/sys-devel/clang/clang-9.0.1.ebuild b/sys-devel/clang/clang-9.0.1.ebuild index 8636b7166174..926c06a7ee9c 100644 --- a/sys-devel/clang/clang-9.0.1.ebuild +++ b/sys-devel/clang/clang-9.0.1.ebuild @@ -7,8 +7,11 @@ PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) inherit cmake-utils llvm llvm.org multilib-minimal multiprocessing \ pax-utils python-single-r1 toolchain-funcs +MANPAGE_P=llvm-9.0.0-manpages DESCRIPTION="C language family frontend for LLVM" HOMEPAGE="https://llvm.org/" +SRC_URI=" + !doc? ( https://dev.gentoo.org/~mgorny/dist/llvm/${MANPAGE_P}.tar.bz2 )" LLVM_COMPONENTS=( clang clang-tools-extra ) LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support @@ -80,6 +83,12 @@ src_unpack() { cd x/y || die llvm.org_src_unpack mv clang-tools-extra clang/tools/extra || die + + if ! use doc; then + ebegin "Unpacking ${MANPAGE_P}.tar.bz2" + tar -xf "${DISTDIR}/${MANPAGE_P}.tar.bz2" || die + eend + fi } multilib_src_configure() { @@ -243,6 +252,12 @@ multilib_src_install_all() { python_optimize "${ED}"/usr/lib/llvm/${SLOT}/share/scan-view fi + # install pre-generated manpages + if ! use doc; then + insinto "/usr/lib/llvm/${SLOT}/share/man/man1" + doins "${WORKDIR}/x/y/${MANPAGE_P}/clang"/*.1 + fi + docompress "/usr/lib/llvm/${SLOT}/share/man" # match 'html' non-compression use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"