summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-10-26 12:34:01 +0100
committerMichał Górny <mgorny@gentoo.org>2020-10-26 17:48:41 +0100
commita338e5ac4f704a03ac8ba0fb905c0f9011bf9eb5 (patch)
treef8a7337e7580dcc71184cb311aa283c775c19ab2 /sys-devel/llvm
parentllvm.org.eclass: Add manpage build/install utilities (diff)
downloadgentoo-a338e5ac4f704a03ac8ba0fb905c0f9011bf9eb5.tar.gz
gentoo-a338e5ac4f704a03ac8ba0fb905c0f9011bf9eb5.tar.bz2
gentoo-a338e5ac4f704a03ac8ba0fb905c0f9011bf9eb5.zip
sys-devel/llvm: Reuse eclass manpage build logic for 10.0.1+
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-devel/llvm')
-rw-r--r--sys-devel/llvm/llvm-10.0.1.ebuild51
-rw-r--r--sys-devel/llvm/llvm-11.0.0.9999.ebuild51
-rw-r--r--sys-devel/llvm/llvm-11.0.0.ebuild51
-rw-r--r--sys-devel/llvm/llvm-12.0.0.9999.ebuild51
4 files changed, 128 insertions, 76 deletions
diff --git a/sys-devel/llvm/llvm-10.0.1.ebuild b/sys-devel/llvm/llvm-10.0.1.ebuild
index b162bfbdf27..819b1086a7b 100644
--- a/sys-devel/llvm/llvm-10.0.1.ebuild
+++ b/sys-devel/llvm/llvm-10.0.1.ebuild
@@ -10,6 +10,7 @@ inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="https://llvm.org/"
LLVM_COMPONENTS=( llvm )
+LLVM_MANPAGES=build
llvm.org_set_globals
# Those are in lib/Targets, without explicit CMakeLists.txt mention
@@ -58,11 +59,12 @@ BDEPEND="
<sys-libs/libcxx-$(ver_cut 1-3).9999
>=sys-devel/binutils-apple-5.1
)
- libffi? ( virtual/pkgconfig )
- $(python_gen_any_dep '
+ doc? ( $(python_gen_any_dep '
+ dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
- doc? ( dev-python/recommonmark[${PYTHON_USEDEP}] )
- ')"
+ ') )
+ libffi? ( virtual/pkgconfig )
+ ${PYTHON_DEPS}"
# There are no file collisions between these versions but having :0
# installed means llvm-config there will take precedence.
RDEPEND="${RDEPEND}
@@ -77,10 +79,9 @@ PATCHES=(
)
python_check_deps() {
- if use doc; then
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" ||
- return 1
- fi
+ use doc || return 0
+
+ has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
}
@@ -111,7 +112,7 @@ check_distribution_components() {
;;
# used only w/ USE=doc
docs-llvm-html)
- continue
+ use doc || continue
;;
esac
@@ -275,12 +276,16 @@ get_distribution_components() {
# python modules
opt-viewer
-
- # manpages
- docs-dsymutil-man
- docs-llvm-dwarfdump-man
- docs-llvm-man
)
+
+ if llvm_are_manpages_built; then
+ out+=(
+ # manpages
+ docs-dsymutil-man
+ docs-llvm-dwarfdump-man
+ docs-llvm-man
+ )
+ fi
use doc && out+=(
docs-llvm-html
)
@@ -362,15 +367,22 @@ multilib_src_configure() {
)
if multilib_is_native_abi; then
+ local build_docs=OFF
+ if llvm_are_manpages_built; then
+ build_docs=ON
+ mycmakeargs+=(
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ fi
+
mycmakeargs+=(
- -DLLVM_BUILD_DOCS=ON
+ -DLLVM_BUILD_DOCS=${build_docs}
-DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=ON
+ -DLLVM_ENABLE_SPHINX=${build_docs}
-DLLVM_ENABLE_DOXYGEN=OFF
-DLLVM_INSTALL_UTILS=ON
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
)
use gold && mycmakeargs+=(
-DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
@@ -465,6 +477,7 @@ multilib_src_install_all() {
_EOF_
docompress "/usr/lib/llvm/${SLOT}/share/man"
+ llvm_install_manpages
}
pkg_postinst() {
diff --git a/sys-devel/llvm/llvm-11.0.0.9999.ebuild b/sys-devel/llvm/llvm-11.0.0.9999.ebuild
index fd13357643c..8e4357a1098 100644
--- a/sys-devel/llvm/llvm-11.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-11.0.0.9999.ebuild
@@ -10,6 +10,7 @@ inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="https://llvm.org/"
LLVM_COMPONENTS=( llvm )
+LLVM_MANPAGES=build
llvm.org_set_globals
# Those are in lib/Targets, without explicit CMakeLists.txt mention
@@ -59,11 +60,12 @@ BDEPEND="
<sys-libs/libcxx-$(ver_cut 1-3).9999
>=sys-devel/binutils-apple-5.1
)
- libffi? ( virtual/pkgconfig )
- $(python_gen_any_dep '
+ doc? ( $(python_gen_any_dep '
+ dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
- doc? ( dev-python/recommonmark[${PYTHON_USEDEP}] )
- ')"
+ ') )
+ libffi? ( virtual/pkgconfig )
+ ${PYTHON_DEPS}"
# There are no file collisions between these versions but having :0
# installed means llvm-config there will take precedence.
RDEPEND="${RDEPEND}
@@ -72,10 +74,9 @@ PDEPEND="sys-devel/llvm-common
gold? ( >=sys-devel/llvmgold-${SLOT} )"
python_check_deps() {
- if use doc; then
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" ||
- return 1
- fi
+ use doc || return 0
+
+ has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
}
@@ -138,7 +139,7 @@ check_distribution_components() {
;;
# used only w/ USE=doc
docs-llvm-html)
- continue
+ use doc || continue
;;
esac
@@ -302,12 +303,16 @@ get_distribution_components() {
# python modules
opt-viewer
-
- # manpages
- docs-dsymutil-man
- docs-llvm-dwarfdump-man
- docs-llvm-man
)
+
+ if llvm_are_manpages_built; then
+ out+=(
+ # manpages
+ docs-dsymutil-man
+ docs-llvm-dwarfdump-man
+ docs-llvm-man
+ )
+ fi
use doc && out+=(
docs-llvm-html
)
@@ -391,15 +396,22 @@ multilib_src_configure() {
)
if multilib_is_native_abi; then
+ local build_docs=OFF
+ if llvm_are_manpages_built; then
+ build_docs=ON
+ mycmakeargs+=(
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ fi
+
mycmakeargs+=(
- -DLLVM_BUILD_DOCS=ON
+ -DLLVM_BUILD_DOCS=${build_docs}
-DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=ON
+ -DLLVM_ENABLE_SPHINX=${build_docs}
-DLLVM_ENABLE_DOXYGEN=OFF
-DLLVM_INSTALL_UTILS=ON
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
)
use gold && mycmakeargs+=(
-DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
@@ -494,6 +506,7 @@ multilib_src_install_all() {
_EOF_
docompress "/usr/lib/llvm/${SLOT}/share/man"
+ llvm_install_manpages
}
pkg_postinst() {
diff --git a/sys-devel/llvm/llvm-11.0.0.ebuild b/sys-devel/llvm/llvm-11.0.0.ebuild
index 1a9eb3f6406..4f4194c6cef 100644
--- a/sys-devel/llvm/llvm-11.0.0.ebuild
+++ b/sys-devel/llvm/llvm-11.0.0.ebuild
@@ -10,6 +10,7 @@ inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="https://llvm.org/"
LLVM_COMPONENTS=( llvm )
+LLVM_MANPAGES=build
llvm.org_set_globals
# Those are in lib/Targets, without explicit CMakeLists.txt mention
@@ -59,11 +60,12 @@ BDEPEND="
<sys-libs/libcxx-$(ver_cut 1-3).9999
>=sys-devel/binutils-apple-5.1
)
- libffi? ( virtual/pkgconfig )
- $(python_gen_any_dep '
+ doc? ( $(python_gen_any_dep '
+ dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
- doc? ( dev-python/recommonmark[${PYTHON_USEDEP}] )
- ')"
+ ') )
+ libffi? ( virtual/pkgconfig )
+ ${PYTHON_DEPS}"
# There are no file collisions between these versions but having :0
# installed means llvm-config there will take precedence.
RDEPEND="${RDEPEND}
@@ -72,10 +74,9 @@ PDEPEND="sys-devel/llvm-common
gold? ( >=sys-devel/llvmgold-${SLOT} )"
python_check_deps() {
- if use doc; then
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" ||
- return 1
- fi
+ use doc || return 0
+
+ has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
}
@@ -138,7 +139,7 @@ check_distribution_components() {
;;
# used only w/ USE=doc
docs-llvm-html)
- continue
+ use doc || continue
;;
esac
@@ -302,12 +303,16 @@ get_distribution_components() {
# python modules
opt-viewer
-
- # manpages
- docs-dsymutil-man
- docs-llvm-dwarfdump-man
- docs-llvm-man
)
+
+ if llvm_are_manpages_built; then
+ out+=(
+ # manpages
+ docs-dsymutil-man
+ docs-llvm-dwarfdump-man
+ docs-llvm-man
+ )
+ fi
use doc && out+=(
docs-llvm-html
)
@@ -391,15 +396,22 @@ multilib_src_configure() {
)
if multilib_is_native_abi; then
+ local build_docs=OFF
+ if llvm_are_manpages_built; then
+ build_docs=ON
+ mycmakeargs+=(
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ fi
+
mycmakeargs+=(
- -DLLVM_BUILD_DOCS=ON
+ -DLLVM_BUILD_DOCS=${build_docs}
-DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=ON
+ -DLLVM_ENABLE_SPHINX=${build_docs}
-DLLVM_ENABLE_DOXYGEN=OFF
-DLLVM_INSTALL_UTILS=ON
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
)
use gold && mycmakeargs+=(
-DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
@@ -494,6 +506,7 @@ multilib_src_install_all() {
_EOF_
docompress "/usr/lib/llvm/${SLOT}/share/man"
+ llvm_install_manpages
}
pkg_postinst() {
diff --git a/sys-devel/llvm/llvm-12.0.0.9999.ebuild b/sys-devel/llvm/llvm-12.0.0.9999.ebuild
index 9c432a044b6..67438844e8e 100644
--- a/sys-devel/llvm/llvm-12.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-12.0.0.9999.ebuild
@@ -10,6 +10,7 @@ inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="https://llvm.org/"
LLVM_COMPONENTS=( llvm )
+LLVM_MANPAGES=build
llvm.org_set_globals
# Those are in lib/Targets, without explicit CMakeLists.txt mention
@@ -59,11 +60,12 @@ BDEPEND="
<sys-libs/libcxx-$(ver_cut 1-3).9999
>=sys-devel/binutils-apple-5.1
)
- libffi? ( virtual/pkgconfig )
- $(python_gen_any_dep '
+ doc? ( $(python_gen_any_dep '
+ dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
- doc? ( dev-python/recommonmark[${PYTHON_USEDEP}] )
- ')"
+ ') )
+ libffi? ( virtual/pkgconfig )
+ ${PYTHON_DEPS}"
# There are no file collisions between these versions but having :0
# installed means llvm-config there will take precedence.
RDEPEND="${RDEPEND}
@@ -72,10 +74,9 @@ PDEPEND="sys-devel/llvm-common
gold? ( >=sys-devel/llvmgold-${SLOT} )"
python_check_deps() {
- if use doc; then
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" ||
- return 1
- fi
+ use doc || return 0
+
+ has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
}
@@ -138,7 +139,7 @@ check_distribution_components() {
;;
# used only w/ USE=doc
docs-llvm-html)
- continue
+ use doc || continue
;;
esac
@@ -303,12 +304,16 @@ get_distribution_components() {
# python modules
opt-viewer
-
- # manpages
- docs-dsymutil-man
- docs-llvm-dwarfdump-man
- docs-llvm-man
)
+
+ if llvm_are_manpages_built; then
+ out+=(
+ # manpages
+ docs-dsymutil-man
+ docs-llvm-dwarfdump-man
+ docs-llvm-man
+ )
+ fi
use doc && out+=(
docs-llvm-html
)
@@ -392,15 +397,22 @@ multilib_src_configure() {
)
if multilib_is_native_abi; then
+ local build_docs=OFF
+ if llvm_are_manpages_built; then
+ build_docs=ON
+ mycmakeargs+=(
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ fi
+
mycmakeargs+=(
- -DLLVM_BUILD_DOCS=ON
+ -DLLVM_BUILD_DOCS=${build_docs}
-DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=ON
+ -DLLVM_ENABLE_SPHINX=${build_docs}
-DLLVM_ENABLE_DOXYGEN=OFF
-DLLVM_INSTALL_UTILS=ON
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
)
use gold && mycmakeargs+=(
-DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
@@ -495,6 +507,7 @@ multilib_src_install_all() {
_EOF_
docompress "/usr/lib/llvm/${SLOT}/share/man"
+ llvm_install_manpages
}
pkg_postinst() {