Bug 258624 - devel/glib20: missing gtk-doc documentation
Summary: devel/glib20: missing gtk-doc documentation
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-desktop (Team)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-20 11:21 UTC by Hodong
Modified: 2022-04-13 10:41 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (desktop)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hodong 2021-09-20 11:21:05 UTC
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.
Comment 1 Adriaan de Groot freebsd_committer freebsd_triage 2022-04-11 18:59:35 UTC
glib20 2.70.4 seems to have a bug in its meson files when gtk_doc is on.
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-04-13 10:35:08 UTC
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(-)
Comment 3 Adriaan de Groot freebsd_committer freebsd_triage 2022-04-13 10:41:06 UTC
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.