summaryrefslogtreecommitdiff
blob: 0a7d89e7916ca0e5305ab24bf490e9ee8b053a55 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

inherit eutils cmake-utils git-2

DESCRIPTION="OpenSG is a portable scenegraph system to create realtime graphics programs, e.g. for virtual reality applications."
HOMEPAGE="http://www.opensg.org/"
LICENSE="LGPL-2.1"

EGIT_REPO_URI="git://opensg.git.sourceforge.net/gitroot/opensg/opensg"

SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="tests doc examples"
DEPEND="virtual/opengl
	media-libs/freeglut
	media-libs/glew
	
	sys-devel/flex
	sys-devel/bison

	dev-libs/boost
	sys-libs/zlib
	media-libs/freetype
	media-libs/tiff
	media-libs/libpng
	media-libs/jpeg
	media-libs/openexr
	media-libs/collada-dom

	x11-libs/qt-gui:4
	x11-libs/qt-opengl:4

	doc? ( app-doc/doxygen )"
# sci-libs/gdal
#sci-libs/vtk

RDEPEND="${DEPEND}"

src_configure() {
	CMAKE_BUILD_TYPE=Release
	mycmakeargs=(
		-DOSG_USE_OSGSUPPORT_LIBS=OFF
		-DBOOST_ROOT=/usr
		-DOSG_DOXY_DOC_TYPE=User
		-DOSGBUILD_EXAMPLES_SIMPLE=ON
		-DOSGBUILD_EXAMPLES_ADVANCED=ON
		-DCOLLADA_INCLUDE_DIR=/usr/include/collada-dom
	)
	cmake-utils_src_configure
}

src_compile() {
	cmake-utils_src_compile
	if use doc; then
		cd "${CMAKE_BUILD_DIR}"
		emake Doc || die "building documentation failed"
	fi
}

src_install() {
	cmake-utils_src_install
	if use doc; then
		dohtml -r ${CMAKE_BUILD_DIR}/Doc/html/* || die "dohtml failed"
	fi
	if use examples; then
		exeinto "/usr/share/OpenSG/examples"
		doexe ${CMAKE_BUILD_DIR}/bin/01hello || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/02move || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/03share || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/04hiertransform || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/05geometry || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/06indexgeometry || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/07multiindexgeometry || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/08materials || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/09traverse || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/10loading || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/11picking || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/deepclone || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/deferredshading || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/fbotexture || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/hiresimage || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/fbotexture || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/hiresimage || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/lights || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/locallights || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/materialsort || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/occlusionculling || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/openglcallback || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/openglslave || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/shadows || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/simplePluginApp || die "dobin failed"
		doexe ${CMAKE_BUILD_DIR}/bin/sortlastclient || die "dobin failed"
	fi
}