# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0

github.setup        xavierleroy ocamlmpi 1.17 v
github.tarball_from tarball
name                ocaml-mpi
revision            0
categories          science devel ocaml
maintainers         nomaintainer
license             LGPL-2
description         Caml bindings for a large subset of MPI functions
long_description    ${description}
homepage            https://github.com/xavierleroy/ocamlmpi

checksums           rmd160  0be5de340358c52fda3c0a86319031dc37b53d0a \
                    sha256  fed478ef93c308f31a93c292f4fa15b6837161c526198c8f80642e34dac2b607 \
                    size    38619

depends_lib-append  port:ocaml \
                    port:ocaml-findlib \
                    path:bin/mpicc-mp:mpich-default

patchfiles          Makefile.diff

use_configure       no
use_parallel_build  no

build.args          MPIINCDIR=${prefix}/include/mpich-mp \
                    MPILIBDIR=${prefix}/lib/mpich-mp

set ocamlfind_destdir ${destroot}${prefix}/lib/ocaml/site-lib
destroot.env        "OCAMLFIND_INSTFLAGS=-destdir $ocamlfind_destdir -ldconf ignore" OCAMLFIND_STUBLIBS=${ocamlfind_destdir}/stublibs
destroot.target     install

pre-destroot {
    file mkdir $ocamlfind_destdir
}

livecheck.type      regex
livecheck.url       https://github.com/xavierleroy/ocamlmpi/releases
livecheck.regex     {v(\d+\.\d+)}
