[Spice-devel] [PATCH spice-gtk v2] build-sys: Make git-version-gen work again with Meson

Christophe Fergeau cfergeau at redhat.com
Wed Jan 30 13:59:57 UTC 2019


Acked-by: Christophe Fergeau <cfergeau at redhat.com>
off-topic, but the tarball generated with ninja dist is only usable with
meson even if it contains autotools files too (but eg gtk-doc.make is
missing).

Christophe

On Mon, Jan 28, 2019 at 09:04:00PM +0000, Frediano Ziglio wrote:
> d0cbd9618f0b removed the ability to use git-version-gen to generate
> proper version string.
> Generate .tarball-version file in the distribution file to allow
> building from tarball.
> Do not use MESON_SOURCE_ROOT when calling git-version-gen command as
> this won't be expanded.
> Change directory in git-version-gen script to allow the script to be
> called from a different directory.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  meson.build | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> Chnges since v1:
> - do not change git-version-gen, not necessary
> - typo in commit message
> 
> diff --git a/meson.build b/meson.build
> index 5f39ff4c..8e540c92 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2,13 +2,15 @@
>  # project definition
>  #
>  project('spice-gtk', 'c',
> -         version : '0.36',
> +         version : run_command('build-aux/git-version-gen', '@0@/.tarball-version'.format(meson.source_root()), check : true).stdout().strip(),
>           license : 'LGPLv2.1',
>           meson_version : '>= 0.49')
>  
>  message('Updating submodules')
>  run_command('build-aux/meson/check-spice-common', check : true)
>  
> +meson.add_dist_script('sh', '-c', 'echo @0@>"$MESON_DIST_ROOT/.tarball-version"'.format(meson.project_version()))
> +
>  #
>  # global C defines
>  #
> -- 
> 2.20.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190130/eb52789f/attachment.sig>


More information about the Spice-devel mailing list