From nobody@FreeBSD.org  Fri Jul 12 08:41:04 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2BD8737B401
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 12 Jul 2002 08:41:04 -0700 (PDT)
Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E326843E6E
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 12 Jul 2002 08:41:03 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g6CFf3OT086962
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 12 Jul 2002 08:41:03 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.4/8.12.4/Submit) id g6CFf3KV086961;
	Fri, 12 Jul 2002 08:41:03 -0700 (PDT)
Message-Id: <200207121541.g6CFf3KV086961@www.freebsd.org>
Date: Fri, 12 Jul 2002 08:41:03 -0700 (PDT)
From: Kirk Strauser <kirk@strauser.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: CUPS now relies on a special version of Ghostscript for printing on non-PS printers
X-Send-Pr-Version: www-1.0

>Number:         40488
>Category:       ports
>Synopsis:       CUPS now relies on a special version of Ghostscript for printing on non-PS printers
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    alane
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 12 08:50:01 PDT 2002
>Closed-Date:    Wed Jul 24 20:04:11 PDT 2002
>Last-Modified:  Thu Jul 25 05:40:01 PDT 2002
>Originator:     Kirk Strauser
>Release:        4.6-STABLE
>Organization:
The Strauser Group
>Environment:
FreeBSD kanga.honeypot.net 4.6-STABLE FreeBSD 4.6-STABLE #1: Sun Jul  7 20:58:28 CDT 2002     root@kanga.honeypot.net:/usr/obj/usr/src/sys/HONEYPOT_KANGA  i386

>Description:
As of version 1.1.15, the CUPS team has moved the 'pstoraster' out of "CUPS proper" and into their own version of Ghostscript (see http://www.cups.org/ghostscript.html for details).  The practical upshot is that users with non-Postscript printers will not be able to print on FreeBSD CUPS servers until the issue is somehow resolved.
>How-To-Repeat:
Upgrade to cups-* version 1.1.15.
>Fix:
Port "ESP Postscript" to FreeBSD, although I don't know how that's going to effect programs that rely on GNU Ghostscript, or what the differences are between the two.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->alane 
Responsible-Changed-By: alane 
Responsible-Changed-When: Fri Jul 12 11:37:08 PDT 2002 
Responsible-Changed-Why:  
I'll handle this. Expect a patch by Sunday. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=40488 

From: Alan E <alane@geeksrus.net>
To: Kirk Strauser <kirk@strauser.com>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: ports/40488: CUPS now relies on a special version of Ghostscript for printing on non-PS printers
Date: Fri, 12 Jul 2002 14:35:31 -0400

 On Fri, Jul 12, 2002 at 08:41:03AM -0700, Kirk Strauser wrote:
 >
 >>Number:         40488
 >>Category:       ports
 >>Synopsis:       CUPS now relies on a special version of Ghostscript for printing on non-PS printers
 
 I am in the process of patching ghostscript-gnu. Unfortunately, life has
 taken precedence for the last few days.
 
 Beware: this means the ghostscript-gnu will now depend on cups-base. I
 don't like this, but it is an unfortunate consequence of the decisions
 made by the cups author(s).
 
 This does not mean that cups-base will have to be installed. It will be
 used only at build time. So please, let's not start a "I don't want
 cups" war over this.
 -- 
 AlanE

From: Alan E <alane@geeksrus.net>
To: Kirk Strauser <kirk@strauser.com>
Cc: FreeBSD Bugs <freebsd-gnats-submit@freebsd.org>
Subject: Re: ports/40488: CUPS now relies on a special version of Ghostscript for printing on non-PS printers
Date: Fri, 12 Jul 2002 18:04:08 -0400

 On Fri, Jul 12, 2002 at 01:45:02PM -0500, Kirk Strauser wrote:
 >
 >At 2002-07-12T18:35:31Z, Alan E <alane@geeksrus.net> writes:
 >> Beware: this means the ghostscript-gnu will now depend on cups-base. I
 >> don't like this, but it is an unfortunate consequence of the decisions
 >> made by the cups author(s).
 >
 >I don't know enough about the programs involved to understand why moving
 >pstoraster out of CUPS and into Ghostscript is a good thing.  I know you're
 >busy, but do you have time to give an informed opinion?
 
 Previously, cups actually installed a private version of ghostscript
 with only one driver -- that's what pstoraster *was*. 
 
 Since some Linux distros (not the guy in the fedora) want cups as
 standard, and only wanted one ghostscript, Mike Sweet (head dude and
 hacker at ESP) decided to produce an ESP ghostscript, which is just GNU
 gs with patches and an additional driver.
 
 There are also instructions for patching the driver into the existing
 ghostscript-gnu framework. All I have to do is figure out how that fits
 in with the 69 other extra drivers we (optionally) install.
 
 The cups-base port will only be used at build time, AFAIK. It should not
 be required to be built and installed. Essentially, we're moving
 pstoraster into ghostscript-gnu. Not because I want to, but because Mike
 has given us no real alternative option other than freezing our version
 of cups at 1.1.14, something that is not an option in my opinion.
 
 Does that help clarify things, Kirk?
 
 -- 
 AlanE

From: KATO Tsuguru <dai_fugo@geocities.co.jp>
To: Alan E <alane@geeksrus.net>, Kirk Strauser <kirk@strauser.com>
Cc: FreeBSD Bugs <freebsd-gnats-submit@freebsd.org>
Subject: Re: ports/40488: CUPS now relies on a special version of Ghostscript for printing on non-PS printers
Date: Sat, 13 Jul 2002 09:51:04 +0900

 > There are also instructions for patching the driver into the existing
 > ghostscript-gnu framework. All I have to do is figure out how that fits
 > in with the 69 other extra drivers we (optionally) install.
 
 I suppose the most rational way to import ESP ghostscript into
 FreeBSD ports tree should be:
 
 - build a binary with enabling pstoraster driver only
 - install a binary named as 'pstoraster' (for example).
 
 Fonts and other resources can be shared with ghostscript-gnu.

From: Alan E <alane@geeksrus.net>
To: KATO Tsuguru <dai_fugo@geocities.co.jp>
Cc: Kirk Strauser <kirk@strauser.com>,
	FreeBSD Bugs <freebsd-gnats-submit@freebsd.org>,
	FreeBSD Ports List <ports@freebsd.org>
Subject: Re: ports/40488: CUPS now relies on a special version of Ghostscript for printing on non-PS printers
Date: Fri, 12 Jul 2002 20:53:23 -0400

 On Sat, Jul 13, 2002 at 09:51:04AM +0900, KATO Tsuguru wrote:
 >> There are also instructions for patching the driver into the existing
 >> ghostscript-gnu framework. All I have to do is figure out how that fits
 >> in with the 69 other extra drivers we (optionally) install.
 >
 >I suppose the most rational way to import ESP ghostscript into
 >FreeBSD ports tree should be:
 
 I do not think that is necessary. I prefer to add the driver to the
 existing ghostscript-gnu. Everybody's got ghostscript-gnu installed,
 anyway. I think it's less hassle this way.
 
 -- 
 AlanE

From: Kirk Strauser <kirk@strauser.com>
To: Alan E <alane@geeksrus.net>
Cc: FreeBSD Bugs <freebsd-gnats-submit@freebsd.org>
Subject: Re: ports/40488: CUPS now relies on a special version of Ghostscript for printing on non-PS printers
Date: 12 Jul 2002 21:35:01 -0500

 At 2002-07-12T22:04:08Z, Alan E <alane@geeksrus.net> writes:
 
 > Previously, cups actually installed a private version of ghostscript with
 > only one driver -- that's what pstoraster *was*.
 
 Ahhh....  That explains much.
 
 > Since some Linux distros (not the guy in the fedora) want cups as
 > standard, and only wanted one ghostscript, Mike Sweet (head dude and
 > hacker at ESP) decided to produce an ESP ghostscript, which is just GNU gs
 > with patches and an additional driver.
 
 Well, I guess that makes sense.  I could see that maintaining multiple
 parallel versions of something that complex could be a headache.
 
 > There are also instructions for patching the driver into the existing
 > ghostscript-gnu framework. All I have to do is figure out how that fits
 > in with the 69 other extra drivers we (optionally) install.
 
 That's all?  And you don't have it done yet?  ;)
 
 > The cups-base port will only be used at build time, AFAIK.
 
 Sort of like the Linux JDK and Java, eh?
 
 > Does that help clarify things, Kirk?
 
 Tremendously.  Thanks for the information, Alan, and thanks for all the work
 you've done for us users so far.
 -- 
 Kirk Strauser
 The Strauser Group - http://www.strausergroup.com/

From: KATO Tsuguru <tkato@prontomail.com>
To: Alan E <alane@geeksrus.net>
Cc: Kirk Strauser <kirk@strauser.com>,
	FreeBSD Bugs <freebsd-gnats-submit@freebsd.org>,
	FreeBSD Ports List <ports@freebsd.org>
Subject: Re: ports/40488: CUPS now relies on a special version of Ghostscript for printing on non-PS printers
Date: Sat, 13 Jul 2002 17:24:24 +0900

 > I do not think that is necessary. I prefer to add the driver to the
 > existing ghostscript-gnu. Everybody's got ghostscript-gnu installed,
 > anyway. I think it's less hassle this way.
 
 Since there is no valid method to control *_DEPENDS, it
 shouldn't be so easy to add third-party drivers which
 require external libraries to current ghostscript-gnu
 port without drastic restructure.
 
 Setting aside that issue, CUPS rasterizer is not necessary
 for every FreeBSD user. Ghostscript users who has no printer
 don't need CUPS rasterizer. CUPS users who has no non-PS
 printer also don't need CUPS rasterizer.
 
 Moreover, there is no actually usable CUPS driver package
 for non-PS printers except Gimp-Print at present. I guess
 it's pretty reasonable to separating CUPS rasterizer from
 existing ghostscript-gnu package.
 
 Here is an experimental implimentation of CUPS rasterizer
 port. I would like you to utilize it if my opinion is
 acceptable.
 
 
 # This is a shell archive.  Save it in a file, remove anything before
 # this line, and then unpack it by entering "sh file".  Note, it may
 # create directories; files and directories will be owned by you and
 # have default permissions.
 #
 # This archive contains:
 #
 #	cups-pstoraster
 #	cups-pstoraster/Makefile
 #	cups-pstoraster/distinfo
 #	cups-pstoraster/files
 #	cups-pstoraster/files/patch-lib:gs_res.ps
 #	cups-pstoraster/files/patch-src:genarch.c
 #	cups-pstoraster/pkg-comment
 #	cups-pstoraster/pkg-descr
 #	cups-pstoraster/pkg-plist
 #
 echo c - cups-pstoraster
 mkdir -p cups-pstoraster > /dev/null 2>&1
 echo x - cups-pstoraster/Makefile
 sed 's/^X//' >cups-pstoraster/Makefile << 'END-of-cups-pstoraster/Makefile'
 X# New ports collection makefile for:	cups-pstoraster
 X# Date created:		Jul 13 2002
 X# Whom:			ports@FreeBSD.org
 X#
 X# $FreeBSD$
 X#
 X
 XPORTNAME=	pstoraster
 XPORTVERSION=	7.05.3
 XCATEGORIES=	print
 XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE} \
 X		ftp://ftp.easysw.com/pub/ghostscript/
 XMASTER_SITE_SUBDIR=	espgs
 XPKGNAMEPREFIX=	cups-
 XDISTNAME=	espgs-${PORTVERSION}-source
 X
 XMAINTAINER=	ports@FreeBSD.org
 X
 XLIB_DEPENDS=	cups.2:${PORTSDIR}/print/cups
 XRUN_DEPENDS=	${LOCALBASE}/share/ghostscript/fonts/fonts.scale:${PORTSDIR}/print/ghostscript-gnu
 X
 XWRKSRC=		${WRKDIR}/espgs-${PORTVERSION}
 X
 XUSE_BZIP2=	yes
 XUSE_GMAKE=	yes
 XGNU_CONFIGURE=	yes
 XCONFIGURE_TARGET=	--build=${ARCH}-portbld-freebsd${OSREL}
 XCONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
 X		LDFLAGS="-L${LOCALBASE}/lib"
 XCONFIGURE_ARGS=	--without-x --without-ijs --without-gimp-print \
 X		--with-drivers=cups --with-gs=espgs \
 X		--with-fontpath=${LOCALBASE}/share/ghostscript/fonts \
 X		--enable-compiled-inits
 X
 Xpost-patch:
 X	@${MV} ${WRKSRC}/lib/gs_res.ps ${WRKSRC}/lib/gs_res.ps.pre_sed
 X	@${SED} -e 's|%%DATADIR%%|${LOCALBASE}/share/ghostscript|g' \
 X		${WRKSRC}/lib/gs_res.ps.pre_sed > ${WRKSRC}/lib/gs_res.ps
 X
 Xpre-build:
 X	@${MKDIR} ${WRKSRC}/bin
 X	@${MKDIR} ${WRKSRC}/obj
 X
 Xdo-install:
 X	${INSTALL_PROGRAM} ${WRKSRC}/bin/espgs ${PREFIX}/bin
 X	${INSTALL_DATA} ${WRKSRC}/pstoraster/pstoraster.convs \
 X		${PREFIX}/etc/cups
 X	${INSTALL_DATA} ${WRKSRC}/pstoraster/pstoraster \
 X		${PREFIX}/libexec/cups/filter
 X
 X.include <bsd.port.mk>
 END-of-cups-pstoraster/Makefile
 echo x - cups-pstoraster/distinfo
 sed 's/^X//' >cups-pstoraster/distinfo << 'END-of-cups-pstoraster/distinfo'
 XMD5 (espgs-7.05.3-source.tar.bz2) = e21697ae9c4aa82d16e48f202ba6f69c
 END-of-cups-pstoraster/distinfo
 echo c - cups-pstoraster/files
 mkdir -p cups-pstoraster/files > /dev/null 2>&1
 echo x - cups-pstoraster/files/patch-lib:gs_res.ps
 sed 's/^X//' >cups-pstoraster/files/patch-lib:gs_res.ps << 'END-of-cups-pstoraster/files/patch-lib:gs_res.ps'
 X--- lib/gs_res.ps.orig	Mon Jul 16 01:09:41 2001
 X+++ lib/gs_res.ps	Fri Feb  8 07:12:09 2002
 X@@ -248,8 +248,8 @@
 X   /pssystemparams 10 dict readonly def
 X } if
 X pssystemparams begin
 X-  /FontResourceDir (/Resource/Font/) readonly .forcedef	% pssys'params is r-o
 X-  /GenericResourceDir (/Resource/) readonly .forcedef	% pssys'params is r-o
 X+  /FontResourceDir (%%DATADIR%%/Resource/Font/) readonly .forcedef	% pssys'params is r-o
 X+  /GenericResourceDir (%%DATADIR%%/Resource/) readonly .forcedef	% pssys'params is r-o
 X   /GenericResourcePathSep (/) readonly .forcedef	% pssys'params is r-o
 X end
 X end
 END-of-cups-pstoraster/files/patch-lib:gs_res.ps
 echo x - cups-pstoraster/files/patch-src:genarch.c
 sed 's/^X//' >cups-pstoraster/files/patch-src:genarch.c << 'END-of-cups-pstoraster/files/patch-src:genarch.c'
 X--- src/genarch.c.orig	Tue Jun  5 15:38:57 2001
 X+++ src/genarch.c	Wed Jun 20 04:17:42 2001
 X@@ -41,6 +41,7 @@
 X     fprintf(f, "\n\t /* ---------------- %s ---------------- */\n\n", str);
 X }
 X 
 X+#ifndef __FreeBSD__
 X private clock_t
 X time_clear(char *buf, int bsize, int nreps)
 X {
 X@@ -51,6 +52,7 @@
 X 	memset(buf, 0, bsize);
 X     return clock() - t;
 X }
 X+#endif /* __FreeBSD__ */
 X 
 X private void
 X define(FILE *f, const char *str)
 X@@ -181,6 +183,7 @@
 X     fprintf(f, "((unsigned long)~0L + (unsigned long)0)\n");
 X #undef PRINT_MAX
 X 
 X+#ifndef __FreeBSD__
 X     section(f, "Cache sizes");
 X 
 X     /*
 X@@ -241,6 +244,7 @@
 X 	}
 X 	define_int(f, "ARCH_CACHE2_SIZE", bsize >> 1);
 X     }
 X+#endif /* __FreeBSD__ */
 X 
 X     section(f, "Miscellaneous");
 X 
 END-of-cups-pstoraster/files/patch-src:genarch.c
 echo x - cups-pstoraster/pkg-comment
 sed 's/^X//' >cups-pstoraster/pkg-comment << 'END-of-cups-pstoraster/pkg-comment'
 XGNU Postscript interprinter for using with CUPS
 END-of-cups-pstoraster/pkg-comment
 echo x - cups-pstoraster/pkg-descr
 sed 's/^X//' >cups-pstoraster/pkg-descr << 'END-of-cups-pstoraster/pkg-descr'
 XGhostscript is the well-known PostScript interpreter which is available for
 Xall common and most esoteric platforms and supports many different printers
 Xand some displays.
 X
 XVersions entitled "GNU Ghostscript" are distributed with the GNU General
 XPublic License, which allows free use, and free copying and redistribution
 Xunder certain conditions (including, in some cases, commercial distribution).
 X
 XThis distribution is based on GNU Ghostscript and provides the "driver" for
 XCUPS that supports non-PostScript printer drivers within CUPS.
 X
 XWWW: http://www.cups.org/ghostscript.html
 END-of-cups-pstoraster/pkg-descr
 echo x - cups-pstoraster/pkg-plist
 sed 's/^X//' >cups-pstoraster/pkg-plist << 'END-of-cups-pstoraster/pkg-plist'
 Xbin/espgs
 Xetc/cups/pstoraster.convs
 Xlibexec/cups/filter/pstoraster
 END-of-cups-pstoraster/pkg-plist
 exit
 

From: Alan E <alane@geeksrus.net>
To: KATO Tsuguru <tkato@prontomail.com>
Cc: Kirk Strauser <kirk@strauser.com>,
	FreeBSD Bugs <freebsd-gnats-submit@FreeBSD.ORG>,
	FreeBSD Ports List <ports@FreeBSD.ORG>
Subject: Re: ports/40488: CUPS now relies on a special version of Ghostscript for printing on non-PS printers
Date: Sat, 13 Jul 2002 05:44:47 -0400

 On Sat, Jul 13, 2002 at 05:24:24PM +0900, KATO Tsuguru wrote:
 >> I do not think that is necessary. I prefer to add the driver to the
 >> existing ghostscript-gnu. Everybody's got ghostscript-gnu installed,
 >> anyway. I think it's less hassle this way.
 >
 >Since there is no valid method to control *_DEPENDS, it
 >shouldn't be so easy to add third-party drivers which
 >require external libraries to current ghostscript-gnu
 >port without drastic restructure.
 
 Well, the patch was larger than this port, and I hadn't got to the
 install part yet. 
 
 >Setting aside that issue, CUPS rasterizer is not necessary
 >for every FreeBSD user. Ghostscript users who has no printer
 >don't need CUPS rasterizer. CUPS users who has no non-PS
 >printer also don't need CUPS rasterizer.
 
 Very true: e.g., I have an HP PS printer. I was going to have a
 WITHOUT_CUPS knob to turn it off, but ..
 
 >Moreover, there is no actually usable CUPS driver package
 >for non-PS printers except Gimp-Print at present. I guess
 >it's pretty reasonable to separating CUPS rasterizer from
 >existing ghostscript-gnu package.
 
 It's starting to look like you're correct on this one.
 
 >
 >Here is an experimental implimentation of CUPS rasterizer
 >port. I would like you to utilize it if my opinion is
 >acceptable.
 >
 
 I'll patch up a couple minor glitches (e.g., lib depends on cups-base).
 I'm a little leery of patching the postscript code, but let me try this
 out.
 
 If it works, then thanks very much. You've saved me a lot of work. :)
 
 -- 
 AlanE

From: Alan E <alane@geeksrus.net>
To: KATO Tsuguru <tkato@prontomail.com>
Cc: Kirk Strauser <kirk@strauser.com>,
	FreeBSD Bugs <freebsd-gnats-submit@FreeBSD.ORG>,
	FreeBSD Ports List <ports@FreeBSD.ORG>
Subject: Re: ports/40488: CUPS now relies on a special version of Ghostscript for printing on non-PS printers
Date: Sat, 13 Jul 2002 11:50:41 -0400

 On Sat, Jul 13, 2002 at 05:44:47AM -0400, Alan E wrote:
 >On Sat, Jul 13, 2002 at 05:24:24PM +0900, KATO Tsuguru wrote:
 >>Here is an experimental implimentation of CUPS rasterizer
 >>port. I would like you to utilize it if my opinion is
 >>acceptable.
 >
 >I'll patch up a couple minor glitches (e.g., lib depends on cups-base).
 >I'm a little leery of patching the postscript code, but let me try this
 >out.
 >
 >If it works, then thanks very much. You've saved me a lot of work. :)
 
 I'm sorry. I left something out: if this works, and it looks like it
 should, not only have you save me a lot of work but come up with a
 better solution, too. 8=)
 
 -- 
 AlanE
State-Changed-From-To: open->closed 
State-Changed-By: alane 
State-Changed-When: Wed Jul 24 20:02:43 PDT 2002 
State-Changed-Why:  
Committed a modified version of Kato's suggest port. I maintain. Now for 
people to test it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=40488 

From: Matthew Beauregard <throw2@marauder.tm>
To: freebsd-gnats-submit@FreeBSD.org, kirk@strauser.com
Cc:  
Subject: Re: ports/40488: CUPS now relies on a special version of Ghostscript
 for printing on non-PS printers
Date: Thu, 25 Jul 2002 22:31:52 +1000

 Installed the cups-pstoraster port, printing fine now.  Thanks everyone.
 
>Unformatted:
