docs: Add GIRepository documentation build using gi-docgen

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3155
This commit is contained in:
Philip Withnall 2023-11-08 23:16:43 +00:00
parent bd803f8a11
commit 11e46361ef
4 changed files with 84 additions and 0 deletions

View File

@ -0,0 +1,50 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# Copyright 2023 Matthias Clasen
# Copyright 2023 Philip Withnall
[library]
name = "Girepository"
version = "@VERSION@"
browse_url = "https://gitlab.gnome.org/GNOME/glib/"
repository_url = "https://gitlab.gnome.org/GNOME/glib.git"
website_url = "https://www.gtk.org"
docs_urls = "https://docs.gtk.org/girepository/"
authors = "GLib Development Team"
license = "LGPL-2.1-or-later"
description = "GIRepository is a library providing access to typelibs and introspection data which describes C APIs"
dependencies = [ "GLib-2.0", "GModule-2.0", "GObject-2.0", "Gio-2.0" ]
devhelp = true
search_index = true
[dependencies."GLib-2.0"]
name = "GLib"
description = "The base utility library"
docs_url = "https://docs.gtk.org/glib/"
[dependencies."GModule-2.0"]
name = "GModule"
description = "Portable API for dynamically loading modules"
docs_url = "https://docs.gtk.org/gmodule/"
[dependencies."GObject-2.0"]
name = "GObject"
description = "The base type system library"
docs_url = "https://docs.gtk.org/gobject/"
[dependencies."Gio-2.0"]
name = "Gio"
description = "Useful classes for general purpose I/O, networking, IPC, settings, etc."
docs_url = "https://docs.gtk.org/gio/"
[theme]
name = "basic"
show_index_summary = true
show_class_hierarchy = true
[extra]
urlmap_file = "urlmap.js"
# The same order will be used when generating the index
content_files = [
]
content_images = [
]

View File

@ -0,0 +1,23 @@
girepository_toml = configure_file(
input: 'girepository.toml.in',
output: 'girepository.toml',
configuration: toml_conf,
)
custom_target('girepository-docs',
input: [ girepository_toml, girepository_gir[0] ],
output: 'girepository',
command: [
gidocgen,
'generate',
gidocgen_common_args,
'--config=@INPUT0@',
'--output-dir=@OUTPUT@',
'--content-dir=@0@'.format(meson.current_source_dir()),
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gobject'),
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gmodule'),
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gio'),
'@INPUT1@',
],
build_by_default: true,
)

View File

@ -0,0 +1,10 @@
// SPDX-License-Identifier: LGPL-2.1-or-later
// SPDX-FileCopyrightText: 2023 Matthias Clasen
var baseURLs = [
[ 'GdkPixbuf', 'https://docs.gtk.org/gdk-pixbuf/' ],
[ 'GLib', 'https://docs.gtk.org/glib/' ],
[ 'GModule', 'https://docs.gtk.org/gmodule/' ],
[ 'GObject', 'https://docs.gtk.org/gobject/' ],
[ 'Gio', 'https://docs.gtk.org/gio/' ],
[ 'Gtk', 'https://docs.gtk.org/gtk4/' ],
];

View File

@ -18,4 +18,5 @@ if get_option('documentation') and enable_gir
subdir('gmodule')
subdir('gobject')
subdir('gio')
subdir('girepository')
endif