[FIX] cmake: no Sphinx manual
CMake Error at Utilities/Sphinx/CMakeLists.txt:52 (message): cmake builds its own manual and man pages with Sphinx, asked for by --sphinx-man and --sphinx-html. python-sphinx is a large Python documentation stack and cmake is wanted here as a build tool. Both flags, and they are bootstrap arguments rather than -D options -- cmake configures itself with its own script before it can run itself. Dropping one leaves the other pulling Sphinx in and the error is identical, which is how a half-fix looks like no fix. --- FR --- CMake Error at Utilities/Sphinx/CMakeLists.txt:52 (message): cmake batit son propre manuel et ses pages de manuel avec Sphinx, reclames par --sphinx-man et --sphinx-html. python-sphinx est une large pile de documentation Python, et cmake est voulu ici comme outil de construction. Les deux drapeaux, et ce sont des arguments d amorcage plutot que des options -D : cmake se configure avec son propre script avant de pouvoir s executer lui-meme. N en retirer qu un laisse l autre tirer Sphinx et l erreur est identique, ce qui donne a une demi-correction l apparence d aucune. Assisted-by: Claude Opus 5
This commit is contained in:
parent
3267c6484c
commit
9a598fdd4d
1 changed files with 28 additions and 0 deletions
|
|
@ -82,3 +82,31 @@ sed -n '/^makedepends=(/,/)/p' PKGBUILD | grep -qw emacs && {
|
|||
grep -q 'cmake-mode' PKGBUILD && {
|
||||
echo "cmake: a cmake-mode reference remains -- check it is harmless" >&2; }
|
||||
echo "cmake: emacs byte-compilation dropped (the .el is installed regardless)"
|
||||
|
||||
# --- no Sphinx documentation ---------------------------------------------------
|
||||
#
|
||||
# CMake Error at Utilities/Sphinx/CMakeLists.txt:52 (message):
|
||||
#
|
||||
# cmake builds its own manual and man pages with Sphinx, requested by
|
||||
# --sphinx-man and --sphinx-html in the bootstrap arguments. python-sphinx is not
|
||||
# in this port: it is a large Python documentation stack, and cmake is wanted here
|
||||
# as a build tool.
|
||||
#
|
||||
# BOTH FLAGS, and they are bootstrap arguments rather than -D options -- cmake
|
||||
# configures itself with its own script before it can run itself. Dropping only
|
||||
# one leaves the other pulling Sphinx in, and the error is identical, which is how
|
||||
# a half-fix looks like no fix.
|
||||
set -euo pipefail
|
||||
python3 - <<'ZZPY'
|
||||
import io, re
|
||||
lines = io.open("PKGBUILD", encoding="utf-8").read().split("\n")
|
||||
hit = [i for i, l in enumerate(lines) if re.match(r"^[ \t]*--sphinx-(man|html)[ \t]*\\\\?$", l)]
|
||||
assert len(hit) == 2, "cmake: expected two --sphinx flags, got %d" % len(hit)
|
||||
# Backwards: deleting shifts everything after it.
|
||||
for i in reversed(hit):
|
||||
del lines[i]
|
||||
io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
|
||||
ZZPY
|
||||
grep -qE "^[[:space:]]*--sphinx-" PKGBUILD && {
|
||||
echo "cmake: a --sphinx flag survived" >&2; exit 1; }
|
||||
echo "cmake: Sphinx manual and man pages dropped"
|
||||
|
|
|
|||
Loading…
Reference in a new issue