From 34fb36c496c7dea5a1154925777033cf913bc811 Mon Sep 17 00:00:00 2001 From: drochner Date: Fri, 20 Nov 2009 20:50:43 +0000 Subject: add foomatic-filters-4.0.3 which is basically foomatic-rip, a printer filter This mostly duplicates pkgsrc/print/foomatic-filters but since there are likely compatibility problems wich different generations of foomatic-rip and PPDs I'll leave the old version intact. --- print/foomatic4-filters/DESCR | 8 ++++ print/foomatic4-filters/Makefile | 65 ++++++++++++++++++++++++++++++++ print/foomatic4-filters/PLIST | 4 ++ print/foomatic4-filters/distinfo | 7 ++++ print/foomatic4-filters/patches/patch-ac | 29 ++++++++++++++ print/foomatic4-filters/patches/patch-ad | 13 +++++++ 6 files changed, 126 insertions(+) create mode 100644 print/foomatic4-filters/DESCR create mode 100644 print/foomatic4-filters/Makefile create mode 100644 print/foomatic4-filters/PLIST create mode 100644 print/foomatic4-filters/distinfo create mode 100644 print/foomatic4-filters/patches/patch-ac create mode 100644 print/foomatic4-filters/patches/patch-ad diff --git a/print/foomatic4-filters/DESCR b/print/foomatic4-filters/DESCR new file mode 100644 index 00000000000..9e6e1a3be81 --- /dev/null +++ b/print/foomatic4-filters/DESCR @@ -0,0 +1,8 @@ +The foomatic-filters package provides foomatic-rip and foomatic-gswrapper. + +foomatic-rip uses an external renderer (like GhostScript) to translate +PostScript to printer's native language. The printer capabilities are +described in PPD files. foomatic-rip works with every known spooler. + +foomatic-gswrapper massages arguments to make Ghostscript execute +properly as a filter. diff --git a/print/foomatic4-filters/Makefile b/print/foomatic4-filters/Makefile new file mode 100644 index 00000000000..2ee462fa501 --- /dev/null +++ b/print/foomatic4-filters/Makefile @@ -0,0 +1,65 @@ +# $NetBSD: Makefile,v 1.1.1.1 2009/11/20 20:50:43 drochner Exp $ + +DISTNAME= foomatic-filters-4.0.3 +CATEGORIES= print +MASTER_SITES= http://www.linuxprinting.org/download/foomatic/ + +MAINTAINER= jlam@pkgsrc.org +HOMEPAGE= http://www.linuxprinting.org/foomatic.html +COMMENT= Spooler-independent PostScript printing filter + +CONFLICTS+= foomatic-gswrapper-[0-9]* + +USE_TOOLS+= gmake gs:run perl + +GNU_CONFIGURE= yes +CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} +CONFIGURE_ARGS+= --disable-file-converter-check + +EVAL_PREFIX+= CUPS_PREFIX=cups +CUPS_FILTERDIR= ${CUPS_PREFIX:Q}/libexec/cups/filter +CONFIGURE_ENV+= CUPS_FILTERS=${CUPS_FILTERDIR} +FILES_SUBST+= CUPS_FILTERDIR=${CUPS_FILTERDIR} + +TEXTTOPS_DEPENDS= {a2ps,enscript,mpage}-[0-9]* +PKG_DESTDIR_SUPPORT= user-destdir + +PKG_OPTIONS_VAR= PKG_OPTIONS.foomatic +PKG_SUPPORTED_OPTIONS= cups + +.include "../../mk/bsd.prefs.mk" + +BUILD_DEFS+= MANINSTALL + +.if ${OPSYS} == "SunOS" +# SunOS nroff has problems with foomatic-rip.1 +MANINSTALL= none +INSTALL_TARGET= install-bin +.else +INSTALL_TARGET= install-bin install-man +.endif + +.include "../../mk/bsd.options.mk" + +.if !empty(PKG_OPTIONS:Mcups) +DEPENDS+= {cups>=1.0,${TEXTTOPS_DEPENDS}}:../../print/cups +.else +DEPENDS+= ${TEXTTOPS_DEPENDS}:../../print/mpage +.endif + +DEINSTALL_TEMPLATES+= ${.CURDIR}/../../print/foomatic-filters-cups/DEINSTALL +INSTALL_TEMPLATES+= ${.CURDIR}/../../print/foomatic-filters-cups/INSTALL + +EGDIR= ${PREFIX}/share/examples/foomatic +CONFDIR= ${PKG_SYSCONFDIR}/foomatic + +REQD_DIRS= ${EGDIR} +OWN_DIRS= ${CONFDIR} +CONF_FILES= ${EGDIR}/filter.conf ${CONFDIR}/filter.conf + +INSTALLATION_DIRS+= ${EGDIR} +post-install: + ${INSTALL_DATA} ${WRKSRC}/filter.conf ${DESTDIR}${EGDIR} + +.include "../../print/ghostscript/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/print/foomatic4-filters/PLIST b/print/foomatic4-filters/PLIST new file mode 100644 index 00000000000..4098832a1c4 --- /dev/null +++ b/print/foomatic4-filters/PLIST @@ -0,0 +1,4 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2009/11/20 20:50:43 drochner Exp $ +bin/foomatic-rip +man/man1/foomatic-rip.1 +share/examples/foomatic/filter.conf diff --git a/print/foomatic4-filters/distinfo b/print/foomatic4-filters/distinfo new file mode 100644 index 00000000000..c4709ddd700 --- /dev/null +++ b/print/foomatic4-filters/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1.1.1 2009/11/20 20:50:43 drochner Exp $ + +SHA1 (foomatic-filters-4.0.3.tar.gz) = 870b904c9390a6632e540a458479c34290a8f960 +RMD160 (foomatic-filters-4.0.3.tar.gz) = 6d4f09847d1c977ef15cc71026364b9a04af1f8d +Size (foomatic-filters-4.0.3.tar.gz) = 239548 bytes +SHA1 (patch-ac) = 5013be198bca54423d520382bf686e9c6280dc43 +SHA1 (patch-ad) = 40f620a2f26d0872f87a2e332dd45853634ca5dc diff --git a/print/foomatic4-filters/patches/patch-ac b/print/foomatic4-filters/patches/patch-ac new file mode 100644 index 00000000000..9f104c3a2e6 --- /dev/null +++ b/print/foomatic4-filters/patches/patch-ac @@ -0,0 +1,29 @@ +$NetBSD: patch-ac,v 1.1.1.1 2009/11/20 20:50:43 drochner Exp $ + +--- foomaticrip.c.orig 2009-01-14 20:23:15.000000000 +0100 ++++ foomaticrip.c +@@ -153,7 +153,7 @@ char cupsfilterpath[PATH_MAX] = "/usr/lo + "/opt/cups/filter:" + "/usr/lib/cups/filter"; + +-char modern_shell[64] = "/bin/bash"; ++char modern_shell[64] = "/bin/sh"; + + void config_set_option(const char *key, const char *value) + { +@@ -968,6 +968,7 @@ int print_file(const char *filename, int + if (dup2(fileno(out), fileno(stdin)) < 0) + rip_die(EXIT_PRNERR_NORETRY_BAD_SETTINGS, + "Couldn't dup stdout of pdf-to-ps\n"); ++ rewind(stdin); + + ret = print_file("", 0); + +@@ -999,6 +1000,7 @@ int print_file(const char *filename, int + /* Read further data from the file converter and not from STDIN */ + if (dup2(fileno(fchandle), fileno(stdin)) < 0) + rip_die(EXIT_PRNERR_NORETRY_BAD_SETTINGS, "Couldn't dup fileconverterhandle\n"); ++ rewind(stdin); + + ret = print_file("", 0); + diff --git a/print/foomatic4-filters/patches/patch-ad b/print/foomatic4-filters/patches/patch-ad new file mode 100644 index 00000000000..5e23a8ed819 --- /dev/null +++ b/print/foomatic4-filters/patches/patch-ad @@ -0,0 +1,13 @@ +$NetBSD: patch-ad,v 1.1.1.1 2009/11/20 20:50:43 drochner Exp $ + +--- postscript.c.orig 2009-02-12 16:42:20.000000000 +0100 ++++ postscript.c +@@ -171,6 +171,8 @@ int print_ps(FILE *file, const char *alr + _log("Could not dup %s to stdin.\n", filename); + return 0; + } ++ if (file != stdin) ++ rewind(stdin); + + stream.pos = 0; + stream.file = stdin; -- cgit v1.2.3