[ADD] nlohmann-json, and three more packages without their docs
nlohmann-json is a real closure gap, not a documentation cut: both cmake and
cppdap stop on "Could NOT find nlohmann_json". It is a header-only C++ library,
one of the cheapest packages in the list, and cmake is not optional -- the
cmake/cppdap/jsoncpp/libuv group behind it is what several other packages build
with.
The other three are doxygen and sphinx again. jsoncpp's is the least readable
failure in the port so far: doxybuild.py is handed an empty doxygen path and
raises Exception('path is empty.'), so a missing tool arrives as a Python
traceback about a path.
libuv needed two places -- `make man -C docs` and the install of
docs/build/man/libuv.1 -- the same shape as libxml2's docs split and pam's PDFs:
a failure on a path at the end of package(), after a compile that worked.
--- FR ---
nlohmann-json est un vrai trou de fermeture, pas une coupe de documentation :
cmake et cppdap s'arrêtent tous deux sur « Could NOT find nlohmann_json ». C'est
une bibliothèque C++ d'en-têtes seuls, l'un des paquets les moins chers de la
liste, et cmake n'est pas optionnel — le groupe cmake/cppdap/jsoncpp/libuv
derrière lui est ce avec quoi plusieurs autres se bâtissent.
Les trois autres sont encore doxygen et sphinx. Celui de jsoncpp est l'échec le
moins lisible du portage jusqu'ici : doxybuild.py reçoit un chemin de doxygen
vide et lève Exception('path is empty.'), donc un outil manquant arrive sous la
forme d'une trace Python parlant d'un chemin.
libuv demandait deux endroits — `make man -C docs` et l'installation de
docs/build/man/libuv.1 — même forme que le découpage de libxml2 et les PDF de
pam : un échec sur un chemin en fin de package(), après une compilation réussie.
Assisted-by: Claude Opus 5
This commit is contained in:
parent
e5c6835234
commit
4eca3612f9
4 changed files with 89 additions and 0 deletions
28
patches/pkgbuild/jsoncpp.sh
Executable file
28
patches/pkgbuild/jsoncpp.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# jsoncpp: no doxygen build.
|
||||||
|
#
|
||||||
|
# File "doxybuild.py", line 82, in assert_is_exe
|
||||||
|
# raise Exception('path is empty.')
|
||||||
|
#
|
||||||
|
# A python traceback, which is what makes this one hard to read: doxybuild.py was
|
||||||
|
# handed an empty doxygen path because there is no doxygen, and it reports that
|
||||||
|
# as a path problem. build() runs it after the compile has already finished.
|
||||||
|
set -euo pipefail
|
||||||
|
python3 - <<'ZZPY'
|
||||||
|
import io, re
|
||||||
|
lines = io.open("PKGBUILD", encoding="utf-8").read().split("\n")
|
||||||
|
# The call spans several lines: find it and drop through its last continuation.
|
||||||
|
hit = [i for i, l in enumerate(lines) if re.search(r"python doxybuild\.py", l)]
|
||||||
|
assert len(hit) == 1, "jsoncpp: expected one doxybuild call, got %d" % len(hit)
|
||||||
|
i = hit[0]
|
||||||
|
j = i
|
||||||
|
while lines[j].rstrip().endswith("\\"):
|
||||||
|
j += 1
|
||||||
|
del lines[i:j + 1]
|
||||||
|
# The `echo "Building docs..."` above it would now announce nothing.
|
||||||
|
if i > 0 and "Building docs" in lines[i - 1]:
|
||||||
|
del lines[i - 1]
|
||||||
|
io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
|
||||||
|
ZZPY
|
||||||
|
grep -q "doxybuild" PKGBUILD && { echo "jsoncpp: doxybuild survived" >&2; exit 1; }
|
||||||
|
echo "jsoncpp: doxygen build removed"
|
||||||
20
patches/pkgbuild/libevent.sh
Executable file
20
patches/pkgbuild/libevent.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# libevent: no Doxygen API reference.
|
||||||
|
#
|
||||||
|
# -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
|
||||||
|
# CMake Error at cmake/UseDoxygen.cmake:108 (message):
|
||||||
|
#
|
||||||
|
# EVENT__DOXYGEN=ON makes it a hard requirement. doxygen is the most expensive of
|
||||||
|
# the documentation tools this port declined -- it wants clang, fmt, spdlog and
|
||||||
|
# llvm-libs, an entire compiler infrastructure to produce HTML.
|
||||||
|
set -euo pipefail
|
||||||
|
python3 - <<'ZZPY'
|
||||||
|
import io
|
||||||
|
s = io.open("PKGBUILD", encoding="utf-8").read()
|
||||||
|
old = "-D EVENT__DOXYGEN=ON"
|
||||||
|
assert s.count(old) == 1, "libevent: expected one EVENT__DOXYGEN, got %d" % s.count(old)
|
||||||
|
s = s.replace(old, "-D EVENT__DOXYGEN=OFF", 1)
|
||||||
|
io.open("PKGBUILD", "w", encoding="utf-8").write(s)
|
||||||
|
ZZPY
|
||||||
|
grep -q "EVENT__DOXYGEN=OFF" PKGBUILD || { echo "libevent: doxygen not disabled" >&2; exit 1; }
|
||||||
|
echo "libevent: Doxygen reference disabled"
|
||||||
32
patches/pkgbuild/libuv.sh
Executable file
32
patches/pkgbuild/libuv.sh
Executable file
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# libuv: no man page.
|
||||||
|
#
|
||||||
|
# Makefile:14: *** The 'sphinx-build' command was not found.
|
||||||
|
#
|
||||||
|
# TWO PLACES: `make man -C docs` builds it and package() installs
|
||||||
|
# docs/build/man/libuv.1. Removing only the build gives
|
||||||
|
#
|
||||||
|
# install: cannot stat 'docs/build/man/libuv.1'
|
||||||
|
#
|
||||||
|
# which is the same shape as libxml2's docs split and pam's PDFs -- a failure on
|
||||||
|
# a path, at the end of package(), after a compile that worked.
|
||||||
|
set -euo pipefail
|
||||||
|
python3 - <<'ZZPY'
|
||||||
|
import io, re
|
||||||
|
lines = io.open("PKGBUILD", encoding="utf-8").read().split("\n")
|
||||||
|
mk = [i for i, l in enumerate(lines) if re.search(r"make man -C docs", l)]
|
||||||
|
assert len(mk) == 1, "libuv: expected one `make man -C docs`, got %d" % len(mk)
|
||||||
|
inst = [i for i, l in enumerate(lines) if "docs/build/man/libuv.1" in l]
|
||||||
|
assert len(inst) == 1, "libuv: expected one man install, got %d" % len(inst)
|
||||||
|
i = inst[0]
|
||||||
|
# The install spans two lines: the source and the destination.
|
||||||
|
j = i
|
||||||
|
while lines[j].rstrip().endswith("\\"):
|
||||||
|
j += 1
|
||||||
|
del lines[i:j + 1]
|
||||||
|
del lines[mk[0]]
|
||||||
|
io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
|
||||||
|
ZZPY
|
||||||
|
grep -qE "make man -C docs|libuv\.1" PKGBUILD && {
|
||||||
|
echo "libuv: a man page reference survived" >&2; exit 1; }
|
||||||
|
echo "libuv: man page dropped (no sphinx)"
|
||||||
|
|
@ -261,6 +261,15 @@ STAGE1_PACKAGES=(
|
||||||
# runtimes behind doxygen or asciidoctor, so it is cheaper to build than to
|
# runtimes behind doxygen or asciidoctor, so it is cheaper to build than to
|
||||||
# hook around.
|
# hook around.
|
||||||
scdoc
|
scdoc
|
||||||
|
# nlohmann-json: a real closure gap, not a documentation cut. BOTH cmake and
|
||||||
|
# cppdap stop on
|
||||||
|
#
|
||||||
|
# Could NOT find nlohmann_json (missing: nlohmann_json_DIR)
|
||||||
|
#
|
||||||
|
# It is a header-only C++ library -- one of the cheapest packages in this
|
||||||
|
# list -- and cmake is not optional here: the whole cmake/cppdap/jsoncpp/
|
||||||
|
# libuv group behind it is what several other packages build with.
|
||||||
|
nlohmann-json
|
||||||
# libxslt stays in the list because it is part of the distribution, but
|
# libxslt stays in the list because it is part of the distribution, but
|
||||||
# STAGE 1 CANNOT BUILD IT:
|
# STAGE 1 CANNOT BUILD IT:
|
||||||
#
|
#
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue