svn commit: r376233 - head/print/cups-base

Boris Samorodov bsam at FreeBSD.org
Sun Jan 4 13:50:42 UTC 2015


Author: bsam
Date: Sun Jan  4 13:50:41 2015
New Revision: 376233
URL: https://svnweb.freebsd.org/changeset/ports/376233
QAT: https://qat.redports.org/buildarchive/r376233/

Log:
  print/cups-client via print/cups-base: treat avahi/dnssd explicitely
  
  1. The port's configure script is auto-detecting if avahi exists
  (unless avahi is explicitely disabled):
  ---
     9096 if test "x$PKGCONFIG" != x -a x$enable_avahi != xno; then
     9097         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Avahi" >&5
     9098 $as_echo_n "checking for Avahi... " >&6; }
     9099         if $PKGCONFIG --exists avahi-client; then
     9100                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     9101 $as_echo "yes" >&6; }
  ---
  
  So if avahi-lib is installed one get config.log:
  ---
  configure:9097: checking for Avahi
  configure:9100: result: yes
  [...]
  #define HAVE_AVAHI 1
  ---
  
  And later avahi is used while building:
  ---
  Using LIBS=-lcups  -lssl -lcrypto -L/usr/local/lib -lavahi-common -lavahi-client   -lz -pthread -lm -lcrypt   -lz
  ---
  
  Then print/cups-client installs libraries which are linked with avahi, ex.:
  ---
  % ldd libcups.so | grep avahi
          libavahi-common.so.3 => /usr/local/lib/libavahi-common.so.3 (0x801cda000)
          libavahi-client.so.3 => /usr/local/lib/libavahi-client.so.3 (0x801ee6000)
  ---
  
  Which leads to print/cups-base build failure (even if avahi is unset by options):
  ---
  Linking ippserver...
  cc -L../cgi-bin -L../cups -L../filter -L../ppdc -L../scheduler -L/usr/local/lib -Wl,-rpath,/usr/lib:/usr/local/lib -fstack-protector -Wl,-R/usr/local/lib   -Wall -Wno-format-y2k -Wunused -fPIC -Os -g -fstack-protector -Wno-tautological-compare -o ippserver ippserver.o  ../cups/libcups.a \
           -lssl -lcrypto -ldns_sd -pthread -lm -lcrypt   -lz -lz
  ../cups/libcups.a(http-support.o): In function `_httpResolveURI':
  ---
  
  Let's reflect this fact.
  
  2. Bump PORTREVISION for print/cups-client, it's default options and dependencies
  were changed.
  
  PR:		ports/195743
  Submitted by:	O. Hartmann <ohartman at zedat.fu-berlin.de>
  Discussed at:	ports@
  Tested by:	O. Hartmann <ohartman at zedat.fu-berlin.de>

Modified:
  head/print/cups-base/Makefile

Modified: head/print/cups-base/Makefile
==============================================================================
--- head/print/cups-base/Makefile	Sun Jan  4 13:43:26 2015	(r376232)
+++ head/print/cups-base/Makefile	Sun Jan  4 13:50:41 2015	(r376233)
@@ -55,9 +55,12 @@ OPTIONS_SINGLE_SSL=	GNUTLS OPENSSL
 OPTIONS_DEFAULT=	OPENSSL
 OPTIONS_SUB=		yes
 .if defined(CUPS_CLIENT)
-PORTREVISION=	3
+PORTREVISION=	4
 LICENSE=	LGPL21
 CUPS_SUFFIX=	-client
+OPTIONS_RADIO=		ZEROCONF
+OPTIONS_RADIO_ZEROCONF=	AVAHI MDNSRESPONDER
+OPTIONS_DEFAULT+=	MDNSRESPONDER
 .elif defined(CUPS_IMAGE)
 PORTREVISION=	3
 CUPS_SUFFIX=	-image
@@ -165,21 +168,6 @@ CONFIGURE_ARGS+=	--enable-libpaper
 LIB_DEPENDS+=		libpaper.so:${PORTSDIR}/print/libpaper
 . endif
 
-. if ${PORT_OPTIONS:MMDNSRESPONDER}
-LIB_DEPENDS+=		libdns_sd.so:${PORTSDIR}/net/mDNSResponder
-CONFIGURE_ARGS+=	--with-dnssd-includes=${LOCALBASE}/include
-CONFIGURE_ARGS+=	--disable-avahi
-SUB_LIST+=		ZEROCONF="mdnsd"
-. elif ${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 ${PORT_OPTIONS:MPAM}
 CONFIGURE_ARGS+=	--enable-pam
 . else
@@ -211,6 +199,25 @@ CONFIGURE_ARGS+=	--with-icondir=${PREFIX
 SUB_FILES+=	ulpt-cupsd.conf ulpt-cupsd.sh
 .endif
 
+.if !defined(CUPS_IMAGE)
+. if ${PORT_OPTIONS:MMDNSRESPONDER}
+LIB_DEPENDS+=		libdns_sd.so:${PORTSDIR}/net/mDNSResponder
+CONFIGURE_ARGS+=	--enable-dnssd
+CONFIGURE_ARGS+=	--with-dnssd-includes=${LOCALBASE}/include
+CONFIGURE_ARGS+=	--disable-avahi
+SUB_LIST+=		ZEROCONF="mdnsd"
+. elif ${PORT_OPTIONS:MAVAHI}
+CONFIGURE_ARGS+=	--enable-avahi
+CONFIGURE_ARGS+=	--disable-dnssd
+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
+.endif
+
 .if ${OSVERSION} < 1000036 && ${ARCH} == i386
 LIBS+=		-lssp_nonshared
 .endif


More information about the svn-ports-all mailing list