freebsd-ports/mail/mboxgrep/files/patch-noredundancy
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

16 lines
463 B
Text

--- src/Makefile.in Sun Mar 30 18:07:10 2003
+++ src/Makefile.in Tue Feb 27 16:50:18 2007
@@ -22,10 +22,10 @@
CC = @CC@
OBJS = info.o main.o mh.o scan.o maildir.o mbox.o misc.o \
- wrap.o getopt.o getopt1.o md5.o
+ wrap.o
SRCS = info.c main.c mh.c scan.c maildir.c mbox.c misc.c \
- wrap.c getopt.c getopt1.c md5.c
+ wrap.c
TARGET = mboxgrep
CFLAGS = @CFLAGS@
-LIBS = @LIBS@
+LIBS = @LIBS@ -lcrypto
INSTALL = @INSTALL@
prefix = @prefix@