diff options
author | Bruce M Simpson <bms@FreeBSD.org> | 2009-04-24 13:42:54 +0000 |
---|---|---|
committer | Bruce M Simpson <bms@FreeBSD.org> | 2009-04-24 13:42:54 +0000 |
commit | d39eb366b0d77dccdadae326e0cc6aa8e2346e7f (patch) | |
tree | 5ab609c87ef56e0957ce0492b8f8d0f2ce9c6dff /net/tcpdump | |
parent | c93900c42fb1d2abafeabe46ddea92440cc945eb (diff) | |
download | ports-d39eb366b0d77dccdadae326e0cc6aa8e2346e7f.tar.gz ports-d39eb366b0d77dccdadae326e0cc6aa8e2346e7f.zip |
Notes
Diffstat (limited to 'net/tcpdump')
-rw-r--r-- | net/tcpdump/Makefile | 85 | ||||
-rw-r--r-- | net/tcpdump/distinfo | 6 | ||||
-rw-r--r-- | net/tcpdump/files/pkg-message-base | 7 | ||||
-rw-r--r-- | net/tcpdump/pkg-plist | 1 |
4 files changed, 36 insertions, 63 deletions
diff --git a/net/tcpdump/Makefile b/net/tcpdump/Makefile index eafb1c8d5eb7..40c1f4c62bc3 100644 --- a/net/tcpdump/Makefile +++ b/net/tcpdump/Makefile @@ -6,52 +6,27 @@ # PORTNAME= tcpdump -PORTVERSION= 3.9.7 +PORTVERSION= 4.0.0 CATEGORIES= net ipv6 -MASTER_SITES= http://www.tcpdump.org/release/ \ - http://www.icrew.org/mirror/tcp_dump/tcpdump_3_9/ +MASTER_SITES= http://www.tcpdump.org/release/ DISTNAME= ${PORTNAME}-${PORTVERSION} MAINTAINER= bms@FreeBSD.org COMMENT= Ubiquitous network traffic analysis tool -# TODO: Add strict sanity check that we're compiling against a -# version of libpcap with which this tcpdump release is compatible. -# -.if defined(TCPDUMP_OVERWRITE_BASE) || !defined(WITH_LIBPCAP_BASE) -BUILD_DEPENDS= ${LOCALBASE}/lib/libpcap.a:${PORTSDIR}/net/libpcap -.endif - -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} - -MAN1= tcpdump.1 +LIB_DEPENDS= pcap.3:${PORTSDIR}/net/libpcap \ + smi.2:${PORTSDIR}/net-mgmt/libsmi GNU_CONFIGURE= yes - -.if defined(TCPDUMP_OVERWRITE_BASE) -PREFIX= /usr -PKGNAMESUFFIX= -overwrite-base -MANPREFIX= ${PREFIX}/share -PLIST_SUB+= NOTBASE="@comment " -PLIST_SUB+= BASE="" -PKGMESSAGE= ${FILESDIR}/pkg-message-base -.else -PLIST_SUB+= BASE="@comment " -PLIST_SUB+= NOTBASE="" -.endif +USE_GMAKE= yes # Compilation Options # -# Special options: -# TCPDUMP_OVERWRITE_BASE Overwrite the base system's tcpdump binary. -# Implies the use of the libpcap port. -# # User-definable switches: # WITHOUT_CRYPTO Build without IPSEC or TCPMD5 decryption. # WITHOUT_IPV6 Build without IPV6 support. -# WITH_LIBPCAP_BASE Use libpcap from the base system instead of ports. # -# Defaults: WITHOUT_LIBPCAP_BASE WITH_CRYPTO WITH_IPV6 +# Defaults: WITH_CRYPTO WITH_IPV6 # The --without-crypto flag needs to be explicitly specified. The # configure script gets confused if you specify --with-crypto and @@ -67,38 +42,44 @@ USE_OPENSSL= defined CONFIGURE_ARGS+= --enable-ipv6 .endif -# When compiling against the port, it's necessary to force the -# port to look for libpcap in ${LOCALPCAPBASE} first, for both -# the configure and build steps. -# -.if defined(TCPDUMP_OVERWRITE_BASE) || !defined(WITH_LIBPCAP_BASE) -LOCALPCAPBASE= ${LOCALBASE} -CONFIGURE_ENV+= CFLAGS="-L${LOCALPCAPBASE}/lib" -.else -LOCALPCAPBASE= /usr -.endif +CONFIGURE_ARGS+= --disable-smb -LOCALPCAPFILES= include/pcap.h include/pcap-namedb.h include/pcap-bpf.h \ - lib/libpcap.a -WRKPCAPDIR= ${WRKDIR}/libpcap-0.9.7 - -.include <bsd.port.pre.mk> +MAN1= tcpdump.1 +PLIST_FILES= sbin/tcpdump +# +# Force the use of the shared library from the libpcap port. +# Don't rely on pcap-config, it is still not ready for prime time. +# # When building tcpdump against a particular pcap version, it expects to # find a built, untarred source tree in the parent of the work tree. # Build a symlink farm which points to the installed versions of the # required files, in order to produce the files it wants without # requiring that the libpcap distfile be untarred. +# Furthermore, tcpdump's aclocal.m4 only looks for the static version +# of this library, so we need to perform another substitution. # +CFLAGS+= "-I${LOCALBASE}/include" +LDFLAGS+= "-L${LOCALBASE}/lib" + +.include <bsd.port.pre.mk> + +LIBPCAP_FORCE_VER= libpcap-1.0.0 +LOCALPCAPFILES= include/pcap.h include/pcap-namedb.h include/pcap-bpf.h \ + include/pcap lib/libpcap.a +WRKPCAPDIR= ${WRKDIR}/${LIBPCAP_FORCE_VER} + pre-configure: - ${MKDIR} ${WRKPCAPDIR} + @${MKDIR} ${WRKPCAPDIR} .for i in ${LOCALPCAPFILES} - ${LN} -s ${LOCALPCAPBASE}/$i ${WRKPCAPDIR} + @${LN} -s ${LOCALBASE}/$i ${WRKPCAPDIR} .endfor -.if defined(TCPDUMP_OVERWRITE_BASE) -post-install: - ${CAT} ${PKGMESSAGE} -.endif +post-configure: + @${REINPLACE_CMD} -e "s,\./\.\./${LIBPCAP_FORCE_VER}/libpcap\.a,${LOCALBASE}/lib/libpcap.so.3," ${WRKSRC}/Makefile + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/tcpdump ${PREFIX}/sbin + ${INSTALL_MAN} ${WRKSRC}/tcpdump.1 ${MAN1PREFIX}/man/man1 .include <bsd.port.post.mk> diff --git a/net/tcpdump/distinfo b/net/tcpdump/distinfo index 30c31b7f64b0..da51a249d524 100644 --- a/net/tcpdump/distinfo +++ b/net/tcpdump/distinfo @@ -1,3 +1,3 @@ -MD5 (tcpdump-3.9.7.tar.gz) = 2aacf4dc9a3bc500a8b4f3887a32cdd5 -SHA256 (tcpdump-3.9.7.tar.gz) = 09f1daece22a3555f1ca1f9779caf36357cc8d5b9ad1964606093c7e884e0da4 -SIZE (tcpdump-3.9.7.tar.gz) = 873866 +MD5 (tcpdump-4.0.0.tar.gz) = b22ca72890df2301d922c9f2d17867f9 +SHA256 (tcpdump-4.0.0.tar.gz) = 5fe99efe0274b5764c9974417c96a38b5f94e21096d8a94cc1fa172a42035284 +SIZE (tcpdump-4.0.0.tar.gz) = 708774 diff --git a/net/tcpdump/files/pkg-message-base b/net/tcpdump/files/pkg-message-base deleted file mode 100644 index 8856bffafd42..000000000000 --- a/net/tcpdump/files/pkg-message-base +++ /dev/null @@ -1,7 +0,0 @@ -*************************************** -* You can always reinstall the older * -* tcpdump via the source directory * -* of the base system: * -* $ cd /usr/src/usr.sbin/tcpdump * -* $ make && make install * -*************************************** diff --git a/net/tcpdump/pkg-plist b/net/tcpdump/pkg-plist deleted file mode 100644 index 9b3c0b6e6bcb..000000000000 --- a/net/tcpdump/pkg-plist +++ /dev/null @@ -1 +0,0 @@ -sbin/tcpdump |