]> git.pld-linux.org Git - packages/poppler.git/blobdiff - poppler.spec
- updated to 23.03.0 (new libpoppler soname)
[packages/poppler.git] / poppler.spec
index 9e81017f5b8f7e7fa01759062b3a6b031e179a5b..1b78e4c7574e1007de04e80376b68169cdf60fc8 100644 (file)
@@ -3,43 +3,54 @@
 %bcond_without apidocs # gtk-doc API documentation
 %bcond_without cairo   # Cairo backend
 %bcond_without qt5     # Qt 5 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.0.0
+%define                qt5_ver         5.9.0
+%define                qt6_ver         6.2
 Summary:       PDF rendering library
 Summary(pl.UTF-8):     Biblioteka renderująca PDF
 Name:          poppler
-Version:       0.82.0
+Version:       23.03.0
 Release:       1
 License:       GPL v2+
 Group:         Libraries
 Source0:       https://poppler.freedesktop.org/%{name}-%{version}.tar.xz
-# Source0-md5: 4d6106c2382c5e66072e0b355acc3640
+# Source0-md5: 342c6661d7dcb5213789acff238912cb
 Patch0:                %{name}-gtkdocdir.patch
+Patch1:                %{name}-include.patch
 URL:           https://poppler.freedesktop.org/
 %{?with_qt5:BuildRequires:     Qt5Core-devel >= %{qt5_ver}}
 %{?with_qt5:BuildRequires:     Qt5Gui-devel >= %{qt5_ver}}
 %{?with_qt5:BuildRequires:     Qt5Test-devel >= %{qt5_ver}}
 %{?with_qt5:BuildRequires:     Qt5Widgets-devel >= %{qt5_ver}}
 %{?with_qt5:BuildRequires:     Qt5Xml-devel >= %{qt5_ver}}
+%{?with_qt6:BuildRequires:     Qt6Core-devel >= %{qt6_ver}}
+%{?with_qt6:BuildRequires:     Qt6Gui-devel >= %{qt6_ver}}
+%{?with_qt6:BuildRequires:     Qt6Test-devel >= %{qt6_ver}}
+%{?with_qt6:BuildRequires:     Qt6Widgets-devel >= %{qt6_ver}}
 BuildRequires: boost-devel >= 1.58.0
 %{?with_cairo:BuildRequires:   cairo-devel >= %{cairo_ver}}
-BuildRequires: cmake >= 3.1.0
+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.41}
+%{?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
@@ -50,13 +61,16 @@ BuildRequires:      pkgconfig(cairo-pdf) >= %{cairo_ver}
 BuildRequires: pkgconfig(cairo-ps) >= %{cairo_ver}
 BuildRequires: pkgconfig(cairo-svg) >= %{cairo_ver}
 %{?with_qt5:BuildRequires:     qt5-build >= %{qt5_ver}}
+%{?with_qt6:BuildRequires:     qt6-build >= %{qt6_ver}}
+BuildRequires: rpm-build >= 4.6
+BuildRequires: rpmbuild(macros) >= 1.752
 BuildRequires: sed >= 4.0
 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
@@ -74,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
 
@@ -101,9 +115,7 @@ Summary:    Poppler library API documentation
 Summary(pl.UTF-8):     Dokumentacja API biblioteki Poppler
 Group:         Documentation
 Requires:      gtk-doc-common
-%if "%{_rpmversion}" >= "5"
 BuildArch:     noarch
-%endif
 
 %description apidocs
 Poppler library API documentation.
@@ -154,7 +166,7 @@ Summary(pl.UTF-8):  Wrapper GLib dla popplera
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
 %{?with_cairo:Requires:        cairo >= %{cairo_ver}}
-Requires:      glib2 >= 1:2.41
+Requires:      glib2 >= 1:2.56
 
 %description glib
 GLib wrapper for poppler.
@@ -169,7 +181,7 @@ Group:              Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 Requires:      %{name}-glib = %{version}-%{release}
 %{?with_cairo:Requires:        cairo-devel >= %{cairo_ver}}
-Requires:      glib2-devel >= 1:2.41
+Requires:      glib2-devel >= 1:2.56
 
 %description glib-devel
 Header files for GLib wrapper for poppler.
@@ -230,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
@@ -256,6 +309,9 @@ Pakiet zawiera zestaw narzędzi do plików PDF. Programy te umożliwiają
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+
+%{__sed} -i -e '/set(_known_build_types/ s/)/;PLD)/' cmake/modules/PopplerMacros.cmake
 
 %build
 install -d build
@@ -267,6 +323,7 @@ cd build
        -DENABLE_GTK_TESTS=OFF \
        -DENABLE_LIBCURL=ON \
        %{!?with_qt5:-DENABLE_QT5=OFF} \
+       %{!?with_qt6:-DENABLE_QT6=OFF} \
        -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
        -DENABLE_ZLIB=ON \
        %{!?with_cairo:-DWITH_CAIRO=OFF}
@@ -274,6 +331,7 @@ cd build
 %{__make}
 cd ..
 
+%if %{with static_libs}
 install -d build-static
 cd build-static
 %cmake .. \
@@ -288,12 +346,15 @@ cd build-static
        %{!?with_cairo:-DWITH_CAIRO=OFF}
 
 %{__make}
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with static_libs}
 %{__make} -C build-static install \
        DESTDIR=$RPM_BUILD_ROOT
+%endif
 
 %{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -317,24 +378,25 @@ 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.92
+%attr(755,root,root) %ghost %{_libdir}/libpoppler.so.126
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libpoppler.so
 %dir %{_includedir}/poppler
 %{_includedir}/poppler/poppler-config.h
+%{_includedir}/poppler/poppler_private_export.h
 %{_includedir}/poppler/[ABCDEFGHJLMNOPRSTUVX]*.h
 %{_includedir}/poppler/fofi
 %{_includedir}/poppler/goo
 %{_includedir}/poppler/splash
 %{_pkgconfigdir}/poppler.pc
-%{?with_cairo:%{_pkgconfigdir}/poppler-cairo.pc}
-%{_pkgconfigdir}/poppler-splash.pc
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libpoppler.a
+%endif
 
 %if %{with apidocs}
 %files apidocs
@@ -354,10 +416,12 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/poppler/cpp
 %{_pkgconfigdir}/poppler-cpp.pc
 
+%if %{with static_libs}
 %files cpp-static
 %defattr(644,root,root,755)
 %{_libdir}/libpoppler-cpp.a
 %endif
+%endif
 
 %if %{with glib}
 %files glib
@@ -373,10 +437,12 @@ rm -rf $RPM_BUILD_ROOT
 %{_pkgconfigdir}/poppler-glib.pc
 %{_datadir}/gir-1.0/Poppler-0.18.gir
 
+%if %{with static_libs}
 %files glib-static
 %defattr(644,root,root,755)
 %{_libdir}/libpoppler-glib.a
 %endif
+%endif
 
 %if %{with qt5}
 %files qt5
@@ -390,10 +456,31 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/poppler/qt5
 %{_pkgconfigdir}/poppler-qt5.pc
 
+%if %{with static_libs}
 %files qt5-static
 %defattr(644,root,root,755)
 %{_libdir}/libpoppler-qt5.a
 %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)
This page took 0.091632 seconds and 4 git commands to generate.