[arch-commits] Commit in cups-pdf/trunk (2 files)

Andreas Radke andyrtr at archlinux.org
Tue Apr 6 15:12:23 UTC 2021


    Date: Tuesday, April 6, 2021 @ 15:12:23
  Author: andyrtr
Revision: 411608

upgpkg: cups-pdf 3.0.1-6: fix deprecated ghostscript operator .setpdfwrite - FS#70313; honor LDFLAGS

Added:
  cups-pdf/trunk/remove-deprecated-ghostscript-setpdfwrite-operator.diff
Modified:
  cups-pdf/trunk/PKGBUILD

---------------------------------------------------------+
 PKGBUILD                                                |   20 +++++++----
 remove-deprecated-ghostscript-setpdfwrite-operator.diff |   25 ++++++++++++++
 2 files changed, 39 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-04-06 14:29:01 UTC (rev 411607)
+++ PKGBUILD	2021-04-06 15:12:23 UTC (rev 411608)
@@ -3,7 +3,7 @@
 
 pkgname=cups-pdf
 pkgver=3.0.1
-pkgrel=5
+pkgrel=6
 pkgdesc="PDF printer for cups"
 arch=(x86_64)
 depends=('cups' 'ghostscript')
@@ -10,20 +10,28 @@
 install=cups-pdf.install
 url="https://www.cups-pdf.de/welcome.shtml"
 license=('GPL2')
-source=(https://www.cups-pdf.de/src/cups-pdf_$pkgver.tar.gz)
+source=(https://www.cups-pdf.de/src/cups-pdf_$pkgver.tar.gz
+        remove-deprecated-ghostscript-setpdfwrite-operator.diff)
 backup=(etc/cups/cups-pdf.conf)
 # http://www.cups-pdf.de/src/cups-pdf_3.0.1.tar.gz.md5 - no other checksums
-md5sums=('5071bf192b9c6eb5ada4337b6917b939')
+md5sums=('5071bf192b9c6eb5ada4337b6917b939'
+         '08eb1f7037ec8c6197437204d533db22')
 
+prepare() {
+  cd "$pkgname-$pkgver"
+  # remove unsupported ghostscript operator - FS#70313
+  patch -Np1 -i ../remove-deprecated-ghostscript-setpdfwrite-operator.diff
+}  
+
 build() {
-  cd "$srcdir"/$pkgname-$pkgver/src
+  cd "$pkgname-$pkgver"/src
   [ -z "$CC" ] && CC=gcc
 #  $CC $CFLAGS -Wall -o cups-pdf cups-pdf.c
-  $CC $CFLAGS -s cups-pdf.c -o cups-pdf -lcups  
+  $CC $CFLAGS $LDFLAGS -s cups-pdf.c -o cups-pdf -lcups  
 }
 
 package() {
-  cd "$srcdir"/$pkgname-$pkgver/src
+  cd "$pkgname-$pkgver"/src
   install -D -m700 cups-pdf "$pkgdir"/usr/lib/cups/backend/cups-pdf
 
   # Install Postscript Color printer

Added: remove-deprecated-ghostscript-setpdfwrite-operator.diff
===================================================================
--- remove-deprecated-ghostscript-setpdfwrite-operator.diff	                        (rev 0)
+++ remove-deprecated-ghostscript-setpdfwrite-operator.diff	2021-04-06 15:12:23 UTC (rev 411608)
@@ -0,0 +1,25 @@
+--- cups-pdf-3.0.1/src/cups-pdf.h	2017-02-24 16:31:00.901661190 +0100
++++ cups-pdf-3.0.1/src/cups-pdf.h.new	2021-04-06 17:05:57.553854742 +0200
+@@ -58,7 +58,7 @@
+   { "AnonDirName", SEC_CONF|SEC_PPD, { "/var/spool/cups-pdf/ANONYMOUS" } },
+   { "AnonUser", SEC_CONF|SEC_PPD, { "nobody" } },
+   { "GhostScript", SEC_CONF|SEC_PPD, { "/usr/bin/gs" } },
+-  { "GSCall", SEC_CONF|SEC_PPD, { "%s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=\"%s\" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f %s" } },
++  { "GSCall", SEC_CONF|SEC_PPD, { "%s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=\"%s\" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c -f %s" } },
+   { "Grp", SEC_CONF|SEC_PPD, { "lp" } },
+   { "GSTmp", SEC_CONF|SEC_PPD, { "TMPDIR=/var/tmp" } },
+   { "Log", SEC_CONF|SEC_PPD, { "/var/log/cups" } },
+--- cups-pdf-3.0.1/extra/cups-pdf.conf	2017-02-24 16:30:18.476524443 +0100
++++ cups-pdf-3.0.1/extra/cups-pdf.conf.new	2021-04-06 17:06:26.364602843 +0200
+@@ -250,9 +250,9 @@
+ ### Key: GSCall (config)
+ ## command line for calling GhostScript (!!! DO NOT USE NEWLINES !!!)
+ ## MacOSX: for using pstopdf set this to %s %s -o %s %s
+-### Default: %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f %s
++### Default: %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c -f %s
+ 
+-#GSCall %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f %s
++#GSCall %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c -f %s
+ 
+ ### Key: PDFVer (config, ppd, lptopions)
+ ##  PDF version to be created - can be "1.5", "1.4", "1.3" or "1.2" 



More information about the arch-commits mailing list