Re: [PATCH spice-gtk 17/34] meson: switch usbredir option to auto feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On Mon, Jan 7, 2019 at 6:22 PM Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
>
> On Mon, Jan 07, 2019 at 12:00:46PM +0400, marcandre.lureau@xxxxxxxxxx wrote:
> > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> > ---
> >  .gitlab-ci.yml    |  1 -
> >  meson.build       | 15 +++++----------
> >  meson_options.txt |  3 +--
> >  3 files changed, 6 insertions(+), 13 deletions(-)
> >
> > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> > index fabe29e..125dbd7 100644
> > --- a/.gitlab-ci.yml
> > +++ b/.gitlab-ci.yml
> > @@ -48,7 +48,6 @@ makecheck_simple-meson:
> >                  -Dlz4=false
> >                  -Dsasl=false
> >                  -Dsmartcard=false
> > -                -Dusbredir=false
> >                  -Ddbus=false || (cat build/meson-logs/meson-log.txt && exit 1)
> >    - ninja -C build
> >    - (cd build && meson test) || (cat build/meson-logs/testlog.txt && exit 1)
> > diff --git a/meson.build b/meson.build
> > index 69f7e1f..18e330f 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -175,16 +175,11 @@ endif
> >
> >  # usbredir
> >  spice_gtk_has_usbredir = false
> > -if get_option('usbredir')
> > -  deps = {'libusbredirparser-0.5': '>= 0.5',
> > -          'libusbredirhost' : '>= 0.4.2',
> > -          'libusb-1.0' : '>= 1.0.16'}
> > -
> > -  foreach dep, version : deps
> > -    usb_dep = dependency(dep, version : version)
> > -    spice_glib_deps += usb_dep
> > -  endforeach
> > -
> > +d = dependency('libusbredirparser-0.5', required : get_option('usbredir'))
> > +if d.found()
> > +  spice_glib_deps += d
> > +  spice_glib_deps += dependency('libusbredirhost', version : '>= 0.4.2')
> > +  spice_glib_deps += dependency('libusb-1.0', version : '>= 1.0.16')
>
> Thinking of the behaviour that we want with 'auto', shouldn't it be
> something like (pseudo-code) this?
>
> d1 = dependency('libusbredirparser-0.5', required : get_option('usbredir'))
> d2 = dependency('libusbredirhost', version : '>= 0.4.2', required : get_option('usbredir')))
> d3 = dependency('libusb-1.0', version : '>= 1.0.16', required : get_option('usbredir')))
> if d1.found() and d2.found() and d3.found():
>   spice_glib_deps += [ d1, d2, d3 ]

Yes, that should work too, although I don't like much the multiple
get_option('usbredir')
I might just not be used to that, or the lack of better support for
multiple feature dependency with meson.

>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Marc-André Lureau
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]