summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpi <pi@FreeBSD.org>2014-05-19 19:09:07 +0000
committerpi <pi@FreeBSD.org>2014-05-19 19:09:07 +0000
commit6ebbc6b3294e9b784c96affed10f54b5e17778a6 (patch)
tree7b600cecd4ee4929d82b7cf07bb799e79a193921
parentf855331dcb3ead3fda2c184a3cb0a516443de2f3 (diff)
downloadFreeBSD-ports-6ebbc6b3294e9b784c96affed10f54b5e17778a6.zip
FreeBSD-ports-6ebbc6b3294e9b784c96affed10f54b5e17778a6.tar.gz
print/cups-base: unbreak AVAHI option and add missing rc script
- Add missing rc script for cups-browsed [1] - Enable building CUPS with native Avahi backend [2] - Disable AVAHI if not selected [3] PR: ports/188550 [1], ports/189757 [2], ports/188751 [3] Submitted by: Rafael Ostertag <rafi@guengel.ch> [1], Raivo Hool <raivo.hool@gmail.com> [2], Dan Lukes <dan@obluda.cz> [3] Approved by: culot (mentor)
-rw-r--r--print/cups-base/Makefile20
-rw-r--r--print/cups-base/files/cups_browsed.in29
-rw-r--r--print/cups-base/pkg-plist6
3 files changed, 43 insertions, 12 deletions
diff --git a/print/cups-base/Makefile b/print/cups-base/Makefile
index 107ab84..7ff64f8 100644
--- a/print/cups-base/Makefile
+++ b/print/cups-base/Makefile
@@ -104,7 +104,7 @@ LIB_DEPENDS+= libcups.so:${PORTSDIR}/${PKGCATEGORY}/cups-client \
BUILD_DEPENDS+= cups-client${PKGNAMESUFFIX2}>=${PORTVERSION}:${PORTSDIR}/${PKGCATEGORY}/cups-client
BUILD_DEPENDS+= cups-image${PKGNAMESUFFIX2}>=${PORTVERSION}:${PORTSDIR}/${PKGCATEGORY}/cups-image
COMMENT2= Server
-USE_RC_SUBR= cupsd
+USE_RC_SUBR= cupsd cups_browsed
PLIST_SUB+= CACHEDIR="${CUPS_CACHEDIR}"
.if ${ARCH} == "ia64"
BROKEN= stack-protector not supported on ia64
@@ -156,16 +156,15 @@ IGNORE= You must select one and only one option to build for Zeroconf
.endif
LIB_DEPENDS+= libdns_sd.so:${PORTSDIR}/net/mDNSResponder
CONFIGURE_ARGS+= --with-dnssd-includes=${LOCALBASE}/include
-PLIST_SUB+= WITH_MDNSRESPONDER=""
+PLIST_SUB+= MDNSRESPONDER="" DNSSD="@comment "
.elif !defined(CUPS_CLIENT) && !defined(CUPS_IMAGE) && ${PORT_OPTIONS:MAVAHI}
-CONFIGURE_ARGS+= --enable-dnssd \
- --with-dnssd-libs=${LOCALBASE}/lib/
-LIB_DEPENDS+= libdns_sd.so:${PORTSDIR}/net/avahi-libdns
-CONFIGURE_ARGS+= --with-dnssd-includes=${LOCALBASE}/include/avahi-compat-libdns_sd/
-BROKEN= missing function, see http://www.avahi.org/ticket/303
+CONFIGURE_ARGS+= --enable-avahi
+LIB_DEPENDS+= libavahi-client.so:${PORTSDIR}/net/avahi-app
+PLIST_SUB+= MDNSRESPONDER="@comment " DNSSD=""
.else
CONFIGURE_ARGS+= --disable-dnssd
-PLIST_SUB+= WITH_MDNSRESPONDER="@comment "
+CONFIGURE_ARGS+= --disable-avahi
+PLIST_SUB+= MDNSRESPONDER="@comment " DNSSD="@comment "
.endif
.if !defined(CUPS_CLIENT) && !defined(CUPS_IMAGE) && ${PORT_OPTIONS:MPAM}
@@ -289,8 +288,11 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/cups/libcups.a ${STAGEDIR}${PREFIX}/lib
${INSTALL_MAN} ${WRKSRC}/man/cups-config.man ${STAGEDIR}${PREFIX}/man/man1/cups-config.1
.elif defined(CUPS_IMAGE)
- ${INSTALL_DATA} ${WRKSRC}/cups/raster.h ${STAGEDIR}${PREFIX}/include/cups
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libcupsimage.so.2
.else
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libcupscgi.so.1
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libcupsppdc.so.1
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libcupsmime.so.1
.if ${PORT_OPTIONS:MGHOSTSCRIPT} || ${PORT_OPTIONS:MXPDF}
${INSTALL_PROGRAM} ${WRKSRC}/filter/pdftops ${STAGEDIR}${PREFIX}/libexec/cups/filter/
.endif
diff --git a/print/cups-base/files/cups_browsed.in b/print/cups-base/files/cups_browsed.in
new file mode 100644
index 0000000..98513cf
--- /dev/null
+++ b/print/cups-base/files/cups_browsed.in
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: cups_browsed
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following to /etc/rc.conf[.local] to enable this service
+#
+# cups_browsed_enable (bool): Set to NO by default.
+# Set it to YES to enable cups_browsed.
+#
+
+. /etc/rc.subr
+
+name=cups_browsed
+rcvar=cups_browsed_enable
+
+load_rc_config ${name}
+
+ : ${cups_browsed_enable:=NO}
+
+command=/usr/sbin/daemon
+pidfile=/var/run/cups-browsed.pid
+command_args="-p ${pidfile} %%PREFIX%%/sbin/cups-browsed"
+procname="%%PREFIX%%/sbin/cups-browsed"
+
+run_rc_command "$1"
diff --git a/print/cups-base/pkg-plist b/print/cups-base/pkg-plist
index 0d541cb..c255b0c 100644
--- a/print/cups-base/pkg-plist
+++ b/print/cups-base/pkg-plist
@@ -83,8 +83,9 @@ libexec/cups/backend/lpd
libexec/cups/backend/snmp
libexec/cups/backend/socket
libexec/cups/backend/usb
-%%WITH_MDNSRESPONDER%%libexec/cups/backend/dnssd
-%%WITH_MDNSRESPONDER%%libexec/cups/backend/mdns
+%%DNSSD%%libexec/cups/backend/dnssd
+%%MDNSRESPONDER%%libexec/cups/backend/dnssd
+%%MDNSRESPONDER%%libexec/cups/backend/mdns
libexec/cups/cgi-bin/admin.cgi
libexec/cups/cgi-bin/classes.cgi
libexec/cups/cgi-bin/help.cgi
@@ -1020,7 +1021,6 @@ share/locale/ru/cups_ru.po
@dirrm libexec/cups/notifier
@dirrm libexec/cups/monitor
@exec mkdir -p %D/libexec/cups/driver
-@dirrmtry include/cups
@dirrmtry libexec/cups/driver
@dirrmtry libexec/cups/daemon
@dirrmtry libexec/cups/cgi-bin
OpenPOWER on IntegriCloud