Index: Portfile
===================================================================
--- Portfile	(revision 120942)
+++ Portfile	(working copy)
@@ -6,6 +6,8 @@
 
 name                FileZilla
 version             3.8.1
+set nightly_date    2014-06-12
+revision            1
 categories          www aqua
 platforms           darwin
 maintainers         strasweb.fr:rudloff openmaintainer
@@ -18,13 +20,16 @@
                     and an intuitive graphical user interface.
 
 homepage            https://filezilla-project.org/
-master_sites        sourceforge:project/filezilla/FileZilla_Client/${version}
+# master_sites      sourceforge:project/filezilla/FileZilla_Client/${version}
+master_sites        https://filezilla-project.org/nightlies/${nightly_date}
 
-checksums           rmd160  6a1692fc1b6ca73b878d8b9c2dd147b1885cacf0 \
-                    sha256  66bc9c082843ffdcb915c7902900b92bdf921ed7310f2a40ff6b96b03cfa1e4f
+checksums           rmd160  2c4cc5cda84a012345dd487ad7239003e7424533 \
+                    sha256  109e2eb9fb3b0e07bfb369bb59ca577c2d668e7097d0d479fab8f823f3d7ae0b
 
 depends_build       port:pkgconfig
 
+wxWidgets.use       wxWidgets-3.0
+
 depends_lib         port:dbus \
                     port:gettext \
                     port:gmp \
@@ -35,53 +40,34 @@
                     port:libidn \
                     port:nettle \
                     port:sqlite3 \
-                    port:xdg-utils
+                    port:xdg-utils \
+                    port:${wxWidgets.port}
 
-distname            ${name}_${version}_src
+# distname          ${name}_${version}_src
+# TODO: just for the nightly
+distname            FileZilla3-src
+dist_subdir         ${name}/${nightly_date}
+
 use_bzip2           yes
 worksrcdir          filezilla-${version}
 
-# http://trac.filezilla-project.org/ticket/8272
-patchfiles          patch-wxWidgets-3.0.diff
+# http://trac.filezilla-project.org/ticket/9578
+patchfiles          patch-src-interface-viewheader.cpp.diff
 
 # http://trac.filezilla-project.org/ticket/5473
 # http://sourceforge.net/p/tinyxml/patches/51/
 configure.args      --with-tinyxml=builtin \
                     --disable-manualupdatecheck \
-                    --disable-autoupdatecheck
+                    --disable-autoupdatecheck \
+                    --with-wxdir=${wxWidgets.wxdir}
 
-variant wxwidgets30 conflicts wxgtk28 wxwidgets28 description {Use wxWidgets 3.0 (not fully functional yet)} {
-    wxWidgets.use           wxWidgets-3.0
-    depends_lib-append      port:${wxWidgets.port}
-    configure.args-append   --with-wxdir=${wxWidgets.wxdir}
-    configure.env-append    WXRC=${wxWidgets.wxrc}
-    destroot {              copy ${worksrcpath}/FileZilla.app ${destroot}${applications_dir} }
-}
+configure.env-append \
+                    WXRC=${wxWidgets.wxrc}
 
-variant wxwidgets28 conflicts wxgtk28 wxwidgets30 description {Use 32-bit Carbon-based wxWidgets 2.8} {
-    wxWidgets.use           wxWidgets-2.8
-    depends_lib-append      port:${wxWidgets.port}
-    configure.args-append   --with-wxdir=${wxWidgets.wxdir}
-    configure.env-append    WXRC=${wxWidgets.wxrc}
-    destroot {              copy ${worksrcpath}/FileZilla.app ${destroot}${applications_dir} }
+destroot {
+    copy ${worksrcpath}/FileZilla.app ${destroot}${applications_dir}
 }
 
-# TODO: when FileZilla is built against wxGTK, it doesn't create an app; this needs (possibly an upstream) fix
-variant wxgtk28 conflicts wxwidgets28 wxwidgets30 description {Use wxWidgets 2.8 with GTK} {
-    wxWidgets.use           wxGTK-2.8
-    depends_lib-append      port:${wxWidgets.port}
-    configure.args-append   --with-wxdir=${wxWidgets.wxdir}
-    configure.env-append    WXRC=${wxWidgets.wxrc}
-}
-
-if {![variant_isset wxwidgets30] && ![variant_isset wxwidgets28] && ![variant_isset wxgtk28]} {
-    if {[vercmp $xcodeversion 4.4] >= 0} {
-        default_variants +wxgtk28
-    } else {
-        default_variants +wxwidgets28
-    }
-}
-
 livecheck.type      regex
 livecheck.url       ${homepage}download.php?type=client
 livecheck.regex     /${name}_(\[0-9.\]+)
Index: files/patch-src-interface-viewheader.cpp.diff
===================================================================
--- files/patch-src-interface-viewheader.cpp.diff	(revision 0)
+++ files/patch-src-interface-viewheader.cpp.diff	(working copy)
@@ -0,0 +1,18 @@
+http://trac.filezilla-project.org/ticket/9578
+
+--- src/interface/viewheader.cpp.orig
++++ src/interface/viewheader.cpp
+@@ -25,7 +25,12 @@ class CComboBoxEx : public wxComboBox
+ {
+ public:
+ 	CComboBoxEx(CViewHeader* parent)
+-		: wxComboBox(parent, wxID_ANY, _T(""), wxDefaultPosition, wxDefaultSize, wxArrayString(), wxCB_DROPDOWN | wxTE_PROCESS_ENTER | wxCB_SORT)
++		: wxComboBox(parent, wxID_ANY, _T(""), wxDefaultPosition, wxDefaultSize, wxArrayString(), wxCB_DROPDOWN | wxTE_PROCESS_ENTER
++// http://trac.wxwidgets.org/ticket/12419
++#ifndef __WXOSX__
++			| wxCB_SORT
++#endif
++		)
+ 	{
+ 		m_parent = parent;
+ 	}
