"Fossies" - the Fresh Open Source Software Archive

Member "gst-plugins-good-1.20.3/docs/meson.build" (15 Jun 2022, 3632 Bytes) of package /linux/misc/gst-plugins-good-1.20.3.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "meson.build": 1.18.6_vs_1.20.0.

    1 build_hotdoc = false
    2 
    3 if meson.is_cross_build()
    4     if get_option('doc').enabled()
    5         error('Documentation enabled but building the doc while cross building is not supported yet.')
    6     endif
    7 
    8     message('Documentation not built as building it while cross building is not supported yet.')
    9     subdir_done()
   10 endif
   11 
   12 required_hotdoc_extensions = ['gst-extension']
   13 if gst_dep.type_name() == 'internal'
   14     gst_proj = subproject('gstreamer')
   15     plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
   16 else
   17     plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
   18         required: false)
   19 endif
   20 
   21 plugins_cache = join_paths(meson.current_source_dir(), 'gst_plugins_cache.json')
   22 if plugins.length() == 0
   23     message('All good plugins have been disabled')
   24 elif plugins_cache_generator.found()
   25     plugins_doc_dep = custom_target('good-plugins-doc-cache',
   26         command: [plugins_cache_generator, plugins_cache, '@OUTPUT@', '@INPUT@'],
   27         input: plugins,
   28         output: 'gst_plugins_cache.json',
   29         build_always_stale: true,
   30     )
   31 else
   32     warning('GStreamer plugin inspector for documentation not found, can\'t update the cache')
   33 endif
   34 
   35 hotdoc_p = find_program('hotdoc', required: get_option('doc'))
   36 if not hotdoc_p.found()
   37     message('Hotdoc not found, not building the documentation')
   38     subdir_done()
   39 endif
   40 
   41 hotdoc_req = '>= 0.11.0'
   42 hotdoc_version = run_command(hotdoc_p, '--version', check: false).stdout()
   43 if not hotdoc_version.version_compare(hotdoc_req)
   44     if get_option('doc').enabled()
   45         error('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
   46     else
   47         message('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
   48         subdir_done()
   49     endif
   50 endif
   51 
   52 hotdoc = import('hotdoc')
   53 foreach extension: required_hotdoc_extensions
   54     if not hotdoc.has_extensions(extension)
   55         if get_option('doc').enabled()
   56             error('Documentation enabled but @0@ missing'.format(extension))
   57         endif
   58 
   59         message('@0@ extension not found, not building documentation'.format(extension))
   60         subdir_done()
   61     endif
   62 endforeach
   63 
   64 docconf = configuration_data()
   65 docconf.set('GST_API_VERSION', api_version)
   66 configure_file(input : 'gst_api_version.in',
   67                output : 'gst_api_version.md',
   68                configuration : docconf)
   69 libs_doc = []
   70 plugins_doc = []
   71 excludes = []
   72 build_hotdoc = true
   73 foreach f: ['gstgdkpixbufplugin.c']
   74     excludes += [join_paths(meson.current_source_dir(), '..', 'ext/gdk_pixbuf/', f)]
   75 endforeach
   76 
   77 excludes += [join_paths(meson.current_source_dir(), '..', 'sys', 'rpicamsrc', 'Raspi*.[ch]')]
   78 
   79 list_plugin_res = run_command(python3, '-c',
   80 '''
   81 import sys
   82 import json
   83 
   84 with open("@0@") as f:
   85     print(':'.join(json.load(f).keys()), end='')
   86 '''.format(plugins_cache),
   87   check: true)
   88 foreach plugin_name: list_plugin_res.stdout().split(':')
   89     plugins_doc += [hotdoc.generate_doc(plugin_name,
   90     project_version: api_version,
   91       sitemap: 'sitemap.txt',
   92       index: 'index.md',
   93       gst_index: 'index.md',
   94       gst_smart_index: true,
   95       gst_c_sources: [
   96         '../sys/*/*.[cmh]',
   97         '../ext/*/*.[ch]',
   98         '../gst/*/*.[ch]',
   99       ],
  100       gst_c_source_filters: excludes,
  101       dependencies: [gst_dep, plugins],
  102       gst_order_generated_subpages: true,
  103       install: false,
  104       disable_incremental_build: true,
  105       gst_cache_file: plugins_cache,
  106       gst_plugin_name: plugin_name,
  107       include_paths: join_paths(meson.current_source_dir(), '..'),
  108       )]
  109 endforeach