summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2014-11-07 13:03:09 +0000
committertijl <tijl@FreeBSD.org>2014-11-07 13:03:09 +0000
commitd375aa146d1ce0117d3e52ef92c7eb71644f4190 (patch)
tree8607969dd33d47433007b930d179a97d7cc02087
parent24b9912dd79860a4e610d06c4f22a28563b01114 (diff)
downloadFreeBSD-ports-d375aa146d1ce0117d3e52ef92c7eb71644f4190.zip
FreeBSD-ports-d375aa146d1ce0117d3e52ef92c7eb71644f4190.tar.gz
- Let the rc script require the mdnsd or avahi_daemon rc scripts [1]
- Fix two getsockopt calls so they return peer credentials correctly [2] PR: 194856 [1], 191515 [2] Submitted by: Adrian Waters <draenan@gmail.com> [1] Submitted by: Bengt Ahlgren <bengta@sics.se> [2]
-rw-r--r--print/cups-base/Makefile5
-rw-r--r--print/cups-base/files/cupsd.in2
-rw-r--r--print/cups-base/files/patch-scheduler__auth.c20
3 files changed, 25 insertions, 2 deletions
diff --git a/print/cups-base/Makefile b/print/cups-base/Makefile
index 94ebf98..15fbdfa 100644
--- a/print/cups-base/Makefile
+++ b/print/cups-base/Makefile
@@ -67,7 +67,7 @@ OPTIONS_SINGLE_SSL= GNUTLS OPENSSL
OPTIONS_DEFAULT= OPENSSL
OPTIONS_SUB= yes
.else
-PORTREVISION= 1
+PORTREVISION= 2
CUPS_SUFFIX= -base
# No DOCS option. Files are needed by web interface.
OPTIONS_DEFINE= DBUS ICONS LIBPAPER LIBUSB PAM XDG_OPEN
@@ -175,12 +175,15 @@ LIB_DEPENDS+= libpaper.so:${PORTSDIR}/print/libpaper
LIB_DEPENDS+= libdns_sd.so:${PORTSDIR}/net/mDNSResponder
CONFIGURE_ARGS+= --with-dnssd-includes=${LOCALBASE}/include
CONFIGURE_ARGS+= --disable-avahi
+SUB_LIST+= ZEROCONF="mdnsd"
.elif !defined(CUPS_CLIENT) && !defined(CUPS_IMAGE) && ${PORT_OPTIONS:MAVAHI}
CONFIGURE_ARGS+= --enable-avahi
LIB_DEPENDS+= libavahi-client.so:${PORTSDIR}/net/avahi-app
+SUB_LIST+= ZEROCONF="avahi_daemon"
.else
CONFIGURE_ARGS+= --disable-dnssd
CONFIGURE_ARGS+= --disable-avahi
+SUB_LIST+= ZEROCONF=""
.endif
.if !defined(CUPS_CLIENT) && !defined(CUPS_IMAGE) && ${PORT_OPTIONS:MPAM}
diff --git a/print/cups-base/files/cupsd.in b/print/cups-base/files/cupsd.in
index b5e426d..498161d 100644
--- a/print/cups-base/files/cupsd.in
+++ b/print/cups-base/files/cupsd.in
@@ -3,7 +3,7 @@
# $FreeBSD$
#
# PROVIDE: cupsd
-# REQUIRE: DAEMON
+# REQUIRE: DAEMON %%ZEROCONF%%
# KEYWORD: shutdown
#
# Add the following to /etc/rc.conf[.local] to enable this service
diff --git a/print/cups-base/files/patch-scheduler__auth.c b/print/cups-base/files/patch-scheduler__auth.c
new file mode 100644
index 0000000..16d44bd
--- /dev/null
+++ b/print/cups-base/files/patch-scheduler__auth.c
@@ -0,0 +1,20 @@
+--- scheduler/auth.c.orig
++++ scheduler/auth.c
+@@ -556,7 +556,7 @@
+
+ peersize = sizeof(peercred);
+
+-# ifdef __APPLE__
++# if defined(__APPLE__) || defined(__FreeBSD__)
+ if (getsockopt(con->http.fd, 0, LOCAL_PEERCRED, &peercred, &peersize))
+ # else
+ if (getsockopt(con->http.fd, SOL_SOCKET, SO_PEERCRED, &peercred, &peersize))
+@@ -1155,7 +1155,7 @@
+
+ peersize = sizeof(peercred);
+
+-# ifdef __APPLE__
++# if defined(__APPLE__) || defined(__FreeBSD__)
+ if (getsockopt(con->http.fd, 0, LOCAL_PEERCRED, &peercred, &peersize))
+ # else
+ if (getsockopt(con->http.fd, SOL_SOCKET, SO_PEERCRED, &peercred,
OpenPOWER on IntegriCloud