"Fossies" - the Fresh Open Source Software Archive

Member "buildroot-2021.05/package/gupnp/0001-doc-Check-for-stylesheet-existence-on-doc-build.patch" (6 Jun 2021, 2216 Bytes) of package /linux/privat/buildroot-2021.05.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Diff source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 From 7ce37c94596029358a67d732a82e4313f7b89135 Mon Sep 17 00:00:00 2001
    2 From: Jens Georg <mail@jensge.org>
    3 Date: Sun, 30 May 2021 13:13:00 +0200
    4 Subject: [PATCH] doc: Check for stylesheet existence on doc build
    5 
    6 Checking for xsltproc is not enough
    7 
    8 Fixes #17
    9 
   10 [Retrieved from:
   11 https://gitlab.gnome.org/GNOME/gupnp/-/commit/7ce37c94596029358a67d732a82e4313f7b89135]
   12 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
   13 ---
   14  doc/meson.build | 34 +++++++++++++++++++++++++---------
   15  1 file changed, 25 insertions(+), 9 deletions(-)
   16 
   17 diff --git a/doc/meson.build b/doc/meson.build
   18 index 26c32c9..eb69d07 100644
   19 --- a/doc/meson.build
   20 +++ b/doc/meson.build
   21 @@ -30,6 +30,8 @@ endif
   22  
   23  xsltproc = find_program('xsltproc', required: false)
   24  if xsltproc.found()
   25 +    stylesheet = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
   26 +
   27      xlstproc_flags = [
   28          '--nonet',
   29          '--xinclude',
   30 @@ -45,17 +47,31 @@ if xsltproc.found()
   31          xsltproc,
   32          xlstproc_flags,
   33          '-o', '@OUTPUT@',
   34 -        'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
   35 +        stylesheet,
   36          '@INPUT@'
   37      ]
   38  
   39 -    custom_target(
   40 -        'man 1 pages',
   41 -        input: 'gupnp-binding-tool.xml',
   42 -        output: 'gupnp-binding-tool-1.2.1',
   43 -        command: xsltproc_args,
   44 -        depend_files : version_xml,
   45 -        install: true,
   46 -        install_dir: join_paths(get_option('mandir'), 'man1')
   47 +    stylesheet_check = run_command(
   48 +        [
   49 +            xsltproc,
   50 +            xlstproc_flags,
   51 +            '--noout',
   52 +            stylesheet,
   53 +            'gupnp-binding-tool.xml'
   54 +        ]
   55      )
   56 +    if (stylesheet_check.returncode() == 0)
   57 +        message('Stylesheet ' + stylesheet + ' available')
   58 +        custom_target(
   59 +            'man 1 pages',
   60 +            input: 'gupnp-binding-tool.xml',
   61 +            output: 'gupnp-binding-tool-1.2.1',
   62 +            command: xsltproc_args,
   63 +            depend_files : version_xml,
   64 +            install: true,
   65 +            install_dir: join_paths(get_option('mandir'), 'man1')
   66 +        )
   67 +    else
   68 +        message('Stylesheet ' + stylesheet + ' not found, not building man page')
   69 +    endif
   70  endif
   71 -- 
   72 GitLab
   73