]> Pileus Git - ~andy/sunrise/blob - dev-cpp/libiqxmlrpc/libiqxmlrpc-0.8.1.ebuild
21692b3ec4061b71d23914ec06c717e9f23f040a
[~andy/sunrise] / dev-cpp / libiqxmlrpc / libiqxmlrpc-0.8.1.ebuild
1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils
6
7 DESCRIPTION="Object-oriented library which represents simple XML-RPC solution both for client and server sides."
8 HOMEPAGE="http://libiqxmlrpc.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
10
11 LICENSE="LGPL-2"
12 SLOT="0"
13 KEYWORDS="~x86"
14 IUSE="doc debug"
15
16 RDEPEND="=dev-cpp/libxmlpp-1*
17         dev-libs/libxml2
18         dev-libs/boost
19         dev-libs/openssl"
20 DEPEND="${RDEPEND}
21         doc? ( app-doc/doxygen )"
22
23 pkg_setup() {
24         if has_version "<dev-libs/boost-1.34" && ! built_with_use dev-libs/boost threads ; then
25                 eerror "dev-libs/boost has to be compiled with 'threads' USE-flag enabled."
26                 die "Needed USE-flag for dev-libs/boost not found."
27         fi
28 }
29
30 src_compile() {
31         econf \
32                 $(use_enable doc docs) \
33                 $(use_enable debug) \
34                 --with-boost-thread=boost_thread-mt \
35                 --with-boost-program-options=boost_program_options-mt \
36                 --with-boost-unit-test-framework=boost_unit_test_framework-mt \
37                 || die "econf failed"
38         emake CXXFLAGS="${CXXFLAGS}" || die "emake failed"
39 }
40
41 src_install() {
42         # We install the docs manually, because: i) sandbox violations ii) wrong location
43         emake DESTDIR="${D}" MKDOC=no install || die "emake install failed"
44         dodoc ChangeLog README NEWS
45         if use doc; then
46                 dohtml doc/libiqxmlrpc.html/*
47         fi
48 }
49
50 src_test() {
51         einfo "This can take some time due to stress tests"
52         cd "${S}/tests"
53         make check
54         ./regression.sh
55 }