[libhttpseverywhere/optional-valadoc] Make valadoc optional



commit e1a2eeb7ab40b17397ceea653018c6739e3b2cbf
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Mon Nov 21 21:04:00 2016 -0600

    Make valadoc optional
    
    Currently libhttpseverywhere and epiphany are skipped in GNOME releases
    because of the valadoc dependency. Apparently valadoc has never had a
    release ever, who would have thunk it! Make it optional so we can really
    include it with GNOME 3.23.2.

 meson.build       |   17 +++++++++--------
 meson_options.txt |    1 +
 2 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/meson.build b/meson.build
index a7a3e1c..fd5c8a1 100644
--- a/meson.build
+++ b/meson.build
@@ -66,14 +66,15 @@ custom_target('httpseverywhere-typelib',
                install: true,
                install_dir: get_option('libdir') + '/girepository-1.0')
 
-
-valadoc = find_program('valadoc')
-custom_target('apidocs',
-               input: httpseverywhere_lib_source,
-               command: [valadoc, '-o', 'devhelp/httpseverywhere-'+api, '--doclet', 'devhelp', '@INPUT@',
-               '--force', '--pkg', 'gee-0.8', '--pkg', 'json-glib-1.0', '--pkg', 'libxml-2.0', '--pkg', 
'libarchive', '--pkg', 'libsoup-2.4'],
-               output: 'devhelp',
-)
+if get_option('enable_valadoc')
+       valadoc = find_program('valadoc', required=false)
+       custom_target('apidocs',
+                   input: httpseverywhere_lib_source,
+                   command: [valadoc, '-o', 'devhelp/httpseverywhere-'+api, '--doclet', 'devhelp', '@INPUT@',
+                   '--force', '--pkg', 'gee-0.8', '--pkg', 'json-glib-1.0', '--pkg', 'libxml-2.0', '--pkg', 
'libarchive', '--pkg', 'libsoup-2.4'],
+                   output: 'devhelp',
+       )
+endif
 
 pkgconfig.generate(libraries : httpseverywhere_lib,
               version : '0.3.0',
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..99a3d41
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1 @@
+option('enable_valadoc', type: 'boolean', value: false)


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