[Spice-commits] 17 commits - configure.ac doc/reference .gitlab-ci.yml meson.build meson_options.txt src/meson.build src/spice-gstaudio.c src/spice-widget.c src/usb-device-manager.c src/win-usb-dev.c src/win-usb-dev.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 8 09:12:19 UTC 2019


 .gitlab-ci.yml            |    8 +---
 configure.ac              |   50 ++--------------------------
 doc/reference/meson.build |    1 
 meson.build               |   81 ++++++++++++++++++++++------------------------
 meson_options.txt         |   19 +++++-----
 src/meson.build           |    2 -
 src/spice-gstaudio.c      |    6 ---
 src/spice-widget.c        |    2 -
 src/usb-device-manager.c  |    8 +---
 src/win-usb-dev.c         |   10 ++---
 src/win-usb-dev.h         |    2 -
 11 files changed, 67 insertions(+), 122 deletions(-)

New commits:
commit f667e3b8a725d6fc5921f977e9535acbe1fa5710
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Sat Jan 5 15:03:09 2019 +0400

    gstaudio: remove spice_gstaudio_finalize
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/src/spice-gstaudio.c b/src/spice-gstaudio.c
index dcd0591..aff69d2 100644
--- a/src/spice-gstaudio.c
+++ b/src/spice-gstaudio.c
@@ -59,11 +59,6 @@ static void spice_gstaudio_get_record_volume_info_async(SpiceAudio *audio,
 static gboolean spice_gstaudio_get_record_volume_info_finish(SpiceAudio *audio,
         GAsyncResult *res, gboolean *mute, guint8 *nchannels, guint16 **volume, GError **error);
 
-static void spice_gstaudio_finalize(GObject *obj)
-{
-    G_OBJECT_CLASS(spice_gstaudio_parent_class)->finalize(obj);
-}
-
 static void stream_dispose(struct stream *s)
 {
     if (s->pipe) {
@@ -113,7 +108,6 @@ static void spice_gstaudio_class_init(SpiceGstaudioClass *klass)
     audio_class->get_record_volume_info_async = spice_gstaudio_get_record_volume_info_async;
     audio_class->get_record_volume_info_finish = spice_gstaudio_get_record_volume_info_finish;
 
-    gobject_class->finalize = spice_gstaudio_finalize;
     gobject_class->dispose = spice_gstaudio_dispose;
 }
 
commit 5d57bb2e9cfb6ae795fe578fb57045150829b9f1
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Jan 4 23:16:25 2019 +0400

    meson: don't alias meson host_machine.system()
    
    It makes it non-obvious what that variable actually is.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/meson.build b/meson.build
index 14e589b..89de9bf 100644
--- a/meson.build
+++ b/meson.build
@@ -34,7 +34,6 @@ spice_gtk_include = [include_directories('.')]
 spice_glib_deps = []
 spice_gtk_deps = []
 spice_acl_deps = []
-spice_gtk_host_system = host_machine.system()
 
 #
 # Spice common subproject
@@ -93,7 +92,7 @@ endforeach
 # mandatory dependencies, without specific version requirement
 # TODO: specify minimum version for cairo, jpeg and zlib?
 deps = ['cairo', 'libjpeg', 'zlib', 'json-glib-1.0']
-if spice_gtk_host_system == 'windows'
+if host_machine.system() == 'windows'
   deps += 'gio-windows-2.0'
 else
   deps += 'gio-unix-2.0'
@@ -104,7 +103,7 @@ foreach dep : deps
 endforeach
 
 deps = []
-if spice_gtk_host_system == 'windows'
+if host_machine.system() == 'windows'
   deps += ['libws2_32', 'libgdi32']
 endif
 
@@ -132,7 +131,7 @@ d = dependency('gtk+-3.0', version : '>= @0@'.format(gtk_version_required),
                required: get_option('gtk'))
 if d.found()
   spice_gtk_deps += d
-  if spice_gtk_host_system != 'windows'
+  if host_machine.system() != 'windows'
     spice_gtk_deps += dependency('epoxy')
     spice_gtk_deps += dependency('x11')
   endif
@@ -277,7 +276,7 @@ spice_gtk_coroutine = get_option('coroutine')
 if spice_gtk_coroutine == 'ucontext'
   if compiler.has_function('makecontext') and compiler.has_function('swapcontext') and compiler.has_function('getcontext')
     spice_gtk_config_data.set('WITH_UCONTEXT', '1')
-    if spice_gtk_host_system == 'darwin'
+    if host_machine.system() == 'darwin'
       spice_gtk_config_data.set('_XOPEN_SOURCE', '1')
     endif
   else
diff --git a/src/meson.build b/src/meson.build
index 6bbb96b..73ddcc0 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -160,7 +160,7 @@ elif spice_gtk_coroutine == 'winfiber'
   spice_client_glib_sources += 'coroutine_winfibers.c'
 endif
 
-if spice_gtk_has_usbredir and spice_gtk_host_system == 'windows'
+if spice_gtk_has_usbredir and host_machine.system() == 'windows'
   spice_client_glib_sources += ['usbdk_api.c',
                                 'usbdk_api.h',
                                 'win-usb-dev.c',
commit 7e0e732bf7c6539a6a0f9993e07286e56ef57d50
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Jan 4 22:40:57 2019 +0400

    meson: add gtk_doc option
    
    This is based on similar meson code in GStreamer.
    (one of the core meson developer, Nirbheek, is also doing the GStreamer
    meson build support)
    
    This allows me to install a meson-mingw64 build, with
    -Dgtk_doc=disabled, as it fails to build currently for other reasons
    which I don't have time to investigate yet.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/meson.build b/meson.build
index a27a652..14e589b 100644
--- a/meson.build
+++ b/meson.build
@@ -382,7 +382,15 @@ add_project_arguments(compiler.get_supported_arguments(spice_gtk_global_cflags),
 subdir('src')
 subdir('tools')
 subdir('tests')
-subdir('doc')
+if build_machine.system() == 'windows'
+  message('Disabling gtk-doc while building on Windows')
+else
+  if find_program('gtkdoc-scan', required : get_option('gtk_doc')).found()
+    subdir('doc')
+  else
+    message('Not building documentation as gtk-doc was not found')
+  endif
+endif
 subdir('data')
 subdir('man')
 subdir('po')
diff --git a/meson_options.txt b/meson_options.txt
index 389b018..05ca407 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -95,3 +95,7 @@ option('smartcard',
     type : 'boolean',
     value : true,
     description : 'Enable smartcard support')
+
+option('gtk_doc',
+       type : 'feature',
+       description : 'Generate API documentation with gtk-doc')
commit 5b3207701b1bb9c468e1cf610598049d1c83b66e
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Jan 4 22:14:16 2019 +0400

    meson: remove some meson-spice-gtk-doc warnings
    
    ../src/./spice-audio.h:22:2: warning: #warning "Only <spice-client.h> can be included directly" [-Wcpp]
     #warning "Only <spice-client.h> can be included directly"
      ^~~~~~~
    ...
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/doc/reference/meson.build b/doc/reference/meson.build
index 7cb94f3..a121e66 100644
--- a/doc/reference/meson.build
+++ b/doc/reference/meson.build
@@ -45,6 +45,7 @@ gnome.gtkdoc('spice-gtk',
              gobject_typesfile : files('spice-gtk.types'),
              ignore_headers : ignore_headers,
              include_directories: spice_gtk_include,
+             c_args : '-DSPICE_COMPILATION',
              install : true,
              scan_args : ['--deprecated-guards="SPICE_DISABLE_DEPRECATED"', '--ignore-decorators="G_GNUC_INTERNAL"'],
              src_dir : join_paths(meson.source_root(), 'src'))
commit f0e5be973c1732f43a6761544b411af1697d7d87
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Jan 4 20:00:41 2019 +0400

    meson: switch sasl option to auto feature
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5dbe12e..ce4f18f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -50,7 +50,6 @@ makecheck_simple-meson:
                 -Dlz4=false
                 -Dgstaudio=false
                 -Dgstvideo=false
-                -Dsasl=false
                 -Dsmartcard=false
                 -Dusbredir=false
                 -Ddbus=false || (cat build/meson-logs/meson-log.txt && exit 1)
diff --git a/meson.build b/meson.build
index 95d5cf3..a27a652 100644
--- a/meson.build
+++ b/meson.build
@@ -332,8 +332,9 @@ endif
 
 # sasl
 spice_gtk_has_sasl = false
-if get_option('sasl')
-  spice_glib_deps += dependency('libsasl2')
+d = dependency('libsasl2', required : get_option('sasl'))
+if d.found()
+  spice_glib_deps += d
   spice_gtk_config_data.set('HAVE_SASL', '1')
   spice_gtk_has_sasl = true
 endif
diff --git a/meson_options.txt b/meson_options.txt
index 4a2a781..389b018 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -80,8 +80,7 @@ option('lz4',
     description: 'Enable lz4 compression support')
 
 option('sasl',
-    type : 'boolean',
-    value : true,
+    type : 'feature',
     description : 'Use cyrus SASL authentication')
 
 option('celt051',
commit ef27e033a09cd0808666ea6f4224c9f980931d44
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Jan 4 19:45:00 2019 +0400

    meson: switch introspection option to auto feature
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/meson.build b/meson.build
index 00ac182..95d5cf3 100644
--- a/meson.build
+++ b/meson.build
@@ -295,8 +295,9 @@ endif
 
 # introspection
 spice_gtk_has_introspection = false
-if get_option('introspection')
-  spice_glib_deps += dependency('gobject-introspection-1.0', version : '>= 0.94')
+d = dependency('gobject-introspection-1.0', version : '>= 0.94', required : get_option('introspection'))
+if d.found()
+  spice_glib_deps += d
   spice_gtk_has_introspection = true
 endif
 
diff --git a/meson_options.txt b/meson_options.txt
index f946513..4a2a781 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -56,8 +56,7 @@ option('coroutine',
     description : 'Use ucontext or GThread for coroutines')
 
 option('introspection',
-    type : 'boolean',
-    value : true,
+    type : 'feature',
     description: 'Check for GObject instrospection requirements')
 
 option('vapi',
commit 5330ad6be08af15eb58f26dbdcab99e58b56f32f
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Jan 4 18:45:43 2019 +0400

    meson: switch pulse option to auto feature
    
    libpulse-mainloop-glib depends on libpulse, no need to check for both.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 57768bc..5dbe12e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -51,7 +51,6 @@ makecheck_simple-meson:
                 -Dgstaudio=false
                 -Dgstvideo=false
                 -Dsasl=false
-                -Dpulse=false
                 -Dsmartcard=false
                 -Dusbredir=false
                 -Ddbus=false || (cat build/meson-logs/meson-log.txt && exit 1)
diff --git a/meson.build b/meson.build
index ad07421..00ac182 100644
--- a/meson.build
+++ b/meson.build
@@ -154,11 +154,9 @@ endif
 
 # pulse
 spice_gtk_has_pulse = false
-if get_option('pulse')
-  deps = ['libpulse', 'libpulse-mainloop-glib']
-  foreach dep : deps
-    spice_glib_deps += dependency(dep)
-  endforeach
+d = dependency('libpulse-mainloop-glib', required: get_option('pulse'))
+if d.found()
+  spice_glib_deps += d
   spice_gtk_config_data.set('HAVE_PULSE', '1')
   spice_gtk_has_pulse = true
 endif
diff --git a/meson_options.txt b/meson_options.txt
index ba43467..f946513 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -7,8 +7,7 @@ option('webdav',
     description: 'Enable webdav support')
 
 option('pulse',
-    type : 'boolean',
-    value : true,
+    type : 'feature',
     description: 'Enable the PulseAudio backend')
 
 option('gstaudio',
commit 0bffe44d3c1201265e6792022f6e9a8c071294c4
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Jan 4 18:43:18 2019 +0400

    meson: switch webdav option to auto feature
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e68b2e0..57768bc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -50,7 +50,6 @@ makecheck_simple-meson:
                 -Dlz4=false
                 -Dgstaudio=false
                 -Dgstvideo=false
-                -Dwebdav=false
                 -Dsasl=false
                 -Dpulse=false
                 -Dsmartcard=false
diff --git a/meson.build b/meson.build
index 63c36a7..ad07421 100644
--- a/meson.build
+++ b/meson.build
@@ -141,11 +141,15 @@ endif
 
 # webdav
 spice_gtk_has_phodav = false
-if get_option('webdav')
-  spice_glib_deps += dependency('libphodav-2.0')
-  spice_glib_deps += dependency('libsoup-2.4', version : '>= 2.49.91')
-  spice_gtk_config_data.set('USE_PHODAV', '1')
-  spice_gtk_has_phodav = true
+d = dependency('libphodav-2.0', required: get_option('webdav'))
+if d.found()
+  spice_glib_deps += d
+  d = dependency('libsoup-2.4', version : '>= 2.49.91', required: get_option('webdav'))
+  if d.found()
+    spice_glib_deps += d
+    spice_gtk_config_data.set('USE_PHODAV', '1')
+    spice_gtk_has_phodav = true
+  endif
 endif
 
 # pulse
diff --git a/meson_options.txt b/meson_options.txt
index c90e9ca..ba43467 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -3,8 +3,7 @@ option('gtk',
     description: 'Enable gtk+')
 
 option('webdav',
-    type : 'boolean',
-    value : true,
+    type : 'feature',
     description: 'Enable webdav support')
 
 option('pulse',
commit fe349fa2a410c4d790d8bf2ff35fdef99b06408d
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Jan 4 18:32:12 2019 +0400

    meson: switch gtk option to auto feature
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/meson.build b/meson.build
index d408caa..63c36a7 100644
--- a/meson.build
+++ b/meson.build
@@ -128,8 +128,10 @@ endforeach
 # gtk
 spice_gtk_has_gtk = false
 gtk_version_required = '3.22'
-if get_option('gtk')
-  spice_gtk_deps += dependency('gtk+-3.0', version : '>= @0@'.format(gtk_version_required))
+d = dependency('gtk+-3.0', version : '>= @0@'.format(gtk_version_required),
+               required: get_option('gtk'))
+if d.found()
+  spice_gtk_deps += d
   if spice_gtk_host_system != 'windows'
     spice_gtk_deps += dependency('epoxy')
     spice_gtk_deps += dependency('x11')
diff --git a/meson_options.txt b/meson_options.txt
index c09d440..c90e9ca 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,6 +1,5 @@
 option('gtk',
-    type : 'boolean',
-    value : true,
+    type : 'feature',
     description: 'Enable gtk+')
 
 option('webdav',
commit 3dbf890bf0a95053ebd86f4b0c7493df439d72cb
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Jan 4 23:49:21 2019 +0400

    .gitlab-ci: disable meson auto-features in makecheck_simple-meson
    
    Let's turn explicit true/false options into features.
    
    They can be auto-detected, and turned all enabled/disabled at once:
    after the following commits which will turn most of the options into
    auto-detected features, all options can be disabled at once using
    -Dauto_features=disabled.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b247caa..e68b2e0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -46,7 +46,8 @@ makecheck_simple:
 
 makecheck_simple-meson:
   script:
-  - meson build -Dlz4=false
+  - meson build -Dauto_features=disabled
+                -Dlz4=false
                 -Dgstaudio=false
                 -Dgstvideo=false
                 -Dwebdav=false
commit 600e48eab886fe950e440878b629b281a0484112
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Jan 4 18:00:19 2019 +0400

    meson: fix mingw build
    
    Remove rt/x11/m dependencies from Windows build.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/meson.build b/meson.build
index 8f9e9f0..d408caa 100644
--- a/meson.build
+++ b/meson.build
@@ -103,7 +103,7 @@ foreach dep : deps
   spice_glib_deps += dependency(dep)
 endforeach
 
-deps = ['librt', 'libm']
+deps = []
 if spice_gtk_host_system == 'windows'
   deps += ['libws2_32', 'libgdi32']
 endif
@@ -130,9 +130,9 @@ spice_gtk_has_gtk = false
 gtk_version_required = '3.22'
 if get_option('gtk')
   spice_gtk_deps += dependency('gtk+-3.0', version : '>= @0@'.format(gtk_version_required))
-  spice_gtk_deps += dependency('x11')
   if spice_gtk_host_system != 'windows'
     spice_gtk_deps += dependency('epoxy')
+    spice_gtk_deps += dependency('x11')
   endif
   spice_gtk_has_gtk = true
 endif
commit 79f2f60a6d21e249d8580f7c9eb0f354f1cf8974
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Jan 4 17:35:12 2019 +0400

    win-usb-dev: don't include gtk, but gio header
    
    Gtk+ shouldn't be used by spice-client-glib. GIO is enough.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/src/win-usb-dev.h b/src/win-usb-dev.h
index b5c4fce..7f40197 100644
--- a/src/win-usb-dev.h
+++ b/src/win-usb-dev.h
@@ -22,7 +22,7 @@
 #ifndef __WIN_USB_DEV_H__
 #define __WIN_USB_DEV_H__
 
-#include <gtk/gtk.h>
+#include <gio/gio.h>
 
 G_BEGIN_DECLS
 
commit 38932c22bd1db3a777d6589a6848fa847ce4d92c
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Jan 4 17:36:27 2019 +0400

    win-usb-dev: replace snprintf() with g_snprintf()
    
    stdio.h is not explicitely included so far. Let's use the glib version
    instead.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/src/win-usb-dev.c b/src/win-usb-dev.c
index 9a130a3..327976d 100644
--- a/src/win-usb-dev.c
+++ b/src/win-usb-dev.c
@@ -373,11 +373,11 @@ static gboolean get_usb_dev_info(libusb_device *dev, GUdevDeviceInfo *udevinfo)
     udevinfo->class = desc.bDeviceClass;
     udevinfo->vid   = desc.idVendor;
     udevinfo->pid   = desc.idProduct;
-    snprintf(udevinfo->sclass, sizeof(udevinfo->sclass), "%d", udevinfo->class);
-    snprintf(udevinfo->sbus,   sizeof(udevinfo->sbus),   "%d", udevinfo->bus);
-    snprintf(udevinfo->saddr,  sizeof(udevinfo->saddr),  "%d", udevinfo->addr);
-    snprintf(udevinfo->svid,   sizeof(udevinfo->svid),   "%d", udevinfo->vid);
-    snprintf(udevinfo->spid,   sizeof(udevinfo->spid),   "%d", udevinfo->pid);
+    g_snprintf(udevinfo->sclass, sizeof(udevinfo->sclass), "%d", udevinfo->class);
+    g_snprintf(udevinfo->sbus,   sizeof(udevinfo->sbus),   "%d", udevinfo->bus);
+    g_snprintf(udevinfo->saddr,  sizeof(udevinfo->saddr),  "%d", udevinfo->addr);
+    g_snprintf(udevinfo->svid,   sizeof(udevinfo->svid),   "%d", udevinfo->vid);
+    g_snprintf(udevinfo->spid,   sizeof(udevinfo->spid),   "%d", udevinfo->pid);
     return TRUE;
 }
 
commit 8269a5be62f4ce1a04dfd8952af531d2bd76c007
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Jan 4 19:24:15 2019 +0400

    build-sys: drop support for libusb < 1.0.16
    
    libusb 1.0.16 was released on 11 Jul 2013, that should be long enough.
    
    From the distro we care about, according to repology, CentOS 6 and
    Ubuntu 12.04 have too old libusb (1.0.9rc).
    
    Fwiw, libusb 1.0.23 should hopefully see Windows hotplug
    support (https://github.com/libusb/libusb/issues/409).
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5294efc..b247caa 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,7 +6,7 @@ variables:
         intltool gtk3-devel gtk-doc gobject-introspection-devel
         cyrus-sasl-devel pulseaudio-libs-devel libjpeg-turbo-devel
         libacl-devel gstreamer1-devel gstreamer1-plugins-base-devel
-        polkit-devel vala lz4-devel opus-devel libgudev-devel
+        polkit-devel vala lz4-devel opus-devel
         pixman-devel libcacard-devel celt051-devel libphodav-devel
         usbutils usbredir-devel libusbx-devel libsoup-devel
         json-glib-devel
diff --git a/configure.ac b/configure.ac
index ebb0182..8c5c4d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -296,38 +296,13 @@ if test "x$enable_usbredir" = "xno"; then
   have_usbredir="no"
 else
   PKG_CHECK_MODULES([USBREDIR],
-                    [libusb-1.0 >= 1.0.9 libusbredirhost libusbredirparser-0.5],
+                    [libusb-1.0 >= 1.0.16 libusbredirhost libusbredirparser-0.5],
                     [have_usbredir=yes],
                     [have_usbredir=no])
   if test "x$have_usbredir" = "xno" && test "x$enable_usbredir" = "xyes"; then
     AC_MSG_ERROR([usbredir support explicitly requested, but some required packages are not available])
   fi
 
-  # On non windows we need either libusb hotplug support or gudev
-  if test "x$have_usbredir" = "xyes" && test "x$os_win32" = "xno"; then
-    PKG_CHECK_MODULES([LIBUSB_HOTPLUG], [libusb-1.0 >= 1.0.16],
-                      [have_libusb_hotplug=yes], [have_libusb_hotplug=no])
-    if test "x$have_libusb_hotplug" = "xyes"; then
-      AC_DEFINE([USE_LIBUSB_HOTPLUG], [1], [Define if libusb has hotplug support])
-      with_usbredir_hotplug="with libusb hotplug"
-    else
-      PKG_CHECK_MODULES([GUDEV],
-                        [gudev-1.0],
-                        [have_gudev=yes],
-                        [have_gudev=no])
-
-      if test "x$have_gudev" = "xno" && test "x$enable_usbredir" = "xyes"; then
-        AC_MSG_ERROR([usbredir requested but required gudev is not available])
-      fi
-      if test "x$have_gudev" = "xyes"; then
-        AC_DEFINE([USE_GUDEV], [1], [Define if supporting gudev])
-        with_usbredir_hotplug="with gudev hotplug"
-      else
-        have_usbredir=no
-      fi
-    fi
-  fi
-
   if test "x$have_usbredir" = "xyes"; then
     AC_DEFINE([USE_USBREDIR], [1], [Define if supporting usbredir proxying])
   fi
diff --git a/meson.build b/meson.build
index 5c0b6a1..8f9e9f0 100644
--- a/meson.build
+++ b/meson.build
@@ -199,22 +199,13 @@ spice_gtk_has_usbredir = false
 if get_option('usbredir')
   deps = {'libusbredirparser-0.5': '>= 0.5',
           'libusbredirhost' : '>= 0.4.2',
-          'libusb-1.0' : '>= 1.0.9'}
+          'libusb-1.0' : '>= 1.0.16'}
 
   foreach dep, version : deps
     usb_dep = dependency(dep, version : version)
     spice_glib_deps += usb_dep
   endforeach
 
-  if spice_gtk_host_system != 'windows'
-    if usb_dep.version().version_compare('>= 1.0.16')
-      spice_gtk_config_data.set('USE_LIBUSB_HOTPLUG', '1')
-    else
-      spice_glib_deps += dependency('gudev-1.0')
-      spice_gtk_config_data.set('USE_GUDEV', '1')
-    endif
-  endif
-
   spice_gtk_config_data.set('USE_USBREDIR', '1')
   spice_gtk_has_usbredir = true
 endif
diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c
index 354038a..55b672b 100644
--- a/src/usb-device-manager.c
+++ b/src/usb-device-manager.c
@@ -31,13 +31,9 @@
 #include "usbdk_api.h"
 #endif
 
-#if defined(USE_GUDEV)
-#include <gudev/gudev.h>
-#elif defined(G_OS_WIN32)
+#if defined(G_OS_WIN32)
 #include "win-usb-dev.h"
 #define USE_GUDEV /* win-usb-dev.h provides a fake gudev interface */
-#elif !defined USE_LIBUSB_HOTPLUG
-#error "Expecting one of USE_GUDEV or USE_LIBUSB_HOTPLUG to be defined"
 #endif
 
 #include "channel-usbredir-priv.h"
@@ -370,7 +366,7 @@ static void spice_usb_device_manager_dispose(GObject *gobject)
     SpiceUsbDeviceManager *self = SPICE_USB_DEVICE_MANAGER(gobject);
     SpiceUsbDeviceManagerPrivate *priv = self->priv;
 
-#ifdef USE_LIBUSB_HOTPLUG
+#ifndef USE_GUDEV
     if (priv->hp_handle) {
         spice_usb_device_manager_stop_event_listening(self);
         if (g_atomic_int_get(&priv->event_thread_run)) {
commit b5d4e49bc9b54e5a491a8fa85952bc9d7f1792f4
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Jan 4 18:53:14 2019 +0400

    build-sys: drop support for usbredir < 0.5
    
    It was release the 2012-09-07, should be enough time.
    
    According to repology, all tracked distros have 0.5:
    https://repology.org/metapackage/usbredir/versions
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/configure.ac b/configure.ac
index ff5114e..ebb0182 100644
--- a/configure.ac
+++ b/configure.ac
@@ -295,17 +295,10 @@ AC_ARG_ENABLE([usbredir],
 if test "x$enable_usbredir" = "xno"; then
   have_usbredir="no"
 else
-  if ${PKG_CONFIG} libusbredirparser-0.5; then
-    PKG_CHECK_MODULES([USBREDIR],
-                      [libusb-1.0 >= 1.0.9 libusbredirhost libusbredirparser-0.5],
-                      [have_usbredir=yes],
-                      [have_usbredir=no])
-  else
-    PKG_CHECK_MODULES([USBREDIR],
-                      [libusb-1.0 >= 1.0.9 libusbredirhost >= 0.4.2 libusbredirparser >= 0.4],
-                      [have_usbredir=yes],
-                      [have_usbredir=no])
-  fi
+  PKG_CHECK_MODULES([USBREDIR],
+                    [libusb-1.0 >= 1.0.9 libusbredirhost libusbredirparser-0.5],
+                    [have_usbredir=yes],
+                    [have_usbredir=no])
   if test "x$have_usbredir" = "xno" && test "x$enable_usbredir" = "xyes"; then
     AC_MSG_ERROR([usbredir support explicitly requested, but some required packages are not available])
   fi
diff --git a/meson.build b/meson.build
index 9cb7ed4..5c0b6a1 100644
--- a/meson.build
+++ b/meson.build
@@ -197,13 +197,8 @@ endif
 # usbredir
 spice_gtk_has_usbredir = false
 if get_option('usbredir')
-  usb_dep = dependency('libusbredirparser-0.5', required : false)
-  if not usb_dep.found()
-    usb_dep = dependency('libusbredirparser', version : '>= 0.4')
-  endif
-  spice_glib_deps += usb_dep
-
-  deps = {'libusbredirhost' : '>= 0.4.2',
+  deps = {'libusbredirparser-0.5': '>= 0.5',
+          'libusbredirhost' : '>= 0.4.2',
           'libusb-1.0' : '>= 1.0.9'}
 
   foreach dep, version : deps
commit 100e4ee750a1716ca73a8a905fd67a443a7f5906
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Jan 4 16:35:34 2019 +0400

    widget: make clear gst_size_allocate() is static on definition
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Acked-by: Snir Sheriber <ssheribe at redhat.com>

diff --git a/src/spice-widget.c b/src/spice-widget.c
index 538e4fa..af0301c 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -2615,7 +2615,7 @@ static gboolean gst_draw_event(GtkWidget *widget, cairo_t *cr, gpointer data)
     return false;
 }
 
-void gst_size_allocate(GtkWidget *widget, GdkRectangle *a, gpointer data)
+static void gst_size_allocate(GtkWidget *widget, GdkRectangle *a, gpointer data)
 {
     SpiceDisplay *display = SPICE_DISPLAY(data);
     SpiceDisplayPrivate *d = display->priv;
commit 597be833cc6a242ab9ec8089cbd96bd462515b57
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Jan 4 15:31:19 2019 +0400

    build-sys: remove autoconf --with-audio=..
    
    Deprecated for several releases now (v0.31).
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/configure.ac b/configure.ac
index 69c03da..ff5114e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -195,16 +195,6 @@ AS_IF([test "x$have_phodav" = "xyes"],
 
 AM_CONDITIONAL([WITH_PHODAV], [test "x$have_phodav" = "xyes"])
 
-AC_ARG_WITH([audio],
-  AS_HELP_STRING([--with-audio=@<:@gstreamer/pulse/auto/no@:>@], [For legacy compatibility only]),
-  [SPICE_WARNING([--with-audio is deprecated. Use --enable-pulse and/or --enable-gstaudio instead])
-   case "$with_audio" in
-   pulse)     enable_pulse="yes"; enable_gstaudio="no" ;;
-   gstreamer) enable_pulse="no";  enable_gstaudio="yes" ;;
-   no)        enable_pulse="no";  enable_gstaudio="no" ;;
-   esac
-])
-
 AC_ARG_ENABLE([pulse],
   AS_HELP_STRING([--enable-pulse=@<:@yes/auto/no@:>@], [Enable the PulseAudio backend @<:@default=auto@:>@]),
   [],


More information about the Spice-commits mailing list