ngrep and libpcap from ports

Florent Thoumie flz at xbsd.org
Fri Jul 22 17:46:38 GMT 2005


Le Vendredi 22 juillet 2005 à 19:32 +0200, Jeremie Le Hen a écrit :
> Florent,
> 
> > > This patch will link against the libpcap from ports if it exists.
> > > I'm not sure this is the correct way to write this, feel free to change
> > > it's needed.
> > 
> > 	I wouldn't fix it that way because it would lead to unexpected 
> > 	behavior.
> > 
> > 	I'd use base pcap includes unless WITH_PORTS_PCAP is defined 
> > 	(which add pcap to LIB_DEPENDS).
> 
> Thanks for your reply.  I'll take it as the way to go it as I'm
> convinced you are far more experienced in ports than I am.
> 
> Here is the updated patch.  Note nevertheless that adding
>     --with-pcap-includes=${PREFIX}/include
> to CONFIGURE_ARGS is required or ngrep configure script will fail
> miserably with the message I showed in my previous mail.
> 
> Regards,

	Still won't work for you (or people who have libpcap installed 
	from ports and doesn't have WITH_PORTS_LIBPCAP).

	Something like this would be more appropriate :

	.if !defined(WITH_PORTS_LIBPCAP)
	# Default behavior
	CONFIGURE_ARGS+= --with-pcap-includes=/usr/include
	.else
	CONFIGURE_ARGS+= --with-pcap-includes=${PREFIX}/include
	LIB_DEPENDS=     pcap.2:${PORTSDIR}/net/libpcap
	.endif

-- 
Florent Thoumie
flz at xbsd.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20050722/69987e82/attachment.bin


More information about the freebsd-ports mailing list