# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 87633 2011-11-29 21:04:32Z devans@macports.org $

PortSystem 1.0

name            devhelp
version         2.30.1
revision        6
license         GPL-2+
set branch      [join [lrange [split ${version} .] 0 1] .]
description     Devhelp is an API documentation browser for GTK+ and GNOME.
long_description \
                Devhelp is an API documentation browser for GTK+ and GNOME. It works \
                natively with gtk-doc (the API reference framework developed for GTK+ \
                and used throughout GNOME for API documentation). If you use gtk-doc \
                with your project, you can use Devhelp to browse the documentation.

maintainers     devans openmaintainer
categories      gnome
platforms       darwin
homepage        http://live.gnome.org/${name}
master_sites    gnome:sources/${name}/${branch}/
use_bzip2       yes

checksums       md5     447413a54d3bec2480e9a290e261703d \
                sha1    51eda53f04080eaae75b6e62e222b98fe5bb0d6f \
                rmd160  2ce6762a7838afad03f237ab0ac662cae426163c

patchfiles      patch-configure.diff \
                patch-src-Makefile.in.diff

depends_build   port:pkgconfig \
                port:intltool

depends_lib     port:webkit-gtk \
                port:gconf  \
                port:libwnck \
                port:libunique

configure.args  --disable-schemas-install

variant python25 conflicts python26 python27 description {Build using Python 2.5} {
    configure.python          ${prefix}/bin/python2.5
    depends_build-append      port:python25
}

variant python26 conflicts python25 python27 description {Build using Python 2.6} {
    configure.python          ${prefix}/bin/python2.6
    depends_build-append      port:python26
}

variant python27 conflicts python25 python26 description {Build using Python 2.7} {
    configure.python          ${prefix}/bin/python2.7
    depends_build-append      port:python27
}

if {![variant_isset python25] && ![variant_isset python26]} {
    default_variants +python27
}

post-activate {
        system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
        system "export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` && \
            gconftool-2 --makefile-install-rule ${prefix}/etc/gconf/schemas/*.schemas"
}

livecheck.type  regex
livecheck.url   http://ftp.gnome.org/pub/gnome/sources/${name}/${branch}/
livecheck.regex {LATEST-IS-(\d+(?:\.\d+)*)}
