# $Id$

PortSystem          1.0

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

checksums           md5  77ca55b93a90bf672e7a41b50a679f0d \
                    sha1  9d7c17fdd5a186439eef91166a690776fc063192 \
                    rmd160  7a5c426d50ae952c3e35522506ab632e7a57f026

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

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
}