# $Id: Portfile 54295 2009-07-24 18:22:08Z toby@macports.org $

PortSystem 1.0
name			dict
version			1.9.7
revision		1
categories		textproc spelling
maintainers		landonf
description		Dictionary Server Protocol (RFC2229) client
long_description	The Dictionary Server Protocol (DICT) is a TCP \
			transaction based query/response protocol that \
			allows a client to access dictionary definitions \
			from a set of natural language dictionary databases. \
			dict(1) is a client which can access DICT servers \
			from the command line.
homepage		http://www.dict.org/
platforms		darwin freebsd

master_sites		ftp://ftp.dict.org/pub/dict/
distname		${name}d-${version}
checksums		md5 baa8f18dd0373e7053658be99d40d5db
depends_build		lib:ltdl.3:libtool

patchfiles		patch-configure

configure.args		--without-local-zlib --with-etcdir=${prefix}/etc --mandir=${prefix}/share/man
build.type		gnu
build.target		dict
destroot.target		install.dict

platform darwin {
	patchfiles-append	patch-libmaa-config.guess patch-libmaa-config.sub patch-libmaa_parse.c patch-regex-ranlib
}

platform freebsd {
	patchfiles-append	freebsd-T_USER.diff
}

post-patch {
	reinplace s|/etc/|${prefix}/etc/|g "${workpath}/${distname}/dict.1"
}
