freebsd-ports/net/dictd/Makefile
Dima Dorfman 302878302d The regexp used to change T_USER to T_USERNAME only works if the
symbol is preceded by whitespace.  However, on line 64 of servscan.l,
the symbol is preceded by a parenthesis, so it is left alone.  On
i386, T_USER is defined, so the build proceeds, but there may still be
adverse side effects due to that routine returning the wrong thing in
some cases.  The bandaid is to fix the regexp to catch the case where
T_USER is used after a parenthesis--this is what's being committed.  The
real fix is either to make the author use T_USERNAME for us, or,
preferably, don't define T_USER when sys/param.h is included since
T_USER is in the application namespace.

Approved by:	maintainer timeout
2002-04-12 02:25:10 +00:00

50 lines
1.3 KiB
Makefile

# ex:ts=8
# New ports collection makefile for: dictd
# Date created: Jan 23, 2001
# Whom: Ying-Chieh Liao <ijliao@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= dictd
PORTVERSION= 1.5.5
PORTREVISION= 3
CATEGORIES= net textproc
MASTER_SITES= ftp://ftp.dict.org/pub/dict/
MAINTAINER= ijliao@FreeBSD.org
MAN1= dictzip.1
MAN8= dictd.8
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-etcdir=${PREFIX}/etc --with-cflags="${CFLAGS}" \
--without-local-zlib
CONFIGURE_ENV= CFLAGS="${CFLAGS}"
USE_GMAKE= yes
ALL_TARGET= dictd dictzip
INSTALL_TARGET= install.dictd install.dictzip
post-patch:
.for i in dict.1 dictd.8
@${PERL} -pi -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/$i
.endfor
.for i in example.conf
@${PERL} -pi -e "s|/usr|${PREFIX}|g" ${WRKSRC}/$i
.endfor
@${PERL} -pi -e "s|%%CFLAGS%%|${CFLAGS}|g" ${WRKSRC}/zlib/Makefile
@${PERL} -pi -e "s|([\ \t(])T_USER|\1T_USERNAME|g" ${WRKSRC}/*.[chly]
post-install:
@${MKDIR} ${DATADIR}
.for i in example.conf example.dictrc example.site example2.conf example3.conf
${INSTALL_DATA} ${WRKSRC}/$i ${DATADIR}
.endfor
@${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/${PORTNAME}.conf > ${PREFIX}/etc/${PORTNAME}.conf
@${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/${PORTNAME}.sh > ${PREFIX}/etc/rc.d/${PORTNAME}.sh
@${CHMOD} +x ${PREFIX}/etc/rc.d/${PORTNAME}.sh
@${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${PKGMESSAGE}
.include <bsd.port.mk>