- Update to 1.1.1. It now installs libpcap.so.1 instead of libpcap.so.3.
This commit is contained in:
parent
178348f2a4
commit
d321ca6382
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=252405
@ -6,17 +6,13 @@
|
||||
#
|
||||
|
||||
PORTNAME= libpcap
|
||||
PORTVERSION= 1.0.0
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 1.1.1
|
||||
CATEGORIES= net ipv6
|
||||
MASTER_SITES= http://www.tcpdump.org/release/
|
||||
DISTNAME= ${PORTNAME}-${PORTVERSION}
|
||||
|
||||
MAINTAINER= wxs@FreeBSD.org
|
||||
COMMENT= Ubiquitous network traffic capture library
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
||||
|
||||
MAKE_JOBS_SAFE= yes
|
||||
GNU_CONFIGURE= yes
|
||||
USE_GMAKE= yes
|
||||
@ -96,16 +92,20 @@ MLINKS= pcap_datalink_val_to_name.3 \
|
||||
pcap_setnonblock.3 pcap_getnonblock.3
|
||||
|
||||
PLIST_FILES+= bin/pcap-config \
|
||||
include/pcap/bluetooth.h \
|
||||
include/pcap/bpf.h \
|
||||
include/pcap/ipnet.h \
|
||||
include/pcap/namedb.h \
|
||||
include/pcap/pcap.h \
|
||||
include/pcap/sll.h \
|
||||
include/pcap/usb.h \
|
||||
include/pcap/vlan.h \
|
||||
include/pcap.h \
|
||||
include/pcap-namedb.h \
|
||||
include/pcap-bpf.h \
|
||||
lib/libpcap.a \
|
||||
lib/libpcap.so.3 \
|
||||
lib/libpcap.so.1 \
|
||||
lib/libpcap.so.${PORTVERSION} \
|
||||
lib/libpcap.so
|
||||
PLIST_DIRS+= include/pcap
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (libpcap-1.0.0.tar.gz) = 9ad1358c5dec48456405eac197a46d3d
|
||||
SHA256 (libpcap-1.0.0.tar.gz) = a214c4e1d7e22a758f66fe1d08f0ce41c3ba801a4c13dd1188e1e38288ac73c0
|
||||
SIZE (libpcap-1.0.0.tar.gz) = 524273
|
||||
MD5 (libpcap-1.1.1.tar.gz) = 1bca27d206970badae248cfa471bbb47
|
||||
SHA256 (libpcap-1.1.1.tar.gz) = 508cca15547e55d1318498b838456a21770c450beb2dc7d7d4a96d90816e5a85
|
||||
SIZE (libpcap-1.1.1.tar.gz) = 581984
|
||||
|
@ -1,73 +1,52 @@
|
||||
--- Makefile.in.orig 2008-10-28 01:26:13.000000000 +0000
|
||||
+++ Makefile.in 2009-04-24 13:38:12.000000000 +0100
|
||||
@@ -311,22 +311,20 @@
|
||||
Win32/Src/inet_net.c \
|
||||
Win32/Src/inet_pton.c
|
||||
|
||||
-all: libpcap.a pcap-config
|
||||
+all: libpcap.a libpcap.so.3 pcap-config
|
||||
|
||||
libpcap.a: $(OBJ)
|
||||
@rm -f $@
|
||||
$(AR) rc $@ $(OBJ) $(LIBS)
|
||||
$(RANLIB) $@
|
||||
|
||||
-shared: libpcap.$(DYEXT)
|
||||
-
|
||||
#
|
||||
# XXX - this works with GNU ld, but won't necessarily work with native
|
||||
# ld on, for example, various SVR4-flavored platforms, or Digital UNIX.
|
||||
#
|
||||
-libpcap.so: $(OBJ)
|
||||
+libpcap.so.3: $(OBJ)
|
||||
@rm -f $@
|
||||
- $(CC) -shared -Wl,-soname,$@.1 -o $@.`cat $(srcdir)/VERSION` $(OBJ) $(DAGLIBS)
|
||||
+ $(CC) -shared -Wl,-x -o libpcap.so.3 -Wl,-soname,libpcap.so.3 `lorder $(OBJ) | tsort -q` $(DAGLIBS)
|
||||
|
||||
#
|
||||
# The following rule succeeds, but the result is untested.
|
||||
@@ -416,6 +414,8 @@
|
||||
install: libpcap.a pcap-config
|
||||
[ -d $(DESTDIR)$(libdir) ] || \
|
||||
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
|
||||
+ $(INSTALL_DATA) libpcap.so.3 $(DESTDIR)$(libdir)/libpcap.so.3
|
||||
+ ln -fs $(DESTDIR)$(libdir)/libpcap.so.3 $(DESTDIR)$(libdir)/libpcap.so
|
||||
$(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
|
||||
$(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
|
||||
[ -d $(DESTDIR)$(includedir) ] || \
|
||||
@@ -445,31 +445,15 @@
|
||||
$(DESTDIR)$(includedir)/pcap-bpf.h
|
||||
$(INSTALL_DATA) $(srcdir)/pcap-namedb.h \
|
||||
$(DESTDIR)$(includedir)/pcap-namedb.h
|
||||
--- ./Makefile.in.orig 2010-03-11 20:56:53.000000000 -0500
|
||||
+++ ./Makefile.in 2010-03-31 20:47:19.278559746 -0400
|
||||
@@ -517,43 +517,19 @@
|
||||
$(DESTDIR)$(includedir)/$$i; done
|
||||
[ -d $(DESTDIR)$(bindir) ] || \
|
||||
(mkdir -p $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir))
|
||||
- $(INSTALL_PROGRAM) pcap-config $(DESTDIR)$(bindir)/pcap-config
|
||||
+ $(INSTALL_DATA) pcap-config $(DESTDIR)$(bindir)/pcap-config
|
||||
+ chmod 755 $(DESTDIR)$(bindir)/pcap-config
|
||||
for i in $(MAN1); do \
|
||||
$(INSTALL_DATA) $(srcdir)/$$i \
|
||||
$(DESTDIR)$(mandir)/man1/$$i; done
|
||||
for i in $(MAN3PCAP); do \
|
||||
for i in $(MAN3PCAP_NOEXPAND); do \
|
||||
+ j=$$(echo $$i | sed -e 's/3pcap/3/') ; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$i \
|
||||
- $(DESTDIR)$(mandir)/man3/$$i; done
|
||||
+ $(DESTDIR)$(mandir)/man3/$$j; done
|
||||
for i in $(MAN3PCAP_EXPAND:.in=); do \
|
||||
+ j=$$(echo $$i | sed -e 's/3pcap/3/') ; \
|
||||
$(INSTALL_DATA) $$i \
|
||||
- $(DESTDIR)$(mandir)/man3/$$i; done
|
||||
- rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
|
||||
- ln $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_name.3pcap \
|
||||
- $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
|
||||
- rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
|
||||
- ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \
|
||||
- $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
|
||||
- rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
|
||||
- ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \
|
||||
- $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
|
||||
- rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
|
||||
- ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \
|
||||
- $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
|
||||
- rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
|
||||
- ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \
|
||||
- $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
|
||||
- rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
|
||||
- ln $(DESTDIR)$(mandir)/man3/pcap_major_version.3pcap \
|
||||
- $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
|
||||
- rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
|
||||
- ln $(DESTDIR)$(mandir)/man3/pcap_next_ex.3pcap \
|
||||
- $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
|
||||
- rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
|
||||
- ln $(DESTDIR)$(mandir)/man3/pcap_open_offline.3pcap \
|
||||
- $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
|
||||
- rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
|
||||
- ln $(DESTDIR)$(mandir)/man3/pcap_setnonblock.3pcap \
|
||||
- $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
|
||||
+ $(DESTDIR)$(mandir)/man3/$$j; done
|
||||
for i in $(MANFILE); do \
|
||||
$(INSTALL_DATA) $(srcdir)/`echo $$i | sed 's/.manfile.in/.manfile/'` \
|
||||
$(INSTALL_DATA) `echo $$i | sed 's/.manfile.in/.manfile/'` \
|
||||
$(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
|
||||
|
@ -1,39 +0,0 @@
|
||||
--- ./inet.c.orig 2008-08-31 22:44:54.000000000 -0400
|
||||
+++ ./inet.c 2010-03-01 13:59:26.873317983 -0500
|
||||
@@ -401,10 +401,15 @@
|
||||
pcap_if_t *curdev;
|
||||
char *description = NULL;
|
||||
pcap_addr_t *curaddr, *prevaddr, *nextaddr;
|
||||
+ int s;
|
||||
#ifdef SIOCGIFDESCR
|
||||
struct ifreq ifrdesc;
|
||||
+#ifndef IFDESCRSIZE
|
||||
+#define _IFDESCRSIZE 64
|
||||
+ char ifdescr[_IFDESCRSIZE];
|
||||
+#else
|
||||
char ifdescr[IFDESCRSIZE];
|
||||
- int s;
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
#ifdef SIOCGIFDESCR
|
||||
@@ -413,12 +418,17 @@
|
||||
*/
|
||||
memset(&ifrdesc, 0, sizeof ifrdesc);
|
||||
strlcpy(ifrdesc.ifr_name, name, sizeof ifrdesc.ifr_name);
|
||||
+#ifdef __FreeBSD__
|
||||
+ ifrdesc.ifr_buffer.buffer = ifdescr;
|
||||
+ ifrdesc.ifr_buffer.length = sizeof(ifdescr);
|
||||
+#else
|
||||
ifrdesc.ifr_data = (caddr_t)&ifdescr;
|
||||
+#endif
|
||||
s = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (s >= 0) {
|
||||
if (ioctl(s, SIOCGIFDESCR, &ifrdesc) == 0 &&
|
||||
- strlen(ifrdesc.ifr_data) != 0)
|
||||
- description = ifrdesc.ifr_data;
|
||||
+ strlen(ifdescr) != 0)
|
||||
+ description = ifdescr;
|
||||
close(s);
|
||||
}
|
||||
#endif
|
@ -4,6 +4,3 @@ variety of BSD, Linux and UN*X applications.
|
||||
Whilst FreeBSD has a vendor branch import of libpcap in its source tree,
|
||||
the purpose of the port is to provide a means of offering additional,
|
||||
bleeding-edge features which might not make it into the tree.
|
||||
|
||||
Bruce
|
||||
bms@FreeBSD.org
|
||||
|
Loading…
Reference in New Issue
Block a user