diff options
author | Mikhail Teterin <mi@FreeBSD.org> | 2005-06-23 12:58:01 +0000 |
---|---|---|
committer | Mikhail Teterin <mi@FreeBSD.org> | 2005-06-23 12:58:01 +0000 |
commit | ad12d82a6ad889b91036289fb3b6072ab7cce186 (patch) | |
tree | 6cbdf2ccfcfecbb4d90bf6ca7a212b08a015d940 /mail/spamprobe | |
parent | d3512b4b2dc287cfed7d4a116a937361ea14ec33 (diff) | |
download | ports-ad12d82a6ad889b91036289fb3b6072ab7cce186.tar.gz ports-ad12d82a6ad889b91036289fb3b6072ab7cce186.zip |
Notes
Diffstat (limited to 'mail/spamprobe')
-rw-r--r-- | mail/spamprobe/Makefile | 11 | ||||
-rw-r--r-- | mail/spamprobe/distinfo | 4 | ||||
-rw-r--r-- | mail/spamprobe/files/patch-MessageFactory.cc | 39 | ||||
-rw-r--r-- | mail/spamprobe/files/patch-md5 | 93 | ||||
-rw-r--r-- | mail/spamprobe/files/patch-strings | 14 |
5 files changed, 115 insertions, 46 deletions
diff --git a/mail/spamprobe/Makefile b/mail/spamprobe/Makefile index 67d6ba13cc02..e074c04839d4 100644 --- a/mail/spamprobe/Makefile +++ b/mail/spamprobe/Makefile @@ -6,7 +6,7 @@ # PORTNAME= spamprobe -PORTVERSION= 1.0a +PORTVERSION= 1.2 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -14,18 +14,19 @@ MASTER_SITE_SUBDIR= ${PORTNAME} MAINTAINER= ports@FreeBSD.org COMMENT= Spam detector using Bayesian analysis of word counts -LIB_DEPENDS= db4.0:${PORTSDIR}/databases/db4 +LIB_DEPENDS= db4:${PORTSDIR}/databases/db4 GNU_CONFIGURE= yes CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" -CONFIGURE_ARGS= --enable-default-8bit +CONFIGURE_ARGS= --enable-default-8bit --enable-cdb MAN1= spamprobe.1 PLIST_FILES= bin/spamprobe +USE_OPENSSL= yes -CPPFLAGS= -I${LOCALBASE}/include/db4 -LDFLAGS= -L${LOCALBASE}/lib -ldb4 +CPPFLAGS= -I${LOCALBASE}/include/db4 -I${OPENSSLINC} +LDFLAGS= -L${LOCALBASE}/lib -ldb4 -lcrypto post-install: @${CAT} ${PKGMESSAGE} diff --git a/mail/spamprobe/distinfo b/mail/spamprobe/distinfo index a5952ce9b2bf..106354066829 100644 --- a/mail/spamprobe/distinfo +++ b/mail/spamprobe/distinfo @@ -1,2 +1,2 @@ -MD5 (spamprobe-1.0a.tar.gz) = 54d34264a0a625b065ddd3f3827d74c5 -SIZE (spamprobe-1.0a.tar.gz) = 165747 +MD5 (spamprobe-1.2.tar.gz) = daec4d835b254402781dcf511271f42b +SIZE (spamprobe-1.2.tar.gz) = 189188 diff --git a/mail/spamprobe/files/patch-MessageFactory.cc b/mail/spamprobe/files/patch-MessageFactory.cc deleted file mode 100644 index 9f266c8244ef..000000000000 --- a/mail/spamprobe/files/patch-MessageFactory.cc +++ /dev/null @@ -1,39 +0,0 @@ - -$FreeBSD$ - ---- MessageFactory.cc.orig Mon Jan 26 22:49:13 2004 -+++ MessageFactory.cc Thu Feb 12 16:25:43 2004 -@@ -27,7 +27,7 @@ - // - - #include <set> --#include <strstream> -+#include <sstream> - #include "FrequencyDB.h" - #include "Tokenizer.h" - #include "MessageFactory.h" -@@ -58,13 +58,13 @@ - MessageFactory::MessageFactory() - : m_minWordLength(1), - m_maxWordLength(90), -+ m_phraser(new PhraseBuilder(2)), - m_replaceNonAsciiChars(true), - m_nonAsciiChar('z'), - m_removeHTML(true), - m_keepSuspiciousTags(false), - m_ignoreBody(false), -- m_headersToInclude(NORMAL_HEADERS), -- m_phraser(new PhraseBuilder(2)) -+ m_headersToInclude(NORMAL_HEADERS) - { - } - -@@ -383,7 +383,7 @@ - text += ' '; - } else if (entity[0] == '#') { - int code = 0; -- istrstream in(entity.c_str() + 1); -+ istringstream in(entity.c_str() + 1); - in >> code; - text += safe_char(code); - } else { diff --git a/mail/spamprobe/files/patch-md5 b/mail/spamprobe/files/patch-md5 new file mode 100644 index 000000000000..496129c7c788 --- /dev/null +++ b/mail/spamprobe/files/patch-md5 @@ -0,0 +1,93 @@ +Use OpenSSL's optimized MD5-implementation instead of compiling our own + + -mi + +--- Makefile.in Tue Jun 21 22:23:57 2005 ++++ Makefile.in Wed Jun 22 17:29:23 2005 +@@ -135,5 +135,4 @@ + WordArray.cc\ + hash.c\ +- md5.c\ + spamprobe.cc\ + util.cc +@@ -196,5 +195,4 @@ + MBoxMailMessageReader.h\ + MD5Digester.h\ +- md5.h\ + Message.h\ + MessageHeader.h\ +@@ -266,5 +264,5 @@ + Tokenizer.$(OBJEXT) TraditionalMailMessageParser.$(OBJEXT) \ + UrlOnlyHtmlTokenizer.$(OBJEXT) WordArray.$(OBJEXT) \ +- hash.$(OBJEXT) md5.$(OBJEXT) spamprobe.$(OBJEXT) util.$(OBJEXT) ++ hash.$(OBJEXT) spamprobe.$(OBJEXT) util.$(OBJEXT) + spamprobe_OBJECTS = $(am_spamprobe_OBJECTS) + spamprobe_LDADD = $(LDADD) +@@ -330,5 +328,5 @@ + @AMDEP_TRUE@ ./$(DEPDIR)/UrlOnlyHtmlTokenizer.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/WordArray.Po ./$(DEPDIR)/hash.Po \ +-@AMDEP_TRUE@ ./$(DEPDIR)/md5.Po ./$(DEPDIR)/spamprobe.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/spamprobe.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/util.Po + COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ +@@ -460,5 +458,4 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WordArray.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spamprobe.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ +--- MD5Digester.h Sun Oct 31 18:10:46 2004 ++++ MD5Digester.h Wed Jun 22 17:30:37 2005 +@@ -33,5 +33,5 @@ + + #include "util.h" +-#include "md5.h" ++#include <openssl/md5.h> + + class MD5Digester +@@ -41,3 +41,1 @@ + +- ~MD5Digester(); +- +@@ -69,5 +69,5 @@ + private: + string m_digest; +- md5_state_s m_state; ++ MD5_CTX m_state; + bool m_running; + }; +--- MD5Digester.cc Sun Oct 31 18:10:46 2004 ++++ MD5Digester.cc Wed Jun 22 17:40:07 2005 +@@ -37,9 +37,1 @@ + +-MD5Digester::~MD5Digester() +-{ +- if (m_running) { +- md5_byte_t raw_digest[32]; +- md5_finish(&m_state, raw_digest); +- } +-} +- +@@ -49,5 +49,5 @@ + + m_digest.erase(); +- md5_init(&m_state); ++ MD5_Init(&m_state); + m_running = true; + } +@@ -58,5 +58,5 @@ + + if (value.length() > 0) { +- md5_append(&m_state, (md5_byte_t *)value.data(), value.length()); ++ MD5_Update(&m_state, value.data(), value.length()); + } + } +@@ -66,6 +66,6 @@ + assert(m_running); + +- md5_byte_t raw_digest[32]; +- md5_finish(&m_state, raw_digest); ++ unsigned char raw_digest[MD5_DIGEST_LENGTH]; ++ MD5_Final(raw_digest, &m_state); + + m_digest.erase(); diff --git a/mail/spamprobe/files/patch-strings b/mail/spamprobe/files/patch-strings new file mode 100644 index 000000000000..8d0091a4b954 --- /dev/null +++ b/mail/spamprobe/files/patch-strings @@ -0,0 +1,14 @@ +g++ before 3.x does not have the clear() method on strings + + -mi + +--- HashDataFile.cc Mon Mar 28 14:58:25 2005 ++++ HashDataFile.cc Wed Jun 22 17:27:02 2005 +@@ -233,5 +233,7 @@ + m_array.reset(0, 0); + m_base = 0; ++#if !defined(__GNUC__) || __GNUC__ > 2 + m_filename.clear(); ++#endif + } + } |