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: ports/98408: [PATCH] print/cups-pdf: Fixed build options Message-ID: <20060602225742.78B705C24@gul.lan.gath3n.de> Resent-Message-ID: <200606022300.k52N0SnH071029@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 98408 >Category: ports >Synopsis: [PATCH] print/cups-pdf: Fixed build options >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jun 02 23:00:28 GMT 2006 >Closed-Date: >Last-Modified: >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: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060602225742.78B705C24>