summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-10-01 03:53:00 +0100
committerSam James <sam@gentoo.org>2022-10-01 03:53:00 +0100
commitf78f4ec02ff2aa306774ccff54ce901b9317a6c1 (patch)
treedb4ec6b591ef0a3a51c36315e8aa81a0caf78ee0
parentmedia-video/pipewire: drop 0.3.57 (diff)
downloadgentoo-f78f4ec02ff2aa306774ccff54ce901b9317a6c1.tar.gz
gentoo-f78f4ec02ff2aa306774ccff54ce901b9317a6c1.tar.bz2
gentoo-f78f4ec02ff2aa306774ccff54ce901b9317a6c1.zip
mail-filter/milter-regex: fix build w/ Clang 16
Closes: https://bugs.gentoo.org/871366 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--mail-filter/milter-regex/files/milter-regex-2.7-implicit-func-decl.patch10
-rw-r--r--mail-filter/milter-regex/milter-regex-2.7-r2.ebuild47
2 files changed, 57 insertions, 0 deletions
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
new file mode 100644
index 000000000000..c2edaa8e0b8f
--- /dev/null
+++ b/mail-filter/milter-regex/files/milter-regex-2.7-implicit-func-decl.patch
@@ -0,0 +1,10 @@
+https://bugs.gentoo.org/871366
+--- a/eval.h
++++ b/eval.h
+@@ -107,4 +107,6 @@ struct action *eval_end(struct ruleset *, int *, int, int);
+ void eval_clear(struct ruleset *, int *, int);
+ void free_ruleset(struct ruleset *);
+
++int yylex(void);
++
+ #endif
diff --git a/mail-filter/milter-regex/milter-regex-2.7-r2.ebuild b/mail-filter/milter-regex/milter-regex-2.7-r2.ebuild
new file mode 100644
index 000000000000..1e21636dfdff
--- /dev/null
+++ b/mail-filter/milter-regex/milter-regex-2.7-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="A milter-based regular expression filter"
+HOMEPAGE="https://www.benzedrine.ch/milter-regex.html"
+SRC_URI="https://www.benzedrine.ch/${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="acct-user/milter-regex
+ >=mail-filter/libmilter-1.0.2_p2:="
+DEPEND="${RDEPEND}
+ virtual/yacc"
+
+src_prepare() {
+ eapply "${FILESDIR}/${PN}-2.6-gentoo.patch"
+ eapply "${FILESDIR}"/milter-regex-2.7-implicit-func-decl.patch
+ eapply_user
+ # Change default user
+ sed -i -e 's/_\(milter-regex\)/\1/g' ${PN}.[8c] || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" -f Makefile.linux all
+}
+
+src_install() {
+ dobin ${PN}
+ insinto /etc
+ newins rules ${PN}.conf
+ newconfd "${FILESDIR}/${PN}-conf-2.6" ${PN}
+ newinitd "${FILESDIR}/${PN}-init" ${PN}
+ doman *.8
+}
+
+pkg_postinst() {
+ elog "Postfix configuration example (add to main.cf or master.cf):"
+ elog " smtpd_milters=unix:/run/milter-regex/socket"
+ elog "Sendmail configuration example:"
+ elog " INPUT_MAIL_FILTER(\`${PN}',\`S=unix:/run/milter-regex/socket,T=S:30s;R:2m')"
+}