From 1aee7b1670cdd430f0518cf80f5d4f67888391c3 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sat, 7 Dec 2024 17:23:25 -0300 Subject: [PATCH] doc: Update to latest way of generating hotdoc config files Part-of: --- docs/meson.build | 63 ++++++++++++++++++------------------------------ meson.build | 9 ++++--- 2 files changed, 29 insertions(+), 43 deletions(-) diff --git a/docs/meson.build b/docs/meson.build index fa0f28f5..30dc96d0 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -86,42 +86,27 @@ foreach extension: required_hotdoc_extensions endforeach build_hotdoc = true -plugins_doc = [] - - -list_plugin_res = run_command(python, '-c', -''' -import sys -import json - -with open("@0@") as f: - print(':'.join(json.load(f).keys()), end='') -'''.format(plugins_cache), - check: true) -foreach plugin_name: list_plugin_res.stdout().split(':') - plugins_doc += [hotdoc.generate_doc(plugin_name, - project_version: '1.0', - sitemap: 'plugins/sitemap.txt', - index: 'plugins/index.md', - gst_index: 'plugins/index.md', - include_paths: join_paths(meson.current_source_dir(), '..'), - extra_assets: [join_paths(meson.current_source_dir(), 'images')], - gst_smart_index: true, - gst_c_source_filters: [ - '../target/*/*.rs', - '../target/*/*/*.rs', - '../target/*/*/*/*.rs', - '../target/*/*/*/*/*.rs', - '../target/*/*/*/*/*/*.rs', - ], - gst_c_sources: [ - '../*/*/*/*.rs', - '../*/*/*/*/*.rs', - '../*/*/*/*/*/*.rs', - ], - dependencies: [gst_dep], - gst_order_generated_subpages: true, - gst_cache_file: plugins_cache, - gst_plugin_name: plugin_name, - )] -endforeach +cdir = meson.current_source_dir() +gst_plugins_doc = run_command( + plugins_cache_generator, + 'hotdoc-config', + '--builddir', meson.current_build_dir(), + '--project_version', '1.0', + '--sitemap', cdir / 'plugins/sitemap.txt', + '--index', cdir / 'plugins/index.md', + '--include_paths', meson.current_source_dir() / '..', + '--gst_index', cdir / 'plugins/index.md', + '--gst_c_source_filters', cdir / '../target/*/*.rs', + '--gst_c_source_filters', + cdir / '../target/*/*/*.rs', + cdir / '../target/*/*/*/*.rs', + cdir / '../target/*/*/*/*/*.rs', + cdir / '../target/*/*/*/*/*/*.rs', + '--gst_c_sources', + cdir / '../*/*/*/*.rs', + cdir / '../*/*/*/*/*.rs', + cdir / '../*/*/*/*/*/*.rs', + '--gst_cache_file', plugins_cache, + '--extra_assets', join_paths(meson.current_source_dir(), 'images'), + check: true, +).stdout().split(pathsep) diff --git a/meson.build b/meson.build index f4e69ca1..a154f8c7 100644 --- a/meson.build +++ b/meson.build @@ -552,12 +552,13 @@ if pkg_config.found() extra_env += {'PKG_CONFIG': pkg_config.full_path()} endif +pathsep = ':' +if host_system == 'windows' + pathsep = ';' +endif + pkg_config_path = get_option('pkg_config_path') if pkg_config_path.length() > 0 - pathsep = ':' - if host_system == 'windows' - pathsep = ';' - endif extra_env += {'PKG_CONFIG_PATH': pathsep.join(pkg_config_path)} endif