# -*- 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 107904 2013-07-08 21:10:03Z devans@macports.org $

PortSystem      1.0

name            abiword-x11
set dname       abiword
version         2.8.6
revision        3
license         GPL
description     A word processor with gnome support.
long_description \
                ${description}
maintainers     nomaintainer
categories      editors textproc gnome
platforms       darwin
homepage        http://www.abisource.com/
master_sites    http://www.abisource.org/downloads/${dname}/${version}/source \
                http://www.nl.abisource.com/downloads/${dname}/${version}/source

checksums       md5     f883b0a7f26229a9c66fd6a1a94381aa \
                sha1    998f69d038000b3fc027d4259548f02d67c8d0df \
                rmd160  caabab25d197f9553ea12376de36fc7f5a771a58

distname        ${dname}-${version}

patchfiles      patch-configure.diff \
                patch-glib-2.32.diff \
                patch-libpng-1.5.diff \
                patch-src-Makefile.in.diff

depends_build   port:pkgconfig

depends_lib     port:desktop-file-utils \
                port:libgnomeui \
                port:libgsf \
                port:fribidi \
                port:wv \
                port:enchant \
                port:libpng \
                port:librsvg

configure.args  --disable-default-plugins

#
# port wv is not universal
#

universal_variant no

post-activate {
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
}

livecheck.type  regex
livecheck.url   http://www.abisource.com/downloads/${dname}/
livecheck.regex ">(\[0-9\]+\\.\[0-9\]*\[02468\]\\.\[0-9\]+)/<"
