]> git.pld-linux.org Git - packages/poppler.git/blobdiff - poppler.spec
- updated to 0.69.0 (note: new libpoppler soname)
[packages/poppler.git] / poppler.spec
index 39b1142beb7738c19e633d0abbca818c0f951e6d..27aefb7c975d1d3e6189a5c31ab4b01c0d47002c 100644 (file)
@@ -2,49 +2,60 @@
 # Conditional build:
 %bcond_without apidocs # disable gtk-doc
 %bcond_without cairo   # disable Cairo backend
-%bcond_without qt4     # disable qt4 wrapper
+%bcond_without qt5     # disable qt5 wrapper
 %bcond_without cpp     # disable cpp wrapper
 %bcond_without glib    # disable glib wrapper
-#
+
 %define                cairo_ver       1.10.0
-#
+%define                qt5_ver         5.0.0
 Summary:       PDF rendering library
 Summary(pl.UTF-8):     Biblioteka renderująca PDF
 Name:          poppler
-Version:       0.20.1
+Version:       0.69.0
 Release:       1
 License:       GPL v2+
 Group:         Libraries
-Source0:       http://poppler.freedesktop.org/%{name}-%{version}.tar.gz
-# Source0-md5: a61e3b844061f5324512a16d6d16984c
-URL:           http://poppler.freedesktop.org/
-%{?with_qt4:BuildRequires:     QtGui-devel >= 4.4.0}
-%{?with_qt4:BuildRequires:     QtTest-devel >= 4.4.0}
-%{?with_qt4:BuildRequires:     QtXml-devel >= 4.4.0}
-BuildRequires: autoconf >= 2.59
-BuildRequires: automake
+Source0:       https://poppler.freedesktop.org/%{name}-%{version}.tar.xz
+# Source0-md5: 0881d921de62673ab558872dadc2b27b
+Patch0:                %{name}-gtkdocdir.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_cairo:BuildRequires:   cairo-devel >= %{cairo_ver}}
+BuildRequires: cmake >= 3.1.0
 BuildRequires: curl-devel
 BuildRequires: docbook-dtd412-xml
 BuildRequires: fontconfig-devel >= 2.0.0
 BuildRequires: freetype-devel >= 2.0
-BuildRequires: gettext-devel
-%{?with_glib:BuildRequires:    glib2-devel >= 1:2.18.0}
-BuildRequires: gobject-introspection-devel >= 0.6.7
+BuildRequires: gettext-tools
+%{?with_glib:BuildRequires:    glib2-devel >= 1:2.41}
+%{?with_glib:BuildRequires:    gobject-introspection-devel >= 0.9.12}
 %{?with_apidocs:BuildRequires: gtk-doc >= 1.14}
-BuildRequires: lcms2-devel
+BuildRequires: lcms2-devel >= 2
 BuildRequires: libjpeg-devel
 BuildRequires: libpng-devel
-BuildRequires: libstdc++-devel
+# -std=c++14
+BuildRequires: libstdc++-devel >= 6:5.0
 BuildRequires: libtiff-devel
-BuildRequires: libtool >= 2:1.5
 BuildRequires: libxml2-devel >= 2.0
-BuildRequires: openjpeg-devel
+BuildRequires: nss-devel >= 3.19
+BuildRequires: openjpeg2-devel >= 2
 BuildRequires: pkgconfig >= 1:0.18
-%{?with_qt4:BuildRequires:     qt4-build}
+# wanted cairo backends
+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}}
 BuildRequires: sed >= 4.0
+BuildRequires: tar >= 1:1.22
 BuildRequires: which
+BuildRequires: xz
 BuildRequires: zlib-devel
+Requires:      openjpeg2 >= 2
+Obsoletes:     poppler-qt4-static
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -61,15 +72,10 @@ Summary(pl.UTF-8):  Pliki nagłówkowe biblioteki Poppler
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 Requires:      curl-devel
-Requires:      fontconfig-devel >= 2.0.0
-Requires:      freetype-devel >= 2.0
-Requires:      lcms2-devel
-Requires:      libjpeg-devel
-Requires:      libpng-devel
-Requires:      libstdc++-devel
-Requires:      libtiff-devel
-Requires:      openjpeg-devel
-Requires:      zlib-devel
+Requires:      lcms2-devel >= 2
+Requires:      libstdc++-devel >= 6:4.7
+Requires:      nss-devel >= 3.19
+Conflicts:     poppler0.61-devel
 
 %description devel
 Header files for the Poppler library.
@@ -94,6 +100,9 @@ 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.
@@ -144,7 +153,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.18.0
+Requires:      glib2 >= 1:2.41
 
 %description glib
 GLib wrapper for poppler.
@@ -159,7 +168,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.18.0
+Requires:      glib2-devel >= 1:2.41
 
 %description glib-devel
 Header files for GLib wrapper for poppler.
@@ -179,49 +188,46 @@ Static version of GLib wrapper for poppler.
 %description glib-static -l pl.UTF-8
 Statyczna wersja wrappera GLib dla popplera.
 
-%package Qt
-Summary:       Qt4 wrapper for poppler
-Summary(pl.UTF-8):     Wrapper Qt4 dla popplera
+%package qt5
+Summary:       Qt5 wrapper for poppler
+Summary(pl.UTF-8):     Wrapper Qt5 dla popplera
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      QtGui >= 4.4.0
-Requires:      QtXml >= 4.4.0
-Obsoletes:     poppler-qt
 
-%description Qt
-Qt4 wrapper for poppler.
+%description qt5
+Qt5 wrapper for poppler.
 
-%description Qt -l pl.UTF-8
-Wrapper Qt4 dla popplera.
+%description qt5 -l pl.UTF-8
+Wrapper Qt5 dla popplera.
 
-%package Qt-devel
-Summary:       Header files for Qt4 wrapper for poppler
-Summary(pl.UTF-8):     Pliki nagłówkowe wrappera Qt4 dla popplera
+%package qt5-devel
+Summary:       Header files for Qt5 wrapper for poppler
+Summary(pl.UTF-8):     Pliki nagłówkowe wrappera Qt5 dla popplera
 Group:         Development/Libraries
-Requires:      %{name}-Qt = %{version}-%{release}
 Requires:      %{name}-devel = %{version}-%{release}
-Requires:      QtGui-devel >= 4.4.0
-Requires:      QtXml-devel >= 4.4.0
-Obsoletes:     poppler-qt-devel
+Requires:      %{name}-qt5 = %{version}-%{release}
+Requires:      Qt5Core-devel >= %{qt5_ver}
+Requires:      Qt5Gui-devel >= %{qt5_ver}
+Requires:      Qt5Widgets-devel >= %{qt5_ver}
+Requires:      Qt5Xml-devel >= %{qt5_ver}
 
-%description Qt-devel
-Header files for Qt4 wrapper for poppler.
+%description qt5-devel
+Header files for Qt5 wrapper for poppler.
 
-%description Qt-devel -l pl.UTF-8
-Pliki nagłówkowe wrapper Qt4 dla popplera.
+%description qt5-devel -l pl.UTF-8
+Pliki nagłówkowe wrapper Qt5 dla popplera.
 
-%package Qt-static
-Summary:       Static version of Qt4 wrapper for poppler
-Summary(pl.UTF-8):     Statyczna wersja wrappera Qt4 dla popplera
+%package qt5-static
+Summary:       Static version of Qt5 wrapper for poppler
+Summary(pl.UTF-8):     Statyczna wersja wrappera Qt5 dla popplera
 Group:         Development/Libraries
-Requires:      %{name}-Qt-devel = %{version}-%{release}
-Obsoletes:     poppler-qt-static
+Requires:      %{name}-qt5-devel = %{version}-%{release}
 
-%description Qt-static
-Static version of Qt4 wrapper for poppler.
+%description qt5-static
+Static version of Qt5 wrapper for poppler.
 
-%description Qt-static -l pl.UTF-8
-Statyczna wersja wrappera Qt4 dla popplera.
+%description qt5-static -l pl.UTF-8
+Statyczna wersja wrappera Qt5 dla popplera.
 
 %package progs
 Summary:       Set of tools for viewing information and converting PDF files
@@ -248,43 +254,49 @@ Pakiet zawiera zestaw narzędzi do plików PDF. Programy te umożliwiają
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
-%{?with_apidocs:%{__gtkdocize}}
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoconf} -f
-%{__autoheader}
-%{__automake}
-%configure \
-       MOCQT4=/usr/bin/moc-qt4 \
-       --disable-gtk-test \
-       --enable-libcurl \
-       %{?with_apidocs:--enable-gtk-doc} \
-       %{!?with_cairo:--disable-cairo-output} \
-       %{!?with_cpp:--disable-poppler-cpp} \
-       %{!?with_glib:--disable-poppler-glib} \
-       %{!?with_qt4:--disable-poppler-qt4} \
-       --disable-silent-rules \
-       --enable-xpdf-headers \
-       --enable-zlib \
-       --enable-dependency-tracking \
-       --with-html-dir=%{_gtkdocdir}
+install -d build
+cd build
+%cmake .. \
+       -DENABLE_GTK_TESTS=OFF \
+       -DENABLE_LIBCURL=ON \
+       %{?with_apidocs:-DENABLE_GTK_DOC=ON} \
+       %{!?with_cairo:-DWITH_CAIRO=OFF} \
+       %{!?with_cpp:-DENABLE_CPP=OFF} \
+       %{!?with_glib:-DENABLE_GLIB=OFF} \
+       %{!?with_qt5:-DENABLE_QT5=OFF} \
+       -DENABLE_XPDF_HEADERS=ON \
+       -DENABLE_ZLIB=ON
+
+%{__make}
+cd ..
+
+install -d build-static
+cd build-static
+%cmake .. \
+       -DBUILD_SHARED_LIBS=OFF \
+       -DENABLE_GTK_TESTS=OFF \
+       -DENABLE_LIBCURL=ON \
+       -DENABLE_GTK_DOC=OFF \
+       %{!?with_cairo:-DWITH_CAIRO=OFF} \
+       %{!?with_cpp:-DENABLE_CPP=OFF} \
+       %{!?with_glib:-DENABLE_GLIB=OFF} \
+       %{!?with_qt5:-DENABLE_QT5=OFF} \
+       -DENABLE_XPDF_HEADERS=ON \
+       -DENABLE_ZLIB=ON
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
+%{__make} -C build-static install \
        DESTDIR=$RPM_BUILD_ROOT
 
-%if %{without apidocs}
-# why it still installs them, brr
-%{__rm} -rf $RPM_BUILD_ROOT%{_gtkdocdir}/poppler || :
-%endif
-
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
+%{__make} -C build install \
+       DESTDIR=$RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -298,14 +310,14 @@ rm -rf $RPM_BUILD_ROOT
 %post  glib -p /sbin/ldconfig
 %postun        glib -p /sbin/ldconfig
 
-%post  Qt -p /sbin/ldconfig
-%postun        Qt -p /sbin/ldconfig
+%post  qt5 -p /sbin/ldconfig
+%postun        qt5 -p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog NEWS README* TODO
+%doc AUTHORS ChangeLog NEWS README*
 %attr(755,root,root) %{_libdir}/libpoppler.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libpoppler.so.26
+%attr(755,root,root) %ghost %{_libdir}/libpoppler.so.80
 
 %files devel
 %defattr(644,root,root,755)
@@ -366,24 +378,47 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libpoppler-glib.a
 %endif
 
-%if %{with qt4}
-%files Qt
+
+%if %{with qt5}
+%files qt5
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libpoppler-qt4.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libpoppler-qt4.so.4
+%attr(755,root,root) %{_libdir}/libpoppler-qt5.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libpoppler-qt5.so.1
 
-%files Qt-devel
+%files qt5-devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libpoppler-qt4.so
-%{_includedir}/poppler/qt4
-%{_pkgconfigdir}/poppler-qt4.pc
+%attr(755,root,root) %{_libdir}/libpoppler-qt5.so
+%{_includedir}/poppler/qt5
+%{_pkgconfigdir}/poppler-qt5.pc
 
-%files Qt-static
+%files qt5-static
 %defattr(644,root,root,755)
-%{_libdir}/libpoppler-qt4.a
+%{_libdir}/libpoppler-qt5.a
 %endif
 
 %files progs
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/pdf*
-%{_mandir}/man1/pdf*
+%attr(755,root,root) %{_bindir}/pdfdetach
+%attr(755,root,root) %{_bindir}/pdffonts
+%attr(755,root,root) %{_bindir}/pdfimages
+%attr(755,root,root) %{_bindir}/pdfinfo
+%attr(755,root,root) %{_bindir}/pdfseparate
+%attr(755,root,root) %{_bindir}/pdfsig
+%attr(755,root,root) %{_bindir}/pdftocairo
+%attr(755,root,root) %{_bindir}/pdftohtml
+%attr(755,root,root) %{_bindir}/pdftoppm
+%attr(755,root,root) %{_bindir}/pdftops
+%attr(755,root,root) %{_bindir}/pdftotext
+%attr(755,root,root) %{_bindir}/pdfunite
+%{_mandir}/man1/pdfdetach.1*
+%{_mandir}/man1/pdffonts.1*
+%{_mandir}/man1/pdfimages.1*
+%{_mandir}/man1/pdfinfo.1*
+%{_mandir}/man1/pdfseparate.1*
+%{_mandir}/man1/pdfsig.1*
+%{_mandir}/man1/pdftocairo.1*
+%{_mandir}/man1/pdftohtml.1*
+%{_mandir}/man1/pdftoppm.1*
+%{_mandir}/man1/pdftops.1*
+%{_mandir}/man1/pdftotext.1*
+%{_mandir}/man1/pdfunite.1*
This page took 0.056915 seconds and 4 git commands to generate.