--- Portfile.orig	2012-01-28 17:19:14.000000000 +0100
+++ Portfile	2012-01-28 17:12:38.000000000 +0100
@@ -1,187 +1,169 @@
 # -*- 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 89315 2012-01-24 22:31:47Z ryandesign@macports.org $
+# $Id: Portfile 87501 2011-11-23 22:53:13Z devans@macports.org $
 
 PortSystem 1.0
 PortGroup xcodeversion 1.0
 PortGroup muniversal 1.0
 
-name            ffmpeg
-conflicts       ffmpeg-devel
-epoch           1
-version         0.7.8
-set branch      [join [lrange [split ${version} .] 0 1] .]
-license         GPL-2+
-categories      multimedia
-maintainers     devans openmaintainer
-
-description     FFmpeg is a complete solution to play, record, convert and \
-                stream audio and video.
-
-long_description        FFmpeg is a complete solution to record, convert and \
-                        stream audio and video. It includes libavcodec, the \
-                        leading audio/video codec library. \
-                        \
-                        The project is made of several components: \
-                        \
-                        ffmpeg is a command line tool to convert one video \
-                        file format to another. It also supports grabbing and \
-                        encoding in real time from a TV card. \
-                        \
-                        ffserver is an HTTP (RTSP is being developped) \
-                        multimedia streaming server for live broadcasts. Time \
-                        shifting of live broadcast is also supported. \
-                        \
-                        ffplay is a simple media player based on SDL and on \
-                        the ffmpeg libraries. \
-                        \
-                        ffprobe gathers information from multimedia streams and \
-                        prints it in human- and machine-readable fashion. \
-                        \
-                        libavcodec is a library containing all the ffmpeg \
-                        audio/video encoders and decoders. Most codecs were \
-                        developped from scratch to ensure best performances \
-                        and high code reusability. \
-                        \
-                        libavformat is a library containing parsers and \
-                        generators for all common audio/video formats.
-
-platforms       darwin
-homepage        http://www.ffmpeg.org/
-master_sites    http://www.ffmpeg.org/releases/
-
-use_bzip2       yes
-
-checksums       sha1    df4983c028a61d4bf3baceab3bae535b91b8928a \
-                rmd160  8f69a6bc5caaba4e3d440c2d5dc96a946454a52c
-
-depends_build   port:pkgconfig \
-                port:gmake \
-                port:texi2html
-
-depends_lib     port:lame \
-                port:libvorbis \
-                port:libogg \
-                port:libtheora \
-                port:dirac \
-                port:schroedinger \
-                port:openjpeg \
-                path:lib/libspeex.dylib:speex \
-                port:XviD \
-                port:x264 \
-                port:libvpx \
-                path:lib/pkgconfig/sdl.pc:libsdl \
-                port:bzip2 \
-                port:zlib
+name		ffmpeg
+conflicts	ffmpeg-devel
+version		0.10
+set branch	[join [lrange [split ${version} .] 0 1] .]
+license		GPL-2+
+categories	multimedia
+maintainers	devans openmaintainer
+
+description	FFmpeg is a complete solution to play, record, convert and \
+		stream audio and video.
+
+long_description \
+		FFmpeg is a complete solution to record, convert and stream audio and \
+		video. It includes libavcodec, the leading audio/video codec library. \
+		The project is made of several components: \
+		\
+		ffmpeg is a command line tool to convert one video file format to \
+		another. It also supports grabbing and encoding in real time from a \
+		TV card. \
+		\
+		ffserver is an HTTP (RTSP is being developed) multimedia streaming \
+		server for live broadcasts. Time shifting of live broadcast is also \
+		supported. \
+		\
+		ffplay is a simple media player based on SDL and on the ffmpeg libraries. \
+		\
+		ffprobe gathers information from multimedia streams and prints it in \
+		human- and machine-readable fashion. \
+		\
+		libavcodec is a library containing all the ffmpeg audio/video encoders \
+		and decoders. Most codecs were developped from scratch to ensure best \
+		performances and high code reusability. \
+		\
+		libavformat is a library containing parsers and generators for all common \
+		audio/video formats.
+
+platforms	darwin
+homepage	http://www.ffmpeg.org/
+master_sites	http://www.ffmpeg.org/releases/
+use_bzip2	yes
+
+checksums	sha256 43596aa76d1a0fab6d42927bf60383405de2bca8fbc740c2012877559ae17ff9 \
+		rmd160 a60568d4e8bd1a44a2c986e0648cfacba766bcd4
+
+depends_build	port:pkgconfig
+depends_lib	port:lame \
+		port:libvorbis \
+		port:libogg \
+		port:libtheora \
+		port:dirac \
+		port:schroedinger \
+		port:openjpeg \
+		port:speex \
+		port:XviD \
+		port:x264 \
+		port:libvpx \
+		port:libsdl \
+		port:bzip2 \
+		port:zlib
 
-patchfiles      patch-configure.diff
-
-build.cmd       ${prefix}/bin/gmake
-build.env-append V=1
+patchfiles	patch-configure.diff
 
 #
 # enable auto configure of mmx and related Intel optimizations by default
 # requires Xcode 3.1 or better on Leopard
 #
-minimum_xcodeversions {9 3.1}
+minimum_xcodeversions	{9 3.1}
 
-# Under some conditions, llvm-gcc-4.2 drops some "unused" code even though it is used
-# fixed in llvm-gcc trunk, but not in Apple's shipped llvm-gccs.
-#
-# similarly clang fails to build on i386 platforms
-if {${configure.compiler} == "llvm-gcc-4.2"} {
-    configure.compiler gcc-4.2
-} elseif {${configure.compiler} == "clang"} {
-    depends_build-append port:apple-gcc42
-    configure.compiler apple-gcc-4.2
-    # base (as of 2.0.3) doesn't set cxx for apple-gcc-4.2
-    configure.cxx ${prefix}/bin/g++-apple-4.2
-}
-
-configure.cflags-append    -DHAVE_LRINTF ${configure.cppflags}
+configure.cflags-append	-DHAVE_LRINTF ${configure.cppflags}
 configure.args \
-        --enable-gpl \
-        --enable-postproc \
-        --enable-swscale --enable-avfilter \
+	--disable-doc \
+	--disable-debug \
+	--enable-gpl \
+	--enable-postproc \
+	--enable-swscale \
+	--enable-avfilter \
         --enable-libmp3lame \
         --enable-libvorbis \
         --enable-libtheora \
-        --enable-libdirac --enable-libschroedinger \
+        --enable-libdirac \
+	--enable-libschroedinger \
         --enable-libopenjpeg \
         --enable-libxvid \
         --enable-libx264 \
         --enable-libvpx \
         --enable-libspeex \
-        --mandir=${prefix}/share/man \
-        --enable-shared --enable-pthreads \
-        --cc=${configure.cc}
+        --enable-shared \
+	--cc=${configure.cc}
 
-test.run        yes
-
-#
-# configure isn't autoconf and they do use a dep cache
-#
+test.run	yes
 
 post-destroot {
-    file mkdir ${destroot}${prefix}/share/doc/ffmpeg
-    file copy ${worksrcpath}/doc/APIchanges ${destroot}${prefix}/share/doc/ffmpeg
-    file copy ${worksrcpath}/doc/RELEASE_NOTES ${destroot}${prefix}/share/doc/ffmpeg
-    foreach f [glob ${worksrcpath}/doc/*.txt] {
-        file copy $f ${destroot}${prefix}/share/doc/ffmpeg
-    }
+	if {[variant_isset doc]} {
+		file mkdir ${destroot}${prefix}/share/doc/ffmpeg
+		file copy ${worksrcpath}/doc/APIchanges ${destroot}${prefix}/share/doc/ffmpeg
+		file copy ${worksrcpath}/doc/RELEASE_NOTES ${destroot}${prefix}/share/doc/ffmpeg
+		foreach f [glob ${worksrcpath}/doc/*.txt] {
+			file copy $f ${destroot}${prefix}/share/doc/ffmpeg
+		}
+	}
 }
 
 platform powerpc {
-    # absence of altivec is not automatically detected
-    if {[catch {sysctl hw.vectorunit} result] || $result == 0} {
-        configure.args-append --disable-altivec
-    }
+	# absence of altivec is not automatically detected
+	if {[catch {sysctl hw.vectorunit} result] || $result == 0} {
+		configure.args-append --disable-altivec
+	}
 }
 
 configure.universal_args-delete --disable-dependency-tracking
 
 if {[variant_isset universal]} {
-    foreach arch ${configure.universal_archs} {
-        lappend merger_configure_args($arch) --arch=${arch}
-        lappend merger_configure_env($arch)  ASFLAGS='-arch ${arch}'
-    }
-    if {[string match "*86*" ${configure.universal_archs}]} {
-        depends_build-append port:yasm
-    }
-    lappend merger_configure_args(i386) --enable-yasm
-    lappend merger_configure_args(x86_64) --enable-yasm
+	foreach arch ${configure.universal_archs} {
+		lappend merger_configure_args($arch) --arch=${arch}
+		lappend merger_configure_env($arch)  ASFLAGS='-arch ${arch}'
+	}
+	if {[string match "*86*" ${configure.universal_archs}]} {
+		depends_build-append port:yasm
+	}
+		lappend merger_configure_args(i386) --enable-yasm
+		lappend merger_configure_args(x86_64) --enable-yasm
 } else {
-    configure.args-append --arch=${configure.build_arch}
-    configure.env-append  ASFLAGS='[get_canonical_archflags]'
-    if {$build_arch == "i386" || $build_arch == "x86_64"} {
-        depends_build-append port:yasm
-        configure.args-append --enable-yasm
-    }
+	configure.args-append --arch=${configure.build_arch}
+	configure.env-append  ASFLAGS='[get_canonical_archflags]'
+	if {$build_arch == "i386" || $build_arch == "x86_64"} {
+		depends_build-append port:yasm
+		configure.args-append --enable-yasm
+	}
 }
 
 variant no_mmx description {disable all x86 asm optimizations} {
-    configure.args-append --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3 --disable-amd3dnow --disable-amd3dnowext
+	configure.args-append --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3 --disable-amd3dnow --disable-amd3dnowext
 }
 
 variant no_gpl conflicts nonfree description {disallow use of GPL code, license will be LGPL} {
-    configure.args-delete   --enable-gpl \
-                            --enable-postproc \
-                            --enable-libx264 \
-                            --enable-libxvid
-    depends_lib-delete      port:XviD \
-                            port:x264
-    license-delete          GPL-2+
-    license-append          LGPL-2.1+
+	configure.args-delete   --enable-gpl \
+				--enable-postproc \
+				--enable-libx264 \
+				--enable-libxvid
+	depends_lib-delete      port:XviD \
+				port:x264
+	license-delete          GPL-2+
+	license-append          LGPL-2.1+
 }
 
 # the build server uses the default variants, and we want distributable binaries
 # nonfree code is disabled by default but can be enabled using the +nonfree variant
 
 variant nonfree conflicts no_gpl description {enable nonfree code, libraries and binaries will not be redistributable} {
-    configure.args-append   --enable-nonfree \
-                            --enable-libfaac
-    depends_lib-append      port:faac
-    license-delete          GPL-2+
-    license-append          Restrictive
+	configure.args-append   --enable-nonfree \
+				--enable-libfaac
+	depends_lib-append      port:faac
+	license-delete          GPL-2+
+	license-append          Restrictive
+}
+
+variant doc description {install documentation files} {
+	configure.args-delete	--disable-doc
+	depends_build-append	port:texi2html
 }
 
 if {[variant_isset nonfree]} {
