diff --git a/print/cups-pdf/Makefile b/print/cups-pdf/Makefile index 6dee1953ab36..5c98a2713d92 100644 --- a/print/cups-pdf/Makefile +++ b/print/cups-pdf/Makefile @@ -1,104 +1,104 @@ # Created by: Mark Reidel PORTNAME= cups-pdf DISTVERSION= 3.0.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= print MASTER_SITES= http://www.cups-pdf.de/src/ \ http://www.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/src/ DISTNAME= ${PORTNAME}_${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Virtual printer for CUPS to produce PDF files LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libcups.so:print/cups RUN_DEPENDS= ${LOCALBASE}/sbin/cupsd:print/cups USES= ghostscript:run localbase LIBS+= -lcups ETCDIR= ${PREFIX}/etc/cups WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} OPTIONS_DEFINE= DOCS _SUBST_CMD= -e "s,\#GhostScript /usr/bin/gs,GhostScript ${LOCALBASE}/bin/gs," \ -e 's,\#GSTmp /var/tmp,GSTmp /tmp,' \ -e 's,\#Grp lp,Grp daemon,' \ -e 's,\#Spool /var/spool/cups-pdf/SPOOL,Spool /var/spool/cups-pdf,' _PDF_VERSIONS= 1.2 1.3 1.4 1.5 .include .ifdef(PDF_VERSION) .if "${_PDF_VERSIONS:M${PDF_VERSION}}" == "" BROKEN= Unsupported PDF-Version selected: ${PDF_VERSION} .endif _SUBST_CMD+= -e "s,\#PDFVer 1.4,PDFVer ${PDF_VERSION}," .endif .ifdef(HOME_SUBDIR) _SUBST_CMD+= -e 's,\#Out /var/spool/cups-pdf/$${USER},Out $${HOME}/${HOME_SUBDIR},' .elifdef(OUTPUT_DIRECTORY) _SUBST_CMD+= -e 's,\#Out /var/spool/cups-pdf/$${USER},Out ${OUTPUT_DIRECTORY},' .endif .ifdef(LOG_DIRECTORY) _SUBST_CMD+= -e "s,\#Log /var/log/cups,Log ${LOG_DIRECTORY}," .endif pre-everything:: .if !defined(PDF_VERSION) || !defined(HOME_SUBDIR) || \ !defined(OUTPUT_DIRECTORY) || !defined(LOG_DIRECTORY) @${ECHO_MSG} "" @${ECHO_MSG} "You may use the following build options:" @${ECHO_MSG} "" .endif .if !defined(PDF_VERSION) @${ECHO_MSG} "PDF_VERSION=${_PDF_VERSIONS:S/ /|/Wg} PDF-version of PDF-files produced" .endif .if !defined(HOME_SUBDIR) @${ECHO_MSG} "HOME_SUBDIR= Place produced PDF-files in the" @${ECHO_MSG} " directory ~//" .endif .if !defined(OUTPUT_DIRECTORY) @${ECHO_MSG} "OUTPUT_DIRECTORY= Place produced PDF-files in the" @${ECHO_MSG} " directory /" .endif .if !defined(LOG_DIRECTORY) @${ECHO_MSG} "LOG_DIRECTORY= Place logfile into /cups-pdf_log" .endif post-patch: @${REINPLACE_CMD} ${_SUBST_CMD} ${WRKSRC}/extra/cups-pdf.conf @${REINPLACE_CMD} -e \ 's,CP_CONFIG_PATH "/etc/cups",CP_CONFIG_PATH "${ETCDIR}",' \ ${WRKSRC}/src/cups-pdf.h do-build: (cd ${WRKSRC}/src && \ ${CC} ${CFLAGS} ${LDFLAGS} ${LIBS} -o cups-pdf cups-pdf.c) do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/libexec/cups/backend ${INSTALL_PROGRAM} ${WRKSRC}/src/cups-pdf \ ${STAGEDIR}${PREFIX}/libexec/cups/backend/ @${MKDIR} ${STAGEDIR}${PREFIX}/share/cups/model ${INSTALL_DATA} ${WRKSRC}/extra/CUPS-PDF_opt.ppd \ ${WRKSRC}/extra/CUPS-PDF_noopt.ppd \ ${STAGEDIR}${PREFIX}/share/cups/model/ @${MKDIR} ${STAGEDIR}${ETCDIR} ${INSTALL_DATA} ${WRKSRC}/extra/cups-pdf.conf \ ${STAGEDIR}${ETCDIR}/cups-pdf.conf.sample post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}/ .include diff --git a/print/cups-pdf/files/patch-remove-deprecated-ghostscript-setpdfwrite-operator b/print/cups-pdf/files/patch-remove-deprecated-ghostscript-setpdfwrite-operator new file mode 100644 index 000000000000..d3018f33cfd4 --- /dev/null +++ b/print/cups-pdf/files/patch-remove-deprecated-ghostscript-setpdfwrite-operator @@ -0,0 +1,27 @@ +https://github.com/archlinux/svntogit-packages/commit/ff157761a0dffe4eb19b46c61b422dcdb2e1c8d9 + +--- extra/cups-pdf.conf.orig 2022-04-01 11:22:32 UTC ++++ extra/cups-pdf.conf +@@ -250,9 +250,9 @@ GSTmp /tmp + ### 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" +--- src/cups-pdf.h.orig 2022-04-01 11:22:32 UTC ++++ 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" } },