[Spice-devel] [PATCH spice-common] fixup! meson build

Frediano Ziglio fziglio at redhat.com
Wed May 23 14:43:15 UTC 2018


> 
> Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
> ---
>  meson.build       | 14 ++++++++++----
>  meson_options.txt |  5 +++++
>  2 files changed, 15 insertions(+), 4 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 9d44604..cd75c51 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -90,11 +90,14 @@ endforeach
>  #
>  # check for mandatory dependencies
>  #
> -glib_version_info = '>= 2.46'
> -glib_encoded_version = 'GLIB_VERSION_2_46'
>  spice_protocol_version = '>= @0@'.format(get_option('protocol-version'))
>  
> -deps = [['spice-protocol', spice_protocol_version],
> +glib_version = get_option('glib-version')
> +glib_major_minor = glib_version.split('.')
> +glib_version_info = '>= @0 at .@1@'.format(glib_major_minor[0],
> glib_major_minor[1])
> +glib_encoded_version = 'GLIB_VERSION_ at 0@_ at 1@'.format(glib_major_minor[0],
> glib_major_minor[1])
> +
> +deps = [['spice-protocol', '>= @0@'.format(get_option('protocol-version'))],
>          ['glib-2.0', glib_version_info],
>          ['gobject-2.0', glib_version_info],
>          ['gio-2.0', glib_version_info],
> @@ -115,8 +118,11 @@ spice_common_global_cflags += spice_common_glib_cflags
>  # Non-mandatory/optional dependencies
>  #
>  deps = [['opus', '>= 0.9.14', 'HAVE_OPUS'],]
> -optional_deps = [['celt051', '>= 0.5.1.1', 'HAVE_CELT051'],]
>  
> +# Check deps which are optional but enabled by default. This foreach block
> only
> +# checks the option, and adds the package to the deps list, while the real
> check
> +# for the dependency is done in the foeach block below.
> +optional_deps = [['celt051', '>= 0.5.1.1', 'HAVE_CELT051'],]
>  foreach dep : optional_deps
>    if get_option(dep[0])
>      deps += [dep]
> diff --git a/meson_options.txt b/meson_options.txt
> index 8e27cbf..b2a38e7 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -26,6 +26,11 @@ option('manual',
>      yield : true,
>      description : 'Build SPICE manual (default=true)')
>  
> +option('glib-version',
> +    type : 'string',
> +    value : '2.38',
> +    description : 'Glib version required (default=2.38)')
> +
>  option('protocol-version',
>      type : 'string',
>      value : '0.12.12',

Both glib-version and protocol-version, not clear why we don't
need this for autoconf but this is needed for Meson.
I think there were discussions about removing protocol-version
option too.

For the bump of version I would say drop support for rhel6
officially and fine with 2.38. Better would be to bump also
to 2.38 for autoconf.

Frediano


More information about the Spice-devel mailing list