# -*- 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 67266 2010-05-03 23:47:42Z ryandesign@macports.org $

PortSystem          1.0

name                mlt
epoch               1
version             0.5.2
categories          multimedia
maintainers         dennedy.org:dan
description         Open source multimedia framework - core libraries
long_description    MLT is an open source multimedia framework, designed and developed for \
                    television broadcasting. It provides a toolkit for broadcasters, video \
                    editors, media players, transcoders, web streamers and many more types of \
                    applications. The functionality of the system is provided via an assortment \
                    of ready to use tools, xml authoring components, and an extendible plug-in \
                    based API. \
                    \
                    This package contains the files necessary for running applications that use \
                    the MLT multimedia framework.
homepage            http://www.mltframework.org
platforms           darwin

fetch.type          git
git.url             git://mltframework.org/mlt.git
git.branch          v${version}
worksrcdir          mlt

# ffmpeg-devel is not universal
universal_variant   no

depends_build       port:pkgconfig \
                    port:git-core \
                    port:doxygen

depends_lib         port:atk \
                    port:frei0r-plugins \
                    port:ffmpeg-devel \
                    port:gtk2 \
                    port:libdv \
                    port:libsamplerate \
                    path:lib/pkgconfig/sdl.pc:libsdl \
                    port:libvorbis \
                    path:bin/qmake-mac:qt4-mac \
                    port:sox

configure.args      --enable-gpl \
                    --qimage-libdir=${prefix}/libexec/qt4-mac/lib \
                    --qimage-includedir=${prefix}/libexec/qt4-mac/include/Qt \
                    --disable-jackrack
platform darwin 8 {
   configure.args-append --disable-mmx
}

configure.pkg_config_path   ${prefix}/lib/pkgconfig:${prefix}/libexec/qt4-mac/lib/pkgconfig
configure.pkg_config        ${prefix}/bin/pkg-config

configure.cflags-append     "-I${prefix}/include"
configure.cflags-append     "-I${prefix}/libexec/qt4-mac/include"
configure.ldflags-append    "-L${prefix}/lib"
build.env                   CFLAGS="${configure.cflags}" LDFLAGS="${configure.ldflags}"
build.args-append           CC="${configure.cc}" CXX="${configure.cxx}" CPP="${configure.cpp}"

variant no_x11 {
    configure.args-append   --disable-gtk2
    depends_lib-delete      port:gtk2
}

livecheck.type     none
