[gegl/wip/pippin/meson] docs: make asciidoc part of build work with meson



commit 84ec46ad1335100e473562410eec583ebca2e77e
Author: Øyvind Kolås <pippin gimp org>
Date:   Sun Aug 4 15:02:53 2019 +0200

    docs: make asciidoc part of build work with meson
    
    Using some bits from wip/nielsdg/meson instead of the custom rule - which
    is not quite meant for generated installed data according to meson docs.

 docs/gegl-docs.xml |  2 ++
 docs/index.txt.in  | 13 +++++++++++--
 docs/meson.build   | 45 +++++++++++++++------------------------------
 meson.build        | 29 +++++++++++++++--------------
 meson_options.txt  |  2 +-
 5 files changed, 44 insertions(+), 47 deletions(-)
---
diff --git a/docs/gegl-docs.xml b/docs/gegl-docs.xml
index 5fbea7bd5..9ad656f3c 100644
--- a/docs/gegl-docs.xml
+++ b/docs/gegl-docs.xml
@@ -32,6 +32,7 @@
     <title>Graph</title>
     <xi:include href="xml/gegl-node.xml" />
     <xi:include href="xml/gegl-pad.xml" />
+    <xi:include href="xml/gegl-connection.xml" />
     <xi:include href="xml/gegl-processor.xml" />
   </chapter>
 
@@ -60,6 +61,7 @@
 
   <chapter id="Misc">
     <title>Misc</title>
+    <xi:include href="xml/gegl-types.xml" />
     <xi:include href="xml/gegl-init.xml" />
     <xi:include href="xml/gegl-lookup.xml" />
     <xi:include href="xml/gegl-apply.xml" />
diff --git a/docs/index.txt.in b/docs/index.txt.in
index 48dfde872..5c1ca7c1e 100644
--- a/docs/index.txt.in
+++ b/docs/index.txt.in
@@ -7,10 +7,14 @@ GEGL
 
 image::images/GEGL.png[GEGL]
 
+
 *GEGL* (Generic Graphics Library) is a data flow based image processing
 framework, providing floating point processing and non-destructive image
-processing capabilities to link:http://www.gimp.org/[GNU Image Manipulation Program] and other projects 
(link:http://www.imgflo.org/[imgflo], link:https://wiki.gnome.org/Apps/Photos[GNOME Photos], 
link:gcut.html[gcut],
-link:https://github.com/the-grid/iconographer[iconographer], ...)
+processing capabilities to link:http://www.gimp.org/[GNU Image Manipulation
+Program] and other projects (link:http://www.imgflo.org/[imgflo],
+link:https://wiki.gnome.org/Apps/Photos[GNOME Photos],
+link:https://github.com/the-grid/iconographer[iconographer], ...) as well as an
+internal lua based UI frontend.
 
 With GEGL you chain together processing link:operations/index.html[operations]
 to represent the desired image processing pipeline. GEGL provides operations
@@ -19,6 +23,11 @@ link:operations/GeglOperationSink.html[storing], link:operations/color.html[colo
 forms of link:features.html[image processing] GEGL can also be used from the
 link:commandline.html[commandline].
 
+For programming with GEGL, either adding new operations or using it from
+applications the link:html/index.html[API Reference] is useful, the API
+of GEGL is available through GObject Introspection, but only the lua
+binding has seen much testing.
+
 The primary repository for the GEGL source code
 link:http://git.gnome.org/browse/gegl/[in GNOME git], and at GIMPs download
 site link:https://download.gimp.org/pub/gegl/0.4/[tarball releases].
diff --git a/docs/meson.build b/docs/meson.build
index c09a55483..58b3194db 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -46,9 +46,6 @@ if enscript.found()
     )
   endforeach
 
-
-
-
   html_files += enscript_files
   # gtkdoc_files += enscript_files
 endif
@@ -64,11 +61,12 @@ html_files += custom_target('class-hierarchy.html',
     'GEGL_PATH='+ meson.build_root() / 'operations',
     introspect,
   ],
+  build_by_default : true,
   capture: true,
 )
 
 if asciidoc.found()
-  txt_files = files(
+asciidoc_files = files(
     'abyss_policy.txt',
     'build.txt',
     'commandline.txt',
@@ -84,7 +82,7 @@ if asciidoc.found()
     'operation-api.txt',
     'source-overview.txt',
   )
-  txt_files += [
+asciidoc_files += [
     configure_file(
       input : 'copyright.txt.in',
       output: 'copyright.txt',
@@ -102,33 +100,23 @@ if asciidoc.found()
     ),
   ]
 
-  asciidoc_gen = generator(asciidoc,
-    arguments: [
+
+foreach file: asciidoc_files
+  rendered_file = custom_target('@0@.html'.format(file).underscorify(),
+    output: '@BASENAME@.html',
+    input: file,
+    build_by_default : true,
+    command: [ asciidoc,
       '--unsafe',
       '-o', '@OUTPUT@',
-      '-a', 'stylesheet=@0@'.format(meson.current_source_dir() / 'gegl.css'),
+      '-a', 'stylesheet="@0@"'.format(join_paths(meson.source_root(), 'gegl.css')),
       '-a', 'quirks!',
-      '@INPUT@'
+      '@INPUT@',
     ],
-    output: '@BASENAME@.html',
   )
-
-  html_files += asciidoc_gen.process(txt_files)
-endif
+endforeach
 
 
-if ruby.found()
-  inheritance_dot = custom_target('inheritance.dot',
-    output: 'inheritance.dot',
-    command: [ gobj2dot, meson.source_root() ],
-    capture: true,
-    build_always_stale: true,
-  )
-  html_files += custom_target('inheritance.png',
-    input :  inheritance_dot,
-    output: 'inheritance.png',
-    command: [ graphviz, '-Tpng', '@INPUT@', '-o', '@OUTPUT@' ],
-  )
 endif
 
 
@@ -210,7 +198,6 @@ glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
 gnome.gtkdoc('gegl',
              dependencies : gegl_lib,
              main_xml : meson.project_name() + '-docs.xml',
-#             gobject_typesfile : meson.project_name() + '.types',
   src_dir: [
     join_paths(meson.source_root(), 'gegl'),
     join_paths(meson.build_root(), 'gegl'),
@@ -220,7 +207,5 @@ gnome.gtkdoc('gegl',
     '--html-dir=@0@'.format(docpath),
     '--extra-dir=@0@'.format(glib_docpath),
   ],
-  install : false,
-
-#             ignore_headers : ignore_headers,
-            )
+#  install : false,
+)
diff --git a/meson.build b/meson.build
index cd5035ca1..8a4eb7872 100644
--- a/meson.build
+++ b/meson.build
@@ -235,6 +235,7 @@ libv4l2   = dependency('libv4l2',     version: '>=1.0.1',
 lua       = dependency('luajit',      version: '>=2.0.4',
   required: get_option('lua')
 )
+config.set('HAVE_LUA', lua.found())
 mrg       = dependency('mrg',         version: '>=0.0.0',
   required: get_option('mrg')
 )
@@ -329,20 +330,20 @@ if get_option('docs')
   subdir('docs')
 endif
 
-if w3m.found()
-  custom_target('README',
-    input : 'docs/index.html',
-    output: 'README',
-    command: [ w3m, '-cols', '72', '-dump', '@INPUT@' ],
-    capture: true,
-  )
-  custom_target('NEWS',
-    input : 'docs/NEWS.html',
-    output: 'NEWS',
-    command: [ w3m, '-cols', '72', '-dump', '@INPUT@' ],
-    capture: true,
-  )
-endif
+#if w3m.found()
+#  custom_target('README',
+#    input : 'docs/index.html',
+#    output: 'README',
+#    command: [ w3m, '-cols', '72', '-dump', '@INPUT@' ],
+#    capture: true,
+#  )
+#  custom_target('NEWS',
+#    input : 'docs/NEWS.html',
+#    output: 'NEWS',
+#    command: [ w3m, '-cols', '72', '-dump', '@INPUT@' ],
+#    capture: true,
+#  )
+#endif
 
 pkgconfig.generate(filebase: 'gegl-' + api_version,
   name: 'GEGL',
diff --git a/meson_options.txt b/meson_options.txt
index 62c949e6d..da011ebf3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -5,7 +5,7 @@ option('enable-sse4_1', type: 'boolean', value: true, description: 'enable SSE4.
 option('enable-f16c',   type: 'boolean', value: true, description: 'enable hardware half-float support')
 option('docs',          type: 'boolean', value: 'true')
 option('workshop',      type: 'boolean', value: 'true')
-option('introspection', type: 'boolean', value: 'false')
+option('introspection', type: 'boolean', value: 'true')
 
 option('exiv2',         type: 'feature', value: 'auto')
 option('gdk-pixbuf',    type: 'feature', value: 'auto')


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