Skip to content

Commit

Permalink
doc: Adapt GLib documentation path to GLib 2.80.2
Browse files Browse the repository at this point in the history
With GLib 2.80.2 (commit 548ec9f1), the installation paths for the documentation
has changed once again.

Rationale there was:
The `gi-docgen` tool is not designed to be used like that. In
particular, when nesting documentation directories, the generated
`*.devhelp2` files (needed by Devhelp to show the documentation) are
nested one directory level too deep for Devhelp to find them, and hence
are useless, and the documentation doesn’t show up in this common
documentation viewer.
  • Loading branch information
DimStar77 committed May 15, 2024
1 parent a38019e commit c54fd65
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,18 @@ if with_docs

if glib.version().version_compare('<2.79.0')
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
else
modules = ['glib', 'gobject' ]
elif glib.version().version_compare('<2.80.2')
glib_docpath = join_paths(glib_prefix, 'share', 'doc', 'glib-2.0')
modules = ['glib', 'gobject' ]
warning('glib >= 2.79.0 documention might not be properly referred from libmodulemd documentation.')
else
glib_docpath = join_paths(glib_prefix, 'share', 'doc')
modules = ['glib-2.0', 'gobject-2.0' ]
warning('glib >= 2.79.0 documention might not be properly referred from libmodulemd documentation.')
endif

foreach referred_module : [ 'glib', 'gobject' ]
foreach referred_module : modules
doc_module_path = join_paths(glib_docpath, referred_module)
doc_index_file = join_paths(doc_module_path, 'index.html')
ret = run_command ([test, '-e', doc_index_file],
Expand Down

0 comments on commit c54fd65

Please sign in to comment.