summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/libspf2/Manifest1
-rw-r--r--mail-filter/libspf2/files/libspf2-1.2.11-memset-include-string-h.patch12
-rw-r--r--mail-filter/libspf2/libspf2-1.2.11.ebuild48
3 files changed, 61 insertions, 0 deletions
diff --git a/mail-filter/libspf2/Manifest b/mail-filter/libspf2/Manifest
index c08387498457..723253e0d979 100644
--- a/mail-filter/libspf2/Manifest
+++ b/mail-filter/libspf2/Manifest
@@ -1 +1,2 @@
DIST libspf2-1.2.10.tar.gz 508842 BLAKE2B d15a44f64c5e3da20aa349e61a6cc02a15f83ed3acff93fe4c23970e30533d6424b1db35d7d60ff488c9a239d343f8544426fbf8fcb66271237155e0b57df1b5 SHA512 162ce382628c6fcadac3e11f5a12442db622bb23f7ec503e16f5ba7fc88afdd777bce6b093c12a58210355985fd11b74b140f08fab347334d82d953dd183b130
+DIST libspf2-1.2.11.tar.gz 565497 BLAKE2B 4000e15204c962ef438cc8bcf6411f4f965e1451e356923e2764d5a1209cbc9153a38e1d83d25c8b4b26646bfb306ec49b71d273fdbabe200b78ac2694c05a4f SHA512 ad7bea800ad6ec8d00a7f8f381b59d9ba074fb6c5932d8babcb05ab5ca59defb78445dd7bd89767e5c272b6c6638c8000c8c525c560d1803c35712f0ff86fa9b
diff --git a/mail-filter/libspf2/files/libspf2-1.2.11-memset-include-string-h.patch b/mail-filter/libspf2/files/libspf2-1.2.11-memset-include-string-h.patch
new file mode 100644
index 000000000000..5b5a77298305
--- /dev/null
+++ b/mail-filter/libspf2/files/libspf2-1.2.11-memset-include-string-h.patch
@@ -0,0 +1,12 @@
+grobian@gentoo.org: include string.h so memset is declared
+
+--- a/src/libspf2/spf_utils.c
++++ b/src/libspf2/spf_utils.c
+@@ -19,6 +19,7 @@
+ #ifdef STDC_HEADERS
+ # include <stdlib.h> /* malloc / free */
+ # include <ctype.h> /* isupper / tolower */
++# include <string.h> /* memset */
+ #endif
+
+ #ifdef HAVE_MEMORY_H
diff --git a/mail-filter/libspf2/libspf2-1.2.11.ebuild b/mail-filter/libspf2/libspf2-1.2.11.ebuild
new file mode 100644
index 000000000000..a7e6b40b96ce
--- /dev/null
+++ b/mail-filter/libspf2/libspf2-1.2.11.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+GHASH=4915c308d57ff3abac9fb241f09c4bed2ab54815 # 1.2.11
+DESCRIPTION="implementation of Sender Policy Framework (SPF)"
+HOMEPAGE="https://www.libspf2.org"
+SRC_URI="https://github.com/shevek/${PN}/archive/${GHASH}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="|| ( LGPL-2.1 BSD-2 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+RDEPEND="!dev-perl/Mail-SPF-Query"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.2.11-memset-include-string-h.patch
+)
+
+S=${WORKDIR}/${PN}-${GHASH}
+
+src_prepare() {
+ default
+
+ sed -i -e '/bin_PROGRAMS/s/spfquery_static//' src/spfquery/Makefile.am \
+ -e '/bin_PROGRAMS/s/spftest_static//' src/spftest/Makefile.am \
+ -e '/bin_PROGRAMS/s/spfd_static//' src/spfd/Makefile.am \
+ -e '/bin_PROGRAMS/s/spf_example_static//' src/spf_example/Makefile.am \
+ || die
+
+ sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-static
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README TODO INSTALL
+
+ find "${ED}" -name '*.la' -delete || die
+}