# -*- 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 79385 2011-06-12 07:59:29Z jmr@macports.org $

PortSystem 1.0

name		atkmm
version		2.22.5
set branch      [join [lrange [split ${version} .] 0 1] .]
description	atkmm is the C++ binding for the ATK library.
long_description \
                ${description} This port is part of the GNOME C++ bindings suite.

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

checksums       md5     d56fe2b29d4c88fa270918e5572fc8cf \
                sha1    0cae95ac770fb7adda7aea392916d16be195fc07 \
                rmd160  4a37e35fe6718bce6e62d4a2ab8081820c456e34

dist_subdir     ${name}/${version}_${revision}

depends_build   port:pkgconfig

depends_lib	port:atk \
                port:glibmm

pre-activate {
    if { [file exists ${prefix}/lib/pkgconfig/atkmm-1.6.pc]
        && ![catch {set vers [lindex [registry_active gtkmm] 0]}]
        && [rpm-vercomp [lindex $vers 1] 2.22.0] < 0} {
        
        set deactivate_proc registry_deactivate_composite
        if {[info commands registry_deactivate_composite] == {}} {
            set deactivate_proc registry_deactivate
        }
        $deactivate_proc gtkmm "" [list ports_nodepcheck 1]
    }
}

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