]> Pileus Git - ~andy/sunrise/blob - dev-cpp/libvmime/libvmime-0.9.1.ebuild
896209d9cfa2a5c775507a25c8de8cecda2dd0bc
[~andy/sunrise] / dev-cpp / libvmime / libvmime-0.9.1.ebuild
1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=4
6
7 DESCRIPTION="Library for working with MIME messages and Internet messaging services like IMAP, POP or SMTP"
8 HOMEPAGE="http://www.vmime.org"
9 SRC_URI="mirror://sourceforge/vmime/${P}.tar.bz2"
10
11 LICENSE="GPL-3"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="debug doc examples +imap +maildir +pop sasl sendmail +smtp ssl"
15
16 RDEPEND="virtual/libiconv
17         ssl? ( >=net-libs/gnutls-1.2.0 )
18         sasl? ( virtual/gsasl )
19         sendmail? ( virtual/mta )"
20 DEPEND="${RDEPEND}
21         doc? ( app-doc/doxygen )"
22
23 src_prepare() {
24         sed -i \
25                 -e "s|doc/\${PACKAGE_TARNAME}|doc/${PF}|" \
26                 -e "s|doc/\$(GENERIC_LIBRARY_NAME)|doc/${PF}|" \
27                 configure Makefile.in || die "sed failed"
28 }
29
30 src_configure() {
31         econf $(use_enable debug) \
32                 $(use_enable sasl) \
33                 $(use_enable ssl tls) \
34                 $(use_enable pop messaging-proto-pop3) \
35                 $(use_enable smtp messaging-proto-smtp) \
36                 $(use_enable imap messaging-proto-imap) \
37                 $(use_enable maildir messaging-proto-maildir) \
38                 $(use_enable sendmail messaging-proto-sendmail)
39 }
40
41 src_compile() {
42         default
43         if use doc ; then
44                 doxygen vmime.doxygen || die "doxygen failed"
45         fi
46 }
47
48 src_install() {
49         emake DESTDIR="${D}" install
50         dodoc AUTHORS ChangeLog
51         if use doc ; then
52                 dohtml doc/html/*
53         fi
54
55         insinto /usr/share/doc/${PF}
56         if use examples ; then
57                 doins -r examples
58         fi
59 }