[93240] trunk/dports/net/driftnet

ryandesign at macports.org ryandesign at macports.org
Fri May 18 01:28:25 PDT 2012


Revision: 93240
          https://trac.macports.org/changeset/93240
Author:   ryandesign at macports.org
Date:     2012-05-18 01:28:25 -0700 (Fri, 18 May 2012)
Log Message:
-----------
driftnet: use giflib instead of libungif (#17193); resolve endian issues hopefully; simplify build.args and patches; install docs; add more checksum types

Modified Paths:
--------------
    trunk/dports/net/driftnet/Portfile
    trunk/dports/net/driftnet/files/patch-Makefile

Added Paths:
-----------
    trunk/dports/net/driftnet/files/patch-img.h

Modified: trunk/dports/net/driftnet/Portfile
===================================================================
--- trunk/dports/net/driftnet/Portfile	2012-05-18 06:26:07 UTC (rev 93239)
+++ trunk/dports/net/driftnet/Portfile	2012-05-18 08:28:25 UTC (rev 93240)
@@ -5,16 +5,12 @@
 
 name                driftnet
 version             0.1.6
-revision            3
+revision            4
 categories          net
 platforms           darwin
 maintainers         nomaintainer
 license             GPL-2+
 
-# patch-Makefile hardcodes -DDRIFTNET_BIG_ENDIAN and just changing that to
-# -DDRIFTNET_LITTLE_ENDIAN does not make it work for me on Intel
-supported_archs     ppc ppc64
-
 description         Watch the pictures go by on your net
 
 long_description    Inspired by EtherPEG, Driftnet is a program which \
@@ -26,25 +22,20 @@
 master_sites        http://www.ex-parrot.com/~chris/driftnet/ \
                     http://www.vanheusden.com/mirrors/
 
-#                   Driftnet doesn't use a configure file, so the Makefile \
-#                   has to be rudely coerced to work properly.
+checksums           md5     8e11d77770452f97bb3c23f510489815 \
+                    rmd160  01057f3cb992faa537a8b188e116c6f21016cfac \
+                    sha256  dbdf7ead3ae14b109f88c86dedeb7524be8c257aa773a781891216f013373d6d
 
-#user_notes         This program is lots of fun to use at a conference \
-#                   where wireless networking is available. I did the port \
-#                   at IETF 57 :-)
-
-checksums           md5     8e11d77770452f97bb3c23f510489815
-
 depends_build       port:makedepend
 
-# really needs libungif, giflib won't do
 depends_lib         port:jpeg \
                     port:libpcap \
-                    port:libungif \
+                    port:giflib \
                     port:gtk1
 
 patchfiles          patch-driftnet.h \
                     patch-driftnet.c \
+                    patch-img.h \
                     patch-media.c \
                     patch-Makefile
 
@@ -54,14 +45,13 @@
 
 build.target
 
-build.args          CC="${configure.cc} [get_canonical_archflags]" \
-                    CFLAGS="-I${prefix}/include \
-                    -I${prefix}/lib/glib/include \
-                    -I${prefix}/include/glib-1.2 \
-                    -I${prefix}/include/gtk-1.2 \
-                    -DDRIFTNET_VERSION='\\"${version}\\"'"
+build.args          CC="${configure.cc} [get_canonical_archflags cc]"
 
 destroot {
     xinstall ${worksrcpath}/${name} ${destroot}${prefix}/bin
     xinstall -m 644 ${worksrcpath}/${name}.1 ${destroot}${prefix}/share/man/man1
+    
+    set docdir ${prefix}/share/doc/${name}
+    xinstall -d ${destroot}${docdir}
+    xinstall -m 644 -W ${worksrcpath} CHANGES COPYING CREDITS README TODO ${destroot}${docdir}
 }

Modified: trunk/dports/net/driftnet/files/patch-Makefile
===================================================================
--- trunk/dports/net/driftnet/files/patch-Makefile	2012-05-18 06:26:07 UTC (rev 93239)
+++ trunk/dports/net/driftnet/files/patch-Makefile	2012-05-18 08:28:25 UTC (rev 93240)
@@ -1,43 +1,33 @@
---- Makefile.orig	Mon Jul 14 12:27:56 2003
-+++ Makefile	Mon Jul 14 12:28:38 2003
-@@ -64,7 +64,7 @@
+--- Makefile.orig	2002-07-09 14:26:41.000000000 -0500
++++ Makefile	2012-05-18 02:10:36.000000000 -0500
+@@ -32,7 +32,7 @@
+ # Optional C compiler and linker flags. Typical driftnet builds have support
+ # for displaying captured images in an X window, and need the following flags:
+ CFLAGS  += `gtk-config --cflags`
+-LDLIBS  += -ljpeg -lungif `gtk-config --libs`
++LDLIBS  += -ljpeg -lgif `gtk-config --libs`
  
- SUBDIRS = 
+ # Alternatively, you can build a version of driftnet which can only be used
+ # in `adjunct' mode as the back end for some other image-processing program. To
+@@ -86,8 +86,8 @@
+ endian: endian.c
+ 	$(CC) $(CFLAGS) -o endian endian.c
  
--TXTS = README TODO COPYING CHANGES CREDITS driftnet.1 driftnet.1.in endian.c
-+TXTS = README TODO COPYING CHANGES CREDITS driftnet.1 driftnet.1.in
- SRCS = audio.c mpeghdr.c gif.c img.c jpeg.c png.c driftnet.c image.c \
-        display.c playaudio.c connection.c media.c
- HDRS = img.h driftnet.h mpeghdr.h
-@@ -80,17 +80,12 @@
- driftnet.1: driftnet.1.in Makefile
- 	( echo '.\" DO NOT EDIT THIS FILE-- edit driftnet.1.in instead' ; sed s/@@@VERSION@@@/$(VERSION)/ ) < driftnet.1.in > driftnet.1
- 
--endianness: endian
--	./endian > endianness
- 
--endian: endian.c
--	$(CC) $(CFLAGS) -o endian endian.c
--
 -%.o:    %.c Makefile endianness
 -	$(CC) $(CFLAGS) `cat endianness` -c -o $@ $<
 +%.o:    %.c Makefile
-+	$(CC) $(CFLAGS) -DDRIFTNET_BIG_ENDIAN -c -o $@ $<
++	$(CC) $(CFLAGS) -c -o $@ $<
  
  clean:  nodepend
--	rm -f *~ *.bak *.o core $(BINS) TAGS driftnet.1 endian endianness
-+	rm -f *~ *.bak *.o core $(BINS) TAGS driftnet.1
- 
- tags:
- 	etags *.c *.h
-@@ -102,8 +97,8 @@
+ 	rm -f *~ *.bak *.o core $(BINS) TAGS driftnet.1 endian endianness
+@@ -102,8 +102,8 @@
  	rm -rf driftnet-$(VERSION)
  	mv driftnet-$(VERSION).tar.gz ..
  	
 -depend: endianness
 -	makedepend -- $(CFLAGS) `cat endianness` -- $(SRCS)
 +depend:
-+	makedepend -- $(CFLAGS) -DDRIFTNET_BIG_ENDIAN -- $(SRCS)
++	makedepend -- $(CFLAGS) -- $(SRCS)
  	touch depend
  	rm -f Makefile.bak
  

Added: trunk/dports/net/driftnet/files/patch-img.h
===================================================================
--- trunk/dports/net/driftnet/files/patch-img.h	                        (rev 0)
+++ trunk/dports/net/driftnet/files/patch-img.h	2012-05-18 08:28:25 UTC (rev 93240)
@@ -0,0 +1,20 @@
+--- img.h.orig	2002-07-09 14:26:41.000000000 -0500
++++ img.h	2012-05-18 01:03:25.000000000 -0500
+@@ -26,7 +26,7 @@
+ typedef uint32_t pel;
+ 
+ /* Yuk. GDKRGB expects data in a specific ordering. */
+-#if defined(DRIFTNET_LITTLE_ENDIAN)
++#if __LITTLE_ENDIAN__
+ #   define PEL(r, g, b)        ((pel)((chan)(r) | ((chan)(g) << 8) | ((chan)(b) << 16)))
+ #   define PELA(r, g, b, a)    ((pel)((chan)(r) | ((chan)(g) << 8) | ((chan)(b) << 16) | ((chan)(a) << 24)))
+ 
+@@ -34,7 +34,7 @@
+ #   define GETG(p)             ((chan)(((p) & (pel)0x0000ff00) >>  8))
+ #   define GETB(p)             ((chan)(((p) & (pel)0x00ff0000) >> 16))
+ #   define GETA(p)             ((chan)(((p) & (pel)0xff000000) >> 24))
+-#elif defined(DRIFTNET_BIG_ENDIAN)
++#elif __BIG_ENDIAN__
+ #   define PEL(r, g, b)        ((pel)(((chan)(r) << 24) | ((chan)(g) << 16) | ((chan)(b) << 8)))
+ #   define PELA(r, g, b, a)    ((pel)(((chan)(r) << 24) | ((chan)(g) << 16) | ((chan)(b) << 8) | ((chan)(a))))
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120518/ba218c5c/attachment-0001.html>


More information about the macports-changes mailing list