> On Wed, Jan 23, 2019 at 09:48:43AM +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 calling git-version-gen command
> > as this won't be expanded.
> 
> "when calling" I think.
> 
> > Change directory in git-version-gen script to allow the
> > script to be called from a different directory.
> > 
> > Signed-off-by: Frediano Ziglio <fzig...@redhat.com>
> > ---
> >  build-aux/git-version-gen | 1 +
> >  meson.build               | 4 +++-
> >  2 files changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
> > index 5617eb8d..00c4a55a 100755
> > --- a/build-aux/git-version-gen
> > +++ b/build-aux/git-version-gen
> > @@ -95,6 +95,7 @@ then
> >     && echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2
> >  fi
> >  
> > +cd "`dirname $0`/.."
> >  if test -n "$v"
> >  then
> >      : # use $v
> 
> I don't know for sure what the canonical source is for git-version-gen,
> but we should avoid making local changes to our copy.
> I found
> https://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/git-version-gen
> which seems much newer than our copy.
> 

Just tested, the patch works even without changing git-version-gen script,
I'll send a new one

> 
> I did not test it, but the changes look reasonable.
> 
> Christophe
> 
> > diff --git a/meson.build b/meson.build
> > index 70dd3188..dcfa4763 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
> >  #
_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to