[Mesa-dev] [PATCH 2/3] meson: do not use the deprecated wayland-scanner "code"
Eric Engestrom
eric.engestrom at intel.com
Fri Jun 29 11:24:05 UTC 2018
On Thursday, 2018-06-28 15:35:45 +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> With version v1.15 the "code" option was deprecated in favour of
> "private-code" or "public-code".
>
> Before the interface symbol generated was exported (which is a bad idea
> since it's internal implementation detail) and others may misuse it.
>
> That was the case with libva approx. 1 year.
"ago"
> Since then libva was fixed,
> so we can finally hide it by using "private-code"
>
> Inspired by similar xserver patch by Adam Jackson.
>
> Cc: Dylan Baker <dylan at pnwbakers.com>
> Cc: Eric Engestrom <eric at engestrom.ch>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> Any suggestions to the commit message for this and the autoconf commit
> are highly appreciated ;-)
Thanks for the patch, I had a local "private-code" patch, but the
detection based on the wayland-scanner version is the right thing to do.
Series is
Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
Wrt the commit title, how about this?
{meson,autoconf}: stop exporting internal wayland details
> ---
> meson.build | 6 ++++++
> src/egl/wayland/wayland-drm/meson.build | 4 ++--
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 79bac89e7d9..429e24f411f 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1271,6 +1271,11 @@ endif
> if with_platform_wayland
> dep_wl_scanner = dependency('wayland-scanner', native: true)
> prog_wl_scanner = find_program(dep_wl_scanner.get_pkgconfig_variable('wayland_scanner'))
> + if dep_wl_scanner.version().version_compare('>= 1.15')
> + wl_scanner_arg = 'private-code'
> + else
> + wl_scanner_arg = 'code'
> + endif
> dep_wl_protocols = dependency('wayland-protocols', version : '>= 1.8')
> dep_wayland_client = dependency('wayland-client', version : '>=1.11')
> dep_wayland_server = dependency('wayland-server', version : '>=1.11')
> @@ -1286,6 +1291,7 @@ if with_platform_wayland
> pre_args += ['-DHAVE_WAYLAND_PLATFORM', '-DWL_HIDE_DEPRECATED']
> else
> prog_wl_scanner = []
> + wl_scanner_arg = ''
> dep_wl_protocols = null_dep
> dep_wayland_client = null_dep
> dep_wayland_server = null_dep
> diff --git a/src/egl/wayland/wayland-drm/meson.build b/src/egl/wayland/wayland-drm/meson.build
> index c627deaa1c3..983bf55fac8 100644
> --- a/src/egl/wayland/wayland-drm/meson.build
> +++ b/src/egl/wayland/wayland-drm/meson.build
> @@ -24,7 +24,7 @@ wayland_drm_protocol_c = custom_target(
> 'wayland-drm-protocol.c',
> input : 'wayland-drm.xml',
> output : 'wayland-drm-protocol.c',
> - command : [prog_wl_scanner, 'code', '@INPUT@', '@OUTPUT@'],
> + command : [prog_wl_scanner, wl_scanner_arg, '@INPUT@', '@OUTPUT@'],
> )
>
> wayland_drm_client_protocol_h = custom_target(
> @@ -61,7 +61,7 @@ linux_dmabuf_unstable_v1_protocol_c = custom_target(
> 'linux-dmabuf-unstable-v1-protocol.c',
> input : wayland_dmabuf_xml,
> output : 'linux-dmabuf-unstable-v1-protocol.c',
> - command : [prog_wl_scanner, 'code', '@INPUT@', '@OUTPUT@'],
> + command : [prog_wl_scanner, wl_scanner_arg, '@INPUT@', '@OUTPUT@'],
> )
>
> linux_dmabuf_unstable_v1_client_protocol_h = custom_target(
> --
> 2.18.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list