# -*- 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
PortGroup active_variants 1.1
github.setup garrigue lablgtk lablgtk2188
maintainers {pmetzger @pmetzger} openmaintainer
# the apps have a much more restrictive license than the library code
license {LGPL-2 Restrictive/Distributable}
description OCaml interface to gtk+ 2.x
long_description LablGTK2 is is an OCaml interface to gtk+ 2.x. \
It uses the rich type system of OCaml to provide a \
strongly typed, yet very comfortable, object-oriented \
github.tarball_from releases
distname ${github.project}-${version}
homepage http://lablgtk.forge.ocamlcore.org/
checksums rmd160 82d73a490a71b9978b0df275fd3ce818a2639b0e \
sha256 91f59bafd07989ea00080f4fd65512ce339878c7117bf5116bad3b93b64d4de3 \
depends_build port:pkgconfig
configure.args --with-libdir=${ocamlfind_dir} \
--without-gtksourceview \
# Temporarily disable installation of docs until the docs
# no longer depend on camlp4
pre-destroot { xinstall -m 755 -d "${destroot}${prefix}/lib/ocaml/site-libs/stublibs" }
destroot.target old-install
xinstall -m 755 -d ${ocamlfind_destdir}/lablgtk2 \
${destroot}${prefix}/share/doc/${name}
# Temporarily disable installation of docs until the docs
# no longer depend on camlp4
#file copy ${worksrcpath}/doc/html ${destroot}${prefix}/share/doc/${name}/
variant gl description "enable gtkglarea support" {
configure.args-delete --without-gl
configure.args-append --with-gl
depends_lib-append port:lablgl port:gtkglarea2
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
variant gtksourceview2 description "enable gtksourceview2 support" {
configure.args-delete --without-gtksourceview2