[virt-tools-list] [virt-viewer 2/2] spec: Get BuildRequires min versions from configure.ac

Marc-André Lureau mlureau at redhat.com
Wed Dec 18 14:04:23 UTC 2013


ack

----- Original Message -----
> We currently duplicate the minimum requirements for the various virt-viewer
> dependencies in configure.ac, virt-viewer.spec.in and
> mingw-virt-viewer.spec.in
> This commit uses the versions set in configure.ac in the 2 .spec.in files
> so that it's easier to keep them in sync
> 
> Before/after diff of the .spec files are:
> 
> --- virt-viewer.spec.or 2013-12-18 14:14:14.304285905 +0100
> +++ virt-viewer.spec    2013-12-18 14:19:20.217072678 +0100
> @@ -47,14 +47,14 @@
>  BuildRequires: libtool
>  %endif
> 
> -BuildRequires: glib2-devel >= 2.22
> +BuildRequires: glib2-devel >= 2.22.0
>  %if %{with_gtk3}
> -BuildRequires: gtk3-devel >= 3.0.0
> +BuildRequires: gtk3-devel >= 3.0
>  %else
> -BuildRequires: gtk2-devel >= 2.12.0
> +BuildRequires: gtk2-devel >= 2.18.0
>  %endif
> -BuildRequires: libvirt-devel >= 0.9.7
> -BuildRequires: libxml2-devel
> +BuildRequires: libvirt-devel >= 0.10.0
> +BuildRequires: libxml2-devel >= 2.6.0
>  %if %{with_gtk3}
>  BuildRequires: gtk-vnc2-devel >= 0.4.0
>  %else
> 
> --- mingw-virt-viewer.spec.or   2013-12-18 14:14:23.656401693 +0100
> +++ mingw-virt-viewer.spec      2013-12-18 14:20:57.007270507 +0100
> @@ -12,22 +12,22 @@
> 
>  BuildRequires:  mingw32-filesystem >= 23
>  BuildRequires:  mingw64-filesystem >= 23
> -BuildRequires:  mingw32-glib2 >= 2.22
> -BuildRequires:  mingw64-glib2 >= 2.22
> +BuildRequires:  mingw32-glib2 >= 2.22.0
> +BuildRequires:  mingw64-glib2 >= 2.22.0
>  BuildRequires:  mingw32-gstreamer-plugins-bad-free
>  BuildRequires:  mingw64-gstreamer-plugins-bad-free
>  BuildRequires:  mingw32-gstreamer-plugins-good
>  BuildRequires:  mingw64-gstreamer-plugins-good
> -BuildRequires:  mingw32-gtk2
> -BuildRequires:  mingw64-gtk2
> +BuildRequires:  mingw32-gtk2 >= 2.18.0
> +BuildRequires:  mingw64-gtk2 >= 2.18.0
>  BuildRequires:  mingw32-libusbx
>  BuildRequires:  mingw64-libusbx
> -BuildRequires:  mingw32-libvirt >= 0.9.7
> -BuildRequires:  mingw64-libvirt >= 0.9.7
> -BuildRequires:  mingw32-libxml2
> -BuildRequires:  mingw64-libxml2
> -BuildRequires:  mingw32-gtk-vnc >= 0.4.3
> -BuildRequires:  mingw64-gtk-vnc >= 0.4.3
> +BuildRequires:  mingw32-libvirt >= 0.10.0
> +BuildRequires:  mingw64-libvirt >= 0.10.0
> +BuildRequires:  mingw32-libxml2 >= 2.6.0
> +BuildRequires:  mingw64-libxml2 >= 2.6.0
> +BuildRequires:  mingw32-gtk-vnc >= 0.3.8
> +BuildRequires:  mingw64-gtk-vnc >= 0.3.8
>  BuildRequires:  mingw32-readline
>  BuildRequires:  mingw64-readline
>  BuildRequires:  mingw32-spice-glib
> ---
>  configure.ac              | 14 +++++++++++++-
>  mingw-virt-viewer.spec.in | 24 ++++++++++++------------
>  virt-viewer.spec.in       | 22 +++++++++++-----------
>  3 files changed, 36 insertions(+), 24 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index d0c7b38..c6602cb 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -21,6 +21,18 @@ GTK_VNC1_REQUIRED="0.3.8"
>  GTK_VNC2_REQUIRED="0.4.0"
>  SPICE_GTK_REQUIRED="0.22"
>  SPICE_PROTOCOL_REQUIRED="0.10.1"
> +GOVIRT_REQUIRED="0.3.0"
> +
> +AC_SUBST([GLIB2_REQUIRED])
> +AC_SUBST([LIBXML2_REQUIRED])
> +AC_SUBST([LIBVIRT_REQUIRED])
> +AC_SUBST([GTK2_REQUIRED])
> +AC_SUBST([GTK3_REQUIRED])
> +AC_SUBST([GTK_VNC1_REQUIRED])
> +AC_SUBST([GTK_VNC2_REQUIRED])
> +AC_SUBST([SPICE_GTK_REQUIRED])
> +AC_SUBST([SPICE_PROTOCOL_REQUIRED])
> +AC_SUBST([GOVIRT_REQUIRED])
>  
>  AC_MSG_CHECKING([for native Win32])
>  case "$host_os" in
> @@ -178,7 +190,7 @@ AC_ARG_WITH([ovirt],
>      AS_HELP_STRING([--without-ovirt], [Ignore presence of librest and
>      disable oVirt support]))
>  
>  AS_IF([test "x$with_ovirt" != "xno"],
> -      [PKG_CHECK_MODULES([OVIRT], [govirt-1.0 >= 0.3.0],
> +      [PKG_CHECK_MODULES([OVIRT], [govirt-1.0 >= $GOVIRT_REQUIRED],
>                           [have_ovirt=yes], [have_ovirt=no])],
>        [have_ovirt=no])
>  
> diff --git a/mingw-virt-viewer.spec.in b/mingw-virt-viewer.spec.in
> index 1c9f109..01f8575 100644
> --- a/mingw-virt-viewer.spec.in
> +++ b/mingw-virt-viewer.spec.in
> @@ -12,28 +12,28 @@ Source0:
> ftp://virt-manager.org/downloads/virt-viewer/virt-viewer-%{versi
>  
>  BuildRequires:  mingw32-filesystem >= 23
>  BuildRequires:  mingw64-filesystem >= 23
> -BuildRequires:  mingw32-glib2 >= 2.22
> -BuildRequires:  mingw64-glib2 >= 2.22
> +BuildRequires:  mingw32-glib2 >= @GLIB2_REQUIRED@
> +BuildRequires:  mingw64-glib2 >= @GLIB2_REQUIRED@
>  BuildRequires:  mingw32-gstreamer-plugins-bad-free
>  BuildRequires:  mingw64-gstreamer-plugins-bad-free
>  BuildRequires:  mingw32-gstreamer-plugins-good
>  BuildRequires:  mingw64-gstreamer-plugins-good
> -BuildRequires:  mingw32-gtk2
> -BuildRequires:  mingw64-gtk2
> +BuildRequires:  mingw32-gtk2 >= @GTK2_REQUIRED@
> +BuildRequires:  mingw64-gtk2 >= @GTK2_REQUIRED@
>  BuildRequires:  mingw32-libusbx
>  BuildRequires:  mingw64-libusbx
> -BuildRequires:  mingw32-libvirt >= 0.9.7
> -BuildRequires:  mingw64-libvirt >= 0.9.7
> -BuildRequires:  mingw32-libxml2
> -BuildRequires:  mingw64-libxml2
> -BuildRequires:  mingw32-gtk-vnc >= 0.4.3
> -BuildRequires:  mingw64-gtk-vnc >= 0.4.3
> +BuildRequires:  mingw32-libvirt >= @LIBVIRT_REQUIRED@
> +BuildRequires:  mingw64-libvirt >= @LIBVIRT_REQUIRED@
> +BuildRequires:  mingw32-libxml2 >= @LIBXML2_REQUIRED@
> +BuildRequires:  mingw64-libxml2 >= @LIBXML2_REQUIRED@
> +BuildRequires:  mingw32-gtk-vnc >= @GTK_VNC1_REQUIRED@
> +BuildRequires:  mingw64-gtk-vnc >= @GTK_VNC1_REQUIRED@
>  BuildRequires:  mingw32-readline
>  BuildRequires:  mingw64-readline
>  BuildRequires:  mingw32-spice-glib
>  BuildRequires:  mingw64-spice-glib
> -BuildRequires:  mingw32-spice-gtk >= 0.22
> -BuildRequires:  mingw64-spice-gtk >= 0.22
> +BuildRequires:  mingw32-spice-gtk >= @SPICE_GTK_REQUIRED@
> +BuildRequires:  mingw64-spice-gtk >= @SPICE_GTK_REQUIRED@
>  BuildRequires:  mingw32-usbredir
>  BuildRequires:  mingw64-usbredir
>  BuildRequires:  pkgconfig
> diff --git a/virt-viewer.spec.in b/virt-viewer.spec.in
> index 1dafa1a..d68029c 100644
> --- a/virt-viewer.spec.in
> +++ b/virt-viewer.spec.in
> @@ -47,31 +47,31 @@ BuildRequires: gettext-devel
>  BuildRequires: libtool
>  %endif
>  
> -BuildRequires: glib2-devel >= 2.22
> +BuildRequires: glib2-devel >= @GLIB2_REQUIRED@
>  %if %{with_gtk3}
> -BuildRequires: gtk3-devel >= 3.0.0
> +BuildRequires: gtk3-devel >= @GTK3_REQUIRED@
>  %else
> -BuildRequires: gtk2-devel >= 2.12.0
> +BuildRequires: gtk2-devel >= @GTK2_REQUIRED@
>  %endif
> -BuildRequires: libvirt-devel >= 0.9.7
> -BuildRequires: libxml2-devel
> +BuildRequires: libvirt-devel >= @LIBVIRT_REQUIRED@
> +BuildRequires: libxml2-devel >= @LIBXML2_REQUIRED@
>  %if %{with_gtk3}
> -BuildRequires: gtk-vnc2-devel >= 0.4.0
> +BuildRequires: gtk-vnc2-devel >= @GTK_VNC2_REQUIRED@
>  %else
> -BuildRequires: gtk-vnc-devel >= 0.3.8
> +BuildRequires: gtk-vnc-devel >= @GTK_VNC1_REQUIRED@
>  %endif
>  %if %{with_spice}
>  %if %{with_gtk3}
> -BuildRequires: spice-gtk3-devel >= 0.22
> +BuildRequires: spice-gtk3-devel >= @SPICE_GTK_REQUIRED@
>  %else
> -BuildRequires: spice-gtk-devel >= 0.22
> +BuildRequires: spice-gtk-devel >= @SPICE_GTK_REQUIRED@
>  %endif
> -BuildRequires: spice-protocol >= 0.10.1
> +BuildRequires: spice-protocol >= @SPICE_PROTOCOL_REQUIRED@
>  %endif
>  BuildRequires: /usr/bin/pod2man
>  BuildRequires: intltool
>  %if %{with_govirt}
> -BuildRequires: libgovirt-devel >= 0.3.0
> +BuildRequires: libgovirt-devel >= @GOVIRT_REQUIRED@
>  %endif
>  
>  %if 0%{?fedora} >= 20
> --
> 1.8.4.2
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
> 




More information about the virt-tools-list mailing list