summaryrefslogtreecommitdiff
blob: 5a075cb5f4d525b1887f6ba6d8d2496c591db91d (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="1"
inherit eutils

DESCRIPTION="Library for working with MIME messages and Internet messaging services like IMAP, POP or SMTP"
HOMEPAGE="http://www.vmime.org"
SRC_URI="mirror://sourceforge/vmime/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug doc examples +imap +maildir +pop sasl sendmail +smtp ssl"

RDEPEND="virtual/libiconv
         ssl? ( >=net-libs/gnutls-1.2.0 )
         sasl? ( || ( net-libs/libgsasl net-misc/gsasl ) )
         sendmail? ( || ( mail-mta/ssmtp mail-mta/sendmail ) )"
DEPEND="${RDEPEND}
        doc? ( app-doc/doxygen )"

src_unpack() {
	unpack ${A}
	cd "${S}"

	sed -i \
		-e "s|doc/\${PACKAGE_TARNAME}|doc/${PF}|" \
		-e "s|doc/\$(GENERIC_LIBRARY_NAME)|doc/${PF}|" \
		configure Makefile.in || die "sed failed"

	epatch "${FILESDIR}/${P}-gcc4_4.patch"
}

src_compile() {
	econf $(use_enable debug) \
          $(use_enable sasl) \
          $(use_enable ssl tls) \
          $(use_enable pop messaging-proto-pop3) \
          $(use_enable smtp messaging-proto-smtp) \
          $(use_enable imap messaging-proto-imap) \
          $(use_enable maildir messaging-proto-maildir) \
          $(use_enable sendmail messaging-proto-sendmail)

	emake || die "emake failed"
	if use doc ; then
		doxygen vmime.doxygen || die "doxygen failed"
	fi
}

src_install() {
	emake DESTDIR="${D}" install || die "emake install failed"
	dodoc AUTHORS ChangeLog || die "dodoc failed"
	if use doc ; then
		dohtml doc/html/* || die "dohtml failed"
	fi

	insinto /usr/share/doc/${PF}
	if use examples ; then
		doins -r examples || die "doins examples failed"
	fi
}