[gcr/gi-docsgen: 1/2] docs: Port from gtk-doc to gi-docgen




commit bae4ddc99f255c2aa2c7b0117e554f3b139124fb
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Thu Sep 30 13:41:44 2021 +0200

    docs: Port from gtk-doc to gi-docgen
    
    gtk-doc has been slowly dying for the past few years. With gi-docgen we
    have a clear successor in sight to replace the voodoo magic one needs to
    get the whole documentation setup.
    
    See the [gi-docgen tutorial] for more info on how it all works.
    
    [gi-docgen tutorial]: https://gnome.pages.gitlab.gnome.org/gi-docgen/tutorial.html

 docs/{reference => }/COPYING                     |   0
 docs/gck/gck-pkcs11-links.md                     |  10 +
 docs/gck/gck.toml.in                             |  34 +
 docs/gck/meson.build                             |  32 +
 docs/gcr/gcr.toml.in                             |  37 +
 docs/gcr/meson.build                             |  32 +
 docs/meson.build                                 |   6 +-
 docs/reference/gck/gck-docs.sgml                 |  37 -
 docs/reference/gck/gck-overrides.txt             |   2 -
 docs/reference/gck/gck-pkcs11-links.xml          |  25 -
 docs/reference/gck/gck-sections.txt              | 484 ------------
 docs/reference/gck/gck.types                     |  15 -
 docs/reference/gck/meson.build                   |  36 -
 docs/reference/gck/version.xml.in                |   1 -
 docs/reference/gcr/gcr-docs.sgml                 |  81 --
 docs/reference/gcr/gcr-overrides.txt             |   2 -
 docs/reference/gcr/gcr-sections.txt              | 899 -----------------------
 docs/reference/gcr/gcr-shooter.c                 | 466 ------------
 docs/reference/gcr/gcr-shooter.h                 |  23 -
 docs/reference/gcr/gcr-visual-index.xml          |  27 -
 docs/reference/gcr/gcr-widgets.c                 | 236 ------
 docs/reference/gcr/gcr.types                     |  29 -
 docs/reference/gcr/images/certificate-widget.png | Bin 16144 -> 0 bytes
 docs/reference/gcr/images/combo-selector.png     | Bin 7065 -> 0 bytes
 docs/reference/gcr/images/import-button.png      | Bin 2925 -> 0 bytes
 docs/reference/gcr/images/key-widget.png         | Bin 10159 -> 0 bytes
 docs/reference/gcr/images/list-selector.png      | Bin 10123 -> 0 bytes
 docs/reference/gcr/images/tree-selector.png      | Bin 10628 -> 0 bytes
 docs/reference/gcr/images/viewer-widget.png      | Bin 13167 -> 0 bytes
 docs/reference/gcr/meson.build                   |  83 ---
 docs/reference/gcr/version.xml.in                |   1 -
 meson.build                                      |   4 +
 32 files changed, 153 insertions(+), 2449 deletions(-)
---
diff --git a/docs/reference/COPYING b/docs/COPYING
similarity index 100%
rename from docs/reference/COPYING
rename to docs/COPYING
diff --git a/docs/gck/gck-pkcs11-links.md b/docs/gck/gck-pkcs11-links.md
new file mode 100644
index 0000000..d4ca9c1
--- /dev/null
+++ b/docs/gck/gck-pkcs11-links.md
@@ -0,0 +1,10 @@
+Title: About PKCS#11
+
+About PKCS#11
+=============
+PKCS#11 is an API for storing and using crypto objects, and performing crypto
+operations on them.
+
+It is specified at the [RSA website](http://www.rsa.com/rsalabs/node.asp?id=2133)
+and a [handy reference](http://www.cryptsoft.com/pkcs11doc/) is also
+available.
diff --git a/docs/gck/gck.toml.in b/docs/gck/gck.toml.in
new file mode 100644
index 0000000..3bd28a6
--- /dev/null
+++ b/docs/gck/gck.toml.in
@@ -0,0 +1,34 @@
+[library]
+namespace = "Gck"
+version = "@GCK_VERSION@"
+browse_url = "https://gitlab.gnome.org/GNOME/gcr/";
+repository_url = "https://gitlab.gnome.org/GNOME/gcr.git";
+authors = "GCK contributors"
+license = "LGPL-2.0-or-later"
+description = "GObject bindings for PKCS#11"
+dependencies = [ "GObject-2.0", "Gio-2.0" ]
+devhelp = true
+search_index = true
+
+  [dependencies."GObject-2.0"]
+  name = "GObject"
+  description = "The base type system library"
+  docs_url = "https://developer.gnome.org/gobject/stable";
+
+  [dependencies."Gio-2.0"]
+  name = "Gio"
+  description = "GObject interfaces and objects"
+  docs_url = "https://developer.gnome.org/gio/stable";
+
+[theme]
+name = "basic"
+show_index_summary = true
+show_class_hierarchy = true
+
+[source-location]
+base_url = "https://gitlab.gnome.org/GNOME/gcr/-/blob/master/";
+
+[extra]
+content_files = [
+  'gck-pkcs11-links.md',
+]
diff --git a/docs/gck/meson.build b/docs/gck/meson.build
new file mode 100644
index 0000000..d2ab3e8
--- /dev/null
+++ b/docs/gck/meson.build
@@ -0,0 +1,32 @@
+gck_content_files = [
+  'gck-pkcs11-links.md',
+]
+
+gck_toml = configure_file(
+  input: 'gck.toml.in',
+  output: 'gck.toml',
+  configuration: {
+    'GCK_VERSION': gck_major_version,
+  },
+)
+
+custom_target('gck-docs',
+  input: gck_gir[0],
+  output: 'gck-@0@'.format(gck_major_version),
+  command: [
+    gi_docgen,
+    'generate',
+    '--quiet',
+    '--fatal-warnings',
+    '--add-include-path=@0@'.format(source_root / 'gck'),
+    '--config', gck_toml,
+    '--output-dir=@OUTPUT@',
+    '--no-namespace-dir',
+    '--content-dir=@0@'.format(meson.current_source_dir()),
+    '@INPUT@',
+  ],
+  depend_files: [ gck_toml, gck_content_files ],
+  build_by_default: true,
+  install: true,
+  install_dir: get_option('datadir') / 'doc',
+)
diff --git a/docs/gcr/gcr.toml.in b/docs/gcr/gcr.toml.in
new file mode 100644
index 0000000..9a2d839
--- /dev/null
+++ b/docs/gcr/gcr.toml.in
@@ -0,0 +1,37 @@
+[library]
+namespace = "Gcr"
+version = "@GCR_VERSION@"
+browse_url = "https://gitlab.gnome.org/GNOME/gcr/";
+repository_url = "https://gitlab.gnome.org/GNOME/gcr.git";
+authors = "GCR contributors"
+license = "LGPL-2.0-or-later"
+description = "GObject and GUI library for high level crypto parsing and display"
+dependencies = [ "GObject-2.0", "Gio-2.0", "Gck-@GCK_VERSION@" ]
+devhelp = true
+search_index = true
+
+  [dependencies."GObject-2.0"]
+  name = "GObject"
+  description = "The base type system library"
+  docs_url = "https://developer.gnome.org/gobject/stable";
+
+  [dependencies."Gio-2.0"]
+  name = "Gio"
+  description = "GObject interfaces and objects"
+  docs_url = "https://developer.gnome.org/gio/stable";
+
+  [dependencies."Gck-@GCK_VERSION@"]
+  name = "Gck"
+  description = "GObject bindings for PKCS#11"
+
+[theme]
+name = "basic"
+show_index_summary = true
+show_class_hierarchy = true
+
+[source-location]
+base_url = "https://gitlab.gnome.org/GNOME/gcr/-/blob/master/";
+
+[extra]
+content_files = [
+]
diff --git a/docs/gcr/meson.build b/docs/gcr/meson.build
new file mode 100644
index 0000000..f0f5358
--- /dev/null
+++ b/docs/gcr/meson.build
@@ -0,0 +1,32 @@
+gcr_content_files = [
+]
+
+gcr_toml = configure_file(
+  input: 'gcr.toml.in',
+  output: 'gcr.toml',
+  configuration: {
+    'GCR_VERSION': gcr_major_version,
+    'GCK_VERSION': gck_major_version,
+  },
+)
+
+custom_target('gcr-docs',
+  input: gcr_gir[0],
+  output: 'gcr-@0@'.format(gcr_major_version),
+  command: [
+    gi_docgen,
+    'generate',
+    '--quiet',
+    '--fatal-warnings',
+    '--add-include-path=@0@'.format(source_root / 'gcr'),
+    '--config', gcr_toml,
+    '--output-dir=@OUTPUT@',
+    '--no-namespace-dir',
+    '--content-dir=@0@'.format(meson.current_source_dir()),
+    '@INPUT@',
+  ],
+  depend_files: [ gcr_toml, gcr_content_files ],
+  build_by_default: true,
+  install: true,
+  install_dir: get_option('datadir') / 'doc',
+)
diff --git a/docs/meson.build b/docs/meson.build
index f353516..ee6fd0a 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -1,2 +1,4 @@
-subdir('reference/gck')
-subdir('reference/gcr')
+gi_docgen = find_program('gi-docgen')
+
+subdir('gck')
+subdir('gcr')
diff --git a/meson.build b/meson.build
index 6fa0ff4..6a7202a 100644
--- a/meson.build
+++ b/meson.build
@@ -101,6 +101,10 @@ if get_option('gtk')
   subdir('ui')
 endif
 if get_option('gtk_doc')
+  if not get_option('introspection')
+    error('Can\'t generate docs without introspection enabled!')
+  endif
+
   subdir('docs')
 endif
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]