net-mail/cyrus-imapd: stable 3.0.13 for ppc, bug #703630
[gentoo.git] / net-mail / safecat / safecat-1.13.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit toolchain-funcs
7
8 DESCRIPTION="Safecat implements qmail's maildir algorithm, safely copying standard input"
9 HOMEPAGE="http://www.jeenyus.net/linux/software/safecat.html"
10 SRC_URI="http://www.jeenyus.net/linux/software/${PN}/${P}.tar.gz"
11
12 LICENSE="BSD"
13 SLOT="0"
14 KEYWORDS="amd64 ~hppa ~mips ppc ~sparc x86"
15 IUSE=""
16 RESTRICT="test"
17
18 DEPEND="sys-apps/groff"
19 RDEPEND=""
20
21 PATCHES=(
22         # applying maildir-patch
23         "${FILESDIR}"/safecat-1.11-gentoo.patch
24         # Fix parallel make errors
25         "${FILESDIR}"/${P}-makefile.patch
26         # Fix POSIX head/tail syntax
27         "${FILESDIR}"/${P}-head-tail-POSIX.patch
28 )
29
30 src_prepare() {
31         default
32
33         sed -ni '/man\|doc/!p' hier.c || die
34
35         # Fix implicit decleration
36         sed '/include <signal.h>/ a #include <stdlib.h>' -i safecat.c || die
37 }
38
39 src_configure() {
40         echo "${D}/usr" > conf-root || die
41         echo "$(tc-getCC) ${CFLAGS}" > conf-cc || die
42         echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die
43 }
44
45 src_install() {
46         emake setup check
47         einstalldocs
48         doman maildir.1 safecat.1
49 }