# $Id$

PortSystem          1.0

name                ocaml-faad
version             0.1.1
revision            4
categories          devel ml audio
license             LGPL-2.1
maintainers         rastageeks.org:toots
description         OCaml bindings for the AAC decoding library
long_description    This port contains an O'Caml interface for the AAC audio \
                    decoder, otherwise known as libfaad.
homepage            http://savonet.sf.net/
platforms           darwin
master_sites        sourceforge:savonet

checksums           md5  e8ba083f756bf0ed28bd815c27faa9e4 \
                    sha1  a729cc5037617d4401ffa126b5448129c3a25853 \
                    rmd160  eb5134fd8b8c801c2f59b04496d912afafd77d89

depends_build       port:pkgconfig
depends_lib         port:ocaml \
                    port:ocaml-findlib \
                    port:faad2

configure.pkg_config    ${prefix}/bin/pkg-config

build.args          LIBDIRS=${prefix}/lib

pre-destroot {
  set ocamlfind_destdir "${destroot}[exec ${prefix}/bin/ocamlfind printconf destdir]"
  file mkdir $ocamlfind_destdir
  reinplace "s#\$(OCAMLFIND_INSTFLAGS)# -ldconf ignore -destdir '$ocamlfind_destdir'#g" \
    ${worksrcpath}/src/OCamlMakefile
}