# $Id$

PortSystem          1.0
PortGroup           ocaml 1.0

name                ocaml-hydro
version             0.7.1
revision            6
categories          devel ml net
maintainers         mww openmaintainer
license             BSD
description         Hydro is an implementation of ICE, the object-oriented RPC protocol
long_description    Hydro is an independent implementation of ICE, the \
                    object-oriented RPC protocol by ZeroC, for the O'Caml \
                    programming language. ZeroC sees ICE as a superior \
                    successor to CORBA.

homepage            http://oss.wink.com/hydro/
platforms           darwin
master_sites        ${homepage}

distname            hydro-${version}

checksums           rmd160  e61fa9f3c7a4a7d7d970a90eb50152977f3af5d1 \
                    sha256  0ce9389100be03ee1ae48809cedce3711aba7b9bf008516fc90ab958d77fbcac

depends_lib         port:ocaml \
                    port:ocaml-findlib \
                    port:ocaml-pcre \
                    port:ocaml-ocamlnet \
                    port:omake

patch {
    reinplace "s|ocamlfind|${ocamlfind_wrapper}|g" \
        ${worksrcpath}/src/hydro/OMakefile ${worksrcpath}/src/hydrogen/OMakefile ${worksrcpath}/src/hydromon/OMakefile
}

use_configure       no

build.target        all opt
use_parallel_build  no

post-destroot {
    xinstall -m 755 ${filespath}/hydrogen ${destroot}${prefix}/bin
    reinplace "s|@OCAMLFIND@|${prefix}/bin/ocamlfind|g" ${destroot}${prefix}/bin/hydrogen
}

livecheck.type      regex
livecheck.regex     hydro-(\[0-9\.\]+)\.tar\.gz