Enable qt6 build

This commit is contained in:
Sandro Mani 2022-01-14 14:42:35 +01:00
parent cb48474398
commit 582ed5f4c2

View File

@ -4,7 +4,7 @@
Summary: PDF rendering library
Name: poppler
Version: 22.01.0
Release: 1%{?dist}
Release: 2%{?dist}
License: (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MIT
URL: http://poppler.freedesktop.org/
Source0: http://poppler.freedesktop.org/poppler-%{version}.tar.xz
@ -44,6 +44,15 @@ BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5Xml)
# FIXME: qt6-qtdeclarative doesn't build on S390x
# BUG: https://bugreports.qt.io/browse/QTBUG-93101
%ifnarch s390x
BuildRequires: cmake(Qt6Core)
BuildRequires: cmake(Qt6Gui)
BuildRequires: cmake(Qt6Test)
BuildRequires: cmake(Qt6Widgets)
BuildRequires: cmake(Qt6Xml)
%endif
BuildRequires: boost-devel
Requires: poppler-data
@ -100,6 +109,22 @@ Obsoletes: %{name}-qt-devel < 0.90.0-9
%description qt5-devel
%{summary}.
%ifnarch s390x
%package qt6
Summary: Qt6 wrapper for poppler
Requires: %{name}%{?_isa} = %{version}-%{release}
%description qt6
%{summary}.
%package qt6-devel
Summary: Development files for Qt6 wrapper
Requires: %{name}-qt6%{?_isa} = %{version}-%{release}
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Requires: qt6-qtbase-devel
%description qt6-devel
%{summary}.
%endif
%package cpp
Summary: Pure C++ wrapper for poppler
Requires: %{name}%{?_isa} = %{version}-%{release}
@ -150,6 +175,9 @@ test "$(pkg-config --modversion poppler)" = "%{version}"
test "$(pkg-config --modversion poppler-cpp)" = "%{version}"
test "$(pkg-config --modversion poppler-glib)" = "%{version}"
test "$(pkg-config --modversion poppler-qt5)" = "%{version}"
%ifnarch s390x
test "$(pkg-config --modversion poppler-qt6)" = "%{version}"
%endif
%ldconfig_scriptlets
@ -157,6 +185,10 @@ test "$(pkg-config --modversion poppler-qt5)" = "%{version}"
%ldconfig_scriptlets qt5
%ifnarch s390x
%ldconfig_scriptlets qt6
%endif
%ldconfig_scriptlets cpp
%files
@ -196,6 +228,16 @@ test "$(pkg-config --modversion poppler-qt5)" = "%{version}"
%{_libdir}/pkgconfig/poppler-qt5.pc
%{_includedir}/poppler/qt5/
%ifnarch s390x
%files qt6
%{_libdir}/libpoppler-qt6.so.3*
%files qt6-devel
%{_libdir}/libpoppler-qt6.so
%{_libdir}/pkgconfig/poppler-qt6.pc
%{_includedir}/poppler/qt6/
%endif
%files cpp
%{_libdir}/libpoppler-cpp.so.0*
@ -209,6 +251,9 @@ test "$(pkg-config --modversion poppler-qt5)" = "%{version}"
%{_mandir}/man1/*
%changelog
* Fri Jan 14 2022 Sandro Mani <manisandro@gmail.com> - 22.01.0-2
- Enable qt6
* Thu Jan 13 2022 Marek Kasik <mkasik@redhat.com> - 22.01.0-1
- Update to 22.01.0
- Resolves: #2000346