From 0ae6e2ecf28880e9b0c031867cdde6ccad42bad4 Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Wed, 16 Mar 2022 09:03:48 +0900 Subject: [PATCH] hwdep: migrate to gi-docgen from gtk-doc This commit uses gi-docgen and obsolete gtk-doc. Signed-off-by: Takashi Sakamoto --- doc/hwdep/alsahwdep.toml.in | 34 +++++++++++++++++++ doc/hwdep/meson.build | 27 +++++++++++++++ doc/hwdep/overview.md | 7 ++++ doc/hwdep/urlmap.js | 4 +++ doc/meson.build | 1 + doc/reference/hwdep/alsahwdep-docs.xml | 47 -------------------------- doc/reference/hwdep/alsahwdep.types | 1 - doc/reference/hwdep/meson.build | 10 ------ doc/reference/meson.build | 1 - src/hwdep/meson.build | 9 +---- 10 files changed, 74 insertions(+), 67 deletions(-) create mode 100644 doc/hwdep/alsahwdep.toml.in create mode 100644 doc/hwdep/meson.build create mode 100644 doc/hwdep/overview.md create mode 100644 doc/hwdep/urlmap.js delete mode 100644 doc/reference/hwdep/alsahwdep-docs.xml delete mode 100644 doc/reference/hwdep/alsahwdep.types delete mode 100644 doc/reference/hwdep/meson.build diff --git a/doc/hwdep/alsahwdep.toml.in b/doc/hwdep/alsahwdep.toml.in new file mode 100644 index 0000000..239e74a --- /dev/null +++ b/doc/hwdep/alsahwdep.toml.in @@ -0,0 +1,34 @@ +[library] +version = "@VERSION@" +description = "alsahwdep" +authors = "Takashi Sakamoto" +license = "LGPL-3.0-or-later" +website_url = "https://alsa-project.github.io/alsa-gobject-docs/alsahwdep/" +browse_url = "https://github.com/alsa-project/alsa-gobject" +repository_url = "https://github.com/alsa-project/alsa-gobject.git" + +dependencies = [ + "GLib-2.0", + "GObject-2.0", +] + +[dependencies."GLib-2.0"] +name = "GLib" +description = "The base utility library" +docs_url = "https://docs.gtk.org/glib/" + +[dependencies."GObject-2.0"] +name = "GObject" +description = "The base type system and object class" +docs_url = "https://docs.gtk.org/gobject/" + +[source-location] +base_url = "https://github.com/alsa-project/alsa-gobject/blob/master/" +file_format = "{filename}#L{line}" + +[extra] +content_files = [ + "overview.md", +] + +urlmap_file = "urlmap.js" diff --git a/doc/hwdep/meson.build b/doc/hwdep/meson.build new file mode 100644 index 0000000..40cc32e --- /dev/null +++ b/doc/hwdep/meson.build @@ -0,0 +1,27 @@ +ext_contents = [ + 'overview.md', +] + +doc_toml = configure_file( + input: 'alsahwdep.toml.in', + output: 'alsahwdep.toml', + configuration: conf, +) + +custom_target('alsahwdep-doc', + input: [ doc_toml, alsahwdep_gir[0] ], + output: 'alsahwdep', + command: [ + gidocgen, + 'generate', + '--no-namespace-dir', + '--config=@INPUT0@', + '--output-dir=@OUTPUT@', + '--content-dir=@0@'.format(meson.current_source_dir()), + '@INPUT1@', + ], + depend_files: [ ext_contents ], + build_by_default: true, + install: true, + install_dir: doc_dir, +) diff --git a/doc/hwdep/overview.md b/doc/hwdep/overview.md new file mode 100644 index 0000000..0bbe817 --- /dev/null +++ b/doc/hwdep/overview.md @@ -0,0 +1,7 @@ +Title: Overview + +This library is designed for applications to manipulate ALSA hwdep character device and retrieve +common information of hardware dependent functionality abstracted as hwdep device. As the design +concept means; hardware dependent, this library has no further functionality. Each applications +should implement it by their own. file descriptor and creates GSource for event dispatching by +GLib's GMainContext/GMainLoop. diff --git a/doc/hwdep/urlmap.js b/doc/hwdep/urlmap.js new file mode 100644 index 0000000..915cb9d --- /dev/null +++ b/doc/hwdep/urlmap.js @@ -0,0 +1,4 @@ +baseURLs = [ + [ 'GLib', 'https://docs.gtk.org/glib/' ], + [ 'GObject', 'https://docs.gtk.org/gobject/' ], +] diff --git a/doc/meson.build b/doc/meson.build index 0844d19..8575a66 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -10,4 +10,5 @@ dependency('gi-docgen', gidocgen = find_program('gi-docgen') subdir('ctl') +subdir('hwdep') subdir('reference') diff --git a/doc/reference/hwdep/alsahwdep-docs.xml b/doc/reference/hwdep/alsahwdep-docs.xml deleted file mode 100644 index 83428cd..0000000 --- a/doc/reference/hwdep/alsahwdep-docs.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - -]> - - - - ALSAHwdep Reference Manual - This document is for the ALSAHwdep library, version &version;. - - - - - Introduction - This library is designed for applications to manipulate ALSA - hwdep character device and retrieve common information of hardware - dependent functionality abstracted as hwdep device. As the design - concept means; hardware dependent, this library has no further - functionality. Each applications should implement it by their own. - - - - - ALSAHwdep enumerations - - - - - ALSAHwdep global methods - - - - - ALSAHwdep objects - - - - - Index of all symbols - - - - - - diff --git a/doc/reference/hwdep/alsahwdep.types b/doc/reference/hwdep/alsahwdep.types deleted file mode 100644 index 964e91e..0000000 --- a/doc/reference/hwdep/alsahwdep.types +++ /dev/null @@ -1 +0,0 @@ -alsahwdep_device_info_get_type diff --git a/doc/reference/hwdep/meson.build b/doc/reference/hwdep/meson.build deleted file mode 100644 index c5efb21..0000000 --- a/doc/reference/hwdep/meson.build +++ /dev/null @@ -1,10 +0,0 @@ -gnome.gtkdoc('alsahwdep', - src_dir : alsahwdep_dir, - main_xml : 'alsahwdep-docs.xml', - scan_args: [ - '--ignore-headers=privates.h', - ], - gobject_typesfile: 'alsahwdep.types', - dependencies: alsahwdep_dependency, - install : true, -) diff --git a/doc/reference/meson.build b/doc/reference/meson.build index fdfd4a3..aad0fad 100644 --- a/doc/reference/meson.build +++ b/doc/reference/meson.build @@ -6,5 +6,4 @@ configure_file( subdir('timer') subdir('seq') -subdir('hwdep') subdir('rawmidi') diff --git a/src/hwdep/meson.build b/src/hwdep/meson.build index d02b382..fd214ba 100644 --- a/src/hwdep/meson.build +++ b/src/hwdep/meson.build @@ -101,7 +101,7 @@ pkg.generate(library, ) # Generate metadata for gobject introspection. -gnome.generate_gir(library, +alsahwdep_gir = gnome.generate_gir(library, sources: enums + headers + sources, nsversion: '0.0', namespace: namespace, @@ -116,10 +116,3 @@ gnome.generate_gir(library, header: 'alsahwdep.h', install: true, ) - -# For documentation of gtk-doc. -alsahwdep_dir = include_directories('.') -alsahwdep_dependency = declare_dependency( - link_with: library, - dependencies: dependencies, -) -- 2.47.3