[packages/xpdf] upgraded to 4.00

gotar gotar at pld-linux.org
Sun Nov 5 23:23:29 CET 2017


commit e24bfd154bff0bac875633e31651365dc1e1aa95
Author: Tomasz Pala <gotar at pld-linux.org>
Date:   Sun Nov 5 23:22:13 2017 +0100

    upgraded to 4.00

 xpdf-install.patch            |  26 ------
 xpdf-remove_protections.patch | 181 ++++++++++++------------------------------
 xpdf.spec                     |  40 +++++-----
 3 files changed, 68 insertions(+), 179 deletions(-)
---
diff --git a/xpdf.spec b/xpdf.spec
index 12e7fb5..5e3baac 100644
--- a/xpdf.spec
+++ b/xpdf.spec
@@ -16,29 +16,27 @@ Summary(pt_BR.UTF-8):	Visualizador de arquivos PDF
 Summary(ru.UTF-8):	Программа для просмотра PDF файлов
 Summary(uk.UTF-8):	Програма для перегляду PDF файлів
 Name:		xpdf
-Version:	3.04
-Release:	2
+Version:	4.00
+Release:	1
 License:	GPL v2 or GPL v3
 Group:		Applications/Publishing
-Source0:	ftp://ftp.foolabs.com/pub/xpdf/%{name}-%{version}.tar.gz
-# Source0-md5:	3bc86c69c8ff444db52461270bef3f44
+Source0:	http://www.xpdfreader.com/dl/%{name}-%{version}.tar.gz
+# Source0-md5:	80c8ce77acf1d36de93cecb82bd64a0f
 Source1:	%{name}.desktop
 Source2:	%{name}.png
 Source3:	%{name}rc
 Patch0:		%{name}-remove_protections.patch
 Patch1:		%{name}-fontdirs.patch
-Patch2:		%{name}-install.patch
-URL:		http://www.foolabs.com/xpdf/
-BuildRequires:	autoconf >= 2.57
+URL:		http://www.xpdfreader.com/
+BuildRequires:	cmake >= 2.8.8
 BuildRequires:	freetype-devel >= 2.1.0
 BuildRequires:	libpaper-devel
 BuildRequires:	libpng-devel
 BuildRequires:	libstdc++-devel
-%{?with_x:BuildRequires:	motif-devel >= 2.2}
+%{?with_x:BuildRequires:	QtCore-devel}
+%{?with_x:BuildRequires:	QtGui-devel}
+%{?with_x:BuildRequires:	qt4-qmake}
 BuildRequires:	rpmbuild(macros) >= 1.596
-%{?with_x:BuildRequires:	xorg-lib-libX11-devel}
-%{?with_x:BuildRequires:	xorg-lib-libXpm-devel}
-%{?with_x:BuildRequires:	xorg-lib-libXt-devel}
 Requires:	desktop-file-utils
 Suggests:	ghostscript-fonts-std
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -109,24 +107,22 @@ pdftops, pdftotext).
 %setup -q
 %{!?with_protections:%patch0 -p1}
 %patch1 -p1
-%patch2 -p1
+sed -e 's|DESTINATION man/|DESTINATION share/man/|g' -i xpdf{,-qt}/CMakeLists.txt
 
 %build
-%{__autoconf}
-%{!?with_x:export no_x=yes}
-CXXFLAGS="%{rpmcflags} -fno-exceptions -fno-rtti"
-%configure \
-	--enable-a4-paper \
-	--enable-cmyk \
-	--enable-multithreaded \
-	--enable-opi \
-	--with-freetype2-includes=/usr/include/freetype2
+%cmake . \
+	-DA4_PAPER=ON \
+	-DSPLASH_CMYK=ON \
+	-DOPI_SUPPORT=ON \
+	-DCMAKE_CXX_FLAGS="%{rpmcxxflags}" \
+	-DCMAKE_EXE_LINKER_FLAGS="-lpaper %{rpmldflags}"
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_datadir}/xpdf}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_desktopdir},%{_pixmapsdir},%{_datadir}/xpdf}
+
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
diff --git a/xpdf-install.patch b/xpdf-install.patch
deleted file mode 100644
index 6dd46d6..0000000
--- a/xpdf-install.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- xpdf-3.04/Makefile.in.orig	2014-05-28 20:50:50.000000000 +0200
-+++ xpdf-3.04/Makefile.in	2014-06-16 18:42:11.004550995 +0200
-@@ -86,19 +86,23 @@
- @X@	$(INSTALL_PROGRAM) xpdf/xpdf$(EXE) $(DESTDIR)@bindir@/xpdf$(EXE)
- 	$(INSTALL_PROGRAM) xpdf/pdftops$(EXE) $(DESTDIR)@bindir@/pdftops$(EXE)
- 	$(INSTALL_PROGRAM) xpdf/pdftotext$(EXE) $(DESTDIR)@bindir@/pdftotext$(EXE)
-+	$(INSTALL_PROGRAM) xpdf/pdftohtml$(EXE) $(DESTDIR)@bindir@/pdftohtml$(EXE)
- 	$(INSTALL_PROGRAM) xpdf/pdfinfo$(EXE) $(DESTDIR)@bindir@/pdfinfo$(EXE)
- 	$(INSTALL_PROGRAM) xpdf/pdffonts$(EXE) $(DESTDIR)@bindir@/pdffonts$(EXE)
- 	$(INSTALL_PROGRAM) xpdf/pdfdetach$(EXE) $(DESTDIR)@bindir@/pdfdetach$(EXE)
- @X@	$(INSTALL_PROGRAM) xpdf/pdftoppm$(EXE) $(DESTDIR)@bindir@/pdftoppm$(EXE)
-+ at X@	$(INSTALL_PROGRAM) xpdf/pdftopng$(EXE) $(DESTDIR)@bindir@/pdftopng$(EXE)
- 	$(INSTALL_PROGRAM) xpdf/pdfimages$(EXE) $(DESTDIR)@bindir@/pdfimages$(EXE)
- 	-mkdir -p $(DESTDIR)@mandir@/man1
- @X@	$(INSTALL_DATA) $(srcdir)/doc/xpdf.1 $(DESTDIR)@mandir@/man1/xpdf.1
- 	$(INSTALL_DATA) $(srcdir)/doc/pdftops.1 $(DESTDIR)@mandir@/man1/pdftops.1
- 	$(INSTALL_DATA) $(srcdir)/doc/pdftotext.1 $(DESTDIR)@mandir@/man1/pdftotext.1
-+	$(INSTALL_DATA) $(srcdir)/doc/pdftohtml.1 $(DESTDIR)@mandir@/man1/pdftohtml.1
- 	$(INSTALL_DATA) $(srcdir)/doc/pdfinfo.1 $(DESTDIR)@mandir@/man1/pdfinfo.1
- 	$(INSTALL_DATA) $(srcdir)/doc/pdffonts.1 $(DESTDIR)@mandir@/man1/pdffonts.1
- 	$(INSTALL_DATA) $(srcdir)/doc/pdfdetach.1 $(DESTDIR)@mandir@/man1/pdfdetach.1
- @X@	$(INSTALL_DATA) $(srcdir)/doc/pdftoppm.1 $(DESTDIR)@mandir@/man1/pdftoppm.1
-+ at X@	$(INSTALL_DATA) $(srcdir)/doc/pdftopng.1 $(DESTDIR)@mandir@/man1/pdftopng.1
- 	$(INSTALL_DATA) $(srcdir)/doc/pdfimages.1 $(DESTDIR)@mandir@/man1/pdfimages.1
- 	-mkdir -p $(DESTDIR)@mandir@/man5
- 	$(INSTALL_DATA) $(srcdir)/doc/xpdfrc.5 $(DESTDIR)@mandir@/man5/xpdfrc.5
diff --git a/xpdf-remove_protections.patch b/xpdf-remove_protections.patch
index 87c1e1b..2aa2572 100644
--- a/xpdf-remove_protections.patch
+++ b/xpdf-remove_protections.patch
@@ -1,150 +1,69 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## permissions.dpatch by  <hamish at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Remove PDF file permission checks
-
- at DPATCH@
---- xpdf-3.03/xpdf/XPDFCore.cc.orig	2011-08-15 23:08:53.000000000 +0200
-+++ xpdf-3.03/xpdf/XPDFCore.cc	2011-08-21 08:23:12.502750231 +0200
-@@ -4,6 +4,8 @@
- //
- // Copyright 2002-2003 Glyph & Cog, LLC
- //
-+// Modified for Debian by Hamish Moffatt, 22 May 2002.
-+//
- //========================================================================
- 
- #include <aconf.h>
-@@ -384,12 +386,16 @@
- #ifndef NO_TEXT_SELECT
-       if (selectULX != selectLRX &&
- 	  selectULY != selectLRY) {
-+#ifdef ENFORCE_PERMISSIONS
- 	if (doc->okToCopy()) {
- 	  copySelection();
- 	} else {
- 	  error(errNotAllowed, -1,
- 		"Copying of text from this document is not allowed.");
- 	}
-+#else
-+	  copySelection();
-+#endif
-       }
- #endif
-     }
-@@ -408,9 +414,11 @@
-   int pg;
-   double ulx, uly, lrx, lry;
- 
-+#ifdef ENFORCE_PERMISSIONS
-   if (!doc->okToCopy()) {
-     return;
-   }
-+#endif
-   if (getSelection(&pg, &ulx, &uly, &lrx, &lry)) {
-     //~ for multithreading: need a mutex here
-     if (currentSelection) {
---- xpdf-3.03/xpdf/XPDFViewer.cc.orig	2011-08-15 23:08:53.000000000 +0200
-+++ xpdf-3.03/xpdf/XPDFViewer.cc	2011-08-21 08:23:52.699416877 +0200
-@@ -4,6 +4,8 @@
- //
- // Copyright 2002-2003 Glyph & Cog, LLC
- //
-+// Modified for Debian by Hamish Moffatt, 22 May 2002.
-+//
- //========================================================================
- 
- #include <aconf.h>
-@@ -3492,10 +3494,12 @@
-   PSOutputDev *psOut;
- 
-   doc = viewer->core->getDoc();
-+#ifdef ENFORCE_PERMISSIONS
-   if (!doc->okToPrint()) {
-     error(errNotAllowed, -1, "Printing this document is not allowed.");
-     return;
-   }
-+#endif
- 
-   viewer->core->setBusyCursor(gTrue);
- 
---- xpdf-3.03/xpdf/pdfimages.cc.orig	2011-08-15 23:08:53.000000000 +0200
-+++ xpdf-3.03/xpdf/pdfimages.cc	2011-08-21 08:24:17.356083531 +0200
-@@ -4,6 +4,8 @@
- //
- // Copyright 1998-2003 Glyph & Cog, LLC
- //
-+// Modified for Debian by Hamish Moffatt, 22 May 2002.
-+//
- //========================================================================
- 
- #include <aconf.h>
-@@ -119,12 +121,14 @@
-   }
- 
-   // check for copy permission
-+#ifdef ENFORCE_PERMISSIONS
-   if (!doc->okToCopy()) {
+diff -ur -x .svn -x .git -x .bzr -x CVS -ur xpdf-4.00/xpdf/pdfimages.cc xpdf-4.00b/xpdf/pdfimages.cc
+--- xpdf-4.00/xpdf/pdfimages.cc	2017-08-09 01:22:50.000000000 +0200
++++ xpdf-4.00b/xpdf/pdfimages.cc	2017-11-05 23:15:21.454296468 +0100
+@@ -130,7 +130,7 @@
      error(errNotAllowed, -1,
  	  "Copying of images from this document is not allowed.");
      exitCode = 3;
-     goto err1;
+-    goto err1;
++//  goto err1;
    }
-+#endif
  
    // get page range
-   if (firstPage < 1)
---- xpdf-3.03/xpdf/pdftops.cc.orig	2011-08-15 23:08:53.000000000 +0200
-+++ xpdf-3.03/xpdf/pdftops.cc	2011-08-21 08:24:36.072750189 +0200
-@@ -4,6 +4,8 @@
- //
- // Copyright 1996-2003 Glyph & Cog, LLC
- //
-+// Modified for Debian by Hamish Moffatt, 22 May 2002.
-+//
- //========================================================================
- 
- #include <aconf.h>
-@@ -278,12 +280,14 @@
-     goto err1;
+diff -ur -x .svn -x .git -x .bzr -x CVS -ur xpdf-4.00/xpdf/pdftohtml.cc xpdf-4.00b/xpdf/pdftohtml.cc
+--- xpdf-4.00/xpdf/pdftohtml.cc	2017-08-09 01:22:50.000000000 +0200
++++ xpdf-4.00b/xpdf/pdftohtml.cc	2017-11-05 23:15:50.590712980 +0100
+@@ -142,7 +142,7 @@
+     error(errNotAllowed, -1,
+ 	  "Copying of text from this document is not allowed.");
+     exitCode = 3;
+-    goto err1;
++//  goto err1;
    }
  
-+#ifdef ENFORCE_PERMISSIONS
-   // check for print permission
+   // get page range
+diff -ur -x .svn -x .git -x .bzr -x CVS -ur xpdf-4.00/xpdf/pdftops.cc xpdf-4.00b/xpdf/pdftops.cc
+--- xpdf-4.00/xpdf/pdftops.cc	2017-08-09 01:22:50.000000000 +0200
++++ xpdf-4.00b/xpdf/pdftops.cc	2017-11-05 23:18:25.649219651 +0100
+@@ -325,7 +325,7 @@
    if (!doc->okToPrint()) {
      error(errNotAllowed, -1, "Printing this document is not allowed.");
      exitCode = 3;
-     goto err1;
+-    goto err1;
++//  goto err1;
    }
-+#endif
  
    // construct PostScript file name
-   if (argc == 3) {
---- xpdf-3.03/xpdf/pdftotext.cc.orig	2011-08-15 23:08:53.000000000 +0200
-+++ xpdf-3.03/xpdf/pdftotext.cc	2011-08-21 08:24:58.639416844 +0200
-@@ -4,6 +4,8 @@
- //
- // Copyright 1997-2003 Glyph & Cog, LLC
- //
-+// Modified for Debian by Hamish Moffatt, 22 May 2002.
-+//
- //========================================================================
- 
- #include <aconf.h>
-@@ -168,6 +170,7 @@
-     goto err2;
-   }
- 
-+#ifdef ENFORCE_PERMISSIONS
-   // check for copy permission
-   if (!doc->okToCopy()) {
+diff -ur -x .svn -x .git -x .bzr -x CVS -ur xpdf-4.00/xpdf/pdftotext.cc xpdf-4.00b/xpdf/pdftotext.cc
+--- xpdf-4.00/xpdf/pdftotext.cc	2017-08-09 01:22:50.000000000 +0200
++++ xpdf-4.00b/xpdf/pdftotext.cc	2017-11-05 23:16:08.077224470 +0100
+@@ -203,7 +203,7 @@
      error(errNotAllowed, -1,
-@@ -175,6 +178,7 @@
+ 	  "Copying of text from this document is not allowed.");
      exitCode = 3;
-     goto err2;
+-    goto err2;
++//  goto err2;
    }
-+#endif
  
    // construct text file name
-   if (argc == 3) {
+diff -ur -x .svn -x .git -x .bzr -x CVS -ur xpdf-4.00/xpdf-qt/QtPDFCore.cc xpdf-4.00b/xpdf-qt/QtPDFCore.cc
+--- xpdf-4.00/xpdf-qt/QtPDFCore.cc	2017-08-09 01:22:50.000000000 +0200
++++ xpdf-4.00b/xpdf-qt/QtPDFCore.cc	2017-11-05 23:17:00.560070752 +0100
+@@ -430,7 +430,7 @@
+   int i;
+ 
+   if (!doc->okToCopy()) {
+-    return "";
++//  return "";
+   }
+   if (!(s = getSelectedText())) {
+     return "";
+@@ -459,7 +459,7 @@
+     return;
+   }
+   if (!doc->okToCopy()) {
+-    return;
++//  return;
+   }
+   if (hasSelection()) {
+     QApplication::clipboard()->setText(getSelectedTextQString(),
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xpdf.git/commitdiff/e24bfd154bff0bac875633e31651365dc1e1aa95



More information about the pld-cvs-commit mailing list