--- Portfile.orig	2013-10-17 02:40:50.000000000 +0200
+++ Portfile	2013-10-17 03:01:28.000000000 +0200
@@ -1,13 +1,13 @@
 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
 # $Id: Portfile 106559 2013-05-31 00:13:02Z cal@macports.org $
 
-PortSystem 1.0
+PortSystem      1.0
+PortGroup       cmake 1.0
 
 name            wireshark-devel
 epoch           2
-version         1.9.0
-revision        3
-patchfiles      patch-configure.diff
+version         1.11.0
+revision        0
 categories      net
 license         {GPL-2 GPL-3}
 maintainers     gmail.com:hsivank
@@ -17,6 +17,11 @@
 distname        wireshark-${version}
 dist_subdir     wireshark
 
+fetch.type      svn
+svn.revision    52640
+worksrcdir      trunk
+svn.url         http://anonsvn.wireshark.org/wireshark/trunk
+
 long_description A network analyzer that lets you capture and \
                  interactively browse Ethernet frames. \
                  Packet data can be read from a file, or live from a local \
@@ -25,97 +30,120 @@
 master_sites    http://www.wireshark.org/download/src/ \
                 http://www.wireshark.org/download/src/all-versions/
 
-use_bzip2       yes
+#use_bzip2       yes
 
-checksums       rmd160  56f62e9a1bc2dfedcbd1856dd06c42869a2cdde2 \
-                sha256  0a21aa84e78de2ae2f758e5f21edf2ec5c26a372fbfbb30a53a9b67a128e4538
+#checksums       rmd160  6335465a428a18a033844d72d7f3bd137aa17434 \
+#                sha256  64085a564e91edf623570a9ed49588de457ab1e8025aceac3c0b861a8f9b1891
 
 conflicts       wireshark
 
 depends_build   port:pkgconfig
 
-depends_lib     port:c-ares \
-                path:lib/pkgconfig/glib-2.0.pc:glib2 \
-                port:gtk2 \
+depends_lib     path:lib/pkgconfig/glib-2.0.pc:glib2 \
                 port:openssl \
-                port:libpcap \
-                port:kerberos5 \
-                port:zlib
-
-configure.args  \
-                --disable-usr-local \
-                --without-adns \
-                --with-c-ares=${prefix} \
-                --without-pcre \
-                --disable-ipv6 \
-                --with-pcap=${prefix} \
-                --with-ssl=${prefix} \
-                --with-zlib=${prefix} \
-                --mandir=\\\${prefix}/share/man \
-                --infodir=\\\${prefix}/share/info \
-                --without-portaudio \
-                --disable-warnings-as-errors \
-                --with-krb5=${prefix} \
-                --without-gnutls \
-                --without-python
-
-configure.ldflags-append "-Wl,-search_paths_first"
-
-variant adns description {use adns library for async. dns resolution instead of the default c-ares library} {
-        configure.args-delete   --without-adns \
-                                --with-c-ares=${prefix}
-        configure.args-append   --with-adns=${prefix} \
-                                --without-c-ares
-        depends_lib-delete      port:c-ares
-        depends_lib-append      port:adns
+                port:libpcap
+
+configure.args  -DCMAKE_INSTALL_RPATH:STRING="${prefix}/lib" \
+				-DCMAKE_INSTALL_NAME_DIR:STRING="${prefix}/lib" \
+				-DENABLE_NETLINK=OFF \
+				-DENABLE_GEOIP=OFF
+
+default_variants +qt4 +adns +portaudio +zlib +lua +libsmi +gnutls +libgcrypt +cares +kerberos5
+
+variant qt4 {
+        configure.args-append   -DBUILD_qtshark=ON \
+                                -DENABLE_QT5=OFF
+        depends_lib-append      port:qt4-mac
 }
 
-variant gnutls {
-        configure.args-append   --with-gnutls=yes
-        depends_lib-append      port:gnutls
+if {![variant_isset qt4]} {
+        configure.args-append   -DBUILD_qtshark=OFF
 }
 
-variant libgcrypt {
-        configure.args-append   --with-libgcrypt-prefix=${prefix}
-        depends_lib-append      port:libgcrypt
+variant gtk2 conflicts gtk3 {
+    configure.args-append       -DBUILD_wireshark=ON \
+                                -DENABLE_GTK3=OFF
+	depends_lib-append          port:gtk2
+}
+variant gtk3 conflicts gtk2 {
+    configure.args-append       -DBUILD_wireshark=ON \
+                                -DENABLE_GTK3=ON
+	depends_lib-append          port:gtk3
+}
+if {![variant_isset gtk2]  && ![variant_isset gtk3]} {
+        configure.args-append   -DBUILD_wireshark=OFF
+}
+
+variant adns description {use adns library for async. dns resolution} {
+        configure.args-append   -DENABLE_ADNS=ON
+        depends_lib-append      port:adns
+}
+if {![variant_isset adns]} {
+        configure.args-append   -DENABLE_ADNS=OFF
 }
 
-variant ipv6 {
-        configure.args-append   --enable-ipv6
-        configure.args-delete   --disable-ipv6
+variant portaudio {
+        configure.args-append   -DENABLE_PORTAUDIO=ON
+        depends_lib-append      port:portaudio
+}
+if {![variant_isset portaudio]} {
+        configure.args-append   -DENABLE_PORTAUDIO=OFF
+}
+
+variant zlib {
+        configure.args-append   -DENABLE_ZLIB=ON
+        depends_lib-append      port:zlib
+}
+if {![variant_isset zlib]} {
+        configure.args-append   -DENABLE_ZLIB=OFF
 }
 
 variant lua {
-        configure.args-append   --with-lua=${prefix}
+        configure.args-append   -DENABLE_LUA=ON
         depends_lib-append      port:lua
 }
+if {![variant_isset lua]} {
+        configure.args-append   -DENABLE_LUA=OFF
+}
 
-variant pcre {
-        configure.args-append   --with-pcre=${prefix}
-        configure.args-delete   --without-pcre
-        depends_lib-append      port:pcre
+variant libsmi {
+        configure.args-append   -DENABLE_SMI=ON
+		depends_lib-append      port:libsmi
+}
+if {![variant_isset libsmi]} {
+        configure.args-append   -DENABLE_SMI=OFF
 }
 
-variant rtp description {add rtp support with portaudio} {
-        configure.args-append   --with-portaudio=${prefix}
-        configure.args-delete   --without-portaudio
-        depends_lib-append      port:portaudio
+variant gnutls {
+        configure.args-append   -DENABLE_GNUTLS=ON
+        depends_lib-append      port:gnutls
+}
+if {![variant_isset gnutls]} {
+        configure.args-append   -DENABLE_GNUTLS=OFF
 }
 
-variant no_ssl {
-        configure.args-append --without-ssl
-        depends_lib-delete      port:openssl
+variant libgcrypt {
+        configure.args-append   -DENABLE_GCRYPT=ON
+        depends_lib-append      port:libgcrypt
+}
+if {![variant_isset libgcrypt]} {
+        configure.args-append   -DENABLE_GCRYPT=OFF
 }
 
-variant no_gui description {Disable GTK GUI} {
-        depends_lib-delete      port:gtk2
-        configure.args-delete   --disable-gtk2
-        configure.args-append   --disable-wireshark
+variant cares description {
+        configure.args-append   -DENABLE_CARES=ON
+        depends_lib-append      port:c-ares
+}
+if {![variant_isset cares]} {
+        configure.args-append   -DENABLE_CARES=OFF
 }
 
-variant libsmi {
-        depends_lib-append port:libsmi
-        configure.args-append --with-libsmi
+variant kerberos5 {
+        configure.args-append   -DENABLE_KERBEROS=ON
+		depends_lib-append      port:kerberos5
+}
+if {![variant_isset kerberos5]} {
+        configure.args-append   -DENABLE_KERBEROS=OFF
 }
 
 variant python25 description {use python25 for the experimental python interface} conflicts python26 python27 {
@@ -135,9 +163,9 @@
 
 pre-configure {
         if {[variant_isset python25] || [variant_isset python26] || [variant_isset python27]} {
-                configure.args-append   --with-python
-                configure.args-delete   --without-python
+                configure.args-append   -DENABLE_PYTHON=ON
         }
+		
         if {[variant_isset python25]} {
                 reinplace "s|python-config|python2.5-config|g" ${worksrcpath}/configure
         }
