]> git.pld-linux.org Git - packages/poppler.git/blobdiff - poppler.spec
- enable qt6 support, rel 2
[packages/poppler.git] / poppler.spec
index 09dbd2031ccf3454c54be66bd7cefbe247d0c4b2..7fa8d3ad8ca01f15c44d60a229e6a0f943f890f4 100644 (file)
@@ -3,23 +3,23 @@
 %bcond_without apidocs # gtk-doc API documentation
 %bcond_without cairo   # Cairo backend
 %bcond_without qt5     # Qt 5 wrapper
-%bcond_with    qt6     # Qt 6 wrapper
+%bcond_without qt6     # Qt 6 wrapper
 %bcond_without cpp     # C++ wrapper
 %bcond_without glib    # GLib wrapper
 %bcond_without static_libs     # don't build static libraries
 
 %define                cairo_ver       1.10.0
 %define                qt5_ver         5.9.0
-%define                qt6_ver         6.0.0
+%define                qt6_ver         6.2
 Summary:       PDF rendering library
 Summary(pl.UTF-8):     Biblioteka renderująca PDF
 Name:          poppler
-Version:       21.08.0
-Release:       1
+Version:       22.04.0
+Release:       2
 License:       GPL v2+
 Group:         Libraries
 Source0:       https://poppler.freedesktop.org/%{name}-%{version}.tar.xz
-# Source0-md5: 60d5be55cc080d602bf58daf6825b124
+# Source0-md5: 8c55071a273a25d582f51d91861b4379
 Patch0:                %{name}-gtkdocdir.patch
 Patch1:                %{name}-include.patch
 URL:           https://poppler.freedesktop.org/
@@ -38,16 +38,19 @@ BuildRequires:      cmake >= 3.10.0
 BuildRequires: curl-devel
 BuildRequires: docbook-dtd412-xml
 BuildRequires: fontconfig-devel >= 2.0.0
-BuildRequires: freetype-devel >= 2.0
+BuildRequires: freetype-devel >= 1:2.8
+# -std=c11
+BuildRequires: gcc >= 6:4.7
 BuildRequires: gettext-tools
 %{?with_glib:BuildRequires:    glib2-devel >= 1:2.56}
 %{?with_glib:BuildRequires:    gobject-introspection-devel >= 0.9.12}
+BuildRequires: gperf
 %{?with_apidocs:BuildRequires: gtk-doc >= 1.14}
 BuildRequires: lcms2-devel >= 2
 BuildRequires: libjpeg-devel
 BuildRequires: libpng-devel
-# -std=c++14
-BuildRequires: libstdc++-devel >= 6:5.0
+# -std=c++17
+BuildRequires: libstdc++-devel >= 6:7
 BuildRequires: libtiff-devel
 BuildRequires: libxml2-devel >= 2.0
 BuildRequires: nss-devel >= 3.19
@@ -66,8 +69,8 @@ BuildRequires:        tar >= 1:1.22
 BuildRequires: which
 BuildRequires: xz
 BuildRequires: zlib-devel
+Requires:      freetype >= 1:2.8
 Requires:      openjpeg2 >= 2
-Obsoletes:     poppler-qt4-static
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -85,7 +88,7 @@ Group:                Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 Requires:      curl-devel
 Requires:      lcms2-devel >= 2
-Requires:      libstdc++-devel >= 6:5.0
+Requires:      libstdc++-devel >= 6:7
 Requires:      nss-devel >= 3.19
 Conflicts:     poppler0.61-devel
 
@@ -239,14 +242,55 @@ Static version of Qt5 wrapper for poppler.
 %description qt5-static -l pl.UTF-8
 Statyczna wersja wrappera Qt5 dla popplera.
 
+%package qt6
+Summary:       Qt6 wrapper for poppler
+Summary(pl.UTF-8):     Wrapper Qt6 dla popplera
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description qt6
+Qt6 wrapper for poppler.
+
+%description qt6 -l pl.UTF-8
+Wrapper Qt6 dla popplera.
+
+%package qt6-devel
+Summary:       Header files for Qt6 wrapper for poppler
+Summary(pl.UTF-8):     Pliki nagłówkowe wrappera Qt6 dla popplera
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+Requires:      %{name}-qt6 = %{version}-%{release}
+Requires:      Qt6Core-devel >= %{qt5_ver}
+Requires:      Qt6Gui-devel >= %{qt5_ver}
+Requires:      Qt6Widgets-devel >= %{qt5_ver}
+Requires:      Qt6Xml-devel >= %{qt5_ver}
+
+%description qt6-devel
+Header files for Qt6 wrapper for poppler.
+
+%description qt6-devel -l pl.UTF-8
+Pliki nagłówkowe wrapper Qt6 dla popplera.
+
+%package qt6-static
+Summary:       Static version of Qt6 wrapper for poppler
+Summary(pl.UTF-8):     Statyczna wersja wrappera Qt6 dla popplera
+Group:         Development/Libraries
+Requires:      %{name}-qt6-devel = %{version}-%{release}
+
+%description qt6-static
+Static version of Qt6 wrapper for poppler.
+
+%description qt6-static -l pl.UTF-8
+Statyczna wersja wrappera Qt6 dla popplera.
+
 %package progs
 Summary:       Set of tools for viewing information and converting PDF files
 Summary(pl.UTF-8):     Zestaw narzędzi do wyświetlania informacji i konwertowania plików PDF
 Group:         Applications/Publishing
 Provides:      pdftops
-Obsoletes:     pdftohtml
-Obsoletes:     pdftohtml-pdftops
-Obsoletes:     poppler-utils
+Obsoletes:     pdftohtml < 0.40
+Obsoletes:     pdftohtml-pdftops < 0.40
+Obsoletes:     poppler-utils < 0.5.0-2
 Obsoletes:     xpdf-tools
 
 %description progs
@@ -267,6 +311,8 @@ Pakiet zawiera zestaw narzędzi do plików PDF. Programy te umożliwiają
 %patch0 -p1
 %patch1 -p1
 
+%{__sed} -i -e '/set(_known_build_types/ s/)/;PLD)/' cmake/modules/PopplerMacros.cmake
+
 %build
 install -d build
 cd build
@@ -332,7 +378,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README*
 %attr(755,root,root) %{_libdir}/libpoppler.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libpoppler.so.112
+%attr(755,root,root) %ghost %{_libdir}/libpoppler.so.120
 
 %files devel
 %defattr(644,root,root,755)
@@ -417,6 +463,25 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 %endif
 
+%if %{with qt6}
+%files qt6
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libpoppler-qt6.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libpoppler-qt6.so.3
+
+%files qt6-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libpoppler-qt6.so
+%{_includedir}/poppler/qt6
+%{_pkgconfigdir}/poppler-qt6.pc
+
+%if %{with static_libs}
+%files qt6-static
+%defattr(644,root,root,755)
+%{_libdir}/libpoppler-qt6.a
+%endif
+%endif
+
 %files progs
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/pdfattach
This page took 0.067567 seconds and 4 git commands to generate.