[114401] trunk/dports/net

ryandesign at macports.org ryandesign at macports.org
Sat Dec 7 05:04:37 PST 2013


Revision: 114401
          https://trac.macports.org/changeset/114401
Author:   ryandesign at macports.org
Date:     2013-12-07 05:04:37 -0800 (Sat, 07 Dec 2013)
Log Message:
-----------
ettercap: rename from ettercap-ng and update to 0.8.0, now hosted at github and built with cmake (#39266); enable +gtk and +plugins variants by default (why not?); add notes; rename default config files so they don't get clobbered on upgrades; install documentation files

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

Added Paths:
-----------
    trunk/dports/net/ettercap/
    trunk/dports/net/ettercap/files/patch-dont-include-pcap-bpf.h.diff
    trunk/dports/net/ettercap/files/patch-safe_free_mem.diff
    trunk/dports/net/ettercap/files/patch-share-etter.conf.v6-darwin.diff
    trunk/dports/net/ettercap/files/patch-src-protocols-ec_tcp.c.diff

Removed Paths:
-------------
    trunk/dports/net/ettercap/files/patch-configure
    trunk/dports/net/ettercap/files/patch-src-Makefile.in
    trunk/dports/net/ettercap/files/patch-src-interfaces-curses-widgets-wdg.h
    trunk/dports/net/ettercap/files/patch-src__protocols__ec_tcp.c

Modified: trunk/dports/net/ettercap/Portfile
===================================================================
--- trunk/dports/net/ettercap-ng/Portfile	2013-12-07 09:47:25 UTC (rev 114397)
+++ trunk/dports/net/ettercap/Portfile	2013-12-07 13:04:37 UTC (rev 114401)
@@ -1,11 +1,14 @@
 # $Id$
 
 PortSystem 1.0
-name             ettercap-ng
-version          0.7.3
-revision         5
+PortGroup           cmake 1.0
+PortGroup           github 1.0
+
+github.setup        Ettercap ettercap 0.8.0 v
 categories       net security
 maintainers      gmail.com:ultrix
+license             GPL-2+
+
 description      multipurpose sniffer/interceptor/logger for switched LAN
 long_description \
     Ettercap is a multi-functional packet sniffer/interceptor/logger \
@@ -14,43 +17,126 @@
     SSH1, and includes features for network and host analysis. Four \
     modes are available: IP Based, MAC Address Based, ARP Based, and \
     PublicARP Based.
-homepage         http://ettercap.sourceforge.net/
+
+homepage            http://ettercap.github.io/ettercap/
 platforms        darwin freebsd
 
-master_sites     sourceforge:ettercap
-distname         ettercap-NG-${version}
-checksums        md5 28fb15cd024162c55249888fe1b97820
+checksums           rmd160  0a790da4d8a801f41b7ed4887e9b944b24d1d7ad \
+                    sha256  0533f2fb41528d2100e36523772b8c43b1ca96c4720364dbb8bc7e665a6c4da9
 
-patchfiles       patch-src-Makefile.in patch-configure \
-                 patch-src-interfaces-curses-widgets-wdg.h \
-                 patch-src__protocols__ec_tcp.c
+depends_build-append \
+                    port:pkgconfig
 
-depends_build    port:pkgconfig
 depends_lib      port:openssl \
                  port:libpcap \
                  port:libnet11 \
-                 port:pcre
+                    port:ncurses \
+                    port:pcre \
+                    port:zlib
 
-configure.args   --disable-gtk \
-                 --disable-plugins \
-                 --with-openssl=${prefix} \
-                 --with-libpcap=${prefix} \
-                 --with-libnet=${prefix} \
-                 --with-libpcre=${prefix} \
-                 --mandir=\\\${prefix}/share/man \
-                 --infodir=\\\${prefix}/share/info
+#patchfiles          patch-src-protocols-ec_tcp.c.diff
+patchfiles          patch-dont-include-pcap-bpf.h.diff \
+                    patch-safe_free_mem.diff
 
-variant gtk {
-    depends_lib-append    port:gtk2
-    configure.args-delete --disable-gtk
-    configure.args-append --enable-gtk
+configure.dir       ${workpath}/build
+build.dir           ${configure.dir}
+
+post-extract {
+    file mkdir ${configure.dir}
 }
 
-variant plugins {
-    depends_lib-append  port:libtool
-    configure.args-delete --disable-plugins
-    configure.args-append --enable-plugins
+set docdir          ${prefix}/share/doc/${subport}
+set sysconfdir      ${prefix}/etc
+set confdir         ${sysconfdir}/${subport}
+set conffiles       {etter.conf etter.dns etter.mdns etter.nbns}
+
+post-patch {
+    reinplace "s|/etc|${prefix}/etc|g" ${worksrcpath}/man/ettercap.8.in
 }
 
-# fails, ticket #26060
-universal_variant no
+configure.args-append \
+                    -DBUNDLED_LIBS=OFF \
+                    -DENABLE_CURSES=ON \
+                    -DENABLE_GTK=OFF \
+                    -DENABLE_IPV6=ON \
+                    -DENABLE_LUA=OFF \
+                    -DENABLE_PDF_DOCS=OFF \
+                    -DENABLE_PLUGINS=OFF \
+                    -DENABLE_SSL=ON \
+                    -DENABLE_TESTS=OFF \
+                    -DINSTALL_SYSCONFDIR=${sysconfdir} \
+                    -DSYSTEM_LIBS=ON \
+                    ${worksrcpath}
+
+# The test suite doesn't do much yet, but to try it:
+#depends_build-append    port:check
+#patchfiles-append       patch-dont-use-librt-on-darwin.diff
+#configure.args-append   -DENABLE_TESTS=ON
+#test.run                yes
+
+post-destroot {
+    foreach f ${conffiles} {
+        move ${destroot}${confdir}/${f} ${destroot}${confdir}/${f}.default
+    }
+
+    xinstall -d ${destroot}${docdir}
+    xinstall -m 644 -W ${worksrcpath} \
+        AUTHORS \
+        CHANGELOG \
+        LICENSE \
+        README \
+        README.BINARIES \
+        README.BUGS \
+        README.OSXLION \
+        THANKS \
+        TODO \
+        TODO.TESTING \
+        ${destroot}${docdir}
+}
+
+post-activate {
+    foreach f ${conffiles} {
+        if {![file exists ${confdir}/${f}]} {
+            copy ${confdir}/${f}.default ${confdir}/${f}
+        }
+    }
+}
+
+variant gtk description {Enable GTK2 support} {
+    depends_lib-append      port:gtk2
+
+    configure.args-replace  -DENABLE_GTK=OFF -DENABLE_GTK=ON
+}
+
+variant plugins description {Enable plugins} {
+    depends_lib-append      port:curl \
+                            port:libtool
+
+    configure.args-replace  -DENABLE_PLUGINS=OFF -DENABLE_PLUGINS=ON
+}
+
+default_variants    +gtk +plugins
+
+notes "
+Without root permission, ettercap will not be able to access your network\
+interfaces, so you probably want to run it as:
+    sudo ettercap
+"
+
+if {[variant_isset gtk]} {
+    notes-append "
+To start the GTK interface, use:
+    sudo ettercap -G
+"
+}
+
+platform darwin {
+    patchfiles-append       patch-share-etter.conf.v6-darwin.diff
+}
+
+platform darwin 11 {
+    notes-append "
+IP forwarding (port forwarding) does not work on OS X 10.7 Lion unless you\
+take special steps. Read ${docdir}/README.OSXLION for more information.
+"
+}

Deleted: trunk/dports/net/ettercap/files/patch-configure
===================================================================
--- trunk/dports/net/ettercap-ng/files/patch-configure	2013-12-07 09:47:25 UTC (rev 114397)
+++ trunk/dports/net/ettercap/files/patch-configure	2013-12-07 13:04:37 UTC (rev 114401)
@@ -1,31 +0,0 @@
---- configure.orig	2005-05-27 17:11:45.000000000 +0200
-+++ configure	2006-03-04 10:15:05.000000000 +0100
-@@ -28243,7 +28243,7 @@
- 
- fi
- 
--   elif test "$OS" != "MACOSX" -a "$OS" != "WINDOWS"; then
-+   elif test "$OS" != "DARWIN" -a "$OS" != "WINDOWS"; then
-       echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
- echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
-       LDFLAGS_store="$LDFLAGS"
-@@ -31725,7 +31725,7 @@
-         owd=`pwd`
-         if cd $withval; then withval=`pwd`; cd $owd; fi
-         LNETINC="-I$withval/include"
--        LNETLIB="-L$withval/lib -L$withval/src -lnet"
-+        LNETLIB="-L$withval/lib -lnet"
-         ac_ec_libnet=$withval
-         echo "$as_me:$LINENO: result: $withval" >&5
- echo "${ECHO_T}$withval" >&6
---- configure.orig	2011-01-27 03:25:41.000000000 +1100
-+++ configure	2011-01-27 03:28:47.000000000 +1100
-@@ -8346,7 +8346,7 @@
-   exit 1
- fi
- gentoo_lt_version="1.5.18"
--gentoo_ltmain_version=`grep '^[:space:]*VERSION=' $ltmain | sed -e 's|^[:space:]*VERSION=||'`
-+gentoo_ltmain_version=`grep '^[[:space:]]*VERSION=' $ltmain | sed -e 's|^[[:space:]]*VERSION=||'`
- if test "$gentoo_lt_version" != "$gentoo_ltmain_version"; then
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6

Added: trunk/dports/net/ettercap/files/patch-dont-include-pcap-bpf.h.diff
===================================================================
--- trunk/dports/net/ettercap/files/patch-dont-include-pcap-bpf.h.diff	                        (rev 0)
+++ trunk/dports/net/ettercap/files/patch-dont-include-pcap-bpf.h.diff	2013-12-07 13:04:37 UTC (rev 114401)
@@ -0,0 +1,26 @@
+Fix "redefinition of 'bpf_program'"
+https://github.com/Ettercap/ettercap/issues/326
+--- include/ec.h.orig	2013-09-11 15:18:45.000000000 -0500
++++ include/ec.h	2013-12-03 10:58:14.000000000 -0600
+@@ -16,6 +16,11 @@
+    #include <windows.h>
+ #endif
+ 
++#ifdef OS_DARWIN
++   #define PCAP_DONT_INCLUDE_PCAP_BPF_H 1
++   #include <net/bpf.h>
++#endif
++
+ #if !defined (__USE_GNU)   /* for memmem(), strsignal(), etc etc... */
+    #define __USE_GNU
+ #endif
+--- src/ec_send.c.orig	2013-09-11 15:18:45.000000000 -0500
++++ src/ec_send.c	2013-12-03 10:58:14.000000000 -0600
+@@ -22,7 +22,6 @@
+ #include <ec.h>
+ 
+ #if defined(OS_DARWIN) || defined(OS_BSD)
+-   #include <net/bpf.h>
+    #include <sys/ioctl.h>
+ #endif
+ 

Added: trunk/dports/net/ettercap/files/patch-safe_free_mem.diff
===================================================================
--- trunk/dports/net/ettercap/files/patch-safe_free_mem.diff	                        (rev 0)
+++ trunk/dports/net/ettercap/files/patch-safe_free_mem.diff	2013-12-07 13:04:37 UTC (rev 114401)
@@ -0,0 +1,99 @@
+Fix "Undefined symbols: '_safe_free_mem'"
+https://github.com/Ettercap/ettercap/issues/344
+https://github.com/eaescob/ettercap/commit/33ac95f78e4f6f067e6bc33b8883b3b7daa896f3
+--- include/ec.h.orig
++++ include/ec.h
+@@ -172,6 +172,9 @@
+ /* exported by ec_main */
+ EC_API_EXTERN void clean_exit(int errcode);
+ 
++/* exported by ec_mem */
++EC_API_EXTERN void safe_free_mem(char **param, int *param_length, char *command);
++
+ 
+ #endif   /*  EC_H */
+ 
+--- src/CMakeLists.txt.orig
++++ src/CMakeLists.txt
+@@ -1,4 +1,5 @@
+ set(EC_SRC
++	ec_mem.c
+         ec_capture.c
+         ec_checksum.c
+         ec_conf.c
+--- /dev/null
++++ src/ec_mem.c
+@@ -0,0 +1,47 @@
++/*
++    ettercap -- global variables handling module
++
++    Copyright (C) ALoR & NaGA
++
++    This program is free software; you can redistribute it and/or modify
++    it under the terms of the GNU General Public License as published by
++    the Free Software Foundation; either version 2 of the License, or
++    (at your option) any later version.
++
++    This program is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++    GNU General Public License for more details.
++
++    You should have received a copy of the GNU General Public License
++    along with this program; if not, write to the Free Software
++    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++
++*/
++
++#include <ec.h>
++
++void safe_free_mem(char **param, int *param_length, char *command);
++
++
++void safe_free_mem(char **param, int *param_length, char *command)
++{
++   int k;
++
++   SAFE_FREE(command);
++        for(k= 0; k < (*param_length); ++k)
++                SAFE_FREE(param[k]);
++        SAFE_FREE(param);
++}
++
++
++
++
++
++
++
++
++/* EOF */
++
++// vim:ts=3:expandtab
++
+--- src/os/ec_linux.c.orig
++++ src/os/ec_linux.c
+@@ -31,7 +31,6 @@
+ static void restore_ip_forward(void);
+ u_int16 get_iface_mtu(const char *iface);
+ void disable_interface_offload(void);
+-void safe_free_mem(char **param, int *param_length, char *command);
+ 
+ /*******************************************/
+ 
+@@ -133,15 +132,6 @@ u_int16 get_iface_mtu(const char *iface)
+    return mtu;
+ }
+ 
+-void safe_free_mem(char **param, int *param_length, char *command)
+-{
+-   int k;
+-
+-   SAFE_FREE(command);
+-	for(k= 0; k < (*param_length); ++k)
+-		SAFE_FREE(param[k]);
+-	SAFE_FREE(param);
+-}
+ 
+ /*
+  * disable segmentation offload on interface

Added: trunk/dports/net/ettercap/files/patch-share-etter.conf.v6-darwin.diff
===================================================================
--- trunk/dports/net/ettercap/files/patch-share-etter.conf.v6-darwin.diff	                        (rev 0)
+++ trunk/dports/net/ettercap/files/patch-share-etter.conf.v6-darwin.diff	2013-12-07 13:04:37 UTC (rev 114401)
@@ -0,0 +1,11 @@
+--- share/etter.conf.v6.orig	2013-09-11 15:18:45.000000000 -0500
++++ share/etter.conf.v6	2013-12-07 05:46:45.000000000 -0600
+@@ -143,7 +143,7 @@
+ utf8_encoding = "ISO-8859-1"
+ 
+ # the command used by the remote_browser plugin
+-remote_browser = "xdg-open http://%host%url"
++remote_browser = "open http://%host%url"
+ 
+ 
+ #####################################

Deleted: trunk/dports/net/ettercap/files/patch-src-Makefile.in
===================================================================
--- trunk/dports/net/ettercap-ng/files/patch-src-Makefile.in	2013-12-07 09:47:25 UTC (rev 114397)
+++ trunk/dports/net/ettercap/files/patch-src-Makefile.in	2013-12-07 13:04:37 UTC (rev 114401)
@@ -1,20 +0,0 @@
---- src/Makefile.in.orig	2005-05-30 16:05:44.000000000 -0700
-+++ src/Makefile.in	2005-05-30 16:07:01.000000000 -0700
-@@ -575,7 +575,7 @@
-                  interfaces/daemon/libec_daemon.a \
-                  interfaces/text/libec_text.a \
- $(am__append_3) $(am__append_4)
--ettercap_LDFLAGS = -export-dynamic @EC_LIBS@ 
-+ettercap_LDFLAGS = -export-dynamic @EC_LIBS@ -lresolv
- CLEANFILES = *.log *.out core* missing/*.o *~
- all: all-recursive
- 
-@@ -3422,7 +3422,7 @@
- 	$(COMPILE) @EC_LIBS@ -c missing/scandir.c -o missing/scandir.o
- 
- missing/memmem.o:
--	$(COMPILE) @EC_LIBS@ -c missing/memmem.c -o missing/memmem.o
-+	$(COMPILE) @EC_LIBS@ $(ettercap_CFLAGS) -c missing/memmem.c -o missing/memmem.o
- 
- missing/memcmp.o:
- 	$(COMPILE) @EC_LIBS@ -c missing/memcmp.c -o missing/memcmp.o

Deleted: trunk/dports/net/ettercap/files/patch-src-interfaces-curses-widgets-wdg.h
===================================================================
--- trunk/dports/net/ettercap-ng/files/patch-src-interfaces-curses-widgets-wdg.h	2013-12-07 09:47:25 UTC (rev 114397)
+++ trunk/dports/net/ettercap/files/patch-src-interfaces-curses-widgets-wdg.h	2013-12-07 13:04:37 UTC (rev 114401)
@@ -1,13 +0,0 @@
---- src/interfaces/curses/widgets/wdg.h.orig	2005-05-27 17:11:45.000000000 +0200
-+++ src/interfaces/curses/widgets/wdg.h	2007-11-15 10:15:05.000000000 +0100
-@@ -11,8 +11,9 @@
- #include <stdio.h>
- #include <unistd.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <sys/types.h>
-
- #ifdef OS_WINDOWS
-    #include <windows.h>
- #endif
-

Copied: trunk/dports/net/ettercap/files/patch-src-protocols-ec_tcp.c.diff (from rev 114397, trunk/dports/net/ettercap-ng/files/patch-src__protocols__ec_tcp.c)
===================================================================
--- trunk/dports/net/ettercap/files/patch-src-protocols-ec_tcp.c.diff	                        (rev 0)
+++ trunk/dports/net/ettercap/files/patch-src-protocols-ec_tcp.c.diff	2013-12-07 13:04:37 UTC (rev 114401)
@@ -0,0 +1,11 @@
+--- src/protocols/ec_tcp.c.orig	2013-09-11 15:18:45.000000000 -0500
++++ src/protocols/ec_tcp.c	2013-12-05 04:44:18.000000000 -0600
+@@ -115,7 +115,7 @@
+    tcp = (struct tcp_header *)DECODE_DATA;
+    
+    opt_start = (u_char *)(tcp + 1);
+-   opt_end = (u_char*)tcp + tcp->off * 4;
++   opt_end = (u_char*)((unsigned long)tcp + tcp->off * 4);
+ 
+    DECODED_LEN = (u_int32)(tcp->off * 4);
+ 

Deleted: trunk/dports/net/ettercap/files/patch-src__protocols__ec_tcp.c
===================================================================
--- trunk/dports/net/ettercap-ng/files/patch-src__protocols__ec_tcp.c	2013-12-07 09:47:25 UTC (rev 114397)
+++ trunk/dports/net/ettercap/files/patch-src__protocols__ec_tcp.c	2013-12-07 13:04:37 UTC (rev 114401)
@@ -1,11 +0,0 @@
---- src/protocols/ec_tcp.c.orig	2009-09-08 17:04:47.000000000 +0200
-+++ src/protocols/ec_tcp.c	2009-09-08 17:06:15.000000000 +0200
-@@ -116,7 +116,7 @@
-    tcp = (struct tcp_header *)DECODE_DATA;
-    
-    opt_start = (u_char *)(tcp + 1);
--   opt_end = (u_char *)((int)tcp + tcp->off * 4);
-+   opt_end = (u_char *)((unsigned long)tcp + tcp->off * 4);
- 
-    DECODED_LEN = (u_int32)(tcp->off * 4);
- 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20131207/25b98ab1/attachment.html>


More information about the macports-changes mailing list