Upstreaming of Gentoo's docdir patch
Hello, Creating an entire fork for this felt a bit excessive, so I'm merely opening an issue - I hope that's acceptable. ;)
Gentoo expects documentation to be installed under /usr/share/doc/package_name-package_version/ but the build system is currently hard-coded to always install to /usr/share/doc/package_name/. Looking at other distros, it seems likely that Gentoo is not the only one that will want to override the default docdir, so upstreaming the patch seems like a good idea.
The original file can be found at https://github.com/gentoo/gentoo/blob/master/media-video/pipewire/files/pipewire-0.3.25-fix-docdir-path.patch which was made by me and now has been ported to the current style of using / for path joining.
Update: A mixup with parenthesis had gotten through and didn't get caught until I did an custom build with docs enabled - sorry about that. I have now updated the patch with a v2 due to that.
From 34010cf14891efa7178d9b1fa45d6cd81f7ab0ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikl=C4=81vs=20Ko=C4=BCes=C5=86ikovs?= <firstname.lastname@example.org> Date: Thu, 15 Apr 2021 21:45:53 +0300 Subject: [PATCH] doc: add docdir option (patch from Gentoo) --- doc/meson.build | 7 +++++-- meson_options.txt | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/meson.build b/doc/meson.build index d623e97c..a55fd953 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -24,11 +24,14 @@ doxyfile = configure_file(input: 'Doxyfile.in', output: 'Doxyfile', configuration: doxyfile_conf) -docdir = pipewire_datadir / 'doc' +docdir = get_option('docdir') +if docdir == '' + docdir = pipewire_datadir / 'doc' / meson.project_name() +endif html_target = custom_target('pipewire-docs', input: [ doxyfile ], output: [ 'html' ], command: [ doxygen, doxyfile ], install: true, - install_dir: docdir / 'pipewire') + install_dir: docdir) diff --git a/meson_options.txt b/meson_options.txt index 858283f2..69241454 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,6 @@ +option('docdir', + type : 'string', + description : 'Directory for installing documentation to (defaults to pipewire_datadir/doc/meson.project_name() )') option('docs', description: 'Build documentation', type: 'feature', -- 2.30.2