From 22bdc5a1f4bd0cdd0421fa5f591527f7b8b53bc9812e09a03bd545f4c5f3183f Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Mon, 13 Mar 2017 16:49:21 +0000 Subject: [PATCH] Accepting request 479086 from home:favogt:branches:Printing - Use Qt5 on Tumbleweed and Leap >= 42.2 (bsc#1018734) OBS-URL: https://build.opensuse.org/request/show/479086 OBS-URL: https://build.opensuse.org/package/show/Printing/hplip?expand=0&rev=137 --- hplip.changes | 5 +++++ hplip.spec | 25 +++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/hplip.changes b/hplip.changes index 5f31c73..8210794 100644 --- a/hplip.changes +++ b/hplip.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 13 08:51:52 UTC 2017 - fvogt@suse.com + +- Use Qt5 on Tumbleweed and Leap >= 42.2 (bsc#1018734) + ------------------------------------------------------------------- Thu Feb 9 17:20:28 UTC 2017 - Mathias.Homann@opensuse.org diff --git a/hplip.spec b/hplip.spec index d2be12e..e87a03e 100644 --- a/hplip.spec +++ b/hplip.spec @@ -32,6 +32,13 @@ BuildRequires: systemd-rpm-macros # For SLE11 redefine _libexecdir because on SLE11 _libexecdir is "/usr/lib64": %global _libexecdir %{_prefix}/lib %endif +# Use Qt5 frontend on TW and Leap >= 42.2 +%if 0%{?is_opensuse} && (0%{?suse_version} > 1320 || 0%{?sle_version} >= 120200) +%global use_qt5 1 +%else +%global use_qt5 0 +%endif + Name: hplip Version: 3.16.11 Release: 0 @@ -76,7 +83,6 @@ BuildRequires: hicolor-icon-theme BuildRequires: libdrm-devel BuildRequires: libgphoto2-devel BuildRequires: libjpeg-devel -BuildRequires: libqt4-devel BuildRequires: libtool BuildRequires: libusb-1_0-devel BuildRequires: net-snmp-devel @@ -88,7 +94,12 @@ BuildRequires: pkgconfig BuildRequires: python-cups BuildRequires: python-devel BuildRequires: python-openssl +%if %use_qt5 +BuildRequires: python-qt5-devel +%else +BuildRequires: libqt4-devel BuildRequires: python-qt4 +%endif BuildRequires: python-xml BuildRequires: readline-devel BuildRequires: update-desktop-files @@ -128,8 +139,12 @@ Requires: foomatic-filters # to get "all the HPLIP stuff" installed has the RPM requirement: Requires: ghostscript Requires: python-gobject2 -# Since version 3.9.2 by default only Qt4 is used: + +%if %use_qt5 +Requires: python-qt5 +%else Requires: python-qt4 +%endif # Require special Python stuff (which pulls in Python base stuff). # At least since openSUSE 11.1 and SLE11 pyxml is no longer required # (pyxml was required in particular for openSUSE 10.3 and SLE10, @@ -390,7 +405,13 @@ export CXXFLAGS="%{optflags} -fno-strict-aliasing" # so that --with-htmldir must be explicitly set. %configure \ --disable-qt3 \ +%if %use_qt5 + --disable-qt4 \ + --enable-qt5 \ +%else --enable-qt4 \ + --disable-qt5 \ +%endif --disable-policykit \ --enable-doc-build \ --enable-network-build \