From 5e2718303ac23c55a53c6b93d50b91c594b6dc62 Mon Sep 17 00:00:00 2001 From: Juergen Daubert Date: Fri, 10 Aug 2012 10:42:09 +0200 Subject: [PATCH] spamprobe: fix build with latest toolchain and Berkely db, patch from debian --- spamprobe/.md5sum | 3 +- spamprobe/Pkgfile | 7 +- spamprobe/spamprobe-1.4d-11.patch | 230 ++++++++++++++++++++++++ spamprobe/spamprobe-1.4d-gcc43.patch | 154 ---------------- spamprobe/spamprobe-1.4d-libpng14.patch | 25 --- 5 files changed, 234 insertions(+), 185 deletions(-) create mode 100644 spamprobe/spamprobe-1.4d-11.patch delete mode 100644 spamprobe/spamprobe-1.4d-gcc43.patch delete mode 100644 spamprobe/spamprobe-1.4d-libpng14.patch diff --git a/spamprobe/.md5sum b/spamprobe/.md5sum index 838138535..524e82590 100644 --- a/spamprobe/.md5sum +++ b/spamprobe/.md5sum @@ -1,3 +1,2 @@ -a69ed9c2fe930e84226ea0ddcf33cc27 spamprobe-1.4d-gcc43.patch -f7d0d2e774d2b3a4b76e8b0c1cef3aa8 spamprobe-1.4d-libpng14.patch +ab90867f2dda67d96f0cd24e75bbbefc spamprobe-1.4d-11.patch 5554d6d097346632b16123452283c969 spamprobe-1.4d.tar.gz diff --git a/spamprobe/Pkgfile b/spamprobe/Pkgfile index 9a4676f95..54e976a18 100644 --- a/spamprobe/Pkgfile +++ b/spamprobe/Pkgfile @@ -5,14 +5,13 @@ name=spamprobe version=1.4d -release=4 +release=5 source=(http://downloads.sourceforge.net/project/$name/$name/$version/$name-$version.tar.gz - $name-$version-gcc43.patch $name-$version-libpng14.patch) + $name-$version-11.patch) build () { cd $SRC/$name-$version - patch -p1 -i $SRC/$name-$version-gcc43.patch - patch -p0 -i $SRC/$name-$version-libpng14.patch + patch -p1 -i $SRC/$name-$version-11.patch ./configure --prefix=/usr --enable-default-8-bit make make DESTDIR=$PKG install diff --git a/spamprobe/spamprobe-1.4d-11.patch b/spamprobe/spamprobe-1.4d-11.patch new file mode 100644 index 000000000..c6b119326 --- /dev/null +++ b/spamprobe/spamprobe-1.4d-11.patch @@ -0,0 +1,230 @@ +# Extracted from http://ftp.de.debian.org/debian/pool/main/s/spamprobe/spamprobe_1.4d-11.diff.gz + +--- spamprobe-1.4d.orig/debian/source/format ++++ spamprobe-1.4d/debian/source/format +@@ -0,0 +1 @@ ++1.0 +--- spamprobe-1.4d.orig/src/parser/PngParser.cc ++++ spamprobe-1.4d/src/parser/PngParser.cc +@@ -37,6 +37,14 @@ + #include "StringReader.h" + #include "PngParser.h" + ++#ifndef int_p_NULL ++#define int_p_NULL NULL ++#endif ++ ++#ifndef png_infopp_NULL ++#define png_infopp_NULL NULL ++#endif ++ + PngParser::PngParser(Message *message, + AbstractTokenizer *tokenizer, + AbstractTokenReceiver *receiver, +--- spamprobe-1.4d.orig/src/parser/AutoTrainMailMessageReader.cc ++++ spamprobe-1.4d/src/parser/AutoTrainMailMessageReader.cc +@@ -28,6 +28,7 @@ + // http://www.cooldevtools.com/qpl.html + // + ++#include + #include "MailMessage.h" + #include "AutoTrainMailMessageReader.h" + +--- spamprobe-1.4d.orig/src/parser/MailMessageReader.cc ++++ spamprobe-1.4d/src/parser/MailMessageReader.cc +@@ -28,6 +28,7 @@ + // http://www.cooldevtools.com/qpl.html + // + ++#include + #include "RegularExpression.h" + #include "MailMessage.h" + #include "MailMessageList.h" +--- spamprobe-1.4d.orig/src/parser/MbxMailMessageReader.cc ++++ spamprobe-1.4d/src/parser/MbxMailMessageReader.cc +@@ -28,6 +28,7 @@ + // http://www.cooldevtools.com/qpl.html + // + ++#include + #include + #include "MailMessage.h" + #include "MailMessageList.h" +--- spamprobe-1.4d.orig/src/parser/HtmlTokenizer.cc ++++ spamprobe-1.4d/src/parser/HtmlTokenizer.cc +@@ -28,6 +28,7 @@ + // http://www.cooldevtools.com/qpl.html + // + ++#include + #include "AbstractTokenReceiver.h" + #include "StringReader.h" + #include "RegularExpression.h" +--- spamprobe-1.4d.orig/src/includes/Ref.h ++++ spamprobe-1.4d/src/includes/Ref.h +@@ -189,7 +189,7 @@ + + CRef &operator=(const CRef &other) + { +- assign(other); ++ this->assign(other); + return *this; + } + +@@ -245,7 +245,7 @@ + + Ref &operator=(const Ref &other) + { +- assign(other); ++ this->assign(other); + return *this; + } + +--- spamprobe-1.4d.orig/src/includes/hash.h ++++ spamprobe-1.4d/src/includes/hash.h +@@ -10,11 +10,13 @@ + #ifndef _jenkinshash_h + #define _jenkinshash_h + ++#include ++ + #ifdef __cplusplus + extern "C" { + #endif + +-typedef unsigned long int ub4; /* unsigned 4-byte quantities */ ++typedef uint32_t ub4; /* unsigned 4-byte quantities */ + typedef unsigned char ub1; /* unsigned 1-byte quantities */ + + #define hashsize(n) ((ub4)1<<(n)) +--- spamprobe-1.4d.orig/src/includes/Buffer.h ++++ spamprobe-1.4d/src/includes/Buffer.h +@@ -32,6 +32,7 @@ + #define _Buffer_h + + #include "Array.h" ++#include + + // + // Similar to Array but handles variable length. +--- spamprobe-1.4d.orig/src/includes/util.h ++++ spamprobe-1.4d/src/includes/util.h +@@ -42,6 +42,7 @@ + #include + #include + #include ++#include + #include "Ptr.h" + #include "Ref.h" + +--- spamprobe-1.4d.orig/src/includes/MultiLineSubString.h ++++ spamprobe-1.4d/src/includes/MultiLineSubString.h +@@ -31,6 +31,7 @@ + #ifndef _MultiLineSubString_h + #define _MultiLineSubString_h + ++#include + #include "AbstractMultiLineString.h" + + class MultiLineSubString : public AbstractMultiLineString +--- spamprobe-1.4d.orig/src/hdl/HdlTokenizer.cc ++++ spamprobe-1.4d/src/hdl/HdlTokenizer.cc +@@ -28,6 +28,7 @@ + // http://www.cooldevtools.com/qpl.html + // + ++#include + #include "AbstractCharReader.h" + #include "HdlError.h" + #include "HdlToken.h" +--- spamprobe-1.4d.orig/src/spamprobe/Command_exec.cc ++++ spamprobe-1.4d/src/spamprobe/Command_exec.cc +@@ -28,6 +28,7 @@ + // http://www.cooldevtools.com/qpl.html + // + ++#include + #include "SpamFilter.h" + #include "CommandConfig.h" + #include "ConfigManager.h" +--- spamprobe-1.4d.orig/src/spamprobe/spamprobe.cc ++++ spamprobe-1.4d/src/spamprobe/spamprobe.cc +@@ -28,6 +28,7 @@ + // http://www.cooldevtools.com/qpl.html + // + ++#include + #include + #include + #include +--- spamprobe-1.4d.orig/src/spamprobe/Command_cleanup.cc ++++ spamprobe-1.4d/src/spamprobe/Command_cleanup.cc +@@ -28,6 +28,7 @@ + // http://www.cooldevtools.com/qpl.html + // + ++#include + #include "CleanupManager.h" + #include "SpamFilter.h" + #include "FrequencyDB.h" +--- spamprobe-1.4d.orig/src/spamprobe/Command_purge.cc ++++ spamprobe-1.4d/src/spamprobe/Command_purge.cc +@@ -28,6 +28,7 @@ + // http://www.cooldevtools.com/qpl.html + // + ++#include + #include "CleanupManager.h" + #include "SpamFilter.h" + #include "FrequencyDB.h" +--- spamprobe-1.4d.orig/src/spamprobe/Command_import.cc ++++ spamprobe-1.4d/src/spamprobe/Command_import.cc +@@ -28,6 +28,7 @@ + // http://www.cooldevtools.com/qpl.html + // + ++#include + #include + #include "LineReader.h" + #include "IstreamCharReader.h" +--- spamprobe-1.4d.orig/src/spamprobe/Command_edit_term.cc ++++ spamprobe-1.4d/src/spamprobe/Command_edit_term.cc +@@ -28,6 +28,7 @@ + // http://www.cooldevtools.com/qpl.html + // + ++#include + #include "SpamFilter.h" + #include "FrequencyDB.h" + #include "CommandConfig.h" +--- spamprobe-1.4d.orig/src/database/WordArray.h ++++ spamprobe-1.4d/src/database/WordArray.h +@@ -31,6 +31,8 @@ + #ifndef _WordArray_h + #define _WordArray_h + ++#include ++ + class WordData; + + class WordArray +@@ -47,7 +49,7 @@ + FLAGS_SIZE = 2, + }; + +- typedef unsigned long key_t; ++ typedef uint32_t key_t; + + void reset(char *buffer, + int num_words); +--- spamprobe-1.4d.orig/src/database/DatabaseConfig.cc ++++ spamprobe-1.4d/src/database/DatabaseConfig.cc +@@ -29,6 +29,7 @@ + // + + #include ++#include + #include "File.h" + #include "WordData.h" + #include "FrequencyDBImpl.h" diff --git a/spamprobe/spamprobe-1.4d-gcc43.patch b/spamprobe/spamprobe-1.4d-gcc43.patch deleted file mode 100644 index d42561a14..000000000 --- a/spamprobe/spamprobe-1.4d-gcc43.patch +++ /dev/null @@ -1,154 +0,0 @@ -diff -ur -x '*~' spamprobe-1.4d.orig/src/database/DatabaseConfig.cc spamprobe-1.4d-dev/src/database/DatabaseConfig.cc ---- spamprobe-1.4d.orig/src/database/DatabaseConfig.cc 2006-11-17 08:24:48.000000000 +0100 -+++ spamprobe-1.4d-dev/src/database/DatabaseConfig.cc 2007-07-09 17:58:18.000000000 +0200 -@@ -29,6 +29,7 @@ - // - - #include -+#include - #include "File.h" - #include "WordData.h" - #include "FrequencyDBImpl.h" -diff -ur -x '*~' spamprobe-1.4d.orig/src/hdl/HdlTokenizer.cc spamprobe-1.4d-dev/src/hdl/HdlTokenizer.cc ---- spamprobe-1.4d.orig/src/hdl/HdlTokenizer.cc 2006-11-17 08:24:48.000000000 +0100 -+++ spamprobe-1.4d-dev/src/hdl/HdlTokenizer.cc 2007-07-09 18:12:33.000000000 +0200 -@@ -28,6 +28,7 @@ - // http://www.cooldevtools.com/qpl.html - // - -+#include - #include "AbstractCharReader.h" - #include "HdlError.h" - #include "HdlToken.h" -diff -ur -x '*~' spamprobe-1.4d.orig/src/includes/MultiLineSubString.h spamprobe-1.4d-dev/src/includes/MultiLineSubString.h ---- spamprobe-1.4d.orig/src/includes/MultiLineSubString.h 2006-11-17 08:24:48.000000000 +0100 -+++ spamprobe-1.4d-dev/src/includes/MultiLineSubString.h 2007-07-09 18:01:10.000000000 +0200 -@@ -31,6 +31,7 @@ - #ifndef _MultiLineSubString_h - #define _MultiLineSubString_h - -+#include - #include "AbstractMultiLineString.h" - - class MultiLineSubString : public AbstractMultiLineString -diff -ur -x '*~' spamprobe-1.4d.orig/src/includes/util.h spamprobe-1.4d-dev/src/includes/util.h ---- spamprobe-1.4d.orig/src/includes/util.h 2006-11-17 08:24:49.000000000 +0100 -+++ spamprobe-1.4d-dev/src/includes/util.h 2007-07-09 17:57:21.000000000 +0200 -@@ -42,6 +42,7 @@ - #include - #include - #include -+#include - #include "Ptr.h" - #include "Ref.h" - -diff -ur -x '*~' spamprobe-1.4d.orig/src/parser/AutoTrainMailMessageReader.cc spamprobe-1.4d-dev/src/parser/AutoTrainMailMessageReader.cc ---- spamprobe-1.4d.orig/src/parser/AutoTrainMailMessageReader.cc 2006-11-17 08:24:49.000000000 +0100 -+++ spamprobe-1.4d-dev/src/parser/AutoTrainMailMessageReader.cc 2007-07-09 17:59:39.000000000 +0200 -@@ -28,6 +28,7 @@ - // http://www.cooldevtools.com/qpl.html - // - -+#include - #include "MailMessage.h" - #include "AutoTrainMailMessageReader.h" - -diff -ur -x '*~' spamprobe-1.4d.orig/src/parser/HtmlTokenizer.cc spamprobe-1.4d-dev/src/parser/HtmlTokenizer.cc ---- spamprobe-1.4d.orig/src/parser/HtmlTokenizer.cc 2006-11-17 08:24:49.000000000 +0100 -+++ spamprobe-1.4d-dev/src/parser/HtmlTokenizer.cc 2007-07-09 18:02:31.000000000 +0200 -@@ -28,6 +28,7 @@ - // http://www.cooldevtools.com/qpl.html - // - -+#include - #include "AbstractTokenReceiver.h" - #include "StringReader.h" - #include "RegularExpression.h" -diff -ur -x '*~' spamprobe-1.4d.orig/src/parser/MailMessageReader.cc spamprobe-1.4d-dev/src/parser/MailMessageReader.cc ---- spamprobe-1.4d.orig/src/parser/MailMessageReader.cc 2006-11-17 08:24:49.000000000 +0100 -+++ spamprobe-1.4d-dev/src/parser/MailMessageReader.cc 2007-07-09 18:03:06.000000000 +0200 -@@ -28,6 +28,7 @@ - // http://www.cooldevtools.com/qpl.html - // - -+#include - #include "RegularExpression.h" - #include "MailMessage.h" - #include "MailMessageList.h" -diff -ur -x '*~' spamprobe-1.4d.orig/src/parser/MbxMailMessageReader.cc spamprobe-1.4d-dev/src/parser/MbxMailMessageReader.cc ---- spamprobe-1.4d.orig/src/parser/MbxMailMessageReader.cc 2006-11-17 08:24:49.000000000 +0100 -+++ spamprobe-1.4d-dev/src/parser/MbxMailMessageReader.cc 2007-07-09 18:03:41.000000000 +0200 -@@ -28,6 +28,7 @@ - // http://www.cooldevtools.com/qpl.html - // - -+#include - #include - #include "MailMessage.h" - #include "MailMessageList.h" -diff -ur -x '*~' spamprobe-1.4d.orig/src/spamprobe/Command_cleanup.cc spamprobe-1.4d-dev/src/spamprobe/Command_cleanup.cc ---- spamprobe-1.4d.orig/src/spamprobe/Command_cleanup.cc 2006-11-17 08:24:49.000000000 +0100 -+++ spamprobe-1.4d-dev/src/spamprobe/Command_cleanup.cc 2007-07-09 18:13:16.000000000 +0200 -@@ -28,6 +28,7 @@ - // http://www.cooldevtools.com/qpl.html - // - -+#include - #include "CleanupManager.h" - #include "SpamFilter.h" - #include "FrequencyDB.h" -diff -ur -x '*~' spamprobe-1.4d.orig/src/spamprobe/Command_edit_term.cc spamprobe-1.4d-dev/src/spamprobe/Command_edit_term.cc ---- spamprobe-1.4d.orig/src/spamprobe/Command_edit_term.cc 2006-11-17 08:24:49.000000000 +0100 -+++ spamprobe-1.4d-dev/src/spamprobe/Command_edit_term.cc 2007-07-09 18:13:42.000000000 +0200 -@@ -28,6 +28,7 @@ - // http://www.cooldevtools.com/qpl.html - // - -+#include - #include "SpamFilter.h" - #include "FrequencyDB.h" - #include "CommandConfig.h" -diff -ur -x '*~' spamprobe-1.4d.orig/src/spamprobe/Command_exec.cc spamprobe-1.4d-dev/src/spamprobe/Command_exec.cc ---- spamprobe-1.4d.orig/src/spamprobe/Command_exec.cc 2006-11-17 08:24:49.000000000 +0100 -+++ spamprobe-1.4d-dev/src/spamprobe/Command_exec.cc 2007-07-09 18:14:16.000000000 +0200 -@@ -28,6 +28,7 @@ - // http://www.cooldevtools.com/qpl.html - // - -+#include - #include "SpamFilter.h" - #include "CommandConfig.h" - #include "ConfigManager.h" -diff -ur -x '*~' spamprobe-1.4d.orig/src/spamprobe/Command_import.cc spamprobe-1.4d-dev/src/spamprobe/Command_import.cc ---- spamprobe-1.4d.orig/src/spamprobe/Command_import.cc 2006-11-17 08:24:49.000000000 +0100 -+++ spamprobe-1.4d-dev/src/spamprobe/Command_import.cc 2007-07-09 18:14:37.000000000 +0200 -@@ -28,6 +28,7 @@ - // http://www.cooldevtools.com/qpl.html - // - -+#include - #include - #include "LineReader.h" - #include "IstreamCharReader.h" -diff -ur -x '*~' spamprobe-1.4d.orig/src/spamprobe/Command_purge.cc spamprobe-1.4d-dev/src/spamprobe/Command_purge.cc ---- spamprobe-1.4d.orig/src/spamprobe/Command_purge.cc 2006-11-17 08:24:49.000000000 +0100 -+++ spamprobe-1.4d-dev/src/spamprobe/Command_purge.cc 2007-07-09 18:14:57.000000000 +0200 -@@ -28,6 +28,7 @@ - // http://www.cooldevtools.com/qpl.html - // - -+#include - #include "CleanupManager.h" - #include "SpamFilter.h" - #include "FrequencyDB.h" -diff -ur -x '*~' spamprobe-1.4d.orig/src/spamprobe/spamprobe.cc spamprobe-1.4d-dev/src/spamprobe/spamprobe.cc ---- spamprobe-1.4d.orig/src/spamprobe/spamprobe.cc 2006-11-17 08:24:49.000000000 +0100 -+++ spamprobe-1.4d-dev/src/spamprobe/spamprobe.cc 2007-07-10 09:50:01.000000000 +0200 -@@ -28,6 +28,7 @@ - // http://www.cooldevtools.com/qpl.html - // - -+#include - #include - #include - #include diff --git a/spamprobe/spamprobe-1.4d-libpng14.patch b/spamprobe/spamprobe-1.4d-libpng14.patch deleted file mode 100644 index ed23003eb..000000000 --- a/spamprobe/spamprobe-1.4d-libpng14.patch +++ /dev/null @@ -1,25 +0,0 @@ -# http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/mail-filter/spamprobe/files/spamprobe-1.4d-libpng14.patch - ---- src/parser/PngParser.cc -+++ src/parser/PngParser.cc -@@ -53,9 +53,9 @@ - { - 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 @@ - 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, (int *) NULL, (int *) NULL); - - string base_token("image_0"); - sendToken(base_token + "_height_" + num_to_string((int)width));