# $Id: Portfile 79085 2011-06-01 23:55:17Z jmr@macports.org $

PortSystem          1.0

name                ocaml-ogg
version             0.2.0
categories          devel ml multimedia
maintainers         rastageeks.org:toots
description         OCaml bindings for the libogg multimedia library
long_description    This port contains an O'Caml interface for the Ogg \
                    bitstream library, otherwise known as libogg.
homepage            http://savonet.sf.net/
platforms           darwin
master_sites        sourceforge:savonet

checksums           md5  eec171992ebb0cb24ec5877de51923ca \
                    sha1  c632364a997ed53a9bb97f6f340d0d6558d810cb \
                    rmd160  b8676342670e07ddc5008507184c3d6359babf9c

depends_build       port:pkgconfig
depends_lib         port:ocaml \
                    port:caml-findlib \
                    port:libogg

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
}
