# -*- 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 89810 2012-02-11 08:55:39Z and.damore@macports.org $

PortSystem 1.0

name		atkmm
version		2.22.6
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
license		LGPL-2.1+
platforms	darwin
homepage	http://www.gtkmm.org/
master_sites    gnome:sources/${name}/${branch}/
use_bzip2	yes

checksums       md5     7c35324dd3c081a385deb7523ed6f287 \
                sha1    9ca44756821f4d431c554e1cf8184989bb25ce12 \
                rmd160  2fa8f5a0ceed2679c9f4d4c2828defaa831580ac

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]}]
        && [vercmp [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+)*)}
