summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD39
-rw-r--r--spamprobe-db5.patch11
-rw-r--r--spamprobe-gcc43.patch150
-rw-r--r--spamprobe-giflib.patch20
-rw-r--r--spamprobe-png.patch23
-rw-r--r--spamprobe-template.patch20
7 files changed, 290 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..706b976446e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = spamprobe
+ pkgdesc = Fast, intelligent, automatic spam detector using Paul Graham style Bayesian analysis of word counts in spam and non-spam emails
+ pkgver = 1.4d
+ pkgrel = 7
+ url = http://spamprobe.sourceforge.net/
+ arch = i686
+ arch = x86_64
+ license = custom:QPL
+ depends = db
+ depends = giflib
+ depends = libjpeg
+ depends = libpng
+ source = http://downloads.sourceforge.net/spamprobe/spamprobe-1.4d.tar.gz
+ source = spamprobe-db5.patch
+ source = spamprobe-gcc43.patch
+ source = spamprobe-png.patch
+ source = spamprobe-template.patch
+ source = spamprobe-giflib.patch
+ sha256sums = 217ce47dcc6f58d8201fbb0a5e2dc38b5b06349fadb1378fb3647ad8a3f44d68
+ sha256sums = 74c047a55a6e9a553bee29b5f46725b43821fa29630e2ca2ab348ea0852d070d
+ sha256sums = 2f1a60295b2832a8c174efb2efa3d54a9268235795560b35a63f2b31bfd59019
+ sha256sums = 3e99cf08dab2a461e1afada44d809dee2407ec990b3e76175fc026cda2830ded
+ sha256sums = 220523fb2e7e5c94d1f01cf54052e7bf3124bf342779953abe1355789129e621
+ sha256sums = af1a610bee4f4d4ad68267b88278d837ecde271e371342497f1b048e528d7d36
+
+pkgname = spamprobe
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..7c94523bacb
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Geert Hendrickx <geert@hendrickx.be>
+# Contributor: Mikael Eriksson <mikael_miffe_eriksson@yahoo.se>
+
+pkgname=spamprobe
+pkgver=1.4d
+pkgrel=7
+pkgdesc="Fast, intelligent, automatic spam detector using Paul Graham style Bayesian analysis of word counts in spam and non-spam emails"
+arch=(i686 x86_64)
+url="http://spamprobe.sourceforge.net/"
+license=('custom:QPL')
+depends=(db giflib libjpeg libpng)
+source=(http://downloads.sourceforge.net/spamprobe/$pkgname-$pkgver.tar.gz
+ spamprobe-db5.patch spamprobe-gcc43.patch spamprobe-png.patch
+ spamprobe-template.patch spamprobe-giflib.patch)
+sha256sums=('217ce47dcc6f58d8201fbb0a5e2dc38b5b06349fadb1378fb3647ad8a3f44d68'
+ '74c047a55a6e9a553bee29b5f46725b43821fa29630e2ca2ab348ea0852d070d'
+ '2f1a60295b2832a8c174efb2efa3d54a9268235795560b35a63f2b31bfd59019'
+ '3e99cf08dab2a461e1afada44d809dee2407ec990b3e76175fc026cda2830ded'
+ '220523fb2e7e5c94d1f01cf54052e7bf3124bf342779953abe1355789129e621'
+ 'af1a610bee4f4d4ad68267b88278d837ecde271e371342497f1b048e528d7d36')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -p0 -i $srcdir/spamprobe-gcc43.patch
+ patch -p0 -i $srcdir/spamprobe-png.patch
+ patch -p0 -i $srcdir/spamprobe-db5.patch
+ patch -p0 -i $srcdir/spamprobe-template.patch
+ patch -p0 -i $srcdir/spamprobe-giflib.patch
+ ./configure --prefix=/usr --mandir=/usr/share/man
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+ install -D -m644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/spamprobe-db5.patch b/spamprobe-db5.patch
new file mode 100644
index 00000000000..9dc337432a4
--- /dev/null
+++ b/spamprobe-db5.patch
@@ -0,0 +1,11 @@
+--- src/database/FrequencyDBImpl_bdb.cc
++++ src/database/FrequencyDBImpl_bdb.cc
+@@ -155,7 +155,7 @@ bool FrequencyDBImpl_bdb::openDatabase(c
+ // hideous ifdefs into my code.
+ string filename(m_env ? db_file.getName() : db_file.getPath());
+ int flags = read_only ? DB_RDONLY : DB_CREATE;
+-#if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1
++#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1)
+ ret = m_file->open(m_file, NULL, filename.c_str(), NULL, DB_BTREE, flags, create_mode);
+ #else
+ ret = m_file->open(m_file, filename.c_str(), NULL, DB_BTREE, flags, create_mode);
diff --git a/spamprobe-gcc43.patch b/spamprobe-gcc43.patch
new file mode 100644
index 00000000000..02c46cf829a
--- /dev/null
+++ b/spamprobe-gcc43.patch
@@ -0,0 +1,150 @@
+--- src/spamprobe/Command_exec.cc
++++ src/spamprobe/Command_exec.cc
+@@ -28,6 +28,7 @@
+ // http://www.cooldevtools.com/qpl.html
+ //
+
++#include <cstdlib>
+ #include "SpamFilter.h"
+ #include "CommandConfig.h"
+ #include "ConfigManager.h"
+--- src/spamprobe/Command_edit_term.cc
++++ src/spamprobe/Command_edit_term.cc
+@@ -28,6 +28,7 @@
+ // http://www.cooldevtools.com/qpl.html
+ //
+
++#include <cstdlib>
+ #include "SpamFilter.h"
+ #include "FrequencyDB.h"
+ #include "CommandConfig.h"
+--- src/spamprobe/Command_cleanup.cc
++++ src/spamprobe/Command_cleanup.cc
+@@ -28,6 +28,7 @@
+ // http://www.cooldevtools.com/qpl.html
+ //
+
++#include <cstdlib>
+ #include "CleanupManager.h"
+ #include "SpamFilter.h"
+ #include "FrequencyDB.h"
+--- src/spamprobe/spamprobe.cc
++++ src/spamprobe/spamprobe.cc
+@@ -28,6 +28,7 @@
+ // http://www.cooldevtools.com/qpl.html
+ //
+
++#include <cstdlib>
+ #include <unistd.h>
+ #include <locale.h>
+ #include <signal.h>
+--- src/spamprobe/Command_purge.cc
++++ src/spamprobe/Command_purge.cc
+@@ -28,6 +28,7 @@
+ // http://www.cooldevtools.com/qpl.html
+ //
+
++#include <cstdlib>
+ #include "CleanupManager.h"
+ #include "SpamFilter.h"
+ #include "FrequencyDB.h"
+--- src/spamprobe/Command_import.cc
++++ src/spamprobe/Command_import.cc
+@@ -28,6 +28,7 @@
+ // http://www.cooldevtools.com/qpl.html
+ //
+
++#include <cstdlib>
+ #include <fstream>
+ #include "LineReader.h"
+ #include "IstreamCharReader.h"
+--- src/database/DatabaseConfig.cc
++++ src/database/DatabaseConfig.cc
+@@ -29,6 +29,7 @@
+ //
+
+ #include <stdexcept>
++#include <cstdlib>
+ #include "File.h"
+ #include "WordData.h"
+ #include "FrequencyDBImpl.h"
+--- src/parser/MailMessageReader.cc
++++ src/parser/MailMessageReader.cc
+@@ -28,6 +28,7 @@
+ // http://www.cooldevtools.com/qpl.html
+ //
+
++#include <cstdlib>
+ #include "RegularExpression.h"
+ #include "MailMessage.h"
+ #include "MailMessageList.h"
+--- src/parser/MbxMailMessageReader.cc
++++ src/parser/MbxMailMessageReader.cc
+@@ -28,6 +28,7 @@
+ // http://www.cooldevtools.com/qpl.html
+ //
+
++#include <cstdlib>
+ #include <stdexcept>
+ #include "MailMessage.h"
+ #include "MailMessageList.h"
+--- src/parser/AutoTrainMailMessageReader.cc
++++ src/parser/AutoTrainMailMessageReader.cc
+@@ -28,6 +28,7 @@
+ // http://www.cooldevtools.com/qpl.html
+ //
+
++#include <cstdlib>
+ #include "MailMessage.h"
+ #include "AutoTrainMailMessageReader.h"
+
+--- src/parser/HtmlTokenizer.cc
++++ src/parser/HtmlTokenizer.cc
+@@ -28,6 +28,7 @@
+ // http://www.cooldevtools.com/qpl.html
+ //
+
++#include <cstdlib>
+ #include "AbstractTokenReceiver.h"
+ #include "StringReader.h"
+ #include "RegularExpression.h"
+--- src/hdl/HdlTokenizer.cc
++++ src/hdl/HdlTokenizer.cc
+@@ -28,6 +28,7 @@
+ // http://www.cooldevtools.com/qpl.html
+ //
+
++#include <cstdlib>
+ #include "AbstractCharReader.h"
+ #include "HdlError.h"
+ #include "HdlToken.h"
+--- src/includes/util.h
++++ src/includes/util.h
+@@ -42,6 +42,7 @@
+ #include <cassert>
+ #include <iostream>
+ #include <cstdio>
++#include <cstring>
+ #include "Ptr.h"
+ #include "Ref.h"
+
+--- src/includes/MultiLineSubString.h
++++ src/includes/MultiLineSubString.h
+@@ -31,6 +31,7 @@
+ #ifndef _MultiLineSubString_h
+ #define _MultiLineSubString_h
+
++#include <climits>
+ #include "AbstractMultiLineString.h"
+
+ class MultiLineSubString : public AbstractMultiLineString
+--- src/includes/Buffer.h
++++ src/includes/Buffer.h
+@@ -32,6 +32,7 @@
+ #define _Buffer_h
+
+ #include "Array.h"
++#include <cassert>
+
+ //
+ // Similar to Array but handles variable length.
diff --git a/spamprobe-giflib.patch b/spamprobe-giflib.patch
new file mode 100644
index 00000000000..234bd590155
--- /dev/null
+++ b/spamprobe-giflib.patch
@@ -0,0 +1,20 @@
+--- src/parser/GifParser.cc 2006-11-17 08:24:49.000000000 +0100
++++ src/parser/GifParser.cc 2014-07-31 09:23:19.372474921 +0200
+@@ -81,7 +81,7 @@
+ GifParser::~GifParser()
+ {
+ if (m_gif) {
+- DGifCloseFile(m_gif);
++ DGifCloseFile(m_gif, NULL);
+ }
+ }
+
+@@ -99,7 +99,7 @@
+ void GifParser::openImage()
+ {
+ m_nextByteIndex = 0;
+- m_gif = DGifOpen(this, readFromBuffer);
++ m_gif = DGifOpen(this, readFromBuffer, NULL);
+ if (!m_gif) {
+ throw runtime_error("open gif failed");
+ }
diff --git a/spamprobe-png.patch b/spamprobe-png.patch
new file mode 100644
index 00000000000..a3cba4266ed
--- /dev/null
+++ b/spamprobe-png.patch
@@ -0,0 +1,23 @@
+--- src/parser/PngParser.cc
++++ src/parser/PngParser.cc
+@@ -53,9 +53,9 @@ PngParser::~PngParser()
+ {
+ if (m_initialized) {
+ if (m_infoPtr) {
+- png_destroy_read_struct(&m_pngPtr, &m_infoPtr, png_infopp_NULL);
++ png_destroy_read_struct(&m_pngPtr, &m_infoPtr, NULL);
+ } else {
+- png_destroy_read_struct(&m_pngPtr, png_infopp_NULL, png_infopp_NULL);
++ png_destroy_read_struct(&m_pngPtr, NULL, NULL);
+ }
+ }
+ }
+@@ -104,7 +104,7 @@ void PngParser::tokenizeImage()
+ int bit_depth, color_type, interlace_type;
+
+ png_get_IHDR(m_pngPtr, m_infoPtr, &width, &height, &bit_depth, &color_type,
+- &interlace_type, int_p_NULL, int_p_NULL);
++ &interlace_type, NULL, NULL);
+
+ string base_token("image_0");
+ sendToken(base_token + "_height_" + num_to_string((int)width));
diff --git a/spamprobe-template.patch b/spamprobe-template.patch
new file mode 100644
index 00000000000..5460ef0b298
--- /dev/null
+++ b/spamprobe-template.patch
@@ -0,0 +1,20 @@
+--- src/includes/Ref.h.orig 2006-11-17 08:24:48.000000000 +0100
++++ src/includes/Ref.h 2013-05-14 08:53:37.453762087 +0200
+@@ -189,7 +189,7 @@
+
+ CRef<T> &operator=(const CRef<T> &other)
+ {
+- assign(other);
++ this->assign(other);
+ return *this;
+ }
+
+@@ -245,7 +245,7 @@
+
+ Ref<T> &operator=(const Ref<T> &other)
+ {
+- assign(other);
++ this->assign(other);
+ return *this;
+ }
+