[arch-commits] Commit in xpdf/repos (5 files)

Evangelos Foutras foutrelis at archlinux.org
Tue Jul 7 19:14:15 UTC 2020


    Date: Tuesday, July 7, 2020 @ 19:14:15
  Author: foutrelis
Revision: 660142

archrelease: copy trunk to community-staging-x86_64

Added:
  xpdf/repos/community-staging-x86_64/
  xpdf/repos/community-staging-x86_64/PKGBUILD
    (from rev 660141, xpdf/trunk/PKGBUILD)
  xpdf/repos/community-staging-x86_64/xpdf-4.00-permissions.patch
    (from rev 660141, xpdf/trunk/xpdf-4.00-permissions.patch)
  xpdf/repos/community-staging-x86_64/xpdf-4.00-xpdfrc.patch
    (from rev 660141, xpdf/trunk/xpdf-4.00-xpdfrc.patch)
  xpdf/repos/community-staging-x86_64/xpdf.desktop
    (from rev 660141, xpdf/trunk/xpdf.desktop)

-----------------------------+
 PKGBUILD                    |   69 +++++++++++++++++++++
 xpdf-4.00-permissions.patch |  132 ++++++++++++++++++++++++++++++++++++++++++
 xpdf-4.00-xpdfrc.patch      |   37 +++++++++++
 xpdf.desktop                |    9 ++
 4 files changed, 247 insertions(+)

Copied: xpdf/repos/community-staging-x86_64/PKGBUILD (from rev 660141, xpdf/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-07-07 19:14:15 UTC (rev 660142)
@@ -0,0 +1,69 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Hyacinthe Cartiaux <hyacinthe.cartiaux at free.fr>
+# Contributor: Gaetan Bisson <bisson at archlinux.org>
+# Contributor: tobias <tobias at archlinux.org>
+# Contributor: Sarah Hay <sarahhay at mb.sympatico.ca>
+# Contributor: Mark Pustjens <pustjens at dds.nl>
+
+pkgname=xpdf
+pkgver=4.02
+pkgrel=2
+pkgdesc='Viewer for Portable Document Format (PDF) files'
+url='https://www.xpdfreader.com/'
+arch=('x86_64')
+license=('GPL3')
+backup=('etc/xpdfrc')
+depends=('gsfonts' 'xdg-utils' 'qt5-base' 'libxt' 'libpaper' 'freetype2'
+         'libcups' 'libjpeg-turbo' 'libtiff' 'libpng' 'zlib' 'qt5-svg')
+optdepends=('poppler: tools that used to be included in xpdf'
+            'desktop-file-utils: for desktop environments')
+makedepends=('cmake' 'qt5-tools')
+source=(https://xpdfreader-dl.s3.amazonaws.com/${pkgname}-${pkgver}.tar.gz{,.sig}
+        xpdf-4.00-permissions.patch
+        xpdf-4.00-xpdfrc.patch
+        xpdf.desktop)
+sha512sums=('72c9413fc7241dde5288137ca8a68c837d2a68e95e909dbe2afe8f374b5a7c92af4edf82918963d1c6388c947057fcf5f0ae1e6fbb2b31c3d5eb9a07d3c74ddc'
+            'SKIP'
+            'f17c1c19c29518a3538a202c19fb60efc7721a42065d32c841f9ed929e571d9373c8558fdae251c1ef3781857cf51483244276179862998f94c9c1fd8bd63695'
+            'c5ce8ef29d9b338fe3623fa52904d4fee5d76a34145614d05abe168108579608f3d16d0d03d34865e43980eb1b2a814f07aa3dbcfc0da06de34bd9b0738eef67'
+            'd6163eb220bd567226c6006bef30c6db1eac1263ae161392db9766dca1ce78014cc555dd9d27febd2b924150053fa01b47c06777b1e760864459574c7614bfc4')
+validpgpkeys=('A56006CA75CF8B13FA2F120DF4825F5397271342') # -Xpdf- <xpdf at xpdfreader.com>
+
+prepare() {
+  cd ${pkgname}-${pkgver}
+  mkdir -p build
+  cp doc/sample-xpdfrc xpdfrc
+  patch -Np1 < ../xpdf-4.00-permissions.patch
+  patch -Np1 < ../xpdf-4.00-xpdfrc.patch
+  sed 's:/usr/share/fonts/type1/gsfonts:/usr/share/fonts/Type1:' -i xpdf/GlobalParams.cc
+}
+
+build() {
+  cd ${pkgname}-${pkgver}/build
+  cmake .. \
+  -DMULTITHREADED=ON \
+  -DOPI_SUPPORT=ON \
+  -DXPDFWIDGET_PRINTING=ON \
+  -DSYSTEM_XPDFRC=/etc/xpdfrc \
+  -DCMAKE_INSTALL_PREFIX=/usr \
+  -DCMAKE_BUILD_TYPE=Release
+  make
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+
+  make -C build DESTDIR="${pkgdir}" install
+
+  install -Dm 644 xpdfrc -t "${pkgdir}/etc"
+  install -Dm 644 "${srcdir}/xpdf.desktop" -t "${pkgdir}/usr/share/applications"
+  install -Dm 644 xpdf-qt/xpdf-icon.svg "${pkgdir}/usr/share/pixmaps/xpdf.svg"
+  install -Dm 644 README CHANGES -t "${pkgdir}/usr/share/doc/${pkgname}"
+
+  # remove stuff provided by poppler
+  for tool in pdfdetach pdffonts pdfimages pdfinfo pdftoppm pdftops pdftotext pdftohtml; do
+    rm "${pkgdir}/usr/bin/${tool}" "${pkgdir}/usr/share/man/man1/${tool}.1"
+  done
+}
+
+# vim: ts=2 sw=2 et:

Copied: xpdf/repos/community-staging-x86_64/xpdf-4.00-permissions.patch (from rev 660141, xpdf/trunk/xpdf-4.00-permissions.patch)
===================================================================
--- community-staging-x86_64/xpdf-4.00-permissions.patch	                        (rev 0)
+++ community-staging-x86_64/xpdf-4.00-permissions.patch	2020-07-07 19:14:15 UTC (rev 660142)
@@ -0,0 +1,132 @@
+diff -up xpdf-4.00/xpdf/PDFCore.cc.permissions xpdf-4.00/xpdf/PDFCore.cc
+diff -up xpdf-4.00/xpdf/pdfimages.cc.permissions xpdf-4.00/xpdf/pdfimages.cc
+--- xpdf-4.00/xpdf/pdfimages.cc.permissions	2017-08-08 19:22:50.000000000 -0400
++++ xpdf-4.00/xpdf/pdfimages.cc	2017-08-16 18:08:04.474032500 -0400
+@@ -4,6 +4,8 @@
+ //
+ // Copyright 1998-2003 Glyph & Cog, LLC
+ //
++// Modified for Debian by Hamish Moffatt, 22 May 2002.
++//
+ //========================================================================
+ 
+ #include <aconf.h>
+@@ -126,12 +128,14 @@ int main(int argc, char *argv[]) {
+   }
+ 
+   // check for copy permission
++#ifdef ENFORCE_PERMISSIONS
+   if (!doc->okToCopy()) {
+     error(errNotAllowed, -1,
+ 	  "Copying of images from this document is not allowed.");
+     exitCode = 3;
+     goto err1;
+   }
++#endif
+ 
+   // get page range
+   if (firstPage < 1)
+diff -up xpdf-4.00/xpdf/pdftohtml.cc.permissions xpdf-4.00/xpdf/pdftohtml.cc
+--- xpdf-4.00/xpdf/pdftohtml.cc.permissions	2017-08-16 18:10:36.656189850 -0400
++++ xpdf-4.00/xpdf/pdftohtml.cc	2017-08-16 18:11:06.127445692 -0400
+@@ -137,6 +137,7 @@ int main(int argc, char *argv[]) {
+     goto err1;
+   }
+ 
++#ifdef ENFORCE_PERMISSIONS
+   // check for copy permission
+   if (!doc->okToCopy()) {
+     error(errNotAllowed, -1,
+@@ -144,6 +145,7 @@ int main(int argc, char *argv[]) {
+     exitCode = 3;
+     goto err1;
+   }
++#endif
+ 
+   // get page range
+   if (firstPage < 1) {
+diff -up xpdf-4.00/xpdf/pdftops.cc.permissions xpdf-4.00/xpdf/pdftops.cc
+--- xpdf-4.00/xpdf/pdftops.cc.permissions	2017-08-08 19:22:50.000000000 -0400
++++ xpdf-4.00/xpdf/pdftops.cc	2017-08-16 18:08:04.475032475 -0400
+@@ -4,6 +4,8 @@
+ //
+ // Copyright 1996-2003 Glyph & Cog, LLC
+ //
++// Modified for Debian by Hamish Moffatt, 22 May 2002.
++//
+ //========================================================================
+ 
+ #include <aconf.h>
+@@ -321,12 +323,14 @@ int main(int argc, char *argv[]) {
+     goto err1;
+   }
+ 
++#ifdef ENFORCE_PERMISSIONS
+   // check for print permission
+   if (!doc->okToPrint()) {
+     error(errNotAllowed, -1, "Printing this document is not allowed.");
+     exitCode = 3;
+     goto err1;
+   }
++#endif
+ 
+   // construct PostScript file name
+   if (argc == 3) {
+diff -up xpdf-4.00/xpdf/pdftotext.cc.permissions xpdf-4.00/xpdf/pdftotext.cc
+--- xpdf-4.00/xpdf/pdftotext.cc.permissions	2017-08-08 19:22:50.000000000 -0400
++++ xpdf-4.00/xpdf/pdftotext.cc	2017-08-16 18:08:04.475032475 -0400
+@@ -4,6 +4,8 @@
+ //
+ // Copyright 1997-2013 Glyph & Cog, LLC
+ //
++// Modified for Debian by Hamish Moffatt, 22 May 2002.
++//
+ //========================================================================
+ 
+ #include <aconf.h>
+@@ -198,6 +200,7 @@ int main(int argc, char *argv[]) {
+     goto err2;
+   }
+ 
++#ifdef ENFORCE_PERMISSIONS
+   // check for copy permission
+   if (!doc->okToCopy()) {
+     error(errNotAllowed, -1,
+@@ -205,6 +208,7 @@ int main(int argc, char *argv[]) {
+     exitCode = 3;
+     goto err2;
+   }
++#endif
+ 
+   // construct text file name
+   if (argc == 3) {
+diff -up xpdf-4.00/xpdf-qt/QtPDFCore.cc.permissions xpdf-4.00/xpdf-qt/QtPDFCore.cc
+--- xpdf-4.00/xpdf-qt/QtPDFCore.cc.permissions	2017-08-16 18:09:45.169489907 -0400
++++ xpdf-4.00/xpdf-qt/QtPDFCore.cc	2017-08-16 18:10:14.375752439 -0400
+@@ -429,9 +429,11 @@ QString QtPDFCore::getSelectedTextQStrin
+   QChar c;
+   int i;
+ 
++#ifdef ENFORCE_PERMISSIONS
+   if (!doc->okToCopy()) {
+     return "";
+   }
++#endif
+   if (!(s = getSelectedText())) {
+     return "";
+   }
+diff -up xpdf-4.00/xpdf-qt/XpdfWidget.cc.permissions xpdf-4.00/xpdf-qt/XpdfWidget.cc
+--- xpdf-4.00/xpdf-qt/XpdfWidget.cc.permissions	2017-08-16 18:12:40.775055809 -0400
++++ xpdf-4.00/xpdf-qt/XpdfWidget.cc	2017-08-16 18:12:45.835928020 -0400
+@@ -1399,7 +1399,11 @@ bool XpdfWidget::okToExtractText() const
+     if (!core->getDoc()) {
+       return false;
+     }
++#ifdef ENFORCE_PERMISSIONS
+     return (bool)core->getDoc()->okToCopy();
++#else
++    return true;
++#endif
+   } catch (GMemException e) {
+     return false;
+   }

Copied: xpdf/repos/community-staging-x86_64/xpdf-4.00-xpdfrc.patch (from rev 660141, xpdf/trunk/xpdf-4.00-xpdfrc.patch)
===================================================================
--- community-staging-x86_64/xpdf-4.00-xpdfrc.patch	                        (rev 0)
+++ community-staging-x86_64/xpdf-4.00-xpdfrc.patch	2020-07-07 19:14:15 UTC (rev 660142)
@@ -0,0 +1,37 @@
+--- a/xpdfrc	2018-01-02 12:28:46.521609323 +0100
++++ b/xpdfrc	2018-01-02 11:18:14.342938091 +0100
+@@ -29,20 +29,20 @@
+ # installed in a "standard" location, xpdf will find them
+ # automatically.)
+ 
+-#fontFile Times-Roman		/usr/local/share/ghostscript/fonts/n021003l.pfb
+-#fontFile Times-Italic		/usr/local/share/ghostscript/fonts/n021023l.pfb
+-#fontFile Times-Bold		/usr/local/share/ghostscript/fonts/n021004l.pfb
+-#fontFile Times-BoldItalic	/usr/local/share/ghostscript/fonts/n021024l.pfb
+-#fontFile Helvetica		/usr/local/share/ghostscript/fonts/n019003l.pfb
+-#fontFile Helvetica-Oblique	/usr/local/share/ghostscript/fonts/n019023l.pfb
+-#fontFile Helvetica-Bold		/usr/local/share/ghostscript/fonts/n019004l.pfb
+-#fontFile Helvetica-BoldOblique	/usr/local/share/ghostscript/fonts/n019024l.pfb
+-#fontFile Courier		/usr/local/share/ghostscript/fonts/n022003l.pfb
+-#fontFile Courier-Oblique	/usr/local/share/ghostscript/fonts/n022023l.pfb
+-#fontFile Courier-Bold		/usr/local/share/ghostscript/fonts/n022004l.pfb
+-#fontFile Courier-BoldOblique	/usr/local/share/ghostscript/fonts/n022024l.pfb
+-#fontFile Symbol			/usr/local/share/ghostscript/fonts/s050000l.pfb
+-#fontFile ZapfDingbats		/usr/local/share/ghostscript/fonts/d050000l.pfb
++fontFile Times-Roman           /usr/share/fonts/gsfonts/NimbusRoman-Regular.otf
++fontFile Times-Italic          /usr/share/fonts/gsfonts/NimbusRoman-Italic.otf
++fontFile Times-Bold            /usr/share/fonts/gsfonts/NimbusRoman-Bold.otf
++fontFile Times-BoldItalic      /usr/share/fonts/gsfonts/NimbusRoman-BoldItalic.otf
++fontFile Helvetica             /usr/share/fonts/gsfonts/NimbusSans-Regular.otf
++fontFile Helvetica-Oblique     /usr/share/fonts/gsfonts/NimbusSans-Oblique.otf
++fontFile Helvetica-Bold        /usr/share/fonts/gsfonts/NimbusSans-Bold.otf
++fontFile Helvetica-BoldOblique /usr/share/fonts/gsfonts/NimbusSans-BoldOblique.otf
++fontFile Courier               /usr/share/fonts/gsfonts/NimbusMonoPS-Regular.otf
++fontFile Courier-Oblique       /usr/share/fonts/gsfonts/NimbusMonoPS-Italic.otf
++fontFile Courier-Bold          /usr/share/fonts/gsfonts/NimbusMonoPS-Bold.otf
++fontFile Courier-BoldOblique   /usr/share/fonts/gsfonts/NimbusMonoPS-BoldItalic.otf
++fontFile Symbol                /usr/share/fonts/gsfonts/StandardSymbolsPS.otf
++fontFile ZapfDingbats          /usr/share/fonts/gsfonts/Z003-MediumItalic.otf
+ 
+ # If you need to display PDF files that refer to non-embedded fonts,
+ # you should add one or more fontDir options to point to the

Copied: xpdf/repos/community-staging-x86_64/xpdf.desktop (from rev 660141, xpdf/trunk/xpdf.desktop)
===================================================================
--- community-staging-x86_64/xpdf.desktop	                        (rev 0)
+++ community-staging-x86_64/xpdf.desktop	2020-07-07 19:14:15 UTC (rev 660142)
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Xpdf
+Comment=Views Adobe PDF (acrobat) files
+Exec=xpdf %f
+Terminal=false
+Type=Application
+Icon=xpdf
+Categories=Office;
+MimeType=application/pdf;



More information about the arch-commits mailing list