[Spice-devel] [PATCH spice-gtk 02/12] meson: fix ninja dist, and building from tarball
Frediano Ziglio
fziglio at redhat.com
Fri Jan 18 11:44:13 UTC 2019
>
> From: Marc-André Lureau <marcandre.lureau at redhat.com>
>
> meson doesn't handle git-version-gen correctly yet (see
> meson#688). Let's set the version manually for now.
>
Why? Current code works, why removing it?
> And a tag version vX.X will also fail to build, version_info[2]
> is out of array bounds.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
> ---
> meson.build | 2 +-
> src/meson.build | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index d7062af..70dd318 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2,7 +2,7 @@
> # project definition
> #
> project('spice-gtk', 'c',
> - version : run_command('build-aux/git-version-gen',
> '${MESON_SOURCE_ROOT}/.tarball-version', check : true).stdout().strip(),
> + version : '0.36',
> license : 'LGPLv2.1',
> meson_version : '>= 0.49')
>
> diff --git a/src/meson.build b/src/meson.build
> index d9614cb..c55db44 100644
> --- a/src/meson.build
> +++ b/src/meson.build
> @@ -8,9 +8,9 @@ spice_gtk_include += [include_directories('.')]
> version_info = meson.project_version().split('.')
> major = '@0@'.format(version_info[0])
> minor = '@0@'.format(version_info[1])
> -micro = version_info[2].split('-')[0]
> -if micro == ''
> - micro = '0'
> +micro = '0'
> +if version_info.length() > 2
> + micro = version_info[2].split('-')[0]
> endif
> version_data = configuration_data()
> version_data.set('SPICE_GTK_MAJOR_VERSION', major)
> --
> 2.20.1.98.gecbdaf0899
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
>
More information about the Spice-devel
mailing list