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

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

 



On Mon, Jan 7, 2019 at 6:24 PM Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
>
> On Mon, Jan 07, 2019 at 12:00:47PM +0400, marcandre.lureau@xxxxxxxxxx wrote:
> > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> > ---
> >  meson.build       | 32 +++++++++++++++-----------------
> >  meson_options.txt |  3 +--
> >  2 files changed, 16 insertions(+), 19 deletions(-)
> >
> > diff --git a/meson.build b/meson.build
> > index 18e330f..07e8227 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -186,26 +186,24 @@ endif
> >
> >  # polkit
> >  spice_gtk_has_polkit = false
> > -if get_option('polkit')
> > -  polkit_dep = dependency('polkit-gobject-1', version : '>= 0.96')# ,required : false)
> > -  if polkit_dep.found()
> > -    spice_gtk_policy_dir = polkit_dep.get_pkgconfig_variable('policydir')
> > -    foreach func : ['polkit_authority_get_sync', 'polkit_authorization_result_get_dismissed']
> > -      if compiler.has_function(func, dependencies : polkit_dep)
> > -        spice_gtk_config_data.set('HAVE_@0@'.format(func.to_upper()), '1')
> > -      endif
> > -    endforeach
> > -
> > -    if not compiler.has_function('acl_get_file')
> > -      acl_dep = compiler.find_library('acl')
> > -      if not compiler.has_function('acl_get_file', dependencies : acl_dep)
> > -        error('PolicyKit support requested, but some required packages are not available')
> > -      endif
> > -      spice_acl_deps += acl_dep
> > +d = dependency('polkit-gobject-1', version : '>= 0.96', required : get_option('polkit'))
> > +if d.found()
> > +  spice_gtk_policy_dir = d.get_pkgconfig_variable('policydir')
> > +  foreach func : ['polkit_authority_get_sync', 'polkit_authorization_result_get_dismissed']
> > +    if compiler.has_function(func, dependencies : d)
> > +      spice_gtk_config_data.set('HAVE_@0@'.format(func.to_upper()), '1')
> > +    endif
> > +  endforeach
> > +
> > +  if not compiler.has_function('acl_get_file')
> > +    acl_dep = compiler.find_library('acl')
> > +    if not compiler.has_function('acl_get_file', dependencies : acl_dep)
> > +      error('PolicyKit support requested, but some required packages are not available')
>
> With 'auto', we should just disable polkit support if this is missing.

Does it have to be that smart? Imho, it's unnecessarily complicated.
It could be changed later if needed.


> Christophe
> _______________________________________________
> 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]