Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Oct 2013 15:30:33 +0000 (UTC)
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r331782 - head/dns/dnsmasq
Message-ID:  <201310271530.r9RFUXHJ020318@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mandree
Date: Sun Oct 27 15:30:32 2013
New Revision: 331782
URL: http://svnweb.freebsd.org/changeset/ports/331782

Log:
  Assorted fixes to dependencies on various build options,
  particularly with NLS enabled when libidn was built without NLS.
  
  While here, group OPTIONS and clean up things a bit, and print
  configuration of port and libidn port for debugging.
  
  The particular build failure was
  Reported by:	Yuri Vorobyev

Modified:
  head/dns/dnsmasq/Makefile

Modified: head/dns/dnsmasq/Makefile
==============================================================================
--- head/dns/dnsmasq/Makefile	Sun Oct 27 15:17:05 2013	(r331781)
+++ head/dns/dnsmasq/Makefile	Sun Oct 27 15:30:32 2013	(r331782)
@@ -21,13 +21,17 @@ SUB_FILES=	pkg-message
 
 USE_XZ=		yes
 CFLAGS+=	-Wall -Wno-unused-value
-MAKE_ARGS=	CC="${CC}" CFLAGS="${CFLAGS}" PREFIX="${PREFIX}" COPTS="${CFLAGS}" LIBS="${LDFLAGS}" RPM_OPT_FLAGS="${CPPFLAGS}"
+CPPFLAGS+=	-I${LOCALBASE}/include
+MAKE_ARGS=	CC="${CC}" CFLAGS="${CFLAGS}" PREFIX="${PREFIX}" LIBS="${LDFLAGS}" RPM_OPT_FLAGS="${CPPFLAGS}"
 
-OPTIONS_DEFINE=		IPV6 DBUS NLS IDN LUA
+OPTIONS_DEFINE=		IPV6 DBUS LUA
 OPTIONS_DEFAULT=	IPV6 NLS
 OPTIONS_EXCLUDE+=	EXAMPLES
-NLS_DESC=	National Language Support (NLS, enables IDN)
-IDN_DESC=	International Domain Names (IDN) WITHOUT NLS
+OPTIONS_RADIO=		INTL
+OPTIONS_RADIO_INTL=	IDN NLS
+INTL_DESC=	Internationalization Support Level
+NLS_DESC=	National Language and Int'l Domain Names support (IDN + NLS)
+IDN_DESC=	International Domain Names support WITHOUT full NLS (IDN)
 LUA_DESC=	Support lease-change scripts in LUA
 USES=		shebangfix
 SHEBANG_FILES=	contrib/dynamic-dnsmasq/dynamic-dnsmasq.pl \
@@ -40,27 +44,34 @@ CFLAGS+=	-DNO_IPV6
 .endif
 
 .if ${PORT_OPTIONS:MNLS}
-USES+=		pkgconfig gettext
+USES+=		pkgconfig gettext iconv gmake
 LIB_DEPENDS+=	libidn.so:${PORTSDIR}/dns/libidn
 PLIST_SUB+=	NLS=""
 ALL_TARGET=	all-i18n
-USES+=		gmake
+_intllibs=	-lintl
 .else
+_intllibs=
 PLIST_SUB+=	NLS="@comment "
 .if ${PORT_OPTIONS:MIDN}
+USES+=		iconv
 CFLAGS+=	-DHAVE_IDN
 LIB_DEPENDS+=	libidn.so:${PORTSDIR}/dns/libidn
+_intllibs+=	-lidn
 .endif
 .endif
 
 .if ${PORT_OPTIONS:MDBUS}
 LIB_DEPENDS+=	libdbus-1.so:${PORTSDIR}/devel/dbus
 USES+=		pkgconfig
+CPPFLAGS+=	`pkg-config --cflags dbus-1`
 CFLAGS+=	-DHAVE_DBUS
+LDFLAGS+=	`pkg-config --libs dbus-1`
 .endif
 
 .if ${PORT_OPTIONS:MLUA}
+CPPFLAGS+=	-I${LUA_INCDIR}
 CFLAGS+=	-DHAVE_LUASCRIPT
+LDFLAGS+=	-L${LUA_LIBDIR} -llua
 USE_LUA=	5.1
 .endif
 
@@ -68,15 +79,17 @@ USE_RC_SUBR=	dnsmasq
 
 .include <bsd.port.pre.mk>
 
+LDFLAGS+=	-L${LOCALBASE}/lib ${_intllibs} ${ICONV_LIB}
+
 post-patch:
 	${REINPLACE_CMD} -e "s/lua5\.1/lua-5.1/" ${WRKSRC}/Makefile
 
-pre-configure:
-	@:
+pre-configure: pretty-print-config
+	@${PRINTF} "dns/libidn config: " ; ${MAKE} -C ${PORTSDIR}/dns/libidn pretty-print-config
 .if ${PORT_OPTIONS:MIDN}
 .if empty(PORT_OPTIONS:MNLS)
 	@if ${OBJDUMP} -p ${LOCALBASE}/lib/libidn.so \
-		| ${EGREP} -q "NEEDED[[:space:]]+lib(intl|iconv)\.so" ; \
+		| ${EGREP} -q 'NEEDED[[:space:]]+libintl\.so' ; \
 	then ${ECHO} ; ${ECHO} 'WARNING: dns/libidn was compiled with NLS support!' ; \
 	${ECHO} 'Recompile libidn WITHOUT_NLS to get rid of NLS dependencies.' ; ${ECHO} ; \
 	fi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310271530.r9RFUXHJ020318>