# -*- 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
# $Id: Portfile 68495 2010-06-05 02:56:18Z rmsfisher@macports.org $

PortSystem      1.0

name            gtk-doc
version         1.15
categories      gnome devel
platforms       darwin freebsd linux
maintainers     devans openmaintainer
description     GTK+/GNOME API documentation generator

long_description \
    GTK-Doc generates API documentation from comments added to C code. \
    It is typically used to document the public API of GTK+  and GNOME \
    libraries, but it can also be used to document application code.

homepage        http://www.gtk.org/gtk-doc/
master_sites    gnome:sources/${name}/${version}/
use_bzip2       yes

checksums           md5     c022788b1fbbec30d55df4ccb34eeb90 \
                    sha1    fc1c593e8107cbe33451e3e938ca14b59104e999 \
                    rmd160  142ad9dca015ba69261fe44847f3a27721e06551

depends_build   port:rarian \
                port:gnome-doc-utils \
                port:pkgconfig \
                port:docbook-xml \
                port:docbook-xsl

depends_lib     port:libxml2 \
                path:bin/perl:perl5

# Default to python 2.6, the current production version of python

configure.python ${prefix}/bin/python2.6

configure.perl ${prefix}/bin/perl
configure.args  --with-xml-catalog=${prefix}/etc/xml/catalog

# TODO Enable test support.

post-activate {
    ui_debug "Updating scrollkeeper database..."
    system "${prefix}/bin/scrollkeeper-update"
}


variant python25 description {Configure to use python 2.5 instead of default 2.6} {
    depends_lib-delete      port:python26
    depends_lib-append      port:python25
    depends_run-delete      port:py26-libxml2
    depends_run-append      port:py25-libxml2
    configure.python        ${prefix}/bin/python2.5
}

livecheck.type  regex
livecheck.url   http://ftp.gnome.org/pub/gnome/sources/${name}/?C=M&O=D
livecheck.regex {(\d+(?:\.\d+)*)/}
