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

ESVN_REPO_URI="http://ticpp.googlecode.com/svn/trunk/"
inherit subversion

MY_PV=cvs
DESCRIPTION="A completely new interface to TinyXML that uses MANY of the C++ strengths"
HOMEPAGE="http://code.google.com/p/ticpp/"
SRC_URI=""

LICENSE="GPL-2"
KEYWORDS=""
SLOT="0"
IUSE="debug doc"

DEPEND="dev-util/premake
	doc? ( app-doc/doxygen sys-apps/sed )"
RDEPEND=""

S=${WORKDIR}/${PN}

src_compile() {
	local myconf

	premake --target gnu || die "creating Makefile failed"

	if use !debug ; then
		myconf="CONFIG=Release"
	fi

	emake ${myconf} || die "emake failed"

	if use doc ; then
		sed -i -e '/GENERATE_HTMLHELP/s:YES:NO:' dox || die "sed failed"
		doxygen dox || die "doxygen failed"
	fi
}

src_install () {
	insinto /usr/include/ticpp
	doins *.h || die "installing headers failed"

	if use debug ; then
		dolib libticppd.a || die "installing library failed"
	else
		dolib libticpp.a || die "installing library failed"
	fi

	dodoc {changes,readme,tutorial_gettingStarted,tutorial_ticpp}.txt || \
		die "dodoc failed"

	if use doc ; then
		dohtml -r docs/* || die "installing docs failed"
	fi
}