# -*- 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 63998 2010-02-20 05:20:38Z ryandesign@macports.org $

PortSystem          1.0

name                mkvtoolnix
version             3.2.0
categories          multimedia
maintainers         il.fontys.nl:ruud
description         Matroska media files manipulation tools.
long_description    mkvtoolnix will evolve to a set of tools to create, \
                    alter and inspect Matroska files under Linux and other \
                    Unices, just what the OGMtools do for the OGM format.
homepage            http://www.bunkus.org/videotools/mkvtoolnix/
platforms           darwin
master_sites        ${homepage}sources/
use_bzip2           yes
patchfiles          patch-configure.diff

# libmatroska is not universal
universal_variant   no

checksums           md5 9bf31280cb07870771e69de0287dc769 \
                    sha1 e5d2137402ef6731ee019a472527b77935d301b1 \
                    rmd160 d4dd843ddfbb741339080dbb729938eedf2505d8

depends_lib         port:boost \
                    port:expat \
                    port:libogg \
                    port:libmatroska \
                    port:libvorbis \
                    port:pcre \
                    port:zlib

configure.args      --mandir=${prefix}/share/man \
                    --with-boost-regex=boost_regex-mt \
                    --with-extra-libs=${prefix}/lib \
                    --with-extra-includes=${prefix}/include \
                    --without-flac \
                    --disable-gui \
                    --disable-wxwidgets

default_variants    +flac

variant wxwidgets description {Build with the wxWidgets GUI} {
    depends_lib-append port:wxWidgets
    configure.args-delete \
        --diable-gui \
        --disable-wxwidgets
    configure.args-append \
        --enable-gui \
        --enable-wxwidgets
}

variant flac description {FLAC support} {
    depends_lib-append port:flac
    configure.args-delete --without-flac
    configure.args-append --with-flac
}

variant bzip2 description {bzip2 compression support, zlib is more common} {
    depends_lib-append port:bzip2
    configure.args-append --enable-bzip2
}

variant lzo description {lzo compression support, zlib is more common} {
    depends_lib-append port:lzo
    configure.args-append --enable-lzo
}
