summaryrefslogtreecommitdiff
blob: 14ba7aa6fe82a8947c1eef8c7224e56bdd2e2b2b (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools

DESCRIPTION="Cal3D is a skeletal based character animation library"
HOMEPAGE="https://mp3butcher.github.io/Cal3D/"
SRC_URI="http://download.gna.org/cal3d/sources/${P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="amd64 ~ia64 ppc x86"
IUSE="16bit-indices debug doc"

BDEPEND="
	doc? (
		app-doc/doxygen
		app-text/docbook-sgml-utils
	)"

PATCHES=(
	"${FILESDIR}"/${P}-gcc43.patch
	"${FILESDIR}"/${P}-tests.patch
	"${FILESDIR}"/${P}-verbose.patch
	"${FILESDIR}"/${P}-gcc6.patch
	"${FILESDIR}"/${P}-docbook2html.patch
)

src_prepare() {
	default
	eautoreconf
}

src_configure() {
	econf \
		$(use_enable debug) \
		$(use_enable 16bit-indices)
}

src_compile() {
	emake

	if use doc; then
		cd docs || die
		emake doc-api
		emake doc-guide
		mkdir -p html/{guide,api} || die
		mv *.{html,gif} html/guide/ || die
		mv api/html/* html/api/ || die
		HTML_DOCS=( docs/html/api docs/html/guide )
	fi
}