diff options
author | Mikhail Teterin <mi@FreeBSD.org> | 2002-10-08 23:48:39 +0000 |
---|---|---|
committer | Mikhail Teterin <mi@FreeBSD.org> | 2002-10-08 23:48:39 +0000 |
commit | 3e2361eb5ae8aa6b8cda0217b47aee5a50bb4fc6 (patch) | |
tree | 3c8b40d85eef51c3280c511de2f9eb15834fb773 /mail/spamprobe | |
parent | 1f71ef255534c88f089928228b1369a77e174fb1 (diff) | |
download | ports-3e2361eb5ae8aa6b8cda0217b47aee5a50bb4fc6.tar.gz ports-3e2361eb5ae8aa6b8cda0217b47aee5a50bb4fc6.zip |
Notes
Diffstat (limited to 'mail/spamprobe')
-rw-r--r-- | mail/spamprobe/Makefile | 5 | ||||
-rw-r--r-- | mail/spamprobe/distinfo | 2 | ||||
-rw-r--r-- | mail/spamprobe/files/Makefile | 7 | ||||
-rw-r--r-- | mail/spamprobe/files/Makefile.export0_6 | 4 | ||||
-rw-r--r-- | mail/spamprobe/files/patch-md5 | 76 |
5 files changed, 87 insertions, 7 deletions
diff --git a/mail/spamprobe/Makefile b/mail/spamprobe/Makefile index 78d55d9084db..4d17e4b0a2da 100644 --- a/mail/spamprobe/Makefile +++ b/mail/spamprobe/Makefile @@ -6,7 +6,7 @@ # PORTNAME= spamprobe -PORTVERSION= 0.7a +PORTVERSION= 0.7c CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR=${PORTNAME} @@ -16,6 +16,7 @@ LIB_DEPENDS= db3.3:${PORTSDIR}/databases/db3 MAINTAINER= mdodd@freebsd.org MAKEFILE= ${FILESDIR}/Makefile +MAKE_ENV+= FILESDIR="${FILESDIR}" .include <bsd.port.pre.mk> @@ -24,7 +25,7 @@ post-build: @cd ${WRKSRC} && ${MAKE} -f ${FILESDIR}/Makefile.export0_6 post-extract: - @${CP} ${FILESDIR}/spamprobe.1 ${WRKSRC}/ + @${RM} -rf ${WRKSRC}/thirdparty post-install: @cd ${WRKSRC} && ${MAKE} -f ${FILESDIR}/Makefile.export0_6 install diff --git a/mail/spamprobe/distinfo b/mail/spamprobe/distinfo index eb8912579de7..92ea4bc7d06f 100644 --- a/mail/spamprobe/distinfo +++ b/mail/spamprobe/distinfo @@ -1 +1 @@ -MD5 (spamprobe-0.7a.tar.gz) = dcd2a409391c4842adaa84442019ccc1 +MD5 (spamprobe-0.7c.tar.gz) = 51e568a3bd908ca629537bb0f9acde8c diff --git a/mail/spamprobe/files/Makefile b/mail/spamprobe/files/Makefile index 17359d61f663..315e8ca48952 100644 --- a/mail/spamprobe/files/Makefile +++ b/mail/spamprobe/files/Makefile @@ -1,11 +1,14 @@ # $FreeBSD$ # + +.PATH: ${FILESDIR} + PREFIX?= /usr/local BINDIR= ${PREFIX}/bin MANDIR= ${PREFIX}/man/man PROG_CXX= spamprobe -CXXFLAGS= -Wall -DUSE_DB -I${PREFIX}/include/db3 -LDFLAGS= -L${PREFIX}/lib -ldb3 +CXXFLAGS+= -Wall -DUSE_DB -I${PREFIX}/include/db3 +LDFLAGS= -L${PREFIX}/lib -ldb3 -lmd SRCS= File.cc FrequencyDB.cc FrequencyDBImpl_bdb.cc \ FrequencyDBImpl_cache.cc FrequencyDBImpl_dbm.cc LockFile.cc \ Message.cc MessageFactory.cc MimeHeader.cc MimeLineReader.cc \ diff --git a/mail/spamprobe/files/Makefile.export0_6 b/mail/spamprobe/files/Makefile.export0_6 index 3e65e3a48633..bbd5cfd126d4 100644 --- a/mail/spamprobe/files/Makefile.export0_6 +++ b/mail/spamprobe/files/Makefile.export0_6 @@ -1,10 +1,10 @@ -# $FreeBSD: /tmp/pcvs/ports/mail/spamprobe/files/Attic/Makefile.export0_6,v 1.1 2002-09-16 19:36:22 mdodd Exp $ +# $FreeBSD: /tmp/pcvs/ports/mail/spamprobe/files/Attic/Makefile.export0_6,v 1.2 2002-10-08 23:48:39 mi Exp $ # PREFIX?= /usr/local BINDIR= ${PREFIX}/bin NOMAN= PROG_CXX= spamprobe-export_0.6 -CXXFLAGS= -Wall -DUSE_DBM +CXXFLAGS+= -Wall -DUSE_DBM SRCS= File.cc export0_6.cc .include <bsd.prog.mk> diff --git a/mail/spamprobe/files/patch-md5 b/mail/spamprobe/files/patch-md5 new file mode 100644 index 000000000000..8ae1e7847c8b --- /dev/null +++ b/mail/spamprobe/files/patch-md5 @@ -0,0 +1,76 @@ +--- MimeMessageReader.h Thu Sep 19 12:15:38 2002 ++++ MimeMessageReader.h Wed Sep 25 09:19:55 2002 +@@ -34,4 +34,7 @@ + #include "MimeHeader.h" ++#include <sys/types.h> ++#include <md5.h> ++#define MD5_DIGEST_LENGTH 16 + +-class md5_state_s; ++typedef unsigned char md5_digest_t[MD5_DIGEST_LENGTH*2 + 1]; + +@@ -64,3 +65,3 @@ + +- const string &getMD5Digest(); ++ const md5_digest_t &getMD5Digest(); + +@@ -105,4 +106,4 @@ + vector<MimeHeader> m_headers; +- string m_md5digest; +- NewPtr<md5_state_s> m_md5state; ++ md5_digest_t m_md5digest; ++ NewPtr<MD5_CTX> m_md5state; + }; +--- MimeMessageReader.cc Thu Sep 19 12:15:38 2002 ++++ MimeMessageReader.cc Wed Sep 25 22:56:17 2002 +@@ -30,4 +30,5 @@ + +-#include <cstdio> +-#include "md5.h" ++#include <sys/types.h> ++#include <md5.h> ++#define MD5_DIGEST_LENGTH 16 + #include "util.h" +@@ -93,4 +92,4 @@ + +- m_md5state.set(new md5_state_s); +- md5_init(m_md5state.get()); ++ m_md5state.set(new MD5_CTX); ++ MD5Init(m_md5state.get()); + +@@ -140,3 +139,3 @@ + } +- md5_append(m_md5state.get(), (md5_byte_t *)value.data(), value.length()); ++ MD5Update(m_md5state.get(), (const unsigned char *)value.data(), value.length()); + } +@@ -228,3 +227,3 @@ + +-const string &MimeMessageReader::getMD5Digest() ++const md5_digest_t &MimeMessageReader::getMD5Digest() + { +@@ -236,11 +235,10 @@ + +- m_md5digest.erase(); +- +- md5_byte_t raw_digest[32]; +- char hexcode[8]; +- md5_finish(m_md5state.get(), raw_digest); +- for (int i = 0; i < 16; ++i) { +- sprintf(hexcode, "%02x", (unsigned)raw_digest[i]); +- m_md5digest += hexcode; ++ MD5Final(m_md5digest + MD5_DIGEST_LENGTH + 1, m_md5state.get()); ++ for (int i = 0; i < MD5_DIGEST_LENGTH; i++) { ++ char hexdigits[] = "0123456789abcdef"; ++ m_md5digest[i*2] = hexdigits[m_md5digest[i + MD5_DIGEST_LENGTH + 1] >> 4]; ++ m_md5digest[i*2 + 1] = ++ hexdigits[m_md5digest[i + MD5_DIGEST_LENGTH + 1] & 0x0f]; + } ++ m_md5digest[MD5_DIGEST_LENGTH*2 + 1] = '\0'; + m_md5state.clear(); +--- MessageFactory.cc Tue Sep 17 17:39:36 2002 ++++ MessageFactory.cc Tue Oct 8 18:59:07 2002 +@@ -127,3 +127,3 @@ + +- msg.setDigest(reader.getMD5Digest()); ++ msg.setDigest((char *)reader.getMD5Digest()); + |