# -*- 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 87619 2011-11-29 01:07:43Z devans@macports.org $

PortSystem 1.0

name            alacarte
version         0.13.2
epoch           1
revision        4
license         GPL-2+
set branch      [join [lrange [split ${version} .] 0 1] .]
description     A simple freedesktop.org compliant menu editor for use with GNOME

long_description \
                ${description}

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

use_bzip2       yes

checksums       md5     de84e437babebe036ab8dc9a518282ca \
                sha1    6eb6a0f308be0da84ead38fbfae0b247743f6038 \
                rmd160  97924d34e9d460267b6118a01488b635551a8aaa

supported_archs noarch

depends_build   port:pkgconfig \
                port:intltool

depends_lib     port:gnome-menus

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

variant python25 conflicts python26 python27 description {Use python 2.5} {
    configure.python          ${prefix}/bin/python2.5
    depends_lib-append        port:py25-gtk
}

variant python26 conflicts python25 python27 description {Use python 2.6} {
    configure.python          ${prefix}/bin/python2.6
    depends_lib-append        port:py26-gtk
}

variant python27 conflicts python25 python26 description {Use python 2.7} {
    configure.python          ${prefix}/bin/python2.7
    depends_lib-append        port:py27-gtk
}

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

post-destroot {
    file rename ${destroot}${prefix}/bin/alacarte.py ${destroot}${prefix}/bin/alacarte
}

post-activate {
    system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
}

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