summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-05-18 19:05:38 +0200
committerMichał Górny <mgorny@gentoo.org>2023-05-18 20:54:15 +0200
commit3bce8799e4791f9d2fcb94e5c1ae287632ad7286 (patch)
tree94afdc6643a4cfa3da96b0d71891a74068c97db3 /eclass
parentdev-python/selenium: Fix outdated <dev-python/urllib3-2 dep (diff)
downloadgentoo-3bce8799e4791f9d2fcb94e5c1ae287632ad7286.tar.gz
gentoo-3bce8799e4791f9d2fcb94e5c1ae287632ad7286.tar.bz2
gentoo-3bce8799e4791f9d2fcb94e5c1ae287632ad7286.zip
llvm.org.eclass: Do not require separate manpage dist for every PV
Do not require a separate manpage dist for every minor release. Instead, use the 16.0.4 tarball for 16.x releases going forward. This makes sense since manpages rarely change -- at least for all the 16.x releases, all that's been changing were the build date and the version number in extraclangtools manpage. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/llvm.org.eclass39
1 files changed, 20 insertions, 19 deletions
diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index 8b1c074ac97d..c67651be6ffd 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -59,12 +59,6 @@ LLVM_VERSION=$(ver_cut 1-3)
# the correct branch to use.
_LLVM_MASTER_MAJOR=17
-# @ECLASS_VARIABLE: _LLVM_NEWEST_MANPAGE_RELEASE
-# @INTERNAL
-# @DESCRIPTION:
-# The newest release of LLVM for which manpages were generated.
-_LLVM_NEWEST_MANPAGE_RELEASE=16.0.4
-
# @ECLASS_VARIABLE: _LLVM_SOURCE_TYPE
# @INTERNAL
# @DESCRIPTION:
@@ -271,17 +265,16 @@ llvm.org_set_globals() {
fi
if [[ ${LLVM_MANPAGES} ]]; then
- # use pregenerated tarball for releases
- # up to _LLVM_NEWEST_MANPAGE_RELEASE
- if llvm_manpage_dist_available; then
- IUSE+=" doc"
+ IUSE+=" doc"
+ # use pregenerated tarball if available
+ local manpage_dist=$(llvm_manpage_get_dist)
+ if [[ -n ${manpage_dist} ]]; then
SRC_URI+="
!doc? (
- https://dev.gentoo.org/~mgorny/dist/llvm/llvm-${PV}-manpages.tar.bz2
+ https://dev.gentoo.org/~mgorny/dist/llvm/${manpage_dist}
)
"
else
- IUSE+=" doc"
# NB: this is not always the correct dep but it does no harm
BDEPEND+=" dev-python/sphinx"
fi
@@ -439,13 +432,21 @@ get_lit_flags() {
echo "-vv;-j;${LIT_JOBS:-$(makeopts_jobs)}"
}
-# @FUNCTION: llvm_manpage_dist_available
+# @FUNCTION: llvm_manpage_get_dist
# @DESCRIPTION:
-# Return true (0) if this LLVM version features prebuilt manpage
-# tarball, false (1) otherwise.
-llvm_manpage_dist_available() {
- [[ ${_LLVM_SOURCE_TYPE} == tar && ${PV} != *_rc* ]] &&
- ver_test "${PV}" -le "${_LLVM_NEWEST_MANPAGE_RELEASE}"
+# Output the filename of the manpage dist for this version,
+# if available. Otherwise returns without output.
+llvm_manpage_get_dist() {
+ if [[ ${_LLVM_SOURCE_TYPE} == tar && ${PV} != *_rc* ]]; then
+ case ${PV} in
+ 14*|15*|16.0.[0-3])
+ echo "llvm-${PV}-manpages.tar.bz2"
+ ;;
+ 16*)
+ echo "llvm-16.0.4-manpages.tar.bz2"
+ ;;
+ esac
+ fi
}
# @FUNCTION: llvm_are_manpages_built
@@ -464,7 +465,7 @@ llvm_install_manpages() {
if ! llvm_are_manpages_built; then
# (doman does not support custom paths)
insinto "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1"
- doins "${WORKDIR}/llvm-${PV}-manpages/${LLVM_COMPONENTS[0]}"/*.1
+ doins "${WORKDIR}"/llvm-*-manpages/"${LLVM_COMPONENTS[0]}"/*.1
fi
}