# $Id: Portfile 70037 2010-07-27 17:14:35Z ryandesign@macports.org $

PortSystem          1.0

name                caml-hydro
version             0.7.1
categories          devel ml net
maintainers         mww openmaintainer
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           md5     df2d15e50a28cfda14cc86ef4f19adc2 \
                    sha1    0c444fbc593e0e0d45eff2f18dc4fc64d4791a81 \
                    rmd160  e61fa9f3c7a4a7d7d970a90eb50152977f3af5d1


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

patch {
    set ocaml_site_path [exec ocamlfind printconf destdir]
    reinplace "s|ocamlfind install|ocamlfind install -destdir ${destroot}/${ocaml_site_path}|g" \
        ${worksrcpath}/src/hydro/OMakefile ${worksrcpath}/src/hydrogen/OMakefile ${worksrcpath}/src/hydromon/OMakefile
}

use_configure       no

build.target        all opt
use_parallel_build  no

pre-destroot {
    set ocaml_site_path [exec ocamlfind printconf destdir]
    file mkdir ${destroot}${ocaml_site_path}/stublibs
}

post-destroot {
    xinstall -m 755 ${filespath}/hydrogen ${destroot}${prefix}/bin
}

