# $Id: Portfile 66893 2010-04-24 21:34:18Z ryandesign@macports.org $

PortSystem          1.0

name                lablgtk2
version             2.14.0
categories          x11 ml
maintainers         nomaintainer
description         Objective Caml interface to gtk+ 2.x
long_description    LablGTK2 is is an Objective Caml interface to gtk+ 2.x. \
                    It uses the rich type system of Objective Caml 3 to provide a \
                    strongly typed, yet very comfortable, object-oriented interface to \
                    gtk+. This is not that easy if you know the dynamic typing approach \
                    taken by gtk+.
homepage            http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html
platforms           darwin
master_sites        http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/
distname            lablgtk-${version}
checksums           md5        8a26ab3b749ea86d06b2868112332c33 \
                    sha1    4454747e6056181730e68ec253a1ec0f0a644867 \
                    rmd160    fa72ad547b3a169710f137c7fc1e7f841af437f0
depends_lib         port:ocaml \
                    port:caml-findlib \
                    port:gtk2 \
                    port:libglade2 \
                    port:libgnomecanvas \
                    port:libgnomeui
configure.args      --without-gl --without-rsvg --with-glade \
                    --with-gnomecanvas --with-gnomeui --without-panel \
                    --without-gtkspell --without-gtksourceview
build.target        world
patchfiles          patch-META patch-SourceView2Enums
use_parallel_build  no
universal_variant   no

variant rsvg description "enable rsvg support" {
    configure.args-delete    --without-rsvg
    configure.args-append    --with-rsvg
    depends_lib-append        port:librsvg
}

variant gtksourceview description "enable gtksourceview support" {
    configure.args-delete    --without-gtksourceview
    configure.args-append    --with-gtksourceview
    depends_lib-append        port:gtksourceview
}

post-destroot {
    set ocaml_site_path [exec ocamlfind printconf destdir]
    file mkdir ${destroot}/${ocaml_site_path}/lablgtk2
    file copy ${worksrcpath}/META ${destroot}/${ocaml_site_path}/lablgtk2
}

livecheck.type    regex
livecheck.regex    {<DT> <a href="dist/lablgtk-(2.*?).tar.gz">lablgtk-\1.tar.gz</a>}
