Hello. glib-2.68.4/meson_options.txt includes gtk_doc option. option('gtk_doc', type : 'boolean', value : false, description : 'use gtk-doc to build documentation') With this option, html files can be produced. MESON_ARGS= -Db_lundef=false \ -Ddefault_library=both \ -Dinstalled_tests=false \ -Dlibmount=disabled \ -Dlocalstatedir=/var \ -Dselinux=disabled \ -Dxattr=false \ -Dgtk_doc=true ex) /usr/ports/devel/glib20/work/stage/usr/local/share/gtk-doc/html % ls gio glib gobject ... usr/local/share/gtk-doc/html/glib/glib-Warnings-and-Assertions.html usr/local/share/gtk-doc/html/glib/glib-URI-Functions.html usr/local/share/gtk-doc/html/glib/Sorted_binary_tree_preorder.svg usr/local/share/gtk-doc/html/glib/glib-String-Chunks.html usr/local/share/gtk-doc/html/glib/glib-Bookmark-file-parser.html usr/local/share/gtk-doc/html/glib/glib-Pointer-Arrays.html ... These files are very useful when using devhelp.
glib20 2.70.4 seems to have a bug in its meson files when gtk_doc is on.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f98beca9766c056a826c5ad0f6b3996e80a4528c commit f98beca9766c056a826c5ad0f6b3996e80a4528c Author: Adriaan de Groot <adridg@FreeBSD.org> AuthorDate: 2022-04-11 23:16:38 +0000 Commit: Adriaan de Groot <adridg@FreeBSD.org> CommitDate: 2022-04-13 10:34:08 +0000 devel/glib20: add DOCS option There is documentation possible with glib, using gtk-doc. Add a knob and the plist bits. The documentation depends on the tests, though: see glib issue https://gitlab.gnome.org/GNOME/glib/-/issues/2430 Futz a bit with the options and dependencies; TEST only needs dbus for the build, and the docs need the tests. PR: 258624 Reported by: Hodong@nimfsoft.art devel/glib20/Makefile | 10 +- devel/glib20/pkg-plist | 511 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 518 insertions(+), 3 deletions(-)
Docs needs tests at build-time, other than that straightforward enough. Upstream has an open issue https://gitlab.gnome.org/GNOME/glib/-/issues/2430 to try to untangle that, but not much movement.