summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mail-filter/mailfilter')
-rw-r--r--mail-filter/mailfilter/Manifest2
-rw-r--r--mail-filter/mailfilter/files/0.8.4-fix-parallel-build.patch113
-rw-r--r--mail-filter/mailfilter/files/0.8.9-bashisms.patch26
-rw-r--r--mail-filter/mailfilter/files/0.8.9-prototypes.patch132
-rw-r--r--mail-filter/mailfilter/mailfilter-0.8.4.ebuild32
-rw-r--r--mail-filter/mailfilter/mailfilter-0.8.9.ebuild31
-rw-r--r--mail-filter/mailfilter/metadata.xml11
7 files changed, 199 insertions, 148 deletions
diff --git a/mail-filter/mailfilter/Manifest b/mail-filter/mailfilter/Manifest
index 078a0d506bd1..5408580e14ff 100644
--- a/mail-filter/mailfilter/Manifest
+++ b/mail-filter/mailfilter/Manifest
@@ -1 +1 @@
-DIST mailfilter-0.8.4.tar.gz 424789 BLAKE2B 3ffee855a52b6d85ca7241ab55fd31093ff7dad218b37d2caeaf61dbe0a6ce14a283a60f6bee33409363e516902d8024ec4e5008041ddc28b48d7fc1313d5de3 SHA512 d6cd3399240f60020bf17f460376bfa73132e0714adf1e9b34e2993367440eba28d3cb8ef20b997b1ecf02419f69b761f704598641222d32b3aefdb8a96930e7
+DIST mailfilter-0.8.9.tar.gz 573811 BLAKE2B 7648496c1fbde31da776c7d55517b5824cdc33f91e4543784460838edac7bd6435a09ccece54f4e8f21142330458bf28773934bf8b6bcc40289086ab82142c70 SHA512 8c18d2edf92816cec38359af5e2daf5730fac497a46f89225d938df750144d2bad6fa6dc5e99257423afdf626edf6caeccdf884c90e0b9e70b9c5d03f746ba5f
diff --git a/mail-filter/mailfilter/files/0.8.4-fix-parallel-build.patch b/mail-filter/mailfilter/files/0.8.4-fix-parallel-build.patch
deleted file mode 100644
index f697f94e4502..000000000000
--- a/mail-filter/mailfilter/files/0.8.4-fix-parallel-build.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-https://github.com/nondeterministic/mailfilter/commit/4b3991b1334d83d5f209723ab3ec58d168baff2d
-
-https://bugs.gentoo.org/649514
-
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -31,15 +31,11 @@ bin_PROGRAMS = mailfilter
- rcfile.cc: rcfile.ll rcparser.hh
- $(LEX) $(AM_LFLAGS) -Prc -o$@ $<
-
--# The final `touch' is necessary to be able to invoke flex/bison more
--# than once and to not confuse the ../ylwrap script.
--rcparser.hh: y.tab.c
--y.tab.c: rcfile.yy
-- $(YACC) -p rc $(YFLAGS) -o$@ $<; \
-- mv -f y.tab.c rcparser.cc; \
-- mv -f y.tab.h rcparser.hh; \
-- $(CXXCOMPILE) -c rcparser.cc; \
-- touch y.tab.c
-+rcparser.hh: rcparser.cc
-+rcparser.cc: rcfile.yy
-+ $(YACC) $(YFLAGS) -b rc -p rc $<; \
-+ mv rc.tab.c rcparser.cc; \
-+ mv rc.tab.h rcparser.hh
-
- # Almost the same as above, but this time for the RFC 822 parser:
- rfc822.cc: rfc822.ll rfc822parser.hh
-@@ -47,58 +43,41 @@ rfc822.cc: rfc822.ll rfc822parser.hh
-
- rfc822parser.hh: rfc822parser.cc
- rfc822parser.cc: rfc822.yy
-- $(YACC) $(YFLAGS) -p rfc -o$@ $<; \
-- $(CXXCOMPILE) -c rfc822parser.cc; \
-- touch y.tab.c
-+ $(YACC) $(YFLAGS) -b rfc -p rfc $<; \
-+ mv rfc.tab.c rfc822parser.cc; \
-+ mv rfc.tab.h rfc822parser.hh
-
--# This thing is a workaround to avoid compile errors.
--# We always re-generate the source from the flex/bison input, so it
--# always matches the installed versions and does not lead to errors.
--CLEANFILES = rcfile.cc rcparser.hh rcparser.cc y.tab.c ylwrap \
-- rfc822parser.output rfc822parser.cc rfc822parser.hh \
-- rfc822.cc y.output
--
--nodist_mailfilter_SOURCES = rcfile.cc rcparser.hh y.tab.c rfc822.cc
--
--nodist_mailfilter_OBJECTS = y.tab.$(OBJEXT)
--
--# Looks like automake still wants to distribute rcfile.cc, even if it
--# is in nodist_*_sources.
--dist-hook:
-- rm -f $(distdir)/rcfile.cc \
-- $(distdir)/rfc822parser.cc \
-- $(distdir)/rfcparser.cc
-+CLEANFILES = *.output
-
- # If this gets updated, remember to update the doxygen.in config file!
--mailfilter_SOURCES = md5c.c md5.h \
-- defines.hh \
-- rcfile.ll rcfile.hh \
-- rfc822.ll \
-- mailfilter.hh mailfilter.cc \
-- header.hh header.cc \
-- weeder.hh weeder.cc \
-- preferences.hh preferences.cc \
-- feedback.hh feedback.cc \
-- filter.hh filter.cc \
-- score.hh score.cc \
-- account.hh account.cc \
-- protocol.hh protocol.cc \
-- connection.hh \
-- socket.hh socket.cc \
-- pop3.hh pop3.cc \
-- apop.hh apop.cc \
-+mailfilter_SOURCES = md5c.c md5.h \
-+ defines.hh \
-+ rcfile.ll rcfile.hh \
-+ rcparser.hh rcparser.cc \
-+ rfc822.ll rfc822parser.hh rfc822parser.cc \
-+ mailfilter.hh mailfilter.cc \
-+ header.hh header.cc \
-+ weeder.hh weeder.cc \
-+ preferences.hh preferences.cc \
-+ feedback.hh feedback.cc \
-+ filter.hh filter.cc \
-+ score.hh score.cc \
-+ account.hh account.cc \
-+ protocol.hh protocol.cc \
-+ connection.hh \
-+ socket.hh socket.cc \
-+ pop3.hh pop3.cc \
-+ apop.hh apop.cc \
- imap.hh imap.cc
-
- if !GETOPT
- mailfilter_SOURCES += getopt.c getopt1.c getopt.h
- endif
-
--mailfilter_LDADD = rcparser.o rfc822parser.o
--
--INCLUDES = -I$(includedir) \
-- -I$(srcdir) -I$(top_srcdir)/include -I$(top_srcdir) \
-- -DLOCALEDIR=\"$(datadir)/locale\" \
-- -I$(top_srcdir)/intl \
-- -I$(top_builddir) -I$(top_builddir)/include -I.
-+AM_CPPFLAGS = -I$(includedir) \
-+ -I$(srcdir) -I$(top_srcdir)/include -I$(top_srcdir) \
-+ -DLOCALEDIR=\"$(datadir)/locale\" \
-+ -I$(top_srcdir)/intl \
-+ -I$(top_builddir) -I$(top_builddir)/include -I.
-
- LIBS = @LEXLIB@ @LIBS@
diff --git a/mail-filter/mailfilter/files/0.8.9-bashisms.patch b/mail-filter/mailfilter/files/0.8.9-bashisms.patch
new file mode 100644
index 000000000000..d3fcecb7b5f0
--- /dev/null
+++ b/mail-filter/mailfilter/files/0.8.9-bashisms.patch
@@ -0,0 +1,26 @@
+
+Fix configure bashisms with dash as /bin/sh as reported in
+https://github.com/gentoo/gentoo/pull/27134
+
+Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
+
+--- mailfilter-0.8.9/configure 2022-09-04 12:23:29.000000000 +0200
++++ mailfilter-0.8.9-dash/configure 2022-09-17 19:12:32.174505949 +0200
+@@ -5322,7 +5322,7 @@ fi
+ done
+ test -n "$YACC" || YACC="yacc"
+
+-if test x"$YACC" == x"yacc"
++if test x"$YACC" = x"yacc"
+ then :
+ as_fn_error $? "Please install bison or byacc before configuring." "$LINENO" 5
+ fi
+@@ -5545,7 +5545,7 @@ fi
+ rm -f conftest.l $LEX_OUTPUT_ROOT.c
+
+ fi
+-if test x"$LEX" == x":"
++if test x"$LEX" = x":"
+ then :
+ as_fn_error $? "Please install flex before configuring." "$LINENO" 5
+ fi
diff --git a/mail-filter/mailfilter/files/0.8.9-prototypes.patch b/mail-filter/mailfilter/files/0.8.9-prototypes.patch
new file mode 100644
index 000000000000..22cb739464af
--- /dev/null
+++ b/mail-filter/mailfilter/files/0.8.9-prototypes.patch
@@ -0,0 +1,132 @@
+
+Patch from: https://github.com/nondeterministic/mailfilter/pull/7
+Bug: https://bugs.gentoo.org/870625
+
+From c8ce051933c29561bdc57de782d0445f1513100d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com>
+Date: Wed, 14 Sep 2022 18:49:20 +0200
+Subject: [PATCH] Fix warnings about incorrect prototypes & use standard memcpy/memset
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Clang-15 rightfully complains about function definitions without proper
+prototypes. Also replace handrolled memcpy/memset with standard
+C library calls.
+
+Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
+---
+ src/md5c.c | 47 +++++++++++------------------------------------
+ 1 file changed, 11 insertions(+), 36 deletions(-)
+
+diff --git a/src/md5c.c b/src/md5c.c
+index 2c2c564..ae5ec8d 100644
+--- a/src/md5c.c
++++ b/src/md5c.c
+@@ -24,6 +24,7 @@ documentation and/or software.
+ */
+
+ #include "md5.h"
++#include <string.h>
+
+ /* Constants for MD5Transform routine.
+ */
+@@ -94,8 +95,7 @@ Rotation is separate from addition to prevent recomputation.
+
+ /* MD5 initialization. Begins an MD5 operation, writing a new context.
+ */
+-void MD5Init (context)
+-MD5_CTX *context; /* context */
++void MD5Init (MD5_CTX *context)
+ {
+ context->count[0] = context->count[1] = 0;
+ /* Load magic initialization constants.
+@@ -110,10 +110,7 @@ MD5_CTX *context; /* context */
+ operation, processing another message block, and updating the
+ context.
+ */
+-void MD5Update (context, input, inputLen)
+-MD5_CTX *context; /* context */
+-unsigned char *input; /* input block */
+-unsigned int inputLen; /* length of input block */
++void MD5Update (MD5_CTX *context, unsigned char *input, unsigned int inputLen)
+ {
+ unsigned int i, index, partLen;
+
+@@ -152,9 +149,7 @@ unsigned int inputLen; /* length of input block */
+ /* MD5 finalization. Ends an MD5 message-digest operation, writing the
+ the message digest and zeroizing the context.
+ */
+-void MD5Final (digest, context)
+-unsigned char digest[16]; /* message digest */
+-MD5_CTX *context; /* context */
++void MD5Final (unsigned char digest[16], MD5_CTX *context)
+ {
+ unsigned char bits[8];
+ unsigned int index, padLen;
+@@ -180,9 +175,7 @@ MD5_CTX *context; /* context */
+
+ /* MD5 basic transformation. Transforms state based on block.
+ */
+-static void MD5Transform (state, block)
+-uint32_t state[4];
+-unsigned char block[64];
++static void MD5Transform (uint32_t state[4], unsigned char block[64])
+ {
+ uint32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
+
+@@ -272,10 +265,7 @@ unsigned char block[64];
+ /* Encodes input (uint32_t) into output (unsigned char). Assumes len is
+ a multiple of 4.
+ */
+-static void Encode (output, input, len)
+-unsigned char *output;
+-uint32_t *input;
+-unsigned int len;
++static void Encode (unsigned char *output, uint32_t *input, unsigned int len)
+ {
+ unsigned int i, j;
+
+@@ -290,10 +280,7 @@ unsigned int len;
+ /* Decodes input (unsigned char) into output (uint32_t). Assumes len is
+ a multiple of 4.
+ */
+-static void Decode (output, input, len)
+-uint32_t *output;
+-unsigned char *input;
+-unsigned int len;
++static void Decode (uint32_t *output, unsigned char *input, unsigned int len)
+ {
+ unsigned int i, j;
+
+@@ -305,26 +292,14 @@ unsigned int len;
+ /* Note: Replace "for loop" with standard memcpy if possible.
+ */
+
+-static void MD5_memcpy (output, input, len)
+-POINTER output;
+-POINTER input;
+-unsigned int len;
++static void MD5_memcpy (POINTER output, POINTER input, unsigned int len)
+ {
+- unsigned int i;
+-
+- for (i = 0; i < len; i++)
+- output[i] = input[i];
++ memcpy(output, input, len);
+ }
+
+ /* Note: Replace "for loop" with standard memset if possible.
+ */
+-static void MD5_memset (output, value, len)
+-POINTER output;
+-int value;
+-unsigned int len;
++static void MD5_memset (POINTER output, int value, unsigned int len)
+ {
+- unsigned int i;
+-
+- for (i = 0; i < len; i++)
+- ((char *)output)[i] = (char)value;
++ memset(output, value, len);
+ }
diff --git a/mail-filter/mailfilter/mailfilter-0.8.4.ebuild b/mail-filter/mailfilter/mailfilter-0.8.4.ebuild
deleted file mode 100644
index 5a6a30d45f7d..000000000000
--- a/mail-filter/mailfilter/mailfilter-0.8.4.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-DESCRIPTION="Mailfilter is a utility to get rid of unwanted spam mails"
-HOMEPAGE="http://mailfilter.sourceforge.net/"
-SRC_URI="mirror://sourceforge/mailfilter/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ppc sparc x86 ~x86-fbsd"
-IUSE="libressl +ssl"
-
-DEPEND="sys-devel/flex
- ssl? (
- libressl? ( dev-libs/libressl:0= )
- !libressl? ( dev-libs/openssl:0= )
-)"
-
-RDEPEND=""
-
-PATCHES=( "${FILESDIR}"/0.8.4-fix-parallel-build.patch )
-
-src_configure() {
- econf $(use_with ssl openssl)
-}
-
-src_install() {
- default
- dodoc INSTALL doc/FAQ "${FILESDIR}"/rcfile.example{1,2}
-}
diff --git a/mail-filter/mailfilter/mailfilter-0.8.9.ebuild b/mail-filter/mailfilter/mailfilter-0.8.9.ebuild
new file mode 100644
index 000000000000..9c4076152a9e
--- /dev/null
+++ b/mail-filter/mailfilter/mailfilter-0.8.9.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Mailfilter is a utility to get rid of unwanted spam mails"
+HOMEPAGE="https://mailfilter.sourceforge.io/"
+SRC_URI="https://downloads.sourceforge.net/mailfilter/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ppc sparc x86"
+IUSE="+ssl"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-bashisms.patch
+ "${FILESDIR}"/${PV}-prototypes.patch
+)
+
+DEPEND="app-alternatives/lex
+ ssl? ( dev-libs/openssl:= )"
+RDEPEND="ssl? ( dev-libs/openssl:= )"
+
+src_configure() {
+ econf $(use_with ssl openssl)
+}
+
+src_install() {
+ default
+ dodoc INSTALL doc/FAQ "${FILESDIR}"/rcfile.example{1,2}
+}
diff --git a/mail-filter/mailfilter/metadata.xml b/mail-filter/mailfilter/metadata.xml
index 655e4b29d6ab..7022c58fc2cc 100644
--- a/mail-filter/mailfilter/metadata.xml
+++ b/mail-filter/mailfilter/metadata.xml
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person" proxied="yes">
+ <email>holger@applied-asynchrony.com</email>
+ <name>Holger Hoffstätte</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<upstream>
<remote-id type="sourceforge">mailfilter</remote-id>
</upstream>