summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-08-05 05:07:10 +0100
committerSam James <sam@gentoo.org>2022-08-05 05:07:58 +0100
commit92f3b866eaf6514215fb89afdb40c37f778128af (patch)
tree6bba97cd8ab1cc70a5bd4bc5ee9f28519b00f984 /dev-util/cmake
parentkde-apps/messagelib: backport cmake 3.24.0 fixes (diff)
downloadgentoo-92f3b866eaf6514215fb89afdb40c37f778128af.tar.gz
gentoo-92f3b866eaf6514215fb89afdb40c37f778128af.tar.bz2
gentoo-92f3b866eaf6514215fb89afdb40c37f778128af.zip
dev-util/cmake: provide pre-generated man pages
Closes: https://bugs.gentoo.org/784815 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/cmake')
-rw-r--r--dev-util/cmake/Manifest1
-rw-r--r--dev-util/cmake/cmake-3.24.0.ebuild23
-rw-r--r--dev-util/cmake/cmake-9999.ebuild23
3 files changed, 45 insertions, 2 deletions
diff --git a/dev-util/cmake/Manifest b/dev-util/cmake/Manifest
index 8cb1725e3ef8..40cd2fe7e71e 100644
--- a/dev-util/cmake/Manifest
+++ b/dev-util/cmake/Manifest
@@ -12,4 +12,5 @@ DIST cmake-3.23.3-SHA-256.txt.asc 833 BLAKE2B 10f61d7cfaa5c86d0e372f33d9ba0dbe7a
DIST cmake-3.23.3.tar.gz 9988050 BLAKE2B 55105ce380e5e9f1839fc38cc0eaefe505d58bffa60feab9813a36c7cac92f4fb6aa6b6aaad899f1e8d58cfa5ececb9e7335a470244ccc06848d833b1eddf224 SHA512 75f86abe60ef28ba9bd06546c0c24578921621fb4be942171e629366a759cf1469e430945addc85f8ce977920883c063ed26de1b78fd24dfd98d0eb604800632
DIST cmake-3.24.0-SHA-256.txt 1646 BLAKE2B f41c0e2f280258c79c0d269a8249dc2a5e6615f50277f452f0b5b71f106f1cbcbb272bce4f28580f422cd8f294d040135abcd0d0a1e00cec3c3d3ceaef99286d SHA512 c1a0d16ba46dad95aacdf5e0985df1b75294e2fa664d15a8eabeae126b7e1517ce303c44746a58d339d2622d4dc8be263bd332af5b804ac614e64a2e633f6ec9
DIST cmake-3.24.0-SHA-256.txt.asc 833 BLAKE2B 828f1130930635ad78b6829d8cb1780d9fb9a45edf1650e19a2869d18fd3225d869c664d28775a9b29934f1e3958dae542de3a37e5e3aa965b1704c512b2ee86 SHA512 dc0c495892716643f6ce1015240c373c6145ef070b35f7229d8f109a9bf4c771b49da6672ba765f69c293ed438e26afcab4bb6fa8a3c36f8b4ac91b49b6782bb
+DIST cmake-3.24.0-docs.tar.xz 490472 BLAKE2B f7dcbee55473add99406d8956657098f78e49eb30df96d73dfc8affc2ee4aca19159956189511e1cea821974e4741fd7b1c5d28f6e8f9cc31ace80c6c504b27d SHA512 dc69388e8ab20eae3c447e95f7d1b0c153a537ae81d18ac4dc4117a7df5348a2a9f35ce8c6c18c3fabe34f7d9ce3dc3f90f2323789c65c089679abe9e359f1f6
DIST cmake-3.24.0.tar.gz 10395167 BLAKE2B 72b75e3fa4ae1710f5e5d1ac4e356a723ec1b197c9121cd73273f079f7eb31e61fbd5acab228e9b5696c4f8ab85213da4a6cf8e35068f3ca776082742084ae6d SHA512 91507fc0643f2de20e37cd8d6a539d8cb38a80b604bf77de8e88c8446b6d7b6d02b7329d58966dc2412c6c75edcb9dfbdae02fe84965fefeb7ca47f87631fe17
diff --git a/dev-util/cmake/cmake-3.24.0.ebuild b/dev-util/cmake/cmake-3.24.0.ebuild
index 68485b4312d0..ee2c9abfd92f 100644
--- a/dev-util/cmake/cmake-3.24.0.ebuild
+++ b/dev-util/cmake/cmake-3.24.0.ebuild
@@ -3,6 +3,16 @@
EAPI=8
+# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-cmake-docs
+# Set to 1 if prebuilt, 0 if not
+# (the construct below is to allow overriding from env for script)
+CMAKE_DOCS_PREBUILT=${CMAKE_DOCS_PREBUILT:-1}
+CMAKE_DOCS_PREBUILT_DEV=sam
+CMAKE_DOCS_VERSION=$(ver_cut 1-3)
+# Default to generating docs (inc. man pages) if no prebuilt; overridden later
+# See bug #784815
+CMAKE_DOCS_USEFLAG="+doc"
+
# TODO RunCMake.LinkWhatYouUse fails consistently w/ ninja
# ... but seems fine as of 3.22.3?
# TODO ... but bootstrap sometimes(?) fails with ninja now. bug #834759.
@@ -16,6 +26,8 @@ MY_P="${P/_/-}"
DESCRIPTION="Cross platform Make"
HOMEPAGE="https://cmake.org/"
if [[ ${PV} == 9999 ]] ; then
+ CMAKE_DOCS_PREBUILT=0
+
EGIT_REPO_URI="https://gitlab.kitware.com/cmake/cmake.git"
inherit git-r3
else
@@ -25,6 +37,10 @@ else
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/bradking.asc
inherit verify-sig
+ if [[ ${CMAKE_DOCS_PREBUILT} == 1 ]] ; then
+ SRC_URI+=" !doc? ( https://dev.gentoo.org/~${CMAKE_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${CMAKE_DOCS_VERSION}-docs.tar.xz )"
+ fi
+
SRC_URI+=" verify-sig? (
https://github.com/Kitware/CMake/releases/download/v$(ver_cut 1-3)/${MY_P}-SHA-256.txt
https://github.com/Kitware/CMake/releases/download/v$(ver_cut 1-3)/${MY_P}-SHA-256.txt.asc
@@ -40,7 +56,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="CMake"
SLOT="0"
-IUSE="doc emacs ncurses qt5 test"
+IUSE="${CMAKE_DOCS_USEFLAG} emacs ncurses qt5 test"
RESTRICT="!test? ( test )"
RDEPEND="
@@ -227,6 +243,11 @@ src_test() {
src_install() {
cmake_src_install
+ # If USE=doc, there'll be newly generated docs which we install instead.
+ if ! use doc && [[ ${CMAKE_DOCS_PREBUILT} == 1 ]] ; then
+ doman "${WORKDIR}"/${PN}-${CMAKE_DOCS_VERSION}-docs/docs/*.[0-8]
+ fi
+
if use emacs; then
elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
diff --git a/dev-util/cmake/cmake-9999.ebuild b/dev-util/cmake/cmake-9999.ebuild
index 1a912f345994..918d1d56fccd 100644
--- a/dev-util/cmake/cmake-9999.ebuild
+++ b/dev-util/cmake/cmake-9999.ebuild
@@ -3,6 +3,16 @@
EAPI=8
+# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-cmake-docs
+# Set to 1 if prebuilt, 0 if not
+# (the construct below is to allow overriding from env for script)
+CMAKE_DOCS_PREBUILT=${CMAKE_DOCS_PREBUILT:-1}
+CMAKE_DOCS_PREBUILT_DEV=sam
+CMAKE_DOCS_VERSION=$(ver_cut 1-3)
+# Default to generating docs (inc. man pages) if no prebuilt; overridden later
+# See bug #784815
+CMAKE_DOCS_USEFLAG="+doc"
+
# TODO RunCMake.LinkWhatYouUse fails consistently w/ ninja
# ... but seems fine as of 3.22.3?
# TODO ... but bootstrap sometimes(?) fails with ninja now. bug #834759.
@@ -16,6 +26,8 @@ MY_P="${P/_/-}"
DESCRIPTION="Cross platform Make"
HOMEPAGE="https://cmake.org/"
if [[ ${PV} == 9999 ]] ; then
+ CMAKE_DOCS_PREBUILT=0
+
EGIT_REPO_URI="https://gitlab.kitware.com/cmake/cmake.git"
inherit git-r3
else
@@ -25,6 +37,10 @@ else
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/bradking.asc
inherit verify-sig
+ if [[ ${CMAKE_DOCS_PREBUILT} == 1 ]] ; then
+ SRC_URI+=" !doc? ( https://dev.gentoo.org/~${CMAKE_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${CMAKE_DOCS_VERSION}-docs.tar.xz )"
+ fi
+
SRC_URI+=" verify-sig? (
https://github.com/Kitware/CMake/releases/download/v$(ver_cut 1-3)/${MY_P}-SHA-256.txt
https://github.com/Kitware/CMake/releases/download/v$(ver_cut 1-3)/${MY_P}-SHA-256.txt.asc
@@ -40,7 +56,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="CMake"
SLOT="0"
-IUSE="doc emacs ncurses qt5 test"
+IUSE="${CMAKE_DOCS_USEFLAG} emacs ncurses qt5 test"
RESTRICT="!test? ( test )"
RDEPEND="
@@ -227,6 +243,11 @@ src_test() {
src_install() {
cmake_src_install
+ # If USE=doc, there'll be newly generated docs which we install instead.
+ if ! use doc && [[ ${CMAKE_DOCS_PREBUILT} == 1 ]] ; then
+ doman "${WORKDIR}"/${PN}-${CMAKE_DOCS_VERSION}-docs/docs/*.[0-8]
+ fi
+
if use emacs; then
elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc
elisp-site-file-install "${FILESDIR}/${SITEFILE}"