spamprobe: fix build with gcc11

This commit is contained in:
Juergen Daubert 2022-05-09 13:38:09 +02:00
parent 502bc7c532
commit b6edc14acd
3 changed files with 51 additions and 21 deletions

View File

@ -1,7 +1,7 @@
untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/bYjm8F0RSPN7PGoGTKugpE87la/IzWBNhUu9UjjOD/RsQfJxJS+sv7eJynk6m/Ky2smt5bR8nfY93hAzrt69ws=
SHA256 (Pkgfile) = 00dfa7f30ce5a61fdb79478d5c587873793509c8a97fcdf83f33f852e3e0dc5a
RWSE3ohX2g5d/cMR0UzGHf+XRNKamlfUHxVKnMO3iLUBpEftPVAXCR7tNdp9DtKI5qpejOm4NqtV3j260aZl5ug4tr9MJ5ntPgc=
SHA256 (Pkgfile) = 689ac64b619e1c042c28220b10f66fc2087747b5d9db6aa17a654c89063ff48d
SHA256 (.footprint) = 18a8e9a9a4743437d61b5a7cf02bfd38a3337a240229441d169b9d8e4c253add
SHA256 (spamprobe-1.4d.tar.gz) = 217ce47dcc6f58d8201fbb0a5e2dc38b5b06349fadb1378fb3647ad8a3f44d68
SHA256 (64bit.patch) = 86af19e88f769d4c35d2e0941d1e7c1670e77d3a6b0012902737529ff5bd14d9
SHA256 (compile-fixes.patch) = 9c7452e24e257d17bd1f55468b08bbae55c64c70c4e8ac3051fed926343ccf86
SHA256 (compile-fixes.patch) = 180f8db11a5295e9e4a85ef8a05da3c5cb23a0d4842693e501207091d06f07a1

View File

@ -1,26 +1,27 @@
# Description: Spam detection program that uses Bayesian analysis
# URL: http://spamprobe.sourceforge.net/
# Maintainer: Juergen Daubert, jue at crux dot nu
# Depends on: db
# URL: http://spamprobe.sourceforge.net/
# Maintainer: Juergen Daubert, jue at crux dot nu
# Depends on: db
name=spamprobe
version=1.4d
release=8
release=9
source=(http://downloads.sourceforge.net/project/$name/$name/$version/$name-$version.tar.gz
64bit.patch compile-fixes.patch)
64bit.patch compile-fixes.patch)
build () {
cd $SRC/$name-$version
build() {
cd $SRC/$name-$version
# https://src.fedoraproject.org/rpms/spamprobe/tree/master
patch -p1 -i $SRC/64bit.patch
patch -p1 -i $SRC/compile-fixes.patch
./configure --prefix=/usr \
--mandir=/usr/share/man \
--enable-default-8-bit \
--without-{gif,jpeg,png}
make
make DESTDIR=$PKG install
# https://src.fedoraproject.org/rpms/spamprobe/tree/master
patch -p1 -i $SRC/64bit.patch
patch -p1 -i $SRC/compile-fixes.patch
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--enable-default-8-bit \
--without-{gif,jpeg,png}
make
make DESTDIR=$PKG install
}

View File

@ -57,3 +57,32 @@ diff -up spamprobe-1.4d/src/includes/util.h.compile-fixes spamprobe-1.4d/src/inc
#include <cctype>
#include <cassert>
#include <iostream>
diff --git a/src/includes/LRUCache.h b/src/includes/LRUCache.h
index cf7df30..5c84c5a 100644
--- a/src/includes/LRUCache.h
+++ b/src/includes/LRUCache.h
@@ -60,7 +60,7 @@ public:
{
public:
bool operator()(const NodeType *a,
- const NodeType *b)
+ const NodeType *b) const
{
return a->key < b->key;
}
@@ -77,12 +77,12 @@ public:
}
public:
- bool operator==(const iterator &other)
+ bool operator==(const iterator &other) const
{
return m_iterator == other.m_iterator;
}
- bool operator!=(const iterator &other)
+ bool operator!=(const iterator &other) const
{
return m_iterator != other.m_iterator;
}