]> Pileus Git - ~andy/sunrise/blob - dev-util/mockpp/mockpp-1.14.0.ebuild
6c39e7fa2da8453278c9906f82ffde4937044e9e
[~andy/sunrise] / dev-util / mockpp / mockpp-1.14.0.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 WANT_AUTOMAKE="1.9"
6 inherit eutils autotools
7
8 DESCRIPTION="mockpp is a platform independent generic unit testing framework for C++."
9 HOMEPAGE="http://mockpp.sourceforge.net/"
10 SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~x86"
15 IUSE="boost cppunit doc"
16
17 RDEPEND="cppunit? ( dev-util/cppunit )
18         boost? ( dev-libs/boost )"
19 DEPEND="${RDEPEND}
20         doc? ( app-doc/doxygen
21                 app-text/docbook-xml-dtd
22                 dev-java/fop )"
23
24 pkg_setup() {
25         if use boost && use cppunit; then
26                 ewarn
27                 ewarn "Both boost and cppunit use-flags specified, will use boost"
28                 ewarn
29         fi
30 }
31
32 src_unpack() {
33         unpack ${A}
34         cd "${S}"
35         epatch "${FILESDIR}/${PV}-destdir.patch"
36         epatch "${FILESDIR}/${PV}-boost_incdir_m4.patch"
37         eautoreconf
38 }
39
40 src_compile() {
41         econf \
42                 $(use_enable cppunit) \
43                 $(use_enable boost boosttest) \
44                 $(use_enable doc doxygen) \
45                 $(use_enable doc docbook) || die "econf failed"
46         emake || die "emake failed"
47 }
48
49 src_install() {
50         # docs get build & installed only if doc use-flag is specified
51         emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install || die "emake install failed"
52         dodoc ChangeLog AUTHORS README TODO
53 }