]> git.pld-linux.org Git - packages/xpdf.git/commitdiff
- updated to 4.01.01 (fixes CVE-2018-7173 CVE-2018-7174 CVE-2018-7175 CVE-2018-7452... auto/th/xpdf-4.01.01-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 19 May 2019 10:06:09 +0000 (12:06 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 19 May 2019 10:06:09 +0000 (12:06 +0200)
- updated dynamic_private patch
- added qt4 patch (fixes build with Qt4)
- added link patch (fix internal libs linking)
- package libs in libdir (depending on arch ABI)
- added qt5 bcond

dynamic_private.patch
xpdf-link.patch [new file with mode: 0644]
xpdf-qt4.patch [new file with mode: 0644]
xpdf.spec

index b59ad92995ee64528198436d3ffd64956e40fdd6..980c363a95e4a8d3ccfee8bd7cd70fff08be5db2 100644 (file)
@@ -1,6 +1,6 @@
---- a/xpdf-qt/CMakeLists.txt.orig      2017-08-09 01:22:50.000000000 +0200
-+++ b/xpdf-qt/CMakeLists.txt   2017-11-19 12:38:14.000000000 +0100
-@@ -63,9 +63,6 @@
+--- xpdf-4.01.01/xpdf-qt/CMakeLists.txt.orig   2019-03-14 22:01:02.000000000 +0100
++++ xpdf-4.01.01/xpdf-qt/CMakeLists.txt        2019-05-19 07:34:41.876234349 +0200
+@@ -65,9 +65,6 @@
    endif ()
  
    add_executable(xpdf
      $<TARGET_OBJECTS:xpdf_objs>
      $<TARGET_OBJECTS:xpdf_widget_objs>
      ${XPDFWIDGET_PRINT_MODULES}
-@@ -81,6 +78,7 @@
+@@ -83,6 +80,7 @@
      ${XPDF_ICONS}
    )
    target_link_libraries(xpdf ${QT_LIBRARIES} ${EXTRA_QT_LIBRARIES}
-+                      goo fofi splash
++                        goo fofi splash
+                         ${PAPER_LIBRARY}
                          ${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
                          ${DTYPE_LIBRARY} ${LCMS_LIBRARY}
-                         ${CMAKE_THREAD_LIBS_INIT})
diff --git a/xpdf-link.patch b/xpdf-link.patch
new file mode 100644 (file)
index 0000000..ac6e378
--- /dev/null
@@ -0,0 +1,15 @@
+--- xpdf-4.01.01/fofi/CMakeLists.txt.orig      2019-03-14 22:01:02.000000000 +0100
++++ xpdf-4.01.01/fofi/CMakeLists.txt   2019-05-19 10:21:08.075467801 +0200
+@@ -24,3 +24,4 @@
+ add_library(fofi
+   $<TARGET_OBJECTS:fofi_objs>
+ )
++target_link_libraries(fofi goo)
+--- xpdf-4.01.01/splash/CMakeLists.txt.orig    2019-03-14 22:01:02.000000000 +0100
++++ xpdf-4.01.01/splash/CMakeLists.txt 2019-05-19 10:22:19.315081863 +0200
+@@ -44,4 +44,5 @@
+   add_library(splash
+     $<TARGET_OBJECTS:splash_objs>
+   )
++  target_link_libraries(splash fofi goo ${DTYPE_LIBS} ${FREETYPE_LIBS})
+ endif ()
diff --git a/xpdf-qt4.patch b/xpdf-qt4.patch
new file mode 100644 (file)
index 0000000..7e17234
--- /dev/null
@@ -0,0 +1,11 @@
+--- xpdf-4.01.01/cmake-config.txt.orig 2019-03-14 22:01:02.000000000 +0100
++++ xpdf-4.01.01/cmake-config.txt      2019-05-19 09:28:12.156006566 +0200
+@@ -193,7 +193,7 @@
+   find_package(Qt5Network)
+   find_package(Qt5PrintSupport)
+ else ()
+-  find_package(Qt4)
++  find_package(Qt4 COMPONENTS QtCore QtGui QtNetwork)
+ endif ()
+ if(Qt5Widgets_FOUND)
+   message(STATUS "Qt5 found")
index c39acd549e8a2d3b37c5fe20051f2044e77bd91f..7562f52ab3b3342dd3635d1500d808421252e0db 100644 (file)
--- a/xpdf.spec
+++ b/xpdf.spec
@@ -1,5 +1,7 @@
+#
 # Conditional build:
 %bcond_with    protections     # protections against fair use (printing and copying)
+%bcond_with    qt5             # Qt5 instead of Qt4
 %bcond_without x               # X-based browser
 
 Summary:       Portable Document Format (PDF) file viewer
@@ -10,28 +12,45 @@ Summary(pt_BR.UTF-8):       Visualizador de arquivos PDF
 Summary(ru.UTF-8):     Программа для просмотра PDF файлов
 Summary(uk.UTF-8):     Програма для перегляду PDF файлів
 Name:          xpdf
-Version:       4.00
-Release:       6
+Version:       4.01.01
+Release:       1
 License:       GPL v2+
 Group:         Applications/Publishing
-Source0:       http://www.xpdfreader.com/dl/%{name}-%{version}.tar.gz
-# Source0-md5: 80c8ce77acf1d36de93cecb82bd64a0f
+#Source0Download: http://www.xpdfreader.com/download.html
+Source0:       https://xpdfreader-dl.s3.amazonaws.com/%{name}-%{version}.tar.gz
+# Source0-md5: 2c07a8c4381eb368be6f3f2149cc0ed1
 Source1:       %{name}.desktop
 Source2:       %{name}.png
 Source3:       %{name}rc
 Patch0:                %{name}-remove_protections.patch
 Patch1:                %{name}-fontdirs.patch
 Patch2:                dynamic_private.patch
+Patch3:                %{name}-qt4.patch
+Patch4:                %{name}-link.patch
 URL:           http://www.xpdfreader.com/
 BuildRequires: cmake >= 2.8.8
+%{?with_x:BuildRequires:       cups-devel}
 BuildRequires: freetype-devel >= 2.1.0
 BuildRequires: libpaper-devel
 BuildRequires: libpng-devel
 BuildRequires: libstdc++-devel
-%{?with_x:BuildRequires:       QtCore-devel}
-%{?with_x:BuildRequires:       QtGui-devel}
-%{?with_x:BuildRequires:       qt4-qmake}
-BuildRequires: rpmbuild(macros) >= 1.596
+BuildRequires: rpmbuild(macros) >= 1.605
+BuildRequires: zlib-devel
+%if %{with x}
+%if %{with qt5}
+BuildRequires: Qt5Core-devel >= 5
+BuildRequires: Qt5Network-devel >= 5
+BuildRequires: Qt5PrintSupport-devel >= 5
+BuildRequires: Qt5Widgets-devel >= 5
+BuildRequires: qt5-qmake >= 5
+%else
+BuildRequires: QtCore-devel >= 4
+BuildRequires: QtGui-devel >= 4
+BuildRequires: QtNetwork-devel >= 4
+BuildRequires: qt4-qmake >= 4
+%endif
+%endif
+Requires:      %{name}-common = %{version}-%{release}
 Requires:      desktop-file-utils
 Suggests:      ghostscript-fonts-std
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -89,11 +108,16 @@ Group:             Applications/Publishing
 %description common
 Private libraries used by xpdf GUI and CLI tools and xpdfrc file.
 
+%description common -l pl.UTF-8
+Prywatne biblioteki używane przez graficzny interfejs xpdf oraz
+narzędzia linii poleceń, wraz z plikiem xpdfrc.
+
 %package tools
 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
+Requires:      %{name}-common = %{version}-%{release}
 Obsoletes:     pdftohtml-pdftops
 
 %description tools
@@ -111,30 +135,33 @@ pdftops, pdftotext).
 %{!?with_protections:%patch0 -p1}
 %patch1 -p1
 %patch2 -p1
-sed -e 's|DESTINATION man/|DESTINATION share/man/|g' -i xpdf{,-qt}/CMakeLists.txt
+%patch3 -p1
+%patch4 -p1
 
 %build
-%cmake . \
+install -d build
+cd build
+%cmake .. \
        -DA4_PAPER=ON \
+       -DCMAKE_CXX_FLAGS="%{rpmcxxflags}" \
+       %{!?with_qt5:-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=1} \
+       -DCMAKE_EXE_LINKER_FLAGS="-lpaper %{rpmldflags}" \
+       -DCMAKE_INSTALL_RPATH="%{_libdir}/%{name}" \
        -DOPI_SUPPORT=ON \
        -DSPLASH_CMYK=ON \
-       -DSYSTEM_XPDFRC="%{_sysconfdir}/%{name}rc" \
+       -DSYSTEM_XPDFRC="%{_sysconfdir}/xpdfrc" \
        -DXPDFWIDGET_PRINTING=ON \
-       -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=1 \
-       -DCMAKE_CXX_FLAGS="%{rpmcxxflags}" \
-       -DCMAKE_INSTALL_RPATH="%{_libexecdir}/%{name}" \
-       -DCMAKE_EXE_LINKER_FLAGS="-lpaper %{rpmldflags}"
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_desktopdir},%{_pixmapsdir},{%{_datadir},%{_libexecdir}}/%{name}}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_desktopdir},%{_pixmapsdir},{%{_datadir},%{_libdir}}/%{name}}
 
-%{__make} install \
+%{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
-install {fofi/libfofi,goo/libgoo,splash/libsplash}.so $RPM_BUILD_ROOT%{_libexecdir}/%{name}
+install build/{fofi/libfofi,goo/libgoo,splash/libsplash}.so $RPM_BUILD_ROOT%{_libdir}/%{name}
 
 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
@@ -153,16 +180,19 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/xpdf
-%{_desktopdir}/%{name}.desktop
-%{_pixmapsdir}/%{name}.png
+%{_desktopdir}/xpdf.desktop
+%{_pixmapsdir}/xpdf.png
 %{_mandir}/man1/xpdf.1*
 %endif
 
 %files common
+%defattr(644,root,root,755)
 %doc ANNOUNCE CHANGES README
-%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/%{name}rc
-%dir %{_libexecdir}/%{name}
-%attr(755,root,root) %{_libexecdir}/%{name}/lib*.so
+%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/xpdfrc
+%dir %{_libdir}/%{name}
+%attr(755,root,root) %{_libdir}/%{name}/libfofi.so
+%attr(755,root,root) %{_libdir}/%{name}/libgoo.so
+%attr(755,root,root) %{_libdir}/%{name}/libsplash.so
 %{_datadir}/xpdf
 %{_mandir}/man5/xpdfrc.5*
 
This page took 0.118695 seconds and 4 git commands to generate.