--- dports/multimedia/VLC/Portfile	2009-07-12 13:48:40.000000000 +0200
+++ dports.local/multimedia/VLC/Portfile	2009-07-12 13:52:54.000000000 +0200
@@ -1,79 +1,79 @@
 # $Id $
 
-PortSystem			1.0
+PortSystem          1.0
 
-name				VLC
-version				0.9.9a
-revision			2
-
-categories			multimedia
-
-maintainers			inmachina.com:max openmaintainer
-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, \
-					mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. \
-					It can also be used as a server to stream in unicast or multicast \
-					in IPv4 or IPv6 on a high-bandwidth network.
-
-platforms			darwin
-
-homepage			http://www.videolan.org
-master_sites		http://download.videolan.org/pub/videolan/vlc/${version}/
-distname			vlc-${version}
-use_bzip2			yes
-
-checksums           md5     c8d832deeef7f4072a73506f8d033198 \
-                    sha1    c72a3aa7854292356c0c5149cbb732da7d46b163 \
-					rmd160  c185b5e8dae8e8aacb6e1c03f14eae24cb805648
-
-# Remove LLVM for now. Only required for upcoming VLC 1.0.0
-#depends_build-append port:llvm-gcc42
-depends_build	port:autoconf port:automake port:libtool
-depends_lib	port:lame port:a52dec port:libogg port:flac \
-		port:libdca port:libcddb port:libcdio port:libmad \
-		port:libvorbis port:libmatroska port:libid3tag \
-		port:ncurses port:lua port:libpng port:jpeg \
-		port:libdvdplay port:libdvdnav port:ffmpeg \
-		port:gnutls port:taglib port:libxml2
+name                VLC
+version             1.0.0
 
-patchfiles			VLC-Makefile.am.patch
+categories          multimedia
 
-use_autoreconf yes
-autoreconf.args -fvi
+maintainers         inmachina.com:max openmaintainer
+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, \
+                    mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. \
+                    It can also be used as a server to stream in unicast or multicast \
+                    in IPv4 or IPv6 on a high-bandwidth network. 
+
+platforms           darwin
+
+homepage            http://www.videolan.org
+master_sites        http://download.videolan.org/pub/videolan/vlc/${version}/
+distname            vlc-${version}
+use_bzip2           yes
+
+checksums           md5     fc78904ab5fa73f518d8fe4e852e7f67 \
+                    sha1    fff08528d97d26f6f7faeafba94b445e0e3562e8 \
+                    rmd160  7d0ed52c580c75d09003788f5a2d27b7de18b410
+
+depends_build       port:autoconf port:automake port:libtool \
+                    port:llvm-gcc42
+depends_lib         port:lame port:a52dec port:libogg port:flac \
+                    port:libdca port:libcddb port:libcdio port:libmad \
+                    port:libvorbis port:libmatroska port:libid3tag \
+                    port:ncurses port:lua port:libpng port:jpeg \
+                    port:libdvdplay port:libdvdnav port:ffmpeg \
+                    port:gnutls port:taglib port:libxml2
+
+patchfiles          Makefile.am.diff configure.ac-xcb.diff
+
+use_autoreconf      yes
+autoreconf.args     -fvi
 
 # VLC needs to be compiled with llvm-gcc frontend
-#configure.cc		${prefix}/bin/llvm-gcc-4.2
-#configure.cpp		${prefix}/bin/llvm-cpp-4.2
-#configure.cxx		${prefix}/bin/llvm-g++-4.2
-#configure.objc		${prefix}/bin/llvm-gcc-4.2
+configure.cc       ${prefix}/bin/llvm-gcc-4.2
+configure.cpp      ${prefix}/bin/llvm-cpp-4.2
+configure.cxx      ${prefix}/bin/llvm-g++-4.2
+configure.objc     ${prefix}/bin/llvm-gcc-4.2
 
-build.target		all
-destroot.target		install
+build.target        all
+destroot.target     install
 
-livecheck.url		http://download.videolan.org/pub/videolan/vlc/
-livecheck.regex		<a href=\"(\\d\[\\d|\.|\\w\]+).*/\">
+livecheck.url       http://download.videolan.org/pub/videolan/vlc/
+livecheck.regex     <a href=\"(\\d\[\\d|\.|\\w\]+).*/\">
 
 # live555 and possibly others are not universal, so disabling for now
-universal_variant no
+universal_variant   no
 
-configure.args-append	--disable-macosx-defaults \
-	--disable-debug --disable-x11 --disable-xvideo --disable-glx --disable-qt4 \
-	--disable-skins2 --disable-notify --disable-telepathy --disable-twolame \
-	--disable-speex --disable-theora --disable-x264 --disable-live555 --disable-dvbpsi \
-	--disable-vcdx  --disable-fontconfig --disable-freetype \
-	--disable-dbus --disable-bonjour --disable-fribidi --disable-goom \
-	--disable-growl --disable-sdl --disable-caca --disable-smb \
-	--enable-release --enable-macosx --enable-a52 --enable-cddax \
-	--enable-dvdnav --enable-dvdread --enable-faad --enable-flac \
-	--enable-vorbis --enable-ogg --enable-mad --enable-libass --enable-asademux \
-	--enable-dca --enable-gnutls --enable-ncurses --enable-png --enable-realrtsp \
-	--with-macosx-version-min=10.4
+configure.args-append   --disable-macosx-defaults \
+    --enable-release --enable-macosx --enable-macosx-audio --enable-a52 --enable-cddax \
+    --enable-dvdnav --enable-dvdread --enable-faad --enable-flac --enable-quicktime \
+    --enable-vorbis --enable-ogg --enable-mad --disable-libass --enable-asademux \
+    --enable-dca --enable-gnutls --enable-ncurses --enable-png --enable-realrtsp \
+    --with-macosx-version-min=10.5 \
+    --disable-debug --disable-x11 --disable-xvideo --disable-glx --disable-xinerama \
+    --disable-xcb --disable-xvmc --disable-qt4 \
+    --disable-skins2 --disable-notify --disable-telepathy --disable-twolame \
+    --disable-speex --disable-theora --disable-x264 --disable-live555 --disable-dvbpsi \
+    --disable-vcdx  --disable-fontconfig --disable-freetype \
+    --disable-dbus --disable-bonjour --disable-fribidi --disable-goom \
+    --disable-growl --disable-sdl --disable-caca --disable-smb \
+    --disable-update-check --without-x
 
 variant x264 description {Enable H.264 en/decoding} {
-	depends_lib-append 		port:x264
-	configure.args-delete   --disable-x264
-	configure.args-append 	--enable-x264
+    depends_lib-append      port:x264
+    configure.args-delete   --disable-x264
+    configure.args-append   --enable-x264
 }
 
 variant theora description {Enable OggTheora support} {
@@ -83,56 +83,56 @@
 }
 
 variant twolame description {Enable MPEG Audio Layer 2 encoding} {
-	depends_lib-append		port:twolame
-	configure.args-delete	--disable-twolame
-	configure.args-append	--enable-twolame
+    depends_lib-append      port:twolame
+    configure.args-delete   --disable-twolame
+    configure.args-append   --enable-twolame
 }
 
 variant live555 description {Enable Live555 streaming media support} {
-	depends_lib-append		port:live555
-	configure.args-delete	--disable-live555
-	configure.args-append	--enable-live555 \
-							--with-live555-tree=${prefix}/lib/live
+    depends_lib-append      port:live555
+    configure.args-delete   --disable-live555
+    configure.args-append   --enable-live555 \
+                            --with-live555-tree=${prefix}/lib/live
 }
 
 variant speex description {Enable Speex decoder support} {
-	depends_lib-append		path:lib/libspeex.dylib:speex
-	configure.args-delete	--disable-speex
-	configure.args-append	--enable-speex
+    depends_lib-append      path:lib/libspeex.dylib:speex
+    configure.args-delete   --disable-speex
+    configure.args-append   --enable-speex
 }
 
 variant svg description {Enable SVG support} {
-	depends_lib-append		port:librsvg
-	configure.args-append	--enable-svg
+    depends_lib-append      port:librsvg
+    configure.args-append   --enable-svg
 }
 
 variant shout description {Enable Shoutcast support} {
-	depends_lib-append		port:libshout2
-	configure.args-append	--enable-shout
+    depends_lib-append      port:libshout2
+    configure.args-append   --enable-shout
 }
 
 variant vcd description {Enable VCD support} {
-	depends_lib-append		port:vcdimager
-	configure.args-delete	--disable-vcdx
-	configure.args-append	--enable-vcdx
+    depends_lib-append      port:vcdimager
+    configure.args-delete   --disable-vcdx
+    configure.args-append   --enable-vcdx
 }
 
 variant mod description {Enable MOD demuxer support} {
-	depends_lib-append		port:libmodplug
-	configure.args-delete	--disable-mod
-	configure.args-append	--enable-mod
+    depends_lib-append      port:libmodplug
+    configure.args-delete   --disable-mod
+    configure.args-append   --enable-mod
 }
 
 variant mpc description {enable Musepack Decoder library support} {
-	depends_lib-append		port:libmpcdec
-	configure.args-delete	--disable-mpc
-	configure.args-append	--enable-mpc
+    depends_lib-append      port:libmpcdec
+    configure.args-delete   --disable-mpc
+    configure.args-append   --enable-mpc
 }
 
 variant dvb description {enable DVB Program Specific Information support} {
-	depends_lib-append		port:libdvbpsi
-	configure.args-delete	--disable-dvbpsi
-	configure.args-append	--enable-dvbpsi
+    depends_lib-append      port:libdvbpsi
+    configure.args-delete   --disable-dvbpsi
+    configure.args-append   --enable-dvbpsi
 }
 
 variant osd description {Enable onscreen display and TrueType font support} {
@@ -148,45 +148,48 @@
     configure.args-append   --enable-fribidi
 }
 
+# avahi port is currently broken, so this variant is removed
+# from +huge 
 variant bonjour description {Enable Bonjour support} {
-	depends_lib-append		port:avahi
-	configure.args-delete	--disable-dbus --disable-bonjour
-	configure.args-append	--enable-dbus --enable-bonjour
+    depends_lib-append      port:avahi
+    configure.args-delete   --disable-dbus --disable-bonjour
+    configure.args-append   --enable-dbus --enable-bonjour
 }
 
 variant sdl description {Enable SDL/SDL-Image support} {
-	depends_lib-append			port:libsdl port:libsdl_image
-	configure.args-delete		--disable-sdl
-	configure.args-append		--enable-sdl
+    depends_lib-append          port:libsdl port:libsdl_image
+    configure.args-delete       --disable-sdl
+    configure.args-append       --enable-sdl
 }
 
 variant smb description {Enable Samba 3 support} {
-	depends_lib-append		port:samba3
-	configure.args-delete	--disable-smb
-	configure.args-append	--enable-smb
-	configure.ldflags-append	-L${prefix}/lib/samba3
+    depends_lib-append      port:samba3
+    configure.args-delete   --disable-smb
+    configure.args-append   --enable-smb
+    configure.ldflags-append    -L${prefix}/lib/samba3
 }
 
 variant no_dvd description {disable DVD and DeCSS support} {
-	depends_lib-delete		port:libdvdnav port:libdvdread
-	configure.args-append	--disable-dvdnav --disable-dvdread
+    depends_lib-delete      port:libdvdnav port:libdvdread
+    configure.args-append   --disable-dvdnav --disable-dvdread
 }
 
 variant no_ffmpeg description {disable FFmpeg support} {
-	depends_lib-delete		port:ffmpeg
-	configure.args-append	--disable-avcodec --disable-avformat \
-							--disable-postproc
+    depends_lib-delete      port:ffmpeg
+    configure.args-append   --disable-avcodec --disable-avformat \
+                            --disable-postproc --disable-swscale
 }
 
 variant x11 description {Build support for X11} {
     depends_lib-append \
-	port:mesa \
-	port:xorg-libXinerama \
-	port:xorg-libXv \
-	port:xorg-libXxf86vm
-
-    configure.args-delete   --disable-x11 --disable-xvideo --disable-glx
-    configure.args-append   --enable-x11 --enable-xvideo --enable-glx
+    port:mesa \
+    port:xorg-libXinerama \
+    port:xorg-libXv \
+    port:xorg-libXxf86vm
+
+    configure.args-delete   --disable-x11 --disable-xvideo --disable-glx --disable-xinerama --disable-xcb
+    configure.args-append   --enable-x11 --enable-xvideo --enable-glx --enable-xinerama --enable-xcb
+    patchfiles-delete       configure.ac-xcb.diff
 }
 
 variant qt4 description {Build using QT4 UI.  This will use qt4-x11 if +x11 and qt4-mac otherwise.} {
@@ -208,30 +211,30 @@
 }
 
 platform macosx {
-	destroot.target-append  VLC.app
+    destroot.target-append  VLC.app
 }
 
 variant minimal description {VLC OSX minimal configuration} {}
 
 variant huge conflicts minimal \
-	requires svg vcd live555 speex dvb fribidi bonjour sdl shout \
-	description {Enable all variants except x11, qt4, smb and no_*} {}
+    requires svg vcd live555 speex dvb fribidi sdl shout \
+    description {Enable all variants except x11, qt4, smb and no_*} {}
 
 variant full requires huge qt4 smb \
-	description {Enable all variants except x11 and no_*} {}
+    description {Enable all variants except x11 and no_*} {}
 
 # Unless minimal variant is set compile with default OSX configuration
 if {![variant_isset minimal]} {
-	default_variants +aqua +x264 +theora +twolame +mod +mpc +osd
+    default_variants +x264 +theora +twolame +mod +mpc +osd 
 }
 
 if {[variant_isset x11]} {
-	default_variants-append +qt4
+    default_variants-append +qt4
 }
 
 post-destroot {
-	if {[variant_isset macosx]} {
-		file mkdir ${destroot}/${applications_dir}
-		file rename ${worksrcpath}/VLC.app ${destroot}/${applications_dir}/VLC.app
-	}
+    if {[variant_isset macosx]} {
+        file mkdir ${destroot}/${applications_dir}
+        file rename ${worksrcpath}/VLC.app ${destroot}/${applications_dir}/VLC.app
+    }
 }
