# $Id$

PortSystem          1.0

name                ocaml-zip
version             1.04
revision            4
categories          devel ml
maintainers         nomaintainer
license             LGPL-2
description         read and write ZIP, JAR and GZIP files from OCaml
long_description    ${description}
homepage            http://cristal.inria.fr/~xleroy/software.html
platforms           darwin

master_sites        http://caml.inria.fr/distrib/bazar-ocaml \
                    https://forge.ocamlcore.org/frs/download.php/328/
distname            camlzip-${version}

checksums           md5     b3930f4f2e2563b9a5e1b17aa455e635 \
                    sha1    43660307fba6243bf2e2e0c8c6ac078477c9d9f9 \
                    rmd160  37a1aae1f84ee30c5f2f0ee2e4b603bf2b5bf397

depends_lib         port:ocaml \
                    port:ocaml-findlib \
                    port:zlib

patchfiles          Makefile.diff

post-patch {
    file copy ${filespath}/META ${worksrcpath}
}

use_configure       no
use_parallel_build  no

build.env           PREFIX=${prefix}
build.target        all allopt

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     ocamlfind-install

pre-destroot {
    file mkdir $ocamlfind_destdir
}

livecheck.type      regex
livecheck.regex     "camlzip-(.*?).tar.gz"