Portfile

# $Id: Portfile 23053 2007-03-23 20:35:47Z pipping@macports.org $

PortSystem 1.0
name dict
version 1.9.7
categories textproc spelling
maintainers landonf@macports.org
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_lib lib:ltdl.3:libtool

patchfiles patch-configure

configure.args --without-local-zlib --with-etcdir=${prefix}/etc
configure.env CPPFLAGS=-I${prefix}/include LDFLAGS=-L${prefix}/lib
build.type gnu
build.target dict
destroot.target install.dict

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

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

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

files