# $Id: Portfile 59972 2009-10-28 07:03:21Z pguyot@kallisys.net $

PortSystem          1.0

name                libebml
version             0.7.8
categories          textproc
maintainers         nomaintainer
description         EBML (Extensible Binary Meta Language), sort of binary version of XML.
long_description    EBML (Extensible Binary Meta Language), a binary derivative of \
                    XML. EBML enables the Matroska Development Team to gain \
                    significant advantages in terms of future format \
                    extensibility, without breaking file support in old parsers.
homepage            http://www.matroska.org/
platforms           darwin
master_sites        http://dl.matroska.org/downloads/${name}/
checksums           md5     6278109f52e4f9d2c8a8dfc0d668b587 \
                    sha1    2b1b9a8f4bc2a5b6a709f00ec520353dcc0a1d18 \
                    rmd160  73e196e03df254536e20aa390acc0c2c79940054
use_bzip2           yes

post-extract {
    system "cd ${worksrcpath}/make && cp -R linux darwin"
}

use_configure       no

build.dir           ${worksrcpath}/make/darwin
build.args          prefix=${prefix} \
                    CXX=${configure.cxx}

# We need -p for install because ld will ask for ranlib if the modification date changes.
destroot.args       INSTALL_OPTS_LIB='-m 644 -p'
destroot.destdir    prefix=${destroot}${prefix}

# livecheck.
livecheck.type      regex
livecheck.url       http://www.bunkus.org/videotools/mkvtoolnix/source.html
livecheck.regex     ${name} (\[0-9.\]+)
