mail-filter/libsrs_alt: stable 1.0-r1 for sparc, bug #697318
[gentoo.git] / mail-filter / libsrs_alt / libsrs_alt-1.0-r1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools
7
8 MY_PV=${PV}
9 MY_RC=${PV}
10 S=${WORKDIR}/${PN}-${MY_PV}
11
12 DESCRIPTION="Sender Rewriting Scheme library for use with Exim"
13 HOMEPAGE="http://opsec.eu/src/srs/"
14 SRC_URI="https://opsec.eu/src/srs/libsrs_alt-${MY_PV}.tar.bz2"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 sparc ~x86"
19 IUSE="static-libs"
20
21 RDEPEND="!dev-perl/Mail-SRS"
22
23 src_prepare() {
24         eapply "${FILESDIR}"/${P}-ftime.patch
25
26         # add missing header
27         sed -i -e '/timeb.h>/ a #include <stdlib.h>' test.c
28
29         eapply_user
30
31         eautoreconf
32 }
33
34 src_configure() {
35         # Since the primary intended consumers of this library are MTAs,
36         # use non-standard separator characters (--with-base64compat).
37         # This breaks "SRS Compliancy", which is a rough standard at
38         # best.
39         econf --with-base64compat
40 }
41
42 src_compile() {
43         # Makefile rules are h0rk3ned, but this is such a tiny package, that
44         # it hardly makes sense to fix this.
45         emake -j1
46 }
47
48 src_install() {
49         default
50         dodoc "${S}"/MTAs/README.EXIM
51
52         use static-libs || rm "${ED}"/usr/$(get_libdir)/libsrs_alt.a
53 }