[32498] trunk/dports/net/libpcap

ricci at macports.org ricci at macports.org
Fri Jan 4 22:48:10 PST 2008


Revision: 32498
          http://trac.macosforge.org/projects/macports/changeset/32498
Author:   ricci at macports.org
Date:     2008-01-04 22:48:09 -0800 (Fri, 04 Jan 2008)

Log Message:
-----------
Upgrade to 0.9.8
remove unneeded patch files
invert mastersites so we look to the real site first, then macports
make 'port lint' happy
add modelines

Modified Paths:
--------------
    trunk/dports/net/libpcap/Portfile

Added Paths:
-----------
    trunk/dports/net/libpcap/files/patch-Makefile.in.diff

Removed Paths:
-------------
    trunk/dports/net/libpcap/files/patch-Makefile.in
    trunk/dports/net/libpcap/files/patch-VERSION
    trunk/dports/net/libpcap/files/patch-inet.c

Modified: trunk/dports/net/libpcap/Portfile
===================================================================
--- trunk/dports/net/libpcap/Portfile	2008-01-05 06:13:52 UTC (rev 32497)
+++ trunk/dports/net/libpcap/Portfile	2008-01-05 06:48:09 UTC (rev 32498)
@@ -3,8 +3,8 @@
 PortSystem 1.0
 
 name                libpcap
-version             0.9.5
-revision            1
+version             0.9.8
+revision            0
 categories          net
 maintainers         opendarwin.org at darkart.com
 description         Packet Capture library
@@ -14,28 +14,27 @@
                     are accessible through this mechanism.
 homepage            http://www.tcpdump.org/
 platforms           darwin
-master_sites        macports \
-                    ${homepage}release/
-checksums           md5 b0626ad59004fe5767ddd2ce743a2271 \
-                    sha1 3a3b0821f7201b4a72201c69ca2411a3db8a83c3
+master_sites        ${homepage}release/ \
+                    macports
+checksums           md5 5208f24d0328ee7c20b52c43eaa9aa0e \
+                    sha1 11dfe67cfc1c279c7346d626a99ad4ba90621028
 
 configure.args             --mandir=${prefix}/share/man
 # configure.env            CFLAGS="-I. -dynamic -fno-common -DHAVE_CONFIG_H"
 configure.cflags-append    -I. -dynamic -fno-common -DHAVE_CONFIG_H
 
-patchfiles          patch-Makefile.in \
-                    patch-inet.c
+patchfiles          patch-Makefile.in.diff
 
 pre-configure {
     reinplace "s/COMPAT_INFO/-compatibility_version $version -current_version $version/" \
     ${worksrcpath}/Makefile.in
 }
 
-variant ipv6 {
+variant ipv6 description { enable ipv6 support } {
     configure.args-append    --enable-ipv6
 }
 
-variant no_shared {
+variant no_shared description { don't build libpcap.dylib } {
     # configure.env-delete      CFLAGS="-I. -dynamic -fno-common -DHAVE_CONFIG_H"
     configure.cflags-delete     -I. -dynamic -fno-common -DHAVE_CONFIG_H
     patchfiles-delete           patch-Makefile.in
@@ -45,3 +44,5 @@
     }
 }
 
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+# vi: set fenc=utf-8 filetype=tcl et sw=4 ts=4 sts=4: #

Deleted: trunk/dports/net/libpcap/files/patch-Makefile.in
===================================================================
--- trunk/dports/net/libpcap/files/patch-Makefile.in	2008-01-05 06:13:52 UTC (rev 32497)
+++ trunk/dports/net/libpcap/files/patch-Makefile.in	2008-01-05 06:48:09 UTC (rev 32498)
@@ -1,40 +0,0 @@
---- Makefile.in	2003-12-14 17:35:03.000000000 -0800
-+++ Makefile.in	2005-08-12 11:49:13.000000000 -0700
-@@ -95,9 +95,9 @@
- TAGFILES = \
- 	$(SRC) $(HDR) $(TAGHDR)
- 
--CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c
-+CLEANFILES = $(OBJ) libpcap.a libpcap.$(DYEXT) $(GENSRC) $(GENHDR) lex.yy.c
- 
--all: libpcap.a
-+all: libpcap.a shared
- 
- libpcap.a: $(OBJ)
- 	@rm -f $@
-@@ -116,11 +116,11 @@
- 
- # the following rule succeeds, but the result is untested.
- libpcap.dylib: $(OBJ)
--	rm -f libpcap*.dylib
--	$(CC) -dynamiclib -undefined error -o libpcap.`cat VERSION`.dylib $(OBJ) \
--		-install_name $(libdir)/libpcap.0.dylib -compatibility_version `cat VERSION` \
--		-current_version `cat VERSION`
--
-+	rm -f $@
-+	$(CC) -dynamiclib -o libpcap.`cat VERSION`.dylib \
-+		-install_name $(libdir)/libpcap.0.dylib \
-+		-compatibility_version 1.0.0 -current_version `cat VERSION` \
-+		$(OBJ) $(LIBS)
- 
- scanner.c: $(srcdir)/scanner.l
- 	@rm -f $@
-@@ -170,7 +170,7 @@
- bpf_filter.o: bpf_filter.c
- 	$(CC) $(CFLAGS) -c bpf_filter.c
- 
--install: libpcap.a 
-+install: libpcap.a install-shared
- 	[ -d $(DESTDIR)$(libdir) ] || \
- 	    (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
- 	$(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a

Copied: trunk/dports/net/libpcap/files/patch-Makefile.in.diff (from rev 32496, trunk/dports/net/libpcap/files/patch-Makefile.in)
===================================================================
--- trunk/dports/net/libpcap/files/patch-Makefile.in.diff	                        (rev 0)
+++ trunk/dports/net/libpcap/files/patch-Makefile.in.diff	2008-01-05 06:48:09 UTC (rev 32498)
@@ -0,0 +1,40 @@
+--- Makefile.in	2003-12-14 17:35:03.000000000 -0800
++++ Makefile.in	2005-08-12 11:49:13.000000000 -0700
+@@ -95,9 +95,9 @@
+ TAGFILES = \
+ 	$(SRC) $(HDR) $(TAGHDR)
+ 
+-CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c
++CLEANFILES = $(OBJ) libpcap.a libpcap.$(DYEXT) $(GENSRC) $(GENHDR) lex.yy.c
+ 
+-all: libpcap.a
++all: libpcap.a shared
+ 
+ libpcap.a: $(OBJ)
+ 	@rm -f $@
+@@ -116,11 +116,11 @@
+ 
+ # the following rule succeeds, but the result is untested.
+ libpcap.dylib: $(OBJ)
+-	rm -f libpcap*.dylib
+-	$(CC) -dynamiclib -undefined error -o libpcap.`cat VERSION`.dylib $(OBJ) \
+-		-install_name $(libdir)/libpcap.0.dylib -compatibility_version `cat VERSION` \
+-		-current_version `cat VERSION`
+-
++	rm -f $@
++	$(CC) -dynamiclib -o libpcap.`cat VERSION`.dylib \
++		-install_name $(libdir)/libpcap.0.dylib \
++		-compatibility_version 1.0.0 -current_version `cat VERSION` \
++		$(OBJ) $(LIBS)
+ 
+ scanner.c: $(srcdir)/scanner.l
+ 	@rm -f $@
+@@ -170,7 +170,7 @@
+ bpf_filter.o: bpf_filter.c
+ 	$(CC) $(CFLAGS) -c bpf_filter.c
+ 
+-install: libpcap.a 
++install: libpcap.a install-shared
+ 	[ -d $(DESTDIR)$(libdir) ] || \
+ 	    (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
+ 	$(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a

Deleted: trunk/dports/net/libpcap/files/patch-VERSION
===================================================================
--- trunk/dports/net/libpcap/files/patch-VERSION	2008-01-05 06:13:52 UTC (rev 32497)
+++ trunk/dports/net/libpcap/files/patch-VERSION	2008-01-05 06:48:09 UTC (rev 32498)
@@ -1,5 +0,0 @@
---- VERSION	2005-07-11 13:09:47.000000000 -0700
-+++ VERSION	2005-08-12 11:28:26.000000000 -0700
-@@ -1 +1 @@
--0.9.2
-+0.9.3

Deleted: trunk/dports/net/libpcap/files/patch-inet.c
===================================================================
--- trunk/dports/net/libpcap/files/patch-inet.c	2008-01-05 06:13:52 UTC (rev 32497)
+++ trunk/dports/net/libpcap/files/patch-inet.c	2008-01-05 06:48:09 UTC (rev 32498)
@@ -1,60 +0,0 @@
-diff -ru work/libpcap-0.9.5/inet.c work.newpatch/libpcap-0.9.5/inet.c
---- inet.c	2006-01-21 02:46:13.000000000 -0800
-+++ inet.c	2007-03-29 21:59:38.000000000 -0700
-@@ -144,7 +144,55 @@
- 	 * on Solaris; we don't just omit loopback interfaces
- 	 * becaue you *can* capture on loopback interfaces on some
- 	 * OSes.
--	 */
-+	 *
-+	 * We do this check so that interfaces that are
-+	 * supplied by the interface enumeration mechanism
-+	 * we're using but that don't support packet capture
-+	 * aren't included in the list.  Loopback interfaces
-+	 * on Solaris are an example of this; we don't just
-+	 * omit loopback interfaces on all platforms because
-+	 * you *can* capture on loopback interfaces on some
-+	 * OSes.
-+	 *
-+	 * On OS X, we don't do this check if the device
-+	 * name begins with "wlt"; at least some versions
-+	 * of OS X offer monitor mode capturing by having
-+	 * a separate "monitor mode" device for each wireless
-+	 * adapter, rather than by implementing the ioctls
-+	 * that {Free,Net,Open,DragonFly}BSD provide.
-+	 * Opening that device puts the adapter into monitor
-+	 * mode, which, at least for some adapters, causes
-+	 * them to deassociate from the network with which
-+	 * they're associated.
-+	 *
-+	 * Instead, we try to open the corresponding "en"
-+	 * device (so that we don't end up with, for users
-+	 * without sufficient privilege to open capture
-+	 * devices, a list of adapters that only includes
-+	 * the wlt devices).
-+	 */
-+#ifdef __APPLE__
-+	if (strncmp(name, "wlt", 3) == 0) {
-+		char *en_name;
-+		size_t en_name_len;
-+
-+		/*
-+		 * Try to allocate a buffer for the "en"
-+		 * device's name.
-+		 */
-+		en_name_len = strlen(name) - 1;
-+		en_name = malloc(en_name_len + 1);
-+		if (en_name == NULL) {
-+			(void)snprintf(errbuf, PCAP_ERRBUF_SIZE,
-+				"malloc: %s", pcap_strerror(errno));
-+			return (-1);
-+		}
-+		strlcpy(en_name, "en", (en_name_len + 1));
-+		strlcat(en_name, (name + 3), (en_name_len + 1));
-+		p = pcap_open_live(en_name, 68, 0, 0, errbuf);
-+		free(en_name);
-+		} else
-+#endif /* __APPLE */	
- 	p = pcap_open_live(name, 68, 0, 0, errbuf);
- 	if (p == NULL) {
- 		/*

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080104/73b89123/attachment.html


More information about the macports-changes mailing list