Skip to content

Commit f333619

Browse files
DimStar77ppisar
authored andcommitted
doc: Adapt GLib documentation path to GLib 2.80.1
With GLib 2.80.1 (commit 548ec9f1), the installation paths for the documentation have changed once again: 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. So, change the installed documentation directory hierarchy: * `${PREFIX}/share/doc/glib-2.0/gio` → `${PREFIX}/share/doc/gio-2.0` * `${PREFIX}/share/doc/glib-2.0/glib-unix` → `${PREFIX}/share/doc/glib-unix-2.0` * `${PREFIX}/share/doc/glib-2.0/gobject` → `${PREFIX}/share/doc/gobject-2.0` * etc. * `${PREFIX}/share/doc/glib-2.0/glib` → `${PREFIX}/share/doc/glib-2.0` https://gitlab.gnome.org/GNOME/glib/-/issues/3287 Reimplements #618
1 parent 7c97abf commit f333619

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

meson.build

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,19 @@ if with_docs
7373

7474
if glib.version().version_compare('<2.79.0')
7575
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
76+
glib_modules = ['glib', 'gobject' ]
7677
else
77-
glib_docpath = join_paths(glib_prefix, 'share', 'doc', 'glib-2.0')
7878
warning('glib >= 2.79.0 documention might not be properly referred from libmodulemd documentation.')
79+
if glib.version().version_compare('<2.80.1')
80+
glib_docpath = join_paths(glib_prefix, 'share', 'doc', 'glib-2.0')
81+
glib_modules = ['glib', 'gobject' ]
82+
else
83+
glib_docpath = join_paths(glib_prefix, 'share', 'doc')
84+
glib_modules = ['glib-2.0', 'gobject-2.0' ]
85+
endif
7986
endif
8087

81-
foreach referred_module : [ 'glib', 'gobject' ]
88+
foreach referred_module : glib_modules
8289
doc_module_path = join_paths(glib_docpath, referred_module)
8390
doc_index_file = join_paths(doc_module_path, 'index.html')
8491
ret = run_command ([test, '-e', doc_index_file],

0 commit comments

Comments
 (0)