# -*- 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 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem 1.0

name		abiword-x11
set dname       abiword
version		2.6.8
description	A word processor with gnome support.
long_description        A word processor with gnome support.
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     fab04d8ef999c303f720197adf261310 \
                sha1    fc979982edc3445385705afdb1e2ebb1fa53a4f6 \
                rmd160  8fcf455a5226a5525b9a89f88c9916b20e973607

distname	${dname}-${version}

patchfiles      patch-configure.diff

depends_lib	\
        port:gtk2 \
        port:libglade2 \
        port:libgsf \
        port:libgnomeui \
	port:libgnomeprintui \
   	port:fribidi \
	port:wv \
	port:ImageMagick \
        port:enchant

configure.args	\
	--disable-Cocoa \
	--disable-Carbon \
	--x-includes=${prefix}/include \
        --x-libraries=${prefix}/lib \
        --mandir=${prefix}/share/man \
	--with-expat=${prefix} \
	--with-fribidi=${prefix} \
	--with-ImageMagick=${prefix} \
	--with-libiconv=${prefix} \
	--with-libjpeg-prefix=${prefix} \
	--with-libpng=${prefix} \
	--with-popt=${prefix} \
	--with-zlib=${prefix} \
	--without-epath \
	--enable-gnome

variant without_gnome description {Disable GNOME support} {
	configure.args-delete	--enable-gnome
        depends_lib-delete	\
		port:libgnomeui \
                port:libgnomeprintui
}

platform darwin 9 {
	post-patch {
		reinplace "s|#define ICONV_CONST const|#define ICONV_CONST|g" ${worksrcpath}/src/af/util/xp/ut_iconv.cpp
	}
}

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