summaryrefslogtreecommitdiff
blob: 1f43d827ed13528eb2e848a0cbef6852243159a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/mail-client/mailx/mailx-8.1.2.20021129-r3.ebuild,v 1.12 2005/01/26 18:21:17 ferdy Exp $

inherit ccc eutils
IUSE=""
MX_VER="8.1.1"
S=${WORKDIR}/mailx-${MX_VER}.orig

DESCRIPTION="The /bin/mail program, which is used to send mail via shell scripts."
SRC_URI="mirror://gentoo/mailx_${MX_VER}.orig.tar.gz
	mirror://gentoo/multifix.diff.gz
	mirror://gentoo/20021129-cvs.diff.bz2"
HOMEPAGE="http://www.debian.org"

DEPEND=">=net-libs/liblockfile-1.03
	virtual/mta
	!mail-client/mailutils
	mail-client/mailx-support"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="x86 ppc sparc alpha ~mips hppa ~ia64 amd64 ppc64"

src_unpack() {

	unpack ${A}
	cd ${S}
	epatch ${DISTDIR}/20021129-cvs.diff.bz2 || die "patch failed"
	epatch ${DISTDIR}/multifix.diff.gz || die "patch failed"
	epatch ${FILESDIR}/mailx-64bit.diff || die "patch failed"
}

src_compile() {

	is-ccc && replace-cc-hardcode

	# Can't compile mailx with optimizations
	_CFLAGS=$(echo $CFLAGS|sed 's/-O.//g')

	make CFLAGS="$_CFLAGS" || die "make failed"

}

src_install() {

	dodir /bin /usr/share/man/man1 /etc /usr/lib

	insinto /bin
	insopts -m 755
	doins mail

	doman mail.1

	dosym mail /bin/Mail
	dosym mail /bin/mailx
	dosym mail.1 /usr/share/man/man1/Mail.1

	cd ${S}/misc
	insinto /usr/lib
	insopts -m 644
	doins mail.help mail.tildehelp
	insinto /etc
	insopts -m 644
	doins mail.rc

}