freebsd-ports/mail/mboxgrep/Makefile
Mikhail Teterin bd40f13590 Don't use the bundled md5.c and getopt1.c in favor of OpenSSL and
USE_GETOPT_LONG respectively. This reduces the executable's size
considerably. (More ports should be doing this.)

When comparing md5 checksums (used to detect duplicates in the
input), treat each as a pair of 8-byte integers instead of calling
strncmp, which was just plain buggy. Memcmp should've been used
instead, but two integer comparisions are even faster.

Re-work the resizable array of checksums removing a separate malloc
call for each md5 checksum. This reduces the runtime memory consumption
considerably. (Tried using a hashtable instead of linearly searching
through the array, but did not see a speed-gain even over a large
collection of messages.)

Vendor notified, but has not responded (the software's last release
is several years old).

Bump PORTREVISION.

Approved by:	maintainer
2007-03-09 08:05:08 +00:00

44 lines
957 B
Makefile

# New ports collection makefile for: mboxgrep
# Date created: 28 October 2001
# Whom: Anders Nordby <anders@fix.no>
#
# $FreeBSD$
#
PORTNAME= mboxgrep
PORTVERSION= 0.7.9
PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= anders@FreeBSD.org
COMMENT= Utility to scan mailboxes for messages matching a regular expression
.if defined(WITH_PCRE)
LIB_DEPENDS= pcre.0:${PORTSDIR}/devel/pcre
.endif
GNU_CONFIGURE= yes
CONFIGURE_ENV+= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" LIBS="-L${LOCALBASE}/lib"
USE_OPENSSL= yes
USE_GETOPT_LONG=yes
MAN1= mboxgrep.1
INFO= mboxgrep
DOCS= ChangeLog NEWS README TODO
post-patch:
@${REINPLACE_CMD} -e 's,void \*tmpp,FILE \*tmpp,g' ${WRKSRC}/src/main.c
post-install:
.if !defined(NOPORTDOCS)
${INSTALL} -d -o root -g wheel -m 0755 ${DOCSDIR}
.for f in ${DOCS}
${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/
.endfor
.endif
.include <bsd.port.mk>