[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
2026-08-22 02:32:55 -04:00
|
|
|
#!/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"
|
[FIX] the second half of two of my own hooks
libevent: mv: cannot stat '<pkgdir>/usr/share/doc': No such file or directory
pam: rm: cannot remove '.../Linux-PAM/*.pdf': No such file or directory
Both are hooks I wrote in this session, and both stopped a build in exactly the
way this port has documented eight times: the documentation build was disabled
and its install was left in place. Turning EVENT__DOXYGEN off does not stop
package() moving usr/share/doc into the libevent-doc split; -Ddocs=disabled does
not stop pam deleting PDFs it no longer produces.
fakeroot was the first one I made myself. This makes three, so the rule is worth
stating instead of rediscovering: after disabling documentation anywhere, search
package() for share/doc, man, and the split arrays before believing the hook is
finished.
pam's rm becomes tolerant rather than deleted -- on a machine with the DocBook
stack the PDFs are real, and the comment above the line says why they must go:
they are not reproducible.
--- FR ---
libevent: mv: cannot stat '<pkgdir>/usr/share/doc': No such file or directory
pam: rm: cannot remove '.../Linux-PAM/*.pdf': No such file or directory
Deux hooks que j'ai écrits dans cette session, et deux arrêts de construction de
la façon exacte que ce portage a documentée huit fois : la construction de la
documentation désactivée, son installation laissée en place. Éteindre
EVENT__DOXYGEN n'empêche pas package() de déplacer usr/share/doc vers le
sous-paquet libevent-doc ; -Ddocs=disabled n'empêche pas pam de supprimer des PDF
qu'il ne produit plus.
fakeroot fut le premier de ma main. Cela en fait trois : la règle mérite d'être
énoncée plutôt que redécouverte — après avoir désactivé une documentation,
chercher dans package() share/doc, man, et les tableaux de sous-paquets avant de
croire le hook terminé.
Le rm de pam devient tolérant plutôt que supprimé : sur une machine dotée de la
pile DocBook les PDF existent, et le commentaire au-dessus dit pourquoi ils
doivent partir — ils ne sont pas reproductibles.
Assisted-by: Claude Opus 5
2026-08-23 19:09:10 -04:00
|
|
|
|
|
|
|
|
# --- and the docs split, which I left behind ----------------------------------
|
|
|
|
|
#
|
|
|
|
|
# mv: cannot stat '<pkgdir>/usr/share/doc': No such file or directory
|
|
|
|
|
#
|
|
|
|
|
# Turning EVENT__DOXYGEN off above stopped the documentation being BUILT and left
|
|
|
|
|
# package() moving it into the libevent-doc split:
|
|
|
|
|
#
|
|
|
|
|
# mv {"$pkgdir",doc}/usr/share/doc
|
|
|
|
|
#
|
|
|
|
|
# NINTH time in this port, and the second time I have made it myself rather than
|
|
|
|
|
# inherited it: fakeroot was the other. Removing a documentation build without
|
|
|
|
|
# removing its install is apparently the easiest mistake available here, so it is
|
|
|
|
|
# worth stating the rule plainly -- after disabling documentation anywhere,
|
|
|
|
|
# search package() for share/doc, man, and the split arrays before believing the
|
|
|
|
|
# hook is finished.
|
|
|
|
|
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.search(r"share/doc", l) and l.lstrip().startswith("mv ")]
|
|
|
|
|
assert len(hit) == 1, "libevent: expected one share/doc move, got %d" % len(hit)
|
|
|
|
|
i = hit[0]
|
|
|
|
|
ind = re.match(r"^[ \t]*", lines[i]).group(0)
|
|
|
|
|
lines[i] = ind + ': # doxygen is off above, so usr/share/doc is never created.'
|
|
|
|
|
io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
|
|
|
|
|
ZZPY
|
|
|
|
|
grep -qE "^[[:space:]]*mv .*share/doc" PKGBUILD && {
|
|
|
|
|
echo "libevent: the docs move survived" >&2; exit 1; }
|
|
|
|
|
echo "libevent: docs split removed (nothing builds them now)"
|