# -*- 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        ygrek ocaml-extlib 1.7.6
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0
categories          ocaml devel
maintainers         {pmetzger @pmetzger} openmaintainer
license             LGPL-2.1
description         Extended Standard Library for OCaml
long_description    A User-supported Extended Standard Library for OCaml

checksums           rmd160  f1e4572a6bd83f789c1493fc1389b56ab0849943 \
                    sha256  f2d81ede59ec0c0f074623276638a3947c2fcbe5bdd810db84ee37d192169f1d \
                    size    88084

depends_build       port:ocaml-cppo
depends_lib         port:ocaml port:ocaml-findlib

use_configure       no

post-patch           {
    reinplace s|^VERSION:=\$(shell.*|| ${worksrcpath}/Makefile
}

use_parallel_build  no
build.target        minimal=1 build
destroot.target     minimal=1 install

pre-destroot {
        set extlib_destdir ${destroot}[exec ${prefix}/bin/ocamlfind printconf destdir]
        xinstall -m 755 -d ${extlib_destdir}
        reinplace "s|ocamlfind install|ocamlfind install -destdir ${extlib_destdir} |" ${worksrcpath}/src/Makefile
}

test.run            yes
