[pango/gi-docs] Generate toml files
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/gi-docs] Generate toml files
- Date: Tue, 16 Feb 2021 19:53:42 +0000 (UTC)
commit 84973a2f5b83ab3c33ec49bb4b6ba01f0597c042
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Feb 16 14:53:11 2021 -0500
Generate toml files
This is so we can set the library version field and
have the correct version show up in the generated docs.
docs/meson.build | 53 +++++++++++++++++++++-------
docs/{pango.toml => pango.toml.in} | 2 +-
docs/{pangocairo.toml => pangocairo.toml.in} | 2 +-
docs/{pangofc.toml => pangofc.toml.in} | 2 +-
docs/{pangoft2.toml => pangoft2.toml.in} | 2 +-
docs/{pangoot.toml => pangoot.toml.in} | 2 +-
docs/{pangoxft.toml => pangoxft.toml.in} | 2 +-
7 files changed, 46 insertions(+), 19 deletions(-)
---
diff --git a/docs/meson.build b/docs/meson.build
index b994a56a..43c0f78b 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -13,6 +13,13 @@ pango_content_files = [
'rects3.png',
]
+doc_conf = configuration_data()
+doc_conf.set('PANGO_VERSION', meson.project_version())
+
+pango_toml = configure_file(input: 'pango.toml.in',
+ output: 'pango.toml',
+ configuration: doc_conf)
+
custom_target('pango-doc',
input: pango_gir[0],
output: 'Pango',
@@ -20,17 +27,21 @@ custom_target('pango-doc',
gidocgen,
'generate',
'--add-include-path=@0@'.format(meson.current_build_dir() / '../pango'),
- '--config=@0@'.format(meson.current_source_dir() / 'pango.toml'),
+ '--config', pango_toml,
'--output-dir=@OUTPUT@',
'--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'@INPUT@',
],
- depend_files: [ 'pango.toml', pango_content_files],
+ depend_files: [ pango_toml, pango_content_files],
build_by_default: true,
)
if build_pangoft2
+ pangoft2_toml = configure_file(input: 'pangoft2.toml.in',
+ output: 'pangoft2.toml',
+ configuration: doc_conf)
+
custom_target('pangoft-doc',
input: pangoft2_gir[0],
output: 'PangoFT2',
@@ -38,18 +49,22 @@ if build_pangoft2
gidocgen,
'generate',
'--add-include-path=@0@'.format(meson.current_build_dir() / '../pango'),
- '--config=@0@'.format(meson.current_source_dir() / 'pangoft2.toml'),
+ '--config', pangoft2_toml,
'--output-dir=@OUTPUT@',
'--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'@INPUT@',
],
- depend_files: [ 'pangoft2.toml', 'pango-name.png' ],
+ depend_files: [ pangoft2_toml, 'pango-name.png' ],
build_by_default: true,
)
endif
if xft_dep.found() and fontconfig_dep.found()
+ pangoxft_toml = configure_file(input: 'pangoxft.toml.in',
+ output: 'pangoxft.toml',
+ configuration: doc_conf)
+
custom_target('pangoxft-doc',
input: pangoxft_gir[0],
output: 'PangoXft',
@@ -57,24 +72,28 @@ if xft_dep.found() and fontconfig_dep.found()
gidocgen,
'generate',
'--add-include-path=@0@'.format(meson.current_build_dir() / '../pango'),
- '--config=@0@'.format(meson.current_source_dir() / 'pangoxft.toml'),
+ '--config', pangoxft_toml,
'--output-dir=@OUTPUT@',
'--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'@INPUT@',
],
- depend_files: [ 'pangoxft.toml', 'pango-name.png' ],
+ depend_files: [ pangoxft_toml, 'pango-name.png' ],
build_by_default: true,
)
endif
if cairo_dep.found()
- pango_cairo_content_files = [
+ pangocairo_content_files = [
'pango_cairo.md',
'pango-name.png',
'rotated-text.png',
]
+ pangocairo_toml = configure_file(input: 'pangocairo.toml.in',
+ output: 'pangocairo.toml',
+ configuration: doc_conf)
+
custom_target('pangocairo-doc',
input: pangocairo_gir[0],
output: 'PangoCairo',
@@ -82,17 +101,21 @@ if cairo_dep.found()
gidocgen,
'generate',
'--add-include-path=@0@'.format(meson.current_build_dir() / '../pango'),
- '--config=@0@'.format(meson.current_source_dir() / 'pangocairo.toml'),
+ '--config', pangocairo_toml,
'--output-dir=@OUTPUT@',
'--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'@INPUT@',
],
- depend_files: [ 'pangocairo.toml', pango_cairo_content_files ],
+ depend_files: [ pangocairo_toml, pangocairo_content_files ],
build_by_default: true,
)
endif
+pangoot_toml = configure_file(input: 'pangoot.toml.in',
+ output: 'pangoot.toml',
+ configuration: doc_conf)
+
custom_target('pangoot-doc',
input: pangoot_gir[0],
output: 'PangoOT',
@@ -100,17 +123,21 @@ custom_target('pangoot-doc',
gidocgen,
'generate',
'--add-include-path=@0@'.format(meson.current_build_dir() / '../pango'),
- '--config=@0@'.format(meson.current_source_dir() / 'pangoot.toml'),
+ '--config', pangoot_toml,
'--output-dir=@OUTPUT@',
'--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'@INPUT@',
],
- depend_files: [ 'pangoot.toml', 'pango-name.png' ],
+ depend_files: [ pangoot_toml, 'pango-name.png' ],
build_by_default: true,
)
if fontconfig_dep.found()
+ pangofc_toml = configure_file(input: 'pangofc.toml.in',
+ output: 'pangofc.toml',
+ configuration: doc_conf)
+
custom_target('pangofc-doc',
input: pangofc_gir[0],
output: 'PangoFc',
@@ -118,13 +145,13 @@ if fontconfig_dep.found()
gidocgen,
'generate',
'--add-include-path=@0@'.format(meson.current_build_dir() / '../pango'),
- '--config=@0@'.format(meson.current_source_dir() / 'pangofc.toml'),
+ '--config', pangofc_toml,
'--output-dir=@OUTPUT@',
'--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'@INPUT@',
],
- depend_files: [ 'pangofc.toml', 'pango-name.png' ],
+ depend_files: [ pangofc_toml, 'pango-name.png' ],
build_by_default: true,
)
endif
diff --git a/docs/pango.toml b/docs/pango.toml.in
similarity index 98%
rename from docs/pango.toml
rename to docs/pango.toml.in
index e4bfe42e..39b6f553 100644
--- a/docs/pango.toml
+++ b/docs/pango.toml.in
@@ -1,6 +1,6 @@
[library]
namespace = "Pango"
-version = "1.0"
+version = "@PANGO_VERSION@"
browse_url = "https://gitlab.gnome.org/GNOME/pango/"
repository_url = "https://gitlab.gnome.org/GNOME/pango.git"
website_url = "https://www.pango.org"
diff --git a/docs/pangocairo.toml b/docs/pangocairo.toml.in
similarity index 96%
rename from docs/pangocairo.toml
rename to docs/pangocairo.toml.in
index 39328028..474ca13d 100644
--- a/docs/pangocairo.toml
+++ b/docs/pangocairo.toml.in
@@ -1,6 +1,6 @@
[library]
namespace = "PangoCairo"
-version = "1.0"
+version = "@PANGO_VERSION@"
browse_url = "https://gitlab.gnome.org/GNOME/pango/"
repository_url = "https://gitlab.gnome.org/GNOME/pango.git"
website_url = "https://www.pango.org"
diff --git a/docs/pangofc.toml b/docs/pangofc.toml.in
similarity index 96%
rename from docs/pangofc.toml
rename to docs/pangofc.toml.in
index f41526bd..7acd5d72 100644
--- a/docs/pangofc.toml
+++ b/docs/pangofc.toml.in
@@ -1,6 +1,6 @@
[library]
namespace = "PangoFc"
-version = "1.0"
+version = "@PANGO_VERSION@"
browse_url = "https://gitlab.gnome.org/GNOME/pango/"
repository_url = "https://gitlab.gnome.org/GNOME/pango.git"
website_url = "https://www.pango.org"
diff --git a/docs/pangoft2.toml b/docs/pangoft2.toml.in
similarity index 96%
rename from docs/pangoft2.toml
rename to docs/pangoft2.toml.in
index f3733253..43c0ca75 100644
--- a/docs/pangoft2.toml
+++ b/docs/pangoft2.toml.in
@@ -1,6 +1,6 @@
[library]
namespace = "PangoFT2"
-version = "1.0"
+version = "@PANGO_VERSION@"
browse_url = "https://gitlab.gnome.org/GNOME/pango/"
repository_url = "https://gitlab.gnome.org/GNOME/pango.git"
website_url = "https://www.pango.org"
diff --git a/docs/pangoot.toml b/docs/pangoot.toml.in
similarity index 96%
rename from docs/pangoot.toml
rename to docs/pangoot.toml.in
index dc0eb091..581a4239 100644
--- a/docs/pangoot.toml
+++ b/docs/pangoot.toml.in
@@ -1,6 +1,6 @@
[library]
namespace = "PangoOT"
-version = "1.0"
+version = "@PANGO_VERSION@"
browse_url = "https://gitlab.gnome.org/GNOME/pango/"
repository_url = "https://gitlab.gnome.org/GNOME/pango.git"
website_url = "https://www.pango.org"
diff --git a/docs/pangoxft.toml b/docs/pangoxft.toml.in
similarity index 96%
rename from docs/pangoxft.toml
rename to docs/pangoxft.toml.in
index 07901e26..241c0aa0 100644
--- a/docs/pangoxft.toml
+++ b/docs/pangoxft.toml.in
@@ -1,6 +1,6 @@
[library]
namespace = "PangoXft"
-version = "1.0"
+version = "@PANGO_VERSION@"
browse_url = "https://gitlab.gnome.org/GNOME/pango/"
repository_url = "https://gitlab.gnome.org/GNOME/pango.git"
website_url = "https://www.pango.org"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]