]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
hwdep: migrate to gi-docgen from gtk-doc
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 16 Mar 2022 00:03:48 +0000 (09:03 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Thu, 17 Mar 2022 07:17:10 +0000 (16:17 +0900)
This commit uses gi-docgen and obsolete gtk-doc.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
doc/hwdep/alsahwdep.toml.in [new file with mode: 0644]
doc/hwdep/meson.build [new file with mode: 0644]
doc/hwdep/overview.md [new file with mode: 0644]
doc/hwdep/urlmap.js [new file with mode: 0644]
doc/meson.build
doc/reference/hwdep/alsahwdep-docs.xml [deleted file]
doc/reference/hwdep/alsahwdep.types [deleted file]
doc/reference/hwdep/meson.build [deleted file]
doc/reference/meson.build
src/hwdep/meson.build

diff --git a/doc/hwdep/alsahwdep.toml.in b/doc/hwdep/alsahwdep.toml.in
new file mode 100644 (file)
index 0000000..239e74a
--- /dev/null
@@ -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 (file)
index 0000000..40cc32e
--- /dev/null
@@ -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 (file)
index 0000000..0bbe817
--- /dev/null
@@ -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 (file)
index 0000000..915cb9d
--- /dev/null
@@ -0,0 +1,4 @@
+baseURLs = [
+    [ 'GLib', 'https://docs.gtk.org/glib/' ],
+    [ 'GObject', 'https://docs.gtk.org/gobject/' ],
+]
index 0844d195a30067c33dbeb9e7c71144a897900ff0..8575a661dad8564a50acf446be87ec81650d9ca1 100644 (file)
@@ -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 (file)
index 83428cd..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-                      "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
-<!ENTITY version SYSTEM "../version.xml">
-]>
-
-<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
-    <bookinfo>
-        <title>ALSAHwdep Reference Manual</title>
-    <releaseinfo>This document is for the ALSAHwdep library, version &version;.
-    </releaseinfo>
-    </bookinfo>
-
-    <chapter id="introduction">
-        <title>Introduction</title>
-        <para>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.
-        </para>
-    </chapter>
-
-    <chapter id="alsahwdep-enumerations">
-        <title>ALSAHwdep enumerations</title>
-        <xi:include href="xml/alsahwdep-enum-types.xml"/>
-    </chapter>
-
-    <chapter id="alsahwdep-global-methods">
-        <title>ALSAHwdep global methods</title>
-        <xi:include href="xml/query.xml"/>
-    </chapter>
-
-    <chapter id="alsahwdep-objects">
-        <title>ALSAHwdep objects</title>
-        <xi:include href="xml/device-info.xml"/>
-    </chapter>
-
-    <index id="index-all">
-        <title>Index of all symbols</title>
-        <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
-    </index>
-
-    <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
-
-</book>
diff --git a/doc/reference/hwdep/alsahwdep.types b/doc/reference/hwdep/alsahwdep.types
deleted file mode 100644 (file)
index 964e91e..0000000
+++ /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 (file)
index c5efb21..0000000
+++ /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,
-)
index fdfd4a324407855b014c7187ebaa1d3043b6a2c2..aad0fadcfcc6145a897fbf72a095a1663baa201c 100644 (file)
@@ -6,5 +6,4 @@ configure_file(
 
 subdir('timer')
 subdir('seq')
-subdir('hwdep')
 subdir('rawmidi')
index d02b38287a6c3ab24582309ec86eaf6eeab894cf..fd214ba96712c66d7c11624ff5a2599dad047bb6 100644 (file)
@@ -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,
-)