From simon@olofsson.de  Fri Jun  2 22:57:45 2006
Return-Path: <simon@olofsson.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0020416A494
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  2 Jun 2006 22:57:44 +0000 (UTC)
	(envelope-from simon@olofsson.de)
Received: from mail-in-04.arcor-online.net (mail-in-04.arcor-online.net [151.189.21.44])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5707C43D48
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  2 Jun 2006 22:57:44 +0000 (GMT)
	(envelope-from simon@olofsson.de)
Received: from mail-in-01-z2.arcor-online.net (mail-in-01-z2.arcor-online.net [151.189.8.13])
	by mail-in-04.arcor-online.net (Postfix) with ESMTP id 092F9122EC7;
	Sat,  3 Jun 2006 00:57:43 +0200 (CEST)
Received: from mail-in-07.arcor-online.net (mail-in-07.arcor-online.net [151.189.21.47])
	by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id ED200CBF36;
	Sat,  3 Jun 2006 00:57:42 +0200 (CEST)
Received: from gul.lan.gath3n.de (dslb-084-060-159-035.pools.arcor-ip.net [84.60.159.35])
	by mail-in-07.arcor-online.net (Postfix) with ESMTP id B9FD516F5FB;
	Sat,  3 Jun 2006 00:57:42 +0200 (CEST)
Received: by gul.lan.gath3n.de (Postfix, from userid 1001)
	id 78B705C24; Sat,  3 Jun 2006 00:57:42 +0200 (CEST)
Message-Id: <20060602225742.78B705C24@gul.lan.gath3n.de>
Date: Sat,  3 Jun 2006 00:57:42 +0200 (CEST)
From: Simon Olofsson <simon@olofsson.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: ports@mark.reidel.info
Subject: [PATCH] print/cups-pdf: Fixed build options
X-Send-Pr-Version: 3.113
X-GNATS-Notify: ports@mark.reidel.info

>Number:         98408
>Category:       ports
>Synopsis:       [PATCH] print/cups-pdf: Fixed build options
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    itetcu
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 02 23:00:28 GMT 2006
>Closed-Date:    Fri Jun 09 06:21:45 GMT 2006
>Last-Modified:  Fri Jun 09 06:21:45 GMT 2006
>Originator:     Simon Olofsson
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
>Environment:
System: FreeBSD gul.lan.gath3n.de 6.1-STABLE FreeBSD 6.1-STABLE #24: Thu Jun  1 18:20:49 CEST
>Description:
Since Version 2.0beta1 exists a cups-pdf.conf.
So you can define all options there and not int cups-pdf.h.
I fixed this and hope it's ok this way.
If the Maintainer is no longer interessed in this Port,
I would take it.

Port maintainer (ports@mark.reidel.info) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- cups-pdf-2.3.1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/print/cups-pdf/Makefile /usr/home/simon/src/ports/print/cups-pdf/Makefile
--- /usr/ports/print/cups-pdf/Makefile	Sat Jun  3 00:09:12 2006
+++ /usr/home/simon/src/ports/print/cups-pdf/Makefile	Sat Jun  3 00:50:35 2006
@@ -22,10 +22,10 @@
 
 USE_GHOSTSCRIPT_RUN=	yes
 
-SUBST_CMD=		-e "s,/usr/bin/gs,${LOCALBASE}/bin/gs," \
-			-e 's,/var/tmp,/tmp,' \
-			-e 's,"lp","daemon",' \
-			-e 's,/var/spool/cups-pdf/SPOOL,/var/spool/cups-pdf,'
+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,'
 
 .ifdef(PDF_VERSION)
 .if ${PDF_VERSION} == 1.2
@@ -35,19 +35,19 @@
 .else
 BROKEN=		Unsupported PDF-Version selected: ${PDF_VERSION}
 .endif
-SUBST_CMD+=	-e 's,CPPDFVER "1.4",CPPDFVER "${PDF_VERSION}",'
+SUBST_CMD+=	-e "s,\#PDFVer 1.4,PDFVer ${PDF_VERSION},"
 .endif
 
 .ifdef(HOME_SUBDIR)
-SUBST_CMD+=	-e 's,CPOUT "/var/spool/cups-pdf",CPOUT "$$HOME",' -e 's,CPHOMESUB "cups-pdf",CPHOMESUB "${HOME_SUBDIR}",'
+SUBST_CMD+=	-e "s,\#Out /var/spool/cups-pdf/$${USER},Out $${HOME}/${HOME_SUBDIR},"
 .else
 .ifdef(OUTPUT_DIRECTORY)
-SUBST_CMD+=	-e 's,CPOUT "/var/spool/cups-pdf",CPOUT "${OUTPUT_DIRECTORY}",'
+SUBST_CMD+=	-e "s,\#Out /var/spool/cups-pdf/$${USER},Out ${OUTPUT_DIRECTORY},¨
 .endif
 .endif
 
 .ifdef(LOG_DIRECTORY)
-SUBST_CMD+=	-e "s,/var/log/cups,${LOG_DIRECTORY},"
+SUBST_CMD+=	-e "s,\#Log /var/log/cups,Log ${LOG_DIRECTORY},"
 .endif
 
 pre-everything::
@@ -73,7 +73,10 @@
 	@${GUNZIP_CMD} ${WRKSRC}/extra/PostscriptColor.ppd.gz
 
 post-configure:
-	@${REINPLACE_CMD} ${SUBST_CMD} ${WRKSRC}/src/cups-pdf.h
+	@${REINPLACE_CMD} ${SUBST_CMD} ${WRKSRC}/extra/cups-pdf.conf
+	@${REINPLACE_CMD} -e \
+	's,CPCONFIG "/etc/cups/cups-pdf.conf",CPCONFIG "${LOCALBASE}/etc/cups/cups-pdf.conf",' \
+	${WRKSRC}/src/cups-pdf.h
 
 do-build:
 	cd ${WRKSRC}/src; ${CC} ${CFLAGS} -o cups-pdf cups-pdf.c
@@ -84,6 +87,12 @@
 .if !defined(NOPORTDOCS)
 	${MKDIR} ${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/
+	${INSTALL_DATA} ${WRKSRC}/extra/cups-pdf.conf ${LOCALBASE}/etc/cups/cups-pdf.conf.sample
 .endif
+
+post-install:
+	@if [ ! -f ${LOCALBASE}/etc/cups/cups-pdf.conf ]; then \
+	${CP} -p ${LOCALBASE}/etc/cups/cups-pdf.conf.sample ${LOCALBASE}/etc/cups/cups-pdf.conf ; \
+	fi
 
 .include <bsd.port.post.mk>
diff -ruN --exclude=CVS /usr/ports/print/cups-pdf/pkg-plist /usr/home/simon/src/ports/print/cups-pdf/pkg-plist
--- /usr/ports/print/cups-pdf/pkg-plist	Fri Jun  2 23:28:45 2006
+++ /usr/home/simon/src/ports/print/cups-pdf/pkg-plist	Fri Jun  2 23:46:48 2006
@@ -1,4 +1,7 @@
 libexec/cups/backend/cups-pdf
 share/cups/model/PostscriptColor.ppd
+@unexec if cmp -s %D/etc/cups/cups-pdf.conf.sample %D/etc/cups/cups-pdf.conf; then rm -f %D/etc/cups/cups-pdf.conf; fi
+etc/cups/cups-pdf.conf.sample
+@exec if [ ! -f %D/etc/cups/cups-pdf.conf ] ; then cp -p %D/%F %B/cups-pdf.conf; fi
 %%PORTDOCS%%%%DOCSDIR%%/README
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
--- cups-pdf-2.3.1.patch ends here ---

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Jun 2 23:04:17 UTC 2006 
State-Changed-Why:  
Awaiting maintainers feedback 

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

From: Mark Reidel <ports@mark.reidel.info>
To: bug-followup@FreeBSD.org
Cc: ports@mark.reidel.info
Subject: Re: ports/98408: [PATCH] print/cups-pdf: Fixed build options
Date: Tue, 6 Jun 2006 22:12:24 +0200

 On 02.06.06 you wrote:
 
 > Maintainer of print/cups-pdf,
 >
 > Please note that PR ports/98408 has just been submitted.
 >
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 >
 > The full text of the PR can be found at:
 >    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/98408
 
 I approve the patch and since the submitter asked for taking over
 maintainership, I will gladly accept that offer, too, since I don't have much
 time at the moment.
 
      - Mark
 -- 
 Fortune cookie of the hour:
 You are an insult to my intelligence!
 I demand that you log off immediately.
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Wed Jun 7 15:03:09 UTC 2006 
State-Changed-Why:  
Maintainer approved both the update and the handoff. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=98408 
Responsible-Changed-From-To: freebsd-ports-bugs->itetcu 
Responsible-Changed-By: itetcu 
Responsible-Changed-When: Thu Jun 8 15:21:24 UTC 2006 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=98408 
State-Changed-From-To: open->closed 
State-Changed-By: itetcu 
State-Changed-When: Fri Jun 9 06:21:43 UTC 2006 
State-Changed-Why:  
Committed, with minor changes (when plist content changes, also bump 
PORTREVISION). Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=98408 
>Unformatted:
