From 430b49aae203c875892189c27c6d566f9d3bc9d9 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Sun, 23 Aug 2026 22:18:30 -0400 Subject: [PATCH] [FIX] xz: two doc conditionals, and the flag that is not in the help MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --disable-doc was added and doxygen still ran. The API reference sits behind its own automake conditional, and the generated Makefile shows it plainly: @COND_DOXYGEN_TRUE@$(top_builddir)/doc/api/index.html: ... with the prefix stripped, so configure had set it true. Two conditionals in one package: --disable-doc for the man pages, --disable-doxygen for the API reference. This is the third documentation toolchain xz has asked for, after po4a. --disable-doxygen is NOT in configure's help text -- only --enable-doxygen is -- and it works anyway. That was checked rather than assumed: AC_ARG_ENABLE accepts both forms, and `enable_doxygen` is a real variable the script tests. groff taught the same lesson from the other side, where no such option existed and an invented flag would have drawn a warning and changed nothing. --- FR --- --disable-doc avait été ajouté et doxygen tournait encore. La référence d'API est derrière sa propre condition automake, et le Makefile généré le montre : @COND_DOXYGEN_TRUE@$(top_builddir)/doc/api/index.html: ... préfixe retiré, donc configure l'avait mise à vrai. Deux conditions dans un même paquet : --disable-doc pour les pages de manuel, --disable-doxygen pour l'API. Troisième chaîne de documentation que xz réclame, après po4a. --disable-doxygen n'est PAS dans l'aide de configure — seul --enable-doxygen y est — et fonctionne quand même. Cela a été vérifié plutôt que supposé : AC_ARG_ENABLE accepte les deux formes, et `enable_doxygen` est une variable que le script teste réellement. groff a enseigné la même leçon par l'autre bout, où aucune option n'existait et où un drapeau inventé n'aurait tiré qu'un avertissement sans rien changer. Assisted-by: Claude Opus 5 --- patches/pkgbuild/xz.sh | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/patches/pkgbuild/xz.sh b/patches/pkgbuild/xz.sh index 269a029..e29cfa2 100755 --- a/patches/pkgbuild/xz.sh +++ b/patches/pkgbuild/xz.sh @@ -41,9 +41,22 @@ assert len(hit) == 1, "xz: expected one ./configure line, got %d" % len(hit) i = hit[0] ind = re.match(r"^[ \t]*", lines[i]).group(0) assert lines[i].rstrip().endswith("\\"), "xz: ./configure does not continue" -lines.insert(i + 1, ind + " --disable-doc \\") +# TWO options, not one. --disable-doc was added first and doxygen still ran: +# the API reference is behind its own automake conditional. The generated +# Makefile shows it plainly -- +# +# @COND_DOXYGEN_TRUE@$(top_builddir)/doc/api/index.html: ... +# +# -- with the prefix stripped, so configure had set it true. +# +# --disable-doxygen is not in configure's help text; only --enable-doxygen is. +# It works anyway, and that was CHECKED rather than assumed: AC_ARG_ENABLE +# always accepts both forms, and `enable_doxygen` is a real variable the script +# tests. groff taught this the other way round -- there, no such option existed +# at all, and an invented flag would have drawn a warning and changed nothing. +lines.insert(i + 1, ind + " --disable-doc --disable-doxygen \\") io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines)) ZZPY -grep -A1 -E "^[[:space:]]*\./configure" PKGBUILD | grep -q -- "--disable-doc" || { - echo "xz: --disable-doc is not on the configure line" >&2; exit 1; } -echo "xz: doxygen API reference disabled" +grep -A1 -E "^[[:space:]]*\./configure" PKGBUILD | grep -q -- "--disable-doxygen" || { + echo "xz: --disable-doxygen is not on the configure line" >&2; exit 1; } +echo "xz: man pages and doxygen API reference both disabled"