[FIX] p11-kit: the error named glib, and glib was not the subject
meson.build:65:18: ERROR: Dependency "glib-2.0" not found
This was nearly a sub-project. glib2 is not in this port and adding it is not one
package: Arch glib2 wants gobject-introspection, which itself needs glib2 -- a
cycle to bootstrap -- plus libsysprof-capture, dconf and gi-docgen.
Reading where the requirement comes from changed the answer entirely. The file is
doc/manual/meson.build and the line is
glib_prefix = dependency("glib-2.0").get_variable(pkgconfig : "prefix")
glib is consulted to find where gtk-doc keeps its cross-reference files. It is
not linked, not called, and no p11-kit code touches it. -D gtk_doc=false drops
the subdirectory and the dependency with it. Six lines of context replaced
several packages and a dependency cycle.
--- FR ---
meson.build:65:18: ERROR: Dependency "glib-2.0" not found
C etait presque un sous-projet. glib2 n est pas dans ce portage et l ajouter n est
pas un paquet : le glib2 d Arch veut gobject-introspection, qui depend lui-meme de
glib2 -- un cycle a amorcer -- plus libsysprof-capture, dconf et gi-docgen.
Lire d ou vient reellement l exigence a change la reponse. Le fichier est
doc/manual/meson.build et la ligne est
glib_prefix = dependency("glib-2.0").get_variable(pkgconfig : "prefix")
glib est consulte pour trouver ou gtk-doc range ses references croisees. Il n est
ni lie, ni appele, et aucun code de p11-kit ne le touche. -D gtk_doc=false
supprime le sous-repertoire et la dependance avec lui. Six lignes de contexte ont
remplace plusieurs paquets et un cycle de dependances.
Assisted-by: Claude Opus 5
This commit is contained in:
parent
8c7d8f52a9
commit
5418dace22
1 changed files with 33 additions and 0 deletions
33
patches/pkgbuild/p11-kit.sh
Executable file
33
patches/pkgbuild/p11-kit.sh
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env bash
|
||||
# p11-kit: no gtk-doc manual.
|
||||
#
|
||||
# meson.build:65:18: ERROR: Dependency "glib-2.0" not found (tried pkgconfig)
|
||||
#
|
||||
# THIS ONE WAS NEARLY A SUB-PROJECT. glib-2.0 is not in this port, and adding it
|
||||
# is not one package: Arch's glib2 wants gobject-introspection (which itself
|
||||
# needs glib2 -- a cycle to bootstrap), libsysprof-capture, dconf and gi-docgen.
|
||||
# Several packages and a circular dependency, for one entry in one build.
|
||||
#
|
||||
# Reading where the requirement actually comes from changed the answer entirely.
|
||||
# The file is doc/manual/meson.build, and the line is
|
||||
#
|
||||
# glib_prefix = dependency('glib-2.0').get_variable(pkgconfig : 'prefix')
|
||||
#
|
||||
# glib is consulted to find where gtk-doc keeps its cross-reference files. It is
|
||||
# not linked, not called, and nothing in p11-kit's code touches it. -D gtk_doc
|
||||
# is already in the PKGBUILD's option list, set to true; turning it false drops
|
||||
# the whole doc/manual subdirectory and the dependency with it.
|
||||
#
|
||||
# The lesson is the one this port keeps relearning: the error names glib, and
|
||||
# glib is not the subject. Six lines of context said so.
|
||||
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]*-D gtk_doc=true[ \t]*$", l)]
|
||||
assert len(hit) == 1, "p11-kit: expected one -D gtk_doc=true, got %d" % len(hit)
|
||||
lines[hit[0]] = lines[hit[0]].replace("gtk_doc=true", "gtk_doc=false")
|
||||
io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
|
||||
ZZPY
|
||||
grep -q -- "-D gtk_doc=false" PKGBUILD || { echo "p11-kit: gtk_doc not disabled" >&2; exit 1; }
|
||||
echo "p11-kit: gtk-doc manual disabled (glib was only locating its xrefs)"
|
||||
Loading…
Reference in a new issue