Skip to content

Commit

Permalink
doc: Adapt GLib documentation path to GLib 2.79.0
Browse files Browse the repository at this point in the history
GLib 2.79.0 switched from gtk-doc to gi-docgen, whose format and
installation location are both not compatible. The libmodulemd build
script reported an error because of the new location.

This patch fixes the build failure by using the new location if GLib
is 2.79.0 or greater.

Although the libmodulemd documentation references to GLib remain
unresolved now (i.e. names of the functions and the types are not
hyperlinks), we keep using the new location because the new GLib
*.devhelp2 indices remain there and they can only improve over the
time.

If this expection does not fulfill, libmodulemd will either migrate to
gi-docgen, or drop the hard build-time dependency on GLib
documentation.

Reimplements: #611
  • Loading branch information
ppisar committed Jan 26, 2024
1 parent ffa0080 commit 7f1a55d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ with_docs = get_option('with_docs')
gtk_doc_referred_paths = []
if with_docs
gtkdoc = dependency('gtk-doc')
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')

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

foreach referred_module : [ 'glib', 'gobject' ]
doc_module_path = join_paths(glib_docpath, referred_module)
Expand Down

0 comments on commit 7f1a55d

Please sign in to comment.