Index: .
===================================================================
diff --git a/trunk/dports/multimedia/VLC/Portfile b/trunk/dports/multimedia/VLC/Portfile
--- a/trunk/dports/multimedia/VLC/Portfile	(revision 131791)
+++ b/trunk/dports/multimedia/VLC/Portfile	(working copy)
@@ -6,10 +6,10 @@
 
 name                VLC
 version             2.1.5
-revision            2
+revision            3
 categories          multimedia
 
-maintainers         nomaintainer
+maintainers         gmail.com:rjvbertin nomaintainer
 description         VLC is a cross-platform media player and streaming server
 long_description    VLC media player is a highly portable multimedia player for \
                     various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, \
@@ -114,6 +114,7 @@
 
 configure.args-append \
                     --with-contrib=${worksrcpath}/contrib \
+                    --enable-shared \
                     --disable-debug \
                     --disable-update-check \
                     --disable-dbus \
@@ -254,15 +255,14 @@
 
 # Audio Plugins
 depends_lib-append  \
-                    port:libsamplerate \
-                    port:pulseaudio
+                    port:libsamplerate 
 
 configure.args-append \
-                    --disable-chromaprint \
+                    --disable-chromaprint  \
+                    --disable-macosx-audio \
+                    --enable-samplerate \
                     --disable-jack \
-                    --disable-macosx-audio \
-                    --enable-pulse \
-                    --enable-samplerate
+                    --disable-pulse
 
 # Interface Plugins
 depends_lib-append  \
@@ -292,6 +292,18 @@
                     --enable-bonjour \
                     --enable-upnp
 
+variant dbus description {Enable DBus support} {
+    depends_lib-append      port:dbus
+    configure.args-delete   --disable-dbus 
+    configure.args-append   --enable-dbus
+}
+
+variant pulse description {Enable PulseAudio support} {
+    depends_lib-append      port:pulseaudio
+    configure.args-delete   --disable-pulse 
+    configure.args-append   --enable-pulse 
+}
+
 variant eyetv description {Enable eyetv plugin} {
     configure.args-delete --disable-macosx-eyetv
     configure.args-append --enable-macosx-eyetv
@@ -396,9 +408,10 @@
                             --enable-xvideo
 }
 
-variant qt4 description {Build using QT4 UI.  This will use qt4-mac} {
+variant qt4 description {Build using QT4 UI. This will use qt4-mac} {
     configure.args-delete   --disable-qt
     configure.args-append   --enable-qt
+    patchfiles-append       patch-vlc-qt4mac.diff
 
     PortGroup qt4 1.0
 
@@ -410,25 +423,32 @@
 }
 
 variant quartz {
+    patchfiles-append       patch-vlc-for-macports.diff
+
     depends_lib-append      port:BGHUDAppKit
+    depends_lib-delete      port:libsamplerate
     configure.args-delete   --disable-macosx \
                             --disable-macosx-avfoundation \
-                            --disable-macosx-dialog-provider \
+                            --enable-samplerate
                             
     configure.args-append   --enable-macosx \
-                            --enable-macosx-avfoundation \
-                            --enable-macosx-dialog-provider
+                            --enable-macosx-avfoundation
+    # taken from VLC's own configure.sh script for OS X:
+    configure.args-append   --disable-samplerate \
+                            --enable-merge-ffmpeg \
+                            --enable-realrtsp \
+                            --enable-libass
 }
 
 default_variants +mod +mpc +osd +quartz
 
 variant huge \
-    requires dvb eyetv fribidi jack mod mpc osd sdl shout speex svg vcd \
-    description {Enable all variants except quartz, qt4, smb, and x11} {}
+    requires dvb eyetv fribidi jack mod mpc osd sdl shout speex svg vcd pulse \
+        description {Enable all variants except quartz, qt4, smb, and x11} {}
 
 variant full \
     requires huge qt4 quartz smb x11 \
-    description {Enable all variants} {}
+        description {Enable all variants} {}
 
 platform macosx {
     default_variants-append +qtkit
@@ -489,6 +509,15 @@
             # http://trac.macports.org/ticket/35131
             ln -s ${prefix}/lib ${destroot}${applications_dir}/VLC.app/Contents/MacOS/lib
             ln -s ${prefix}/lib/vlc/plugins ${destroot}${applications_dir}/VLC.app/Contents/MacOS/plugins
+            # the vlc executable needs to be started with a full path to the app bundle executable
+            # or else the Mac OS X interface will hang beyond even a ^C or ^\ :
+            file delete ${destroot}${prefix}/bin/vlc
+            set vlc [open "${filespath}/vlc" "w"]
+            puts ${vlc} "#!/bin/sh"
+            puts ${vlc} ""
+            puts ${vlc} "exec ${applications_dir}/VLC.app/Contents/MacOS/VLC \"$@\""
+            close ${vlc}
+            xinstall -m 755 ${filespath}/vlc ${destroot}${prefix}/bin
         }
     }
 }
