summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2021-04-26 19:26:18 +0200
committerThomas Deutschmann <whissi@gentoo.org>2021-04-26 19:27:06 +0200
commite72a26a68a6127cebccec0000ead414b323c3d35 (patch)
treed95d8f8613c26c1d8d94f7ecb42955cf6e62438e /net-print/cups-pdf
parentprofiles/package.mask: dev-java/commons-fileupload last-rite (diff)
downloadgentoo-e72a26a68a6127cebccec0000ead414b323c3d35.tar.gz
gentoo-e72a26a68a6127cebccec0000ead414b323c3d35.tar.bz2
gentoo-e72a26a68a6127cebccec0000ead414b323c3d35.zip
net-print/cups-pdf: unbreak >=app-text/ghostscript-gpl-9.54.0
While here, migrate to EAPI 7. Closes: https://bugs.gentoo.org/779706 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'net-print/cups-pdf')
-rw-r--r--net-print/cups-pdf/cups-pdf-3.0.1-r2.ebuild47
-rw-r--r--net-print/cups-pdf/files/cups-pdf-3.0.1-ghostscript-gpl-9.54-compat.patch28
2 files changed, 75 insertions, 0 deletions
diff --git a/net-print/cups-pdf/cups-pdf-3.0.1-r2.ebuild b/net-print/cups-pdf/cups-pdf-3.0.1-r2.ebuild
new file mode 100644
index 000000000000..a27e4fb17d9e
--- /dev/null
+++ b/net-print/cups-pdf/cups-pdf-3.0.1-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Provides a virtual printer for CUPS to produce PDF files"
+HOMEPAGE="https://www.cups-pdf.de/"
+SRC_URI="https://www.cups-pdf.de/src/${PN}_${PV/_}.tar.gz"
+S=${WORKDIR}/${PN}-${PV/_}
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE="+ppds"
+
+DEPEND="net-print/cups"
+
+RDEPEND="${DEPEND}
+ >=app-text/ghostscript-gpl-9.54"
+
+PATCHES=( "${FILESDIR}"/${PN}-3.0.1-ghostscript-gpl-9.54-compat.patch )
+
+src_compile() {
+ pushd src &>/dev/null || die
+ $(tc-getCC) ${LDFLAGS} ${CFLAGS} ${PN}.c -o ${PN} -lcups || die
+ popd &>/dev/null || die
+}
+
+src_install() {
+ exeinto /usr/libexec/cups/backend
+ exeopts -m0700
+ doexe src/cups-pdf
+
+ insinto /etc/cups
+ doins extra/cups-pdf.conf
+
+ insinto /usr/share/cups/model
+ if use ppds; then
+ doins extra/CUPS-PDF_opt.ppd
+ else
+ doins extra/CUPS-PDF_noopt.ppd
+ fi
+
+ dodoc ChangeLog README
+}
diff --git a/net-print/cups-pdf/files/cups-pdf-3.0.1-ghostscript-gpl-9.54-compat.patch b/net-print/cups-pdf/files/cups-pdf-3.0.1-ghostscript-gpl-9.54-compat.patch
new file mode 100644
index 000000000000..3890743107e5
--- /dev/null
+++ b/net-print/cups-pdf/files/cups-pdf-3.0.1-ghostscript-gpl-9.54-compat.patch
@@ -0,0 +1,28 @@
+https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=180419375973b9ce4664286a67106d712260ef7f
+
+--- a/extra/cups-pdf.conf
++++ b/extra/cups-pdf.conf
+@@ -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"
+--- a/src/cups-pdf.h
++++ b/src/cups-pdf.h
+@@ -58,7 +58,7 @@ struct {
+ { "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" } },
+