From: Michał Górny Date: Sat, 21 Dec 2019 08:10:15 +0000 (+0100) Subject: sys-devel/llvm: Support pregenerated manpages X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1c00443e329ca1c9f3994be4b0764b14ddf983ff;p=gentoo.git sys-devel/llvm: Support pregenerated manpages Signed-off-by: Michał Górny --- diff --git a/sys-devel/llvm/llvm-9.0.1.ebuild b/sys-devel/llvm/llvm-9.0.1.ebuild index 656ecf1927e8..938ddb974485 100644 --- a/sys-devel/llvm/llvm-9.0.1.ebuild +++ b/sys-devel/llvm/llvm-9.0.1.ebuild @@ -7,8 +7,12 @@ PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) inherit cmake-utils llvm.org multilib-minimal multiprocessing \ pax-utils python-any-r1 toolchain-funcs +# no changes in 9.0.1 +MANPAGE_P=llvm-9.0.0-manpages DESCRIPTION="Low Level Virtual Machine" HOMEPAGE="https://llvm.org/" +SRC_URI=" + !doc? ( https://dev.gentoo.org/~mgorny/dist/llvm/${MANPAGE_P}.tar.bz2 )" LLVM_COMPONENTS=( llvm ) llvm.org_set_globals @@ -80,6 +84,16 @@ python_check_deps() { has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" } +src_unpack() { + llvm.org_src_unpack + + if ! use doc; then + ebegin "Unpacking ${MANPAGE_P}.tar.bz2" + tar -xf "${DISTDIR}/${MANPAGE_P}.tar.bz2" || die + eend + fi +} + src_prepare() { # Fix llvm-config for shared linking and sane flags # https://bugs.gentoo.org/show_bug.cgi?id=565358 @@ -266,6 +280,13 @@ multilib_src_install_all() { LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" _EOF_ + # install pre-generated manpages + if ! use doc; then + # (doman does not support custom paths) + insinto "/usr/lib/llvm/${SLOT}/share/man/man1" + doins "${WORKDIR}/${MANPAGE_P}/llvm"/*.1 + fi + docompress "/usr/lib/llvm/${SLOT}/share/man" }