Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/milter-regex/, mail-filter/milter-regex/files/
Date: Sat, 01 Oct 2022 02:54:00
Message-Id: 1664592780.f78f4ec02ff2aa306774ccff54ce901b9317a6c1.sam@gentoo
1 commit: f78f4ec02ff2aa306774ccff54ce901b9317a6c1
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 1 02:53:00 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 1 02:53:00 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f78f4ec0
7
8 mail-filter/milter-regex: fix build w/ Clang 16
9
10 Closes: https://bugs.gentoo.org/871366
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 .../milter-regex-2.7-implicit-func-decl.patch | 10 +++++
14 .../milter-regex/milter-regex-2.7-r2.ebuild | 47 ++++++++++++++++++++++
15 2 files changed, 57 insertions(+)
16
17 diff --git a/mail-filter/milter-regex/files/milter-regex-2.7-implicit-func-decl.patch b/mail-filter/milter-regex/files/milter-regex-2.7-implicit-func-decl.patch
18 new file mode 100644
19 index 000000000000..c2edaa8e0b8f
20 --- /dev/null
21 +++ b/mail-filter/milter-regex/files/milter-regex-2.7-implicit-func-decl.patch
22 @@ -0,0 +1,10 @@
23 +https://bugs.gentoo.org/871366
24 +--- a/eval.h
25 ++++ b/eval.h
26 +@@ -107,4 +107,6 @@ struct action *eval_end(struct ruleset *, int *, int, int);
27 + void eval_clear(struct ruleset *, int *, int);
28 + void free_ruleset(struct ruleset *);
29 +
30 ++int yylex(void);
31 ++
32 + #endif
33
34 diff --git a/mail-filter/milter-regex/milter-regex-2.7-r2.ebuild b/mail-filter/milter-regex/milter-regex-2.7-r2.ebuild
35 new file mode 100644
36 index 000000000000..1e21636dfdff
37 --- /dev/null
38 +++ b/mail-filter/milter-regex/milter-regex-2.7-r2.ebuild
39 @@ -0,0 +1,47 @@
40 +# Copyright 1999-2022 Gentoo Authors
41 +# Distributed under the terms of the GNU General Public License v2
42 +
43 +EAPI=7
44 +
45 +inherit toolchain-funcs
46 +
47 +DESCRIPTION="A milter-based regular expression filter"
48 +HOMEPAGE="https://www.benzedrine.ch/milter-regex.html"
49 +SRC_URI="https://www.benzedrine.ch/${P}.tar.gz"
50 +LICENSE="BSD"
51 +SLOT="0"
52 +KEYWORDS="~amd64 ~x86"
53 +IUSE=""
54 +
55 +RDEPEND="acct-user/milter-regex
56 + >=mail-filter/libmilter-1.0.2_p2:="
57 +DEPEND="${RDEPEND}
58 + virtual/yacc"
59 +
60 +src_prepare() {
61 + eapply "${FILESDIR}/${PN}-2.6-gentoo.patch"
62 + eapply "${FILESDIR}"/milter-regex-2.7-implicit-func-decl.patch
63 + eapply_user
64 + # Change default user
65 + sed -i -e 's/_\(milter-regex\)/\1/g' ${PN}.[8c] || die
66 +}
67 +
68 +src_compile() {
69 + emake CC="$(tc-getCC)" -f Makefile.linux all
70 +}
71 +
72 +src_install() {
73 + dobin ${PN}
74 + insinto /etc
75 + newins rules ${PN}.conf
76 + newconfd "${FILESDIR}/${PN}-conf-2.6" ${PN}
77 + newinitd "${FILESDIR}/${PN}-init" ${PN}
78 + doman *.8
79 +}
80 +
81 +pkg_postinst() {
82 + elog "Postfix configuration example (add to main.cf or master.cf):"
83 + elog " smtpd_milters=unix:/run/milter-regex/socket"
84 + elog "Sendmail configuration example:"
85 + elog " INPUT_MAIL_FILTER(\`${PN}',\`S=unix:/run/milter-regex/socket,T=S:30s;R:2m')"
86 +}