ports/189682: [patch] add support for staging/options to print/cups-pdf
Matthieu Volat
mazhe at alkumuna.eu
Sun May 11 19:10:00 UTC 2014
>Number: 189682
>Category: ports
>Synopsis: [patch] add support for staging/options to print/cups-pdf
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Sun May 11 19:10:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Matthieu Volat
>Release: 10.0-RELEASE-p3
>Organization:
-
>Environment:
>Description:
As of now, print/cups-pdf do not have a maintainer and lacks staging and relies on NOPORTDOCS for optional documentation installation.
>How-To-Repeat:
-
>Fix:
Attached patch provides staging and DOCS option support.
Patch attached with submission follows:
Index: Makefile
===================================================================
--- Makefile (revision 353034)
+++ Makefile (working copy)
@@ -21,6 +21,11 @@
USE_GHOSTSCRIPT_RUN= yes
+OPTIONS_DEFINE= DOCS
+OPTIONS_DEFAULT= DOCS
+
+.include <bsd.port.options.mk>
+
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,' \
@@ -49,7 +54,6 @@
SUBST_CMD+= -e "s,\#Log /var/log/cups,Log ${LOG_DIRECTORY},"
.endif
-NO_STAGE= yes
pre-everything::
.if !defined(PDF_VERSION) || !defined(HOME_SUBDIR) || \
!defined(OUTPUT_DIRECTORY) || !defined(LOG_DIRECTORY)
@@ -82,23 +86,23 @@
cd ${WRKSRC}/src; ${CC} ${CFLAGS} -o cups-pdf cups-pdf.c
do-install:
- ${MKDIR} ${PREFIX}/libexec/cups/backend
- ${INSTALL} -o root -g wheel -m 0700 ${WRKSRC}/src/cups-pdf ${PREFIX}/libexec/cups/backend
- ${MKDIR} ${PREFIX}/share/cups/model
+ ${MKDIR} ${STAGEDIR}${LOCALBASE}/libexec/cups/backend
+ ${INSTALL} -o root -g wheel -m 0700 ${WRKSRC}/src/cups-pdf ${STAGEDIR}${LOCALBASE}/libexec/cups/backend
+ ${MKDIR} ${STAGEDIR}${PREFIX}/share/cups/model
${INSTALL_DATA} ${WRKSRC}/extra/CUPS-PDF.ppd \
- ${PREFIX}/share/cups/model/CUPS-PDF.ppd
- ${MKDIR} ${PREFIX}/etc/cups
+ ${STAGEDIR}${LOCALBASE}/share/cups/model/CUPS-PDF.ppd
+ ${MKDIR} ${STAGEDIR}${LOCALBASE}/etc/cups
${INSTALL_DATA} ${WRKSRC}/extra/cups-pdf.conf \
- ${PREFIX}/etc/cups/cups-pdf.conf.sample
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/
+ ${STAGEDIR}${LOCALBASE}/etc/cups/cups-pdf.conf.sample
+.if ${PORT_OPTIONS:MDOCS}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}/
.endif
post-install:
@if [ ! -f ${PREFIX}/etc/cups/cups-pdf.conf ]; then \
- ${CP} -p ${PREFIX}/etc/cups/cups-pdf.conf.sample \
- ${PREFIX}/etc/cups/cups-pdf.conf ; \
- fi
+ ${CP} -p ${PREFIX}/etc/cups/cups-pdf.conf.sample \
+ ${PREFIX}/etc/cups/cups-pdf.conf ; \
+ fi
.include <bsd.port.mk>
Index: pkg-descr
===================================================================
--- pkg-descr (revision 353034)
+++ pkg-descr (working copy)
@@ -5,4 +5,4 @@
be placed in the specified directory.
Author: Dr. Volker Christian Behr <behr at physik.uni-wuerzburg.de>
-WWW: http://www.cups-pdf.de
+WWW: http://www.cups-pdf.de
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list