1 |
commit: 063b180e11f29d4d8cbba732c65d8cef9d77c777 |
2 |
Author: Marco Scardovi <marco <AT> scardovi <DOT> com> |
3 |
AuthorDate: Thu Jun 24 14:53:47 2021 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 8 07:35:05 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=063b180e |
7 |
|
8 |
mail-filter/bogofilter: bump to 1.2.5 |
9 |
|
10 |
This also drop patch made for v1.2.4 |
11 |
Closes: https://bugs.gentoo.org/763024 |
12 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
13 |
Signed-off-by: Marco Scardovi <marco <AT> scardovi.com> |
14 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
15 |
|
16 |
mail-filter/bogofilter/Manifest | 1 + |
17 |
mail-filter/bogofilter/bogofilter-1.2.5.ebuild | 129 +++++++++++++++++++++++++ |
18 |
2 files changed, 130 insertions(+) |
19 |
|
20 |
diff --git a/mail-filter/bogofilter/Manifest b/mail-filter/bogofilter/Manifest |
21 |
index 30f3319892a..0c769c323e6 100644 |
22 |
--- a/mail-filter/bogofilter/Manifest |
23 |
+++ b/mail-filter/bogofilter/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
DIST bogofilter-1.2.4.tar.bz2 887848 BLAKE2B 4ed5c15a44f5a166e3858581ccc59b36ebde2fe1eb402cc0471378600b555b2452f4eae04d7d37dcb7638568db0c196da2d2504a3a569d7571c4aacd7e0ceea7 SHA512 e8c0b6bcc14f12fbbb2752e697a6d9065e17abfca3f70045ce9fe668d01c1cfad4adaa35c81546ecdd3639b0c28f3f4776bb5ed4699f21e9e2a5b19ca33479db |
26 |
+DIST bogofilter-1.2.5.tar.xz 801240 BLAKE2B 90fc5f0ab258ada722ca2fb79d17279b621eb089f646eade2ab41b78c44deea7f3fd8f219053e09ce5b4c64f5fc81f43a17c20b84261b22d5529c06106e80b3c SHA512 3a7280485cfe5802dd3e9721c153f88ccf28bff7a6a24590e985e860d1f1e0ddea7bde8a8e5ad1ff643e94c9fd7b26b2a5ed5a9fb991cee3fd5b0ce67ce9abfe |
27 |
|
28 |
diff --git a/mail-filter/bogofilter/bogofilter-1.2.5.ebuild b/mail-filter/bogofilter/bogofilter-1.2.5.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..6b621458523 |
31 |
--- /dev/null |
32 |
+++ b/mail-filter/bogofilter/bogofilter-1.2.5.ebuild |
33 |
@@ -0,0 +1,129 @@ |
34 |
+# Copyright 1999-2021 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+inherit autotools db-use flag-o-matic toolchain-funcs |
40 |
+ |
41 |
+DESCRIPTION="Bayesian spam filter designed with fast algorithms, and tuned for speed" |
42 |
+HOMEPAGE="http://bogofilter.sourceforge.net/" |
43 |
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz" |
44 |
+ |
45 |
+LICENSE="GPL-3+ CC-BY-ND-3.0" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
48 |
+IUSE="berkdb sqlite tokyocabinet" |
49 |
+ |
50 |
+# pax needed for bf_tar |
51 |
+DEPEND=" |
52 |
+ app-arch/pax |
53 |
+ sci-libs/gsl:= |
54 |
+ virtual/libiconv |
55 |
+ berkdb? ( >=sys-libs/db-3.2:* ) |
56 |
+ !berkdb? ( |
57 |
+ sqlite? ( >=dev-db/sqlite-3.6.22 ) |
58 |
+ !sqlite? ( |
59 |
+ tokyocabinet? ( dev-db/tokyocabinet ) |
60 |
+ !tokyocabinet? ( >=sys-libs/db-3.2:* ) |
61 |
+ ) |
62 |
+ ) |
63 |
+" |
64 |
+RDEPEND="${DEPEND}" |
65 |
+ |
66 |
+pkg_setup() { |
67 |
+ has_version mail-filter/bogofilter || return 0 |
68 |
+ if ( use berkdb && ! has_version 'mail-filter/bogofilter[berkdb]' ) || \ |
69 |
+ ( ! use berkdb && has_version 'mail-filter/bogofilter[berkdb]' ) || \ |
70 |
+ ( use sqlite && ! has_version 'mail-filter/bogofilter[sqlite]' ) || \ |
71 |
+ ( ! use sqlite && has_version 'mail-filter/bogofilter[sqlite]' ) || \ |
72 |
+ ( has_version '>=mail-filter/bogofilter-1.2.1-r1' && \ |
73 |
+ ( use tokyocabinet && ! has_version 'mail-filter/bogofilter[tokyocabinet]' ) || \ |
74 |
+ ( ! use tokyocabinet && has_version 'mail-filter/bogofilter[tokyocabinet]' ) |
75 |
+ ) ; then |
76 |
+ ewarn |
77 |
+ ewarn "If you want to switch the database backend, you must dump the wordlist" |
78 |
+ ewarn "with the current version (old use flags) and load it with the new version!" |
79 |
+ ewarn |
80 |
+ fi |
81 |
+} |
82 |
+ |
83 |
+src_prepare() { |
84 |
+ default |
85 |
+ |
86 |
+ # bug 445918 |
87 |
+ sed -i -e 's/ -ggdb//' configure.ac || die |
88 |
+ |
89 |
+ # bug 421747 |
90 |
+ chmod +x src/tests/t.{ctype,leakfind,lexer.qpcr,lexer.eoh,message_id,queue_id} || die |
91 |
+ |
92 |
+ # bug 654990 |
93 |
+ sed -i -e 's/t.bulkmode//' \ |
94 |
+ -e 's/t.dump.load//' \ |
95 |
+ -e 's/t.nonascii.replace//' \ |
96 |
+ src/tests/Makefile.am || die |
97 |
+ |
98 |
+ eautoreconf |
99 |
+} |
100 |
+ |
101 |
+src_configure() { |
102 |
+ local myconf="" berkdb=true |
103 |
+ myconf="--without-included-gsl" |
104 |
+ |
105 |
+ # determine backend: berkdb *is* default |
106 |
+ if use berkdb && use sqlite ; then |
107 |
+ elog "Both useflags berkdb and sqlite are in USE:" |
108 |
+ elog "Using berkdb as database backend." |
109 |
+ elif use berkdb && use tokyocabinet ; then |
110 |
+ elog "Both useflags berkdb and tokyocabinet are in USE:" |
111 |
+ elog "Using berkdb as database backend." |
112 |
+ elif use sqlite && use tokyocabinet ; then |
113 |
+ elog "Both useflags sqlite and tokyocabinet are in USE:" |
114 |
+ elog "Using sqlite as database backend." |
115 |
+ myconf="${myconf} --with-database=sqlite" |
116 |
+ berkdb=false |
117 |
+ elif use sqlite ; then |
118 |
+ myconf="${myconf} --with-database=sqlite" |
119 |
+ berkdb=false |
120 |
+ elif use tokyocabinet ; then |
121 |
+ myconf="${myconf} --with-database=tokyocabinet" |
122 |
+ berkdb=false |
123 |
+ elif ! use berkdb ; then |
124 |
+ elog "Neither berkdb nor sqlite nor tokyocabinet are in USE:" |
125 |
+ elog "Using berkdb as database backend." |
126 |
+ fi |
127 |
+ |
128 |
+ # Include the right berkdb headers for FreeBSD |
129 |
+ if ${berkdb} ; then |
130 |
+ append-cppflags "-I$(db_includedir)" |
131 |
+ fi |
132 |
+ |
133 |
+ econf ${myconf} |
134 |
+} |
135 |
+ |
136 |
+src_test() { |
137 |
+ emake -C src/ check |
138 |
+} |
139 |
+ |
140 |
+src_install() { |
141 |
+ emake DESTDIR="${D}" install |
142 |
+ |
143 |
+ exeinto /usr/share/${PN}/contrib |
144 |
+ doexe contrib/{bogofilter-qfe,parmtest,randomtrain}.sh \ |
145 |
+ contrib/{bfproxy,bogominitrain,mime.get.rfc822,printmaildir}.pl \ |
146 |
+ contrib/{spamitarium,stripsearch}.pl |
147 |
+ |
148 |
+ insinto /usr/share/${PN}/contrib |
149 |
+ doins contrib/{README.*,dot-qmail-bogofilter-default} \ |
150 |
+ contrib/{bogogrep.c,bogo.R,bogofilter-milter.pl,*.example} \ |
151 |
+ contrib/vm-bogofilter.el \ |
152 |
+ contrib/{trainbogo,scramble}.sh |
153 |
+ |
154 |
+ dodoc AUTHORS NEWS README RELEASE.NOTES* TODO GETTING.STARTED \ |
155 |
+ doc/integrating-with-* doc/README.{db,sqlite} |
156 |
+ |
157 |
+ dodoc -r doc/*.html |
158 |
+ |
159 |
+ dodir /usr/share/doc/${PF}/samples |
160 |
+ mv "${D}"/etc/bogofilter.cf.example "${D}"/usr/share/doc/${PF}/samples/ || die |
161 |
+ rmdir "${D}"/etc || die |
162 |
+} |