# -*- 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

PortSystem      1.0

name            gnome-photo-print
set gname       gpp
version         0.7.0
license         GPL-2+
description     Gnome Photo Printer is intended for printing photos in an easy way.
long_description \
                ${description}
maintainers     nomaintainer
categories      gnome
homepage        http://www.fogman.de/?page_id=7
distname        ${gname}-${version}
master_sites    http://www.fogman.de/gpp/

checksums       md5     ff8fdd9a8f741b346a8d87045d1d02e3 \
                sha1    e79ee69c7fb3961f1c8fb28e00f88f4d4ecedb97 \
                rmd160  7a96e9b5cd05f2c6ce8017888aa2751934283a80

depends_build   port:autoconf \
                port:automake \
                port:intltool \
                port:libtool \
                path:bin/pkg-config:pkgconfig

depends_lib     port:libgnomeprintui \
                port:libgnomeui \
                port:desktop-file-utils

patchfiles      patch-autogen.sh.diff

# reconfigure using upstream autogen.sh for intltool 0.51 compatibility

configure.cmd   ./autogen.sh
configure.env   ACLOCAL=${prefix}/bin/aclocal \
                AUTOCONF=${prefix}/bin/autoconf \
                AUTOHEADER=${prefix}/bin/autoheader \
                AUTOMAKE=${prefix}/bin/automake \
                LIBTOOL=${prefix}/bin/glibtool \
                LIBTOOLIZE=${prefix}/bin/glibtoolize

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

livecheck.type  regex
livecheck.regex "${gname}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
