summaryrefslogtreecommitdiff
path: root/spamprobe
diff options
context:
space:
mode:
authorJuergen Daubert <jue@jue.li>2010-07-24 16:56:35 +0200
committerJuergen Daubert <jue@jue.li>2010-07-24 16:56:35 +0200
commite151c8e8ea64caaff1e3eec789db6b99826fa5fa (patch)
treea7d3c06eb409787bb838a4544b7339c78c7949db /spamprobe
parent4cdfef9fa5acc7aafb6411cd4a02dacf92bf9753 (diff)
downloadopt-e151c8e8ea64caaff1e3eec789db6b99826fa5fa.tar.gz
opt-e151c8e8ea64caaff1e3eec789db6b99826fa5fa.tar.xz
spamprobe: fix for libpng 1.4, update to pbl 1.04
Diffstat (limited to 'spamprobe')
-rw-r--r--spamprobe/.md5sum4
-rw-r--r--spamprobe/Pkgfile20
-rw-r--r--spamprobe/spamprobe-1.4d-libpng14.patch25
-rw-r--r--spamprobe/spamprobe-1.4d-pbl104.patch12
4 files changed, 54 insertions, 7 deletions
diff --git a/spamprobe/.md5sum b/spamprobe/.md5sum
index d32628ac4..b0a541fd2 100644
--- a/spamprobe/.md5sum
+++ b/spamprobe/.md5sum
@@ -1,3 +1,5 @@
-452b1f802dfb2da7ceaaf647eb8564c8 pbl_1_03.tar.gz
+3a3d2e35a0dea8d6eb03e9098295d4d8 pbl_1_04.tar.gz
a69ed9c2fe930e84226ea0ddcf33cc27 spamprobe-1.4d-gcc43.patch
+f7d0d2e774d2b3a4b76e8b0c1cef3aa8 spamprobe-1.4d-libpng14.patch
+8636af56bddb4cf6d7a86784c08256f1 spamprobe-1.4d-pbl104.patch
5554d6d097346632b16123452283c969 spamprobe-1.4d.tar.gz
diff --git a/spamprobe/Pkgfile b/spamprobe/Pkgfile
index 46584cb45..8d2ed15cc 100644
--- a/spamprobe/Pkgfile
+++ b/spamprobe/Pkgfile
@@ -4,20 +4,28 @@
name=spamprobe
version=1.4d
-release=2
-source=(http://dl.sourceforge.net/sourceforge/$name/$name-$version.tar.gz
- http://www.mission-base.com/peter/source/pbl_1_03.tar.gz
- $name-$version-gcc43.patch)
+release=3
+source=(http://downloads.sourceforge.net/project/$name/$name/$version/$name-$version.tar.gz
+ http://www.mission-base.com/peter/source/pbl_1_04.tar.gz
+ $name-$version-gcc43.patch
+ $name-$version-libpng14.patch
+ $name-$version-pbl104.patch)
build () {
- cd pbl_1_03
+ cd pbl_1_04_02/src
+
sed -i "/^CFLAGS/s/-O3/$CFLAGS/" makefile
make
+
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-pbl104.patch
+
./configure --prefix=/usr \
- --with-pbl=$SRC/pbl_1_03 \
+ --with-pbl=$SRC/pbl_1_04_02/src \
--enable-default-8-bit
make
make DESTDIR=$PKG install
diff --git a/spamprobe/spamprobe-1.4d-libpng14.patch b/spamprobe/spamprobe-1.4d-libpng14.patch
new file mode 100644
index 000000000..ed23003eb
--- /dev/null
+++ b/spamprobe/spamprobe-1.4d-libpng14.patch
@@ -0,0 +1,25 @@
+# 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));
diff --git a/spamprobe/spamprobe-1.4d-pbl104.patch b/spamprobe/spamprobe-1.4d-pbl104.patch
new file mode 100644
index 000000000..fead534f2
--- /dev/null
+++ b/spamprobe/spamprobe-1.4d-pbl104.patch
@@ -0,0 +1,12 @@
+diff -Nru spamprobe-1.4d.orig/src/database/FrequencyDBImpl_pbl.cc spamprobe-1.4d/src/database/FrequencyDBImpl_pbl.cc
+--- spamprobe-1.4d.orig/src/database/FrequencyDBImpl_pbl.cc 2010-07-24 16:02:39.115311539 +0200
++++ spamprobe-1.4d/src/database/FrequencyDBImpl_pbl.cc 2010-07-24 16:10:34.885311626 +0200
+@@ -260,7 +260,7 @@
+ WordData &counts)
+ {
+ char key[BUFFER_SIZE];
+- int keylen = 0;
++ size_t keylen = 0;
+ int rc = 0;
+
+ switch (pbl_code) {

Generated by cgit