diff --git a/gwenhywfar.changes b/gwenhywfar.changes index 0aa7ae9..a01e52c 100644 --- a/gwenhywfar.changes +++ b/gwenhywfar.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Nov 27 10:00:09 UTC 2017 - dimstar@opensuse.org + +- Conditionalize usage of qt4 libs + ------------------------------------------------------------------- Sat Jun 10 11:17:28 UTC 2017 - wbauer@tmo.at diff --git a/gwenhywfar.spec b/gwenhywfar.spec index 50f8c9b..178d2a1 100644 --- a/gwenhywfar.spec +++ b/gwenhywfar.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # +%bcond_with qt4 %define libversion 60 %define devversion 4.17 @@ -32,7 +33,9 @@ BuildRequires: gnutls-devel >= 3.0 BuildRequires: gtk2-devel >= 1.4 BuildRequires: libgcrypt-devel >= 1.2.0 BuildRequires: libopenssl-devel +%if %{with qt4} BuildRequires: libqt4-devel +%endif BuildRequires: cmake(Qt5Concurrent) BuildRequires: cmake(Qt5Core) BuildRequires: cmake(Qt5DBus) @@ -170,7 +173,9 @@ Requires: glibc-devel Requires: lib%{name}%{libversion} = %{version} Requires: libgwengui-fox16-0 = %{version} Requires: libgwengui-gtk2-0 = %{version} +%if %{with qt4} Requires: libgwengui-qt4-0 = %{version} +%endif Requires: libgwengui-qt5-0 = %{version} %description devel @@ -194,8 +199,10 @@ export CPP --enable-full-doc\ --with-docpath=%{_docdir}/%{name}/api \ --disable-static \ +%if %{with qt4} --with-qt4-libs=%{_libdir} \ - --with-guis="fox16 qt4 qt5 gtk2" \ +%endif + --with-guis="fox16 %{?with qt4:qt4} qt5 gtk2" \ --with-plugins-cfgmgr=all \ --with-pic %__make %{?smp_mflags} @@ -230,9 +237,11 @@ rm -rf %{buildroot} %postun -n libgwengui-gtk2-0 -p /sbin/ldconfig +%if %{with qt4} %post -n libgwengui-qt4-0 -p /sbin/ldconfig %postun -n libgwengui-qt4-0 -p /sbin/ldconfig +%endif %post -n libgwengui-fox16-0 -p /sbin/ldconfig @@ -275,9 +284,11 @@ rm -rf %{buildroot} %defattr (-, root, root) %{_libdir}/libgwengui-gtk2.so.* +%if %{with qt4} %files -n libgwengui-qt4-0 %defattr (-, root, root) %{_libdir}/libgwengui-qt4.so.* +%endif %files -n libgwengui-qt5-0 %defattr (-, root, root) @@ -297,13 +308,15 @@ rm -rf %{buildroot} %{_libdir}/*.so %{_libdir}/pkgconfig/%{name}.pc %{_libdir}/pkgconfig/gwengui-gtk2.pc +%if %{with qt4} %{_libdir}/pkgconfig/gwengui-qt4.pc +%{_libdir}/cmake/gwengui-qt4-%{devversion} +%endif %{_libdir}/pkgconfig/gwengui-qt5.pc %{_libdir}/pkgconfig/gwengui-fox16.pc %dir %{_libdir}/cmake %{_libdir}/cmake/%{name}-%{devversion} %{_libdir}/cmake/gwengui-cpp-%{devversion} -%{_libdir}/cmake/gwengui-qt4-%{devversion} %{_libdir}/cmake/gwengui-qt5-%{devversion} %files lang -f %{name}.lang