]> Pileus Git - ~andy/sunrise/blob - dev-util/tinyxml/tinyxml-2.5.3.ebuild
sunrise/ app-portage/elog-list/elog-list-0.0.6.ebuild: Update header
[~andy/sunrise] / dev-util / tinyxml / tinyxml-2.5.3.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit toolchain-funcs
6
7 DESCRIPTION="A simple C++ XML parser that can be easily integrating into other programs"
8 HOMEPAGE="http://www.grinninglizard.com/tinyxml/index.html"
9 SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV//./_}.tar.gz"
10
11 LICENSE="GPL-2"
12 KEYWORDS="~amd64 ~x86"
13 SLOT="0"
14 IUSE="doc examples"
15
16 DEPEND="doc? ( app-doc/doxygen )"
17 RDEPEND=""
18
19 S="${WORKDIR}/${PN}"
20
21 src_compile() {
22 $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} -fPIC -c -o tinystr.os -DTIXML_USE_STL tinystr.cpp || die
23 $(tc-getCXX) ${CFLAGS} ${LDFLAGS} -fPIC -c -o tinyxml.os -DTIXML_USE_STL tinyxml.cpp || die
24 $(tc-getCXX) ${CFLAGS} ${LDFLAGS} -fPIC -c -o tinyxmlerror.os tinyxmlerror.cpp || die
25 $(tc-getCXX) ${CFLAGS} ${LDFLAGS} -fPIC -c -o tinyxmlparser.os -DTIXML_USE_STL tinyxmlparser.cpp || die
26 $(tc-getCXX) ${CFLAGS} ${LDFLAGS} -fPIC -Wl,-soname -Wl,tinyxml.so -o libtinyxml.so -shared tinystr.os tinyxml.os tinyxmlerror.os tinyxmlparser.os || die
27         if use doc ; then
28                 doxygen dox || die "doxygen failed"
29         fi
30 }
31
32 src_install () {
33         insinto /usr/include
34         doins *.h || die "installing headers failed"
35         dolib libtinyxml.so || die "installing library failed"
36         dodoc {changes,readme}.txt
37         if use doc ; then
38                 dohtml docs/* || die "installing docs"
39         fi
40         if use examples ; then
41                 insinto /usr/share/doc/${PF}/samples
42                 doins *.xml xmltest.cpp || die "installing examples"
43         fi
44 }