[dia: 71/105] #19: Port doc/{de,eu,fr,pl} HTML-help generation.



commit fd6f67053764cdcdf135f7d3262ed44785ad5b60
Author: Eduard Nicodei <eddnicodei gmail com>
Date:   Wed Jan 9 23:23:58 2019 +0000

    #19: Port doc/{de,eu,fr,pl} HTML-help generation.
    
      - Also add missing misc-shapes.png for 'de'.

 doc/de/dia.xml                  |   4 +-
 doc/de/graphics/misc-shapes.png | Bin 0 -> 2558 bytes
 doc/de/meson.build              |  90 ++++++++++++++++++++++++++++++++++++++
 doc/en/dia.xml                  |   7 ---
 doc/en/meson.build              |  66 ++++++++++++++--------------
 doc/eu/meson.build              |  82 +++++++++++++++++++++++++++++++++++
 doc/fr/meson.build              |  93 ++++++++++++++++++++++++++++++++++++++++
 doc/meson.build                 |  15 +++++--
 doc/pl/meson.build              |  77 +++++++++++++++++++++++++++++++++
 9 files changed, 391 insertions(+), 43 deletions(-)
---
diff --git a/doc/de/dia.xml b/doc/de/dia.xml
index 49c0b1f1..19f8a1f8 100644
--- a/doc/de/dia.xml
+++ b/doc/de/dia.xml
@@ -15,9 +15,9 @@
     <!ENTITY CANVAS SYSTEM "usage-canvas.xml">
 
     <!ENTITY OBJECTS SYSTEM "usage-objects.xml">
-    
+
     <!ENTITY BASIC-OBJECTS SYSTEM "usage-objects-basic.xml">
-    
+
     <!ENTITY SPECIAL-OBJECTS SYSTEM "usage-objects-special.xml">
 
     <!ENTITY SELECTING-OBJECTS SYSTEM "usage-objects-selecting.xml">
diff --git a/doc/de/graphics/misc-shapes.png b/doc/de/graphics/misc-shapes.png
new file mode 100644
index 00000000..73ba8337
Binary files /dev/null and b/doc/de/graphics/misc-shapes.png differ
diff --git a/doc/de/meson.build b/doc/de/meson.build
new file mode 100644
index 00000000..9a3f9fc5
--- /dev/null
+++ b/doc/de/meson.build
@@ -0,0 +1,90 @@
+xml_deps = files(
+    'authors.xml',
+    'dia.xml',
+    'intro.xml',
+    'license-documentation.xml',
+    'license.xml',
+    'usage-canvas.xml',
+    'usage-loadsave.xml',
+    'usage-objects-basic.xml',
+    'usage-objects-selecting.xml',
+    'usage-objects-special.xml',
+    'usage-objects.xml',
+    'usage-quickstart.xml',
+)
+
+html_output = [
+    'apa.html',
+    'ch01.html',
+    'ch02.html',
+    'ch02s02.html',
+    'ch02s03.html',
+    'ch02s04.html',
+    'ch02s05.html',
+    'ch02s06.html',
+    'ch02s07.html',
+    'ch03.html',
+    'ch03s02.html',
+    'ch03s03.html',
+    'ch03s04.html',
+    'ch03s05.html',
+    'ch03s06.html',
+    'ch03s07.html',
+    'ch04.html',
+    'ch04s02.html',
+    'ch04s03.html',
+    'ch04s04.html',
+    'ch04s05.html',
+    'ch05.html',
+    'ch06.html',
+    'ch07.html',
+    'ch07s02.html',
+    'ch07s03.html',
+    'ch08.html',
+    'ch08s02.html',
+    'ch09.html',
+    'ch10.html',
+    'index.html',
+]
+
+lang = 'de'
+
+# TODO: this requires tex-live-german
+# https://tex.stackexchange.com/questions/139700/package-babel-error-unknown-option-francais
+#custom_target(lang + '-dia.pdf',
+#    output : 'dia.pdf',
+#    input  : 'dia.xml',
+#    depend_files : xml_deps,
+#    command : [dblatex, '-t', 'pdf', '-q', '-o', '@OUTPUT@', '@INPUT@'],
+#    install : true,
+#    install_dir : join_paths(docdir, lang)
+#)
+
+if xsltproc.found()
+    html_dir = join_paths(helpdir, lang)
+
+    custom_target(lang + '-dia_html',
+        input: [ 'html.xsl', 'dia.xml' ],
+        output: html_output,
+        command: [
+            xsltproc,
+            '--stringparam', 'graphic.default.extension', 'png',
+            '-o', join_paths('@OUTDIR@', ''),
+            '@INPUT@'
+        ],
+        depend_files: xml_deps,
+        install: true,
+        install_dir: html_dir,
+    )
+
+    install_subdir(
+        'graphics',
+        install_dir: html_dir,
+    )
+
+    install_subdir(
+        join_paths('..', 'html'),
+        install_dir: html_dir,
+        strip_directory: true,
+    )
+endif
diff --git a/doc/en/dia.xml b/doc/en/dia.xml
index 2025ab3b..25441984 100644
--- a/doc/en/dia.xml
+++ b/doc/en/dia.xml
@@ -46,12 +46,8 @@
 

 
-
-
 <book id="index" lang="en"> <!-- please do not change the id -->
 
-
-
  <bookinfo>
 
   <title>Dia</title>
@@ -192,6 +188,3 @@
 &LICENSE;
 
 </book>
-
-
-
diff --git a/doc/en/meson.build b/doc/en/meson.build
index db91a9fd..4266ddf3 100644
--- a/doc/en/meson.build
+++ b/doc/en/meson.build
@@ -1,10 +1,4 @@
-docdir = join_paths(
-    get_option('datadir'),
-    'doc',
-    meson.project_name()
-)
-
-dia_xml_deps = [
+xml_deps = files(
     'authors.xml',
     'custom-shapes.xml',
     'dia-1.xml',
@@ -22,20 +16,9 @@ dia_xml_deps = [
     'usage-objects-special.xml',
     'usage-objects.xml',
     'usage-quickstart.xml',
-]
-
-if dblatex.found()
-    custom_target('dia.pdf',
-        output : 'dia.pdf',
-        input  : 'dia.xml',
-        depend_files : dia_xml_deps,
-        command : [dblatex, '-t', 'pdf', '-q', '-o', '@OUTPUT@', '@INPUT@'],
-        install : true,
-        install_dir : docdir
-    )
-endif
+)
 
-dia_html_output = [
+html_output = [
     'ch01.html',
     'ch01s02.html',
     'ch02.html',
@@ -84,24 +67,45 @@ dia_html_output = [
     're01.html',
 ]
 
+lang = 'en'
+
+custom_target(lang + '-dia.pdf',
+    output : 'dia.pdf',
+    input  : 'dia.xml',
+    depend_files : xml_deps,
+    command : [dblatex, '-t', 'pdf', '-q', '-o', '@OUTPUT@', '@INPUT@'],
+    install : true,
+    install_dir : join_paths(docdir, lang)
+)
+
 if xsltproc.found()
-    dia_man = custom_target('dia.1',
-        output : 'dia.1',
-        input  : 'dia.dbk',
-        command : [xsltproc, '--novalid', '--output', '@OUTPUT@', DB2MAN, '@INPUT@'],
+    dia_man = custom_target(lang + '-dia.1',
+        input: 'dia.dbk',
+        output: 'dia.1',
+        command: [
+            xsltproc, '--novalid',
+            '--output', '@OUTPUT@',
+            DB2MAN,
+            '@INPUT@'
+        ],
         install : true,
         install_dir : join_paths(get_option('mandir'), 'man1')
     )
     # TODO: this should fixed in meson: https://github.com/mesonbuild/meson/issues/1550
-    #install_data(dia_man)
+    #install_man(dia_man, language : lang)
 
-    html_dir = join_paths(helpdir, 'en')
+    html_dir = join_paths(helpdir, lang)
 
-    custom_target('dia_html',
-        input : ['html.xsl', 'dia.xml'],
-        command : [xsltproc, '--stringparam', 'graphic.default.extension', 'png', '-o', 
join_paths('@OUTDIR@', ''), '@INPUT@'],
-        output : dia_html_output,
-        depend_files : dia_xml_deps,
+    custom_target(lang + '-dia_html',
+        input: [ 'html.xsl', 'dia.xml' ],
+        output: html_output,
+        command: [
+            xsltproc,
+            '--stringparam', 'graphic.default.extension', 'png',
+            '-o', join_paths('@OUTDIR@', ''),
+            '@INPUT@'
+        ],
+        depend_files: xml_deps,
         install : true,
         install_dir : html_dir,
     )
diff --git a/doc/eu/meson.build b/doc/eu/meson.build
new file mode 100644
index 00000000..c4bb3fcf
--- /dev/null
+++ b/doc/eu/meson.build
@@ -0,0 +1,82 @@
+xml_deps = files(
+    'authors.xml',
+    'dia-1.xml',
+    'dia.xml',
+    'entities.xml',
+    'intro.xml',
+    'license.xml',
+    'usage-canvas.xml',
+    'usage-customization.xml',
+    'usage-layers.xml',
+    'usage-loadsave.xml',
+    'usage-objects-basic.xml',
+    'usage-objects-selecting.xml',
+    'usage-objects-special.xml',
+    'usage-objects.xml',
+    'usage-quickstart.xml',
+)
+
+html_output = [
+    'ch01.html',
+    'ch02.html',
+    'ch02s02.html',
+    'ch02s03.html',
+    'ch02s04.html',
+    'ch02s05.html',
+    'ch02s06.html',
+    'ch02s07.html',
+    'ch03.html',
+    'ch03s02.html',
+    'ch03s03.html',
+    'ch03s04.html',
+    'ch03s05.html',
+    'ch04.html',
+    'ch04s02.html',
+    'ch04s03.html',
+    'ch04s04.html',
+    'ch05.html',
+    'ch06.html',
+    'ch06s02.html',
+    'ch07.html',
+    'ch07s02.html',
+    'ch08.html',
+    'ch08s02.html',
+    'ch09.html',
+    'ch10.html',
+    'ch10s02.html',
+    'ch10s03.html',
+    'ch11.html',
+    'ch12.html',
+    'index.html',
+]
+
+lang = 'eu'
+
+if xsltproc.found()
+    html_dir = join_paths(helpdir, lang)
+
+    custom_target(lang + '-dia_html',
+        input: [ 'html.xsl', 'dia.xml' ],
+        output: html_output,
+        command: [
+            xsltproc,
+            '--stringparam', 'graphic.default.extension', 'png',
+            '-o', join_paths('@OUTDIR@', ''),
+            '@INPUT@'
+        ],
+        depend_files: xml_deps,
+        install: true,
+        install_dir: html_dir,
+    )
+
+    install_subdir(
+        'graphics',
+        install_dir: html_dir,
+    )
+
+    install_subdir(
+        join_paths('..', 'html'),
+        install_dir: html_dir,
+        strip_directory: true,
+    )
+endif
diff --git a/doc/fr/meson.build b/doc/fr/meson.build
new file mode 100644
index 00000000..1a24e44c
--- /dev/null
+++ b/doc/fr/meson.build
@@ -0,0 +1,93 @@
+xml_deps = files(
+    'authors.xml',
+    'custom-shapes.xml',
+    'dia-1.xml',
+    'dia-cmdline.xml',
+    'dia.xml',
+    'entities.xml',
+    'intro.xml',
+    'license.xml',
+    'usage-canvas.xml',
+    'usage-customization.xml',
+    'usage-layers.xml',
+    'usage-loadsave.xml',
+    'usage-objects-basic.xml',
+    'usage-objects-selecting.xml',
+    'usage-objects-special.xml',
+    'usage-objects.xml',
+    'usage-quickstart.xml',
+)
+
+html_output = [
+    'ch01.html',
+    'ch02.html',
+    'ch02s02.html',
+    'ch02s03.html',
+    'ch02s04.html',
+    'ch02s05.html',
+    'ch02s06.html',
+    'ch02s07.html',
+    'ch03.html',
+    'ch03s02.html',
+    'ch03s03.html',
+    'ch03s04.html',
+    'ch03s05.html',
+    'ch04.html',
+    'ch04s02.html',
+    'ch04s03.html',
+    'ch04s04.html',
+    'ch05.html',
+    'ch06.html',
+    'ch06s02.html',
+    'ch07.html',
+    'ch07s02.html',
+    'ch08.html',
+    'ch08s02.html',
+    'ch09.html',
+    'ch10.html',
+    'ch10s02.html',
+    'ch10s03.html',
+    'ch11.html',
+    'ch11s02.html',
+    'ch11s03.html',
+    'ch11s04.html',
+    'ch11s05.html',
+    'ch11s06.html',
+    'ch12.html',
+    'ch12s02.html',
+    'ch13.html',
+    'ch14.html',
+    'index.html',
+    're01.html',
+]
+
+lang = 'fr'
+
+if xsltproc.found()
+    html_dir = join_paths(helpdir, lang)
+
+    custom_target(lang + '-dia_html',
+        input: [ 'html.xsl', 'dia.xml' ],
+        output: html_output,
+        command: [
+            xsltproc,
+            '--stringparam', 'graphic.default.extension', 'png',
+            '-o', join_paths('@OUTDIR@', ''),
+            '@INPUT@'
+        ],
+        depend_files: xml_deps,
+        install: true,
+        install_dir: html_dir,
+    )
+
+    install_subdir(
+        'graphics',
+        install_dir: html_dir,
+    )
+
+    install_subdir(
+        join_paths('..', 'html'),
+        install_dir: html_dir,
+        strip_directory: true,
+    )
+endif
diff --git a/doc/meson.build b/doc/meson.build
index 9631a641..361f5e64 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -1,9 +1,18 @@
-dblatex = find_program('dblatex', required: false)
-xsltproc = find_program('xsltproc', required: false)
+docdir = join_paths(
+    get_option('datadir'),
+    'doc',
+    meson.project_name()
+)
+
+dblatex = find_program('dblatex', required: false, disabler: true)
+xsltproc = find_program('xsltproc', required: false, disabler: true)
 
 DB2MAN = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
 
 helpdir = join_paths(pkgdatadir, 'help')
 
+subdir('de')
 subdir('en')
-
+subdir('eu')
+subdir('fr')
+subdir('pl')
diff --git a/doc/pl/meson.build b/doc/pl/meson.build
new file mode 100644
index 00000000..3c55694d
--- /dev/null
+++ b/doc/pl/meson.build
@@ -0,0 +1,77 @@
+xml_deps = files(
+    'authors.xml',
+    'dia.xml',
+    'intro.xml',
+    'license.xml',
+    'usage-canvas.xml',
+    'usage-customization.xml',
+    'usage-layers.xml',
+    'usage-loadsave.xml',
+    'usage-objects-selecting.xml',
+    'usage-objects-special.xml',
+    'usage-objects.xml',
+    'usage-quickstart.xml',
+)
+
+html_output = [
+    'ch01.html',
+    'ch01s02.html',
+    'ch01s03.html',
+    'ch01s04.html',
+    'ch01s05.html',
+    'ch01s06.html',
+    'ch01s07.html',
+    'ch02.html',
+    'ch02s02.html',
+    'ch02s03.html',
+    'ch02s04.html',
+    'ch02s05.html',
+    'ch03.html',
+    'ch03s02.html',
+    'ch03s03.html',
+    'ch03s04.html',
+    'ch04.html',
+    'ch04s02.html',
+    'ch05.html',
+    'ch05s02.html',
+    'ch06.html',
+    'ch06s02.html',
+    'ch07.html',
+    'ch08.html',
+    'ch08s02.html',
+    'ch08s03.html',
+    'ch09.html',
+    'ch10.html',
+    'index.html',
+]
+
+lang = 'pl'
+
+if xsltproc.found()
+    html_dir = join_paths(helpdir, lang)
+
+    custom_target(lang + '-dia_html',
+        input: [ 'html.xsl', 'dia.xml' ],
+        output: html_output,
+        command: [
+            xsltproc,
+            '--stringparam', 'graphic.default.extension', 'png',
+            '-o', join_paths('@OUTDIR@', ''),
+            '@INPUT@'
+        ],
+        depend_files: xml_deps,
+        install: true,
+        install_dir: html_dir,
+    )
+
+    install_subdir(
+        'graphics',
+        install_dir: html_dir,
+    )
+
+    install_subdir(
+        join_paths('..', 'html'),
+        install_dir: html_dir,
+        strip_directory: true,
+    )
+endif


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