summaryrefslogtreecommitdiff
blob: 2c240d65be6be15f2720a418d9bd4f27efa50863 (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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-physics/bullet/bullet-2.76-r1.ebuild,v 1.4 2010/09/16 17:31:03 scarabeus Exp $

EAPI=2
inherit eutils cmake-utils

DESCRIPTION="Continuous Collision Detection and Physics Library"
HOMEPAGE="http://www.bulletphysics.com/"
SRC_URI="http://bullet.googlecode.com/files/${P}.tgz"

LICENSE="ZLIB"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="doc examples"

RDEPEND="media-libs/freeglut"
DEPEND="${RDEPEND}"

src_configure() {
	mycmakeargs="
		-DBUILD_SHARED_LIBS=ON
		-DBUILD_DEMOS=OFF
		-DBUILD_EXTRAS=OFF
		-DINSTALL_LIBS=ON
		-DINSTALL_EXTRA_LIBS=ON"
	#	-DCMAKE_INSTALL_PREFIX=/usr"

	cmake-utils_src_configure
	sed -e "s|@prefix@|${ROOT}usr|" \
		-e 's|@exec_prefix@|${prefix}|' \
		-e "s|@libdir@|\${exec_prefix}/$(get_libdir)|" \
		-e "s|@PACKAGE_VERSION@|${PV}|" \
		-e "s|@includedir@|\${prefix}/include|" \
		bullet.pc.in > bullet.pc || die
}

src_install() {
	cmake-utils_src_install
	insinto /usr/$(get_libdir)/pkgconfig
	doins bullet.pc || die
	dodoc README ChangeLog AUTHORS
	if use doc; then
		insinto /usr/share/doc/${PF}
		doins *.pdf || die
	fi
	if use examples; then
		insinto /usr/share/doc/${PF}/examples
		doins -r Extras Demos || die
	fi
}