virt-viewer: fix buildpaths QA warning

The file virt-viewer-enums.c in the virt-viewer src is generated by
glib-mkenums. glib-mkenums is embedding full paths into this file.
There's no option for this utility to use a sysroot style variable.

So to avoid QA errors, we sed WORKDIR out of the generated file
(after build, before packaging) and make its includes relative.

The file can then be packaged into virt-viewer-src without a QA
error.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Bruce Ashfield 2022-12-01 23:36:09 -05:00
parent eb411d0c5b
commit c66e392d8e

View File

@ -27,3 +27,10 @@ inherit meson pkgconfig gtk-icon-cache mime mime-xdg gobject-introspection
FILES:${PN} += "${datadir}" FILES:${PN} += "${datadir}"
GIR_MESON_OPTION = '' GIR_MESON_OPTION = ''
do_compile:append() {
# glib-mkenums is embedding full paths into this file. There's no
# option to it to use a sysroot style variable. So to avoid QA
# errors, we sed WORKDIR out and make its includes relative
sed -i "s,${WORKDIR}/build/,," src/virt-viewer-enums.c
}