Bug 109752

Summary: meson: more ensure that xmlpool_options.h is generated for targets that need it
Product: Mesa Reporter: David Shao <davshao>
Component: OtherAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: NetBSD   
Whiteboard:
i915 platform: i915 features:
Attachments: xmlpool_options.h patches

Description David Shao 2019-02-23 05:11:52 UTC
Created attachment 143443 [details] [review]
xmlpool_options.h patches

Extension of
2018-02-06 meson: ensure xmlpool/options.h is generated for libgallium
commit	9440599c8e030bddd7e04620bed22df5a8a097fd

Lack of these patches caused a meson build to fail on NetBSD NetBSD 8.99.34 (GENERIC) pkgsrc for
2019-02-02	wsi/display: add comment
commit 808bf59cac793bc6c7de04eee4e23e6921a8a7b5

Subject: [PATCH] meson: more ensure that xmlpool_options.h is generated for
 targets that need it

Extension of
2018-02-06 meson: ensure xmlpool/options.h is generated for libgallium
commit	9440599c8e030bddd7e04620bed22df5a8a097fd
---
 src/gallium/targets/omx/meson.build   | 2 +-
 src/gallium/targets/va/meson.build    | 2 +-
 src/gallium/targets/vdpau/meson.build | 2 +-
 src/gallium/targets/xa/meson.build    | 2 +-
 src/gallium/targets/xvmc/meson.build  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/targets/omx/meson.build b/src/gallium/targets/omx/meson.build
index 6811e6ff904..09925cb3c21 100644
--- a/src/gallium/targets/omx/meson.build
+++ b/src/gallium/targets/omx/meson.build
@@ -32,7 +32,7 @@ endif
 
 libomx_gallium = shared_library(
   'omx_mesa',
-  'target.c',
+  [files('target.c'), xmlpool_options_h],
   c_args : c_vis_args,
   cpp_args : cpp_vis_args,
   link_args : [omx_link_args, ld_args_gc_sections],
diff --git a/src/gallium/targets/va/meson.build b/src/gallium/targets/va/meson.build
index ded689b464d..49e222cefb1 100644
--- a/src/gallium/targets/va/meson.build
+++ b/src/gallium/targets/va/meson.build
@@ -33,7 +33,7 @@ endif
 
 libva_gallium = shared_library(
   'gallium_drv_video',
-  'target.c',
+  [files('target.c'), xmlpool_options_h],
   c_args : c_vis_args,
   cpp_args : cpp_vis_args,
   link_args : [va_link_args, ld_args_gc_sections],
diff --git a/src/gallium/targets/vdpau/meson.build b/src/gallium/targets/vdpau/meson.build
index 22e3f5ffdd8..4398d67cdf7 100644
--- a/src/gallium/targets/vdpau/meson.build
+++ b/src/gallium/targets/vdpau/meson.build
@@ -38,7 +38,7 @@ endif
 
 libvdpau_gallium = shared_library(
   'vdpau_gallium',
-  'target.c',
+  [files('target.c'), xmlpool_options_h],
   c_args : c_vis_args,
   cpp_args : cpp_vis_args,
   link_args : [vdpau_link_args, ld_args_gc_sections],
diff --git a/src/gallium/targets/xa/meson.build b/src/gallium/targets/xa/meson.build
index 733ef54ff85..7bbefa63940 100644
--- a/src/gallium/targets/xa/meson.build
+++ b/src/gallium/targets/xa/meson.build
@@ -34,7 +34,7 @@ _xa_version = '.'.join(xa_version)
 
 libxatracker = shared_library(
   'xatracker',
-  'target.c',
+  [files('target.c'), xmlpool_options_h],
   c_args : c_vis_args,
   cpp_args : cpp_vis_args,
   link_args : [xa_link_args, ld_args_gc_sections],
diff --git a/src/gallium/targets/xvmc/meson.build b/src/gallium/targets/xvmc/meson.build
index 0af5b6477ce..e1d748cde66 100644
--- a/src/gallium/targets/xvmc/meson.build
+++ b/src/gallium/targets/xvmc/meson.build
@@ -33,7 +33,7 @@ endif
 
 libxvmc_gallium = shared_library(
   'XvMCgallium',
-  'target.c',
+  [files('target.c'), xmlpool_options_h],
   c_args : c_vis_args,
   cpp_args : cpp_vis_args,
   link_args : [xvmc_link_args, ld_args_gc_sections],
-- 
2.20.1
Comment 1 Eric Engestrom 2019-02-24 11:15:35 UTC
Hi David!

Thanks for your patch! I verified it and you are entirely correct :)

The preferred way to send patches for Mesa is by submitting a merge request (https://gitlab.freedesktop.org/mesa/mesa/merge_requests, see https://mesa3d.org/submittingpatches.html).

I just saw that you attached your patch, which I missed earlier, and I couldn't manage to fixup the copy/pasted patch, so I rewrote it, added a few `Fixes:` tags so that it gets picked up for backports, and pushed it as:

commit 6fa923a65daf1ee73c5cc763ade91abc82da7085
Author: David Shao <davshao@gmail.com>
Date:   Sun, 24 Feb 2019 09:00:36 +0000

    meson: ensure that xmlpool_options.h is generated for gallium targets that need it

    Fixes: 68076b87474e7959c161 "meson: build gallium vdpau state tracker"
    Fixes: 22a817af8a89eb3c762f "meson: build gallium xvmc state tracker"
    Fixes: 5a785d51a6d68ec676ce "meson: build gallium va state tracker"
    Fixes: 0ba909f0f111824223bc "meson: build gallium xa state tracker"
    Fixes: 1d36dc674d528b93bec3 "meson: build gallium omx state tracker"
    Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>

Please double check the commit to make sure I didn't miss something :)
https://gitlab.freedesktop.org/mesa/mesa/commit/6fa923a65daf1ee73c5cc763ade91abc82da7085

Thanks again for your patch, and welcome to Mesa!
Comment 2 ellieharry8@gmail.com (Spammer; Account disabled) 2019-08-23 10:10:32 UTC Comment hidden (spam)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.