ngrep and libpcap from ports

Jeremie Le Hen jeremie at le-hen.org
Fri Jul 22 15:01:36 GMT 2005


Hi Edwin,

I dare to write this small patch because I fail to build the ngrep
port when the libpcap port is installe.  The configure fails with the
following message :
%%%
    checking for a complete set of pcap headers...
    
    more than one set found in:
    /usr/local/include
    /usr/include

    please wipe out all unused pcap installations
%%%

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.

Thanks.
Regards,
-- 
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/net/ngrep/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- Makefile	24 Feb 2005 06:28:20 -0000	1.18
+++ Makefile	22 Jul 2005 14:50:24 -0000
@@ -31,6 +31,11 @@
 
 .include <bsd.port.pre.mk>
 
+.if exists(${PREFIX}/include/pcap.h)
+CONFIGURE_ARGS+=--with-pcap-includes=${PREFIX}/include
+LIB_DEPENDS=	pcap.2:${PORTSDIR}/net/libpcap
+.endif
+
 post-install:
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}


More information about the freebsd-ports mailing list