Update to cups-filters-1.0.36.

This commit is contained in:
ajacoutot 2013-08-22 08:03:59 +00:00
parent 4ee8fca26e
commit c6c0945a07
7 changed files with 28 additions and 251 deletions

View File

@ -1,11 +1,8 @@
# $OpenBSD: Makefile,v 1.22 2013/08/15 18:41:21 kili Exp $
# XXX remove @exec-update when we branch 5.4-current
# $OpenBSD: Makefile,v 1.23 2013/08/22 08:03:59 ajacoutot Exp $
COMMENT= OpenPrinting CUPS filters
DISTNAME= cups-filters-1.0.35
REVISION= 0
DISTNAME= cups-filters-1.0.36
CATEGORIES= print
SHARED_LIBS += cupsfilters 0.0 # 1.0
@ -39,15 +36,12 @@ LIB_DEPENDS= print/cups,-libs \
print/poppler \
print/qpdf
# make it easier for users: bring in foomatic-filters, ghostscript
# (with gstoraster) and allow the regeneration of PPD files from
# share/foomatic/db/source/*/*.xml
# make it easier for users: bring in foomatic-filters, ghostscript and
# allow the regeneration of PPD files from share/foomatic/db/source/*/*.xml
RUN_DEPENDS += print/foomatic-db-engine
USE_GMAKE= Yes
MAKE_FLAGS= DLOPEN_LIBS=""
FAKE_FLAGS= pkgfontconfigdir=${PREFIX}/share/examples/cups-filters \
pkgcupsserverrootdir=${PREFIX}/share/examples/cups-filters/cups
@ -65,9 +59,15 @@ CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
# prefer pdftops over gs -- see README under ${WRKSRC}
CONFIGURE_ARGS += --with-pdftops=pdftops
BUILD_DEPENDS += print/poppler,-utils
RUN_DEPENDS += print/poppler,-utils # print/ghostscript/gnu
RUN_DEPENDS += print/poppler,-utils #print/ghostscript/gnu
pre-configure:
perl -pi -e 's,/usr/share/cups,${LOCALBASE}/share/cups,g' \
${WRKSRC}/filter/{gstoraster.c,gstopxl}
post-install:
rm -rf ${WRKINST}/rc?.d
cd ${PREFIX}/libexec/cups/filter && ln -s gstopxl pstopxl
cd ${PREFIX}/libexec/cups/filter && ln -s gstoraster pstoraster
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (cups-filters-1.0.35.tar.gz) = 5xvBxYDZwcIFKXOubqAm1kMysT36It8KVST6J5azHww=
SIZE (cups-filters-1.0.35.tar.gz) = 1298671
SHA256 (cups-filters-1.0.36.tar.gz) = uJeVAO6MPZ+bUrs23o3mXSZXpCzMeh55zBcYO7+Gwg8=
SIZE (cups-filters-1.0.36.tar.gz) = 1326139

View File

@ -1,29 +0,0 @@
$OpenBSD: patch-filter_pdf_cxx,v 1.1 2013/08/15 18:41:21 kili Exp $
From upstream bzr revno 7085: Made code working with Poppler 0.24.x.
--- filter/pdf.cxx.orig Mon Aug 20 02:29:46 2012
+++ filter/pdf.cxx Tue Aug 6 19:35:04 2013
@@ -17,6 +17,10 @@
#include "pdf.h"
#include <PDFDoc.h>
+#include <config.h>
+#ifdef HAVE_CPP_POPPLER_VERSION_H
+#include "cpp/poppler-version.h"
+#endif
extern "C" pdf_t * pdf_load_template(const char *filename)
@@ -343,7 +347,11 @@ class NonSeekableFileOutStream: public OutStream (publ
{
}
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 23
+ Goffset getPos()
+#else
int getPos()
+#endif
{
return this->pos;
}

View File

@ -1,70 +0,0 @@
$OpenBSD: patch-filter_pdftoijs_cxx,v 1.1 2013/08/15 18:41:21 kili Exp $
From upstream bzr revno 7085: Made code working with Poppler 0.24.x.
--- filter/pdftoijs.cxx.orig Fri Sep 21 18:36:53 2012
+++ filter/pdftoijs.cxx Tue Aug 6 19:35:04 2013
@@ -70,8 +70,13 @@ namespace {
}
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 19
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 23
void CDECL myErrorFun(void *data, ErrorCategory category,
+ Goffset pos, char *msg)
+#else
+void CDECL myErrorFun(void *data, ErrorCategory category,
int pos, char *msg)
+#endif
{
if (pos >= 0) {
fprintf(stderr, "ERROR (%d): ", pos);
@@ -297,19 +302,15 @@ int main(int argc, char *argv[]) {
if (argc == 6) {
/* stdin */
int fd;
- Object obj;
- BaseStream *str;
- FILE *fp;
+ char name[BUFSIZ];
char buf[BUFSIZ];
int n;
- fd = cupsTempFd(buf,sizeof(buf));
+ fd = cupsTempFd(name,sizeof(name));
if (fd < 0) {
pdfError(-1,"Can't create temporary file");
exit(1);
}
- /* remove name */
- unlink(buf);
/* copy stdin to the tmp file */
while ((n = read(0,buf,BUFSIZ)) > 0) {
@@ -319,23 +320,10 @@ int main(int argc, char *argv[]) {
exit(1);
}
}
- if (lseek(fd,0,SEEK_SET) < 0) {
- pdfError(-1,"Can't rewind temporary file");
- close(fd);
- exit(1);
- }
-
- if ((fp = fdopen(fd,"rb")) == 0) {
- pdfError(-1,"Can't fdopen temporary file");
- close(fd);
- exit(1);
- }
-
- obj.initNull();
-// parsePDFTOPDFComment(fp); // TODO?
- rewind(fp);
- str = new FileStream(fp,0,gFalse,0,&obj);
- doc = new PDFDoc(str);
+ close(fd);
+ doc = new PDFDoc(new GooString(name));
+ /* remove name */
+ unlink(name);
} else {
GooString *fileName = new GooString(argv[6]);
/* argc == 7 filenmae is specified */

View File

@ -1,67 +0,0 @@
$OpenBSD: patch-filter_pdftoopvp_pdftoopvp_cxx,v 1.1 2013/08/15 18:41:21 kili Exp $
From upstream bzr revno 7085: Made code working with Poppler 0.24.x.
--- filter/pdftoopvp/pdftoopvp.cxx.orig Fri Jul 20 10:22:23 2012
+++ filter/pdftoopvp/pdftoopvp.cxx Tue Aug 6 19:35:04 2013
@@ -112,8 +112,13 @@ static int outOnePage(PDFDoc *doc, OPVPOutputDev *opvp
#define MAX_OPVP_OPTIONS 20
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 19
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 23
void CDECL myErrorFun(void *data, ErrorCategory category,
+ Goffset pos, char *msg)
+#else
+void CDECL myErrorFun(void *data, ErrorCategory category,
int pos, char *msg)
+#endif
{
if (pos >= 0) {
fprintf(stderr, "ERROR (%d): ", pos);
@@ -619,9 +624,6 @@ exit(0);
char *s;
GooString name;
int fd;
- Object obj;
- BaseStream *str;
- FILE *fp;
char buf[4096];
int n;
@@ -633,8 +635,6 @@ exit(0);
}
name.append("/XXXXXX");
fd = mkstemp(name.getCString());
- /* remove name */
- unlink(name.getCString());
if (fd < 0) {
opvpError(-1,"Can't create temporary file");
exitCode = 2;
@@ -675,23 +675,10 @@ exit(0);
goto err0;
}
}
- if (lseek(fd,0,SEEK_SET) < 0) {
- opvpError(-1,"Can't rewind temporary file");
- close(fd);
- exitCode = 2;
- goto err0;
- }
-
- if ((fp = fdopen(fd,"rb")) == 0) {
- opvpError(-1,"Can't fdopen temporary file");
- close(fd);
- exitCode = 2;
- goto err0;
- }
-
- obj.initNull();
- str = new FileStream(fp,0,gFalse,0,&obj);
- doc = new PDFDoc(str);
+ close(fd);
+ doc = new PDFDoc(&name);
+ /* remove name */
+ unlink(name.getCString());
} else {
/* no jcl check */
doc = new PDFDoc(fileName.copy());

View File

@ -1,70 +0,0 @@
$OpenBSD: patch-filter_pdftoraster_cxx,v 1.1 2013/08/15 18:41:21 kili Exp $
From upstream bzr revno 7085: Made code working with Poppler 0.24.x.
--- filter/pdftoraster.cxx.orig Wed Jun 26 17:05:04 2013
+++ filter/pdftoraster.cxx Tue Aug 6 19:35:04 2013
@@ -185,8 +185,13 @@ namespace {
}
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 19
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 23
void CDECL myErrorFun(void *data, ErrorCategory category,
+ Goffset pos, char *msg)
+#else
+void CDECL myErrorFun(void *data, ErrorCategory category,
int pos, char *msg)
+#endif
{
if (pos >= 0) {
fprintf(stderr, "ERROR (%d): ", pos);
@@ -1762,19 +1767,15 @@ int main(int argc, char *argv[]) {
if (argc == 6) {
/* stdin */
int fd;
- Object obj;
- BaseStream *str;
- FILE *fp;
+ char name[BUFSIZ];
char buf[BUFSIZ];
int n;
- fd = cupsTempFd(buf,sizeof(buf));
+ fd = cupsTempFd(name,sizeof(name));
if (fd < 0) {
pdfError(-1,const_cast<char *>("Can't create temporary file"));
exit(1);
}
- /* remove name */
- unlink(buf);
/* copy stdin to the tmp file */
while ((n = read(0,buf,BUFSIZ)) > 0) {
@@ -1784,23 +1785,10 @@ int main(int argc, char *argv[]) {
exit(1);
}
}
- if (lseek(fd,0,SEEK_SET) < 0) {
- pdfError(-1,const_cast<char *>("Can't rewind temporary file"));
- close(fd);
- exit(1);
- }
-
- if ((fp = fdopen(fd,"rb")) == 0) {
- pdfError(-1,const_cast<char *>("Can't fdopen temporary file"));
- close(fd);
- exit(1);
- }
-
- obj.initNull();
- parsePDFTOPDFComment(fp);
- rewind(fp);
- str = new FileStream(fp,0,gFalse,0,&obj);
- doc = new PDFDoc(str);
+ close(fd);
+ doc = new PDFDoc(new GooString(name));
+ /* remove name */
+ unlink(name);
} else {
GooString *fileName = new GooString(argv[6]);
/* argc == 7 filenmae is specified */

View File

@ -1,10 +1,11 @@
@comment $OpenBSD: PLIST,v 1.7 2013/07/12 07:30:50 ajacoutot Exp $
@comment $OpenBSD: PLIST,v 1.8 2013/08/22 08:03:59 ajacoutot Exp $
@conflict cups-<1.6.0
@exec-update [ -h ${SYSCONFDIR}/fonts/conf.d/99-pdftoopvp.conf ] && rm -f ${SYSCONFDIR}/fonts/conf.d/99-pdftoopvp.conf || true
@conflict ghostscript-<9.06p3
@bin bin/ttfread
include/cupsfilters/
include/cupsfilters/driver.h
include/cupsfilters/image.h
include/cupsfilters/raster.h
include/fontembed/
include/fontembed/bitset.h
include/fontembed/embed.h
@ -19,11 +20,15 @@ lib/libfontembed.la
@lib lib/libfontembed.so.${LIBfontembed_VERSION}
lib/pkgconfig/libcupsfilters.pc
lib/pkgconfig/libfontembed.pc
libexec/cups/
@bin libexec/cups/backend/parallel
@bin libexec/cups/backend/serial
libexec/cups/filter/
@bin libexec/cups/filter/bannertopdf
@bin libexec/cups/filter/commandtoescpx
@bin libexec/cups/filter/commandtopclx
libexec/cups/filter/gstopxl
@bin libexec/cups/filter/gstoraster
@bin libexec/cups/filter/imagetopdf
libexec/cups/filter/imagetops
@bin libexec/cups/filter/imagetoraster
@ -33,13 +38,18 @@ libexec/cups/filter/imagetops
@bin libexec/cups/filter/pdftops
@bin libexec/cups/filter/pdftoraster
libexec/cups/filter/pstopdf
libexec/cups/filter/pstopxl
libexec/cups/filter/pstoraster
@bin libexec/cups/filter/rastertoescpx
@bin libexec/cups/filter/rastertopclx
libexec/cups/filter/textonly
@bin libexec/cups/filter/texttopdf
libexec/cups/filter/texttops
@bin libexec/cups/filter/urftopdf
@man man/man5/cups-browsed.conf.5
@man man/man8/cups-browsed.8
@bin sbin/cups-browsed
share/cups/
share/cups/banners/
share/cups/banners/classified
share/cups/banners/confidential
@ -61,6 +71,7 @@ share/cups/mime/
share/cups/mime/cupsfilters.convs
share/cups/mime/cupsfilters.types
share/cups/ppdc/
share/cups/ppdc/escp.h
share/cups/ppdc/pcl.h
share/doc/cups-filters/
share/doc/cups-filters/AUTHORS
@ -81,5 +92,7 @@ share/ppd/cupsfilters/
share/ppd/cupsfilters/Generic-PDF_Printer-PDF.ppd
share/ppd/cupsfilters/HP-Color_LaserJet_CM3530_MFP-PDF.ppd
share/ppd/cupsfilters/HP-PhotoSmart_Pro_B8300-hpijs-pdftoijs.ppd
share/ppd/cupsfilters/pxlcolor.ppd
share/ppd/cupsfilters/pxlmono.ppd
share/ppd/cupsfilters/textonly.ppd
@rcscript ${RCDIR}/cups_browsed