summaryrefslogtreecommitdiffstats
path: root/media-gfx/zimg/.svn/text-base/openscenegraph-1.2.ebuild.svn-base
blob: 5a662bd53e0e43ae9d1102ca32878eb4703520cd (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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils multilib toolchain-funcs

MY_PN=OpenSceneGraph
MY_PV=${PV/_rc/-rc}

DESCRIPTION="Cross-platform, high performance 3D graphics toolkit"
HOMEPAGE="http://www.openscenegraph.org/"
SRC_URI="http://www.openscenegraph.org/downloads/snapshots/OSG_OP_OT-${MY_PV}.zip"

LICENSE="OSGPL"
SLOT="0"
KEYWORDS="~x86"
IUSE="doc examples introspection producer gdal jasper truetype xine jpeg gif tiff png coin inventor glut"

RDEPEND=">=dev-libs/openproducer-1.0.2
	>=dev-libs/openthreads-1.4.3
	media-libs/mesa
	virtual/opengl
	x11-libs/libXi
	x11-libs/libXmu
	x11-libs/libX11
	gdal? ( sci-libs/gdal )
	jasper? ( media-libs/jasper )
	truetype? ( media-libs/freetype )
	xine? ( media-libs/xine-lib )
	jpeg? ( media-libs/jpeg )
	gif? ( media-libs/giflib )
	tiff? ( media-libs/tiff )
	png? ( media-libs/libpng
				sys-libs/zlib )
	coin? ( media-libs/coin )
	inventor? ( media-libs/openinventor )
	glut? ( virtual/glut )"
DEPEND="${RDEPEND}
	app-arch/unzip
	doc? ( app-doc/doxygen )"

S=${WORKDIR}/OSG_OP_OT-${MY_PV}/${MY_PN}

src_unpack() {
	unpack ${A}
	cd "${S}"

	epatch "${FILESDIR}"/${P}-build.patch
}

src_compile() {
	local myconf

	use introspection \
		&& myconf="${myconf} COMPILE_INTROSPECTION=yes" \
		|| myconf="${myconf} COMPILE_INTROSPECTION=no"

	use producer \
		&& myconf="${myconf} PRODUCER_INSTALLED=yes" \
		|| myconf="${myconf} PRODUCER_INSTALLED=no"

	use examples \
		&& myconf="${myconf} COMPILE_EXAMPLES=yes" \
		|| myconf="${myconf} COMPILE_EXAMPLES=no"

	use gdal \
		&& myconf="${myconf} GDAL_INSTALLED=yes" \
		|| myconf="${myconf} GDAL_INSTALLED=no"

	use jasper \
		&& myconf="${myconf} JASPER_INSTALLED=yes" \
		|| myconf="${myconf} JASPER_INSTALLED=no"

	use truetype \
		&& myconf="${myconf} FREETYPE_INSTALLED=yes" \
		|| myconf="${myconf} FREETYPE_INSTALLED=no"

	use xine \
		&& myconf="${myconf} XINE_INSTALLED=yes" \
		|| myconf="${myconf} XINE_INSTALLED=no"

	myconf="${myconf} QUICKTIME_INSTALLED=no"

	use jpeg \
		&& myconf="${myconf} LIBJPEG_INSTALLED=yes" \
		|| myconf="${myconf} LIBJPEG_INSTALLED=no"

	use gif \
		&& myconf="${myconf} LIBUNGIF_INSTALLED=yes" \
		|| myconf="${myconf} LIBUNGIF_INSTALLED=no"

	use tiff \
		&& myconf="${myconf} LIBTIFF_INSTALLED=yes" \
		|| myconf="${myconf} LIBTIFF_INSTALLED=no"

	use png \
		&& myconf="${myconf} LIBPNG_INSTALLED=yes" \
		|| myconf="${myconf} LIBPNG_INSTALLED=no"

	use coin \
		&& myconf="${myconf} COIN_INSTALLED=yes" \
		|| myconf="${myconf} COIN_INSTALLED=no"

	use inventor \
		&& myconf="${myconf} INVENTOR_INSTALLED=yes" \
		|| myconf="${myconf} INVENTOR_INSTALLED=no"

	myconf="${myconf} PERFORMER_INSTALLED=no"

	use glut \
		&& myconf="${myconf} GLUT_INSTALLED=yes" \
		|| myconf="${myconf} GLUT_INSTALLED=no"

	emake CXX=$(tc-getCXX) ${myconf} || die "emake failed"

	if use doc; then
		OSGHOME="${S}" doxygen doc/Doxyfiles/all_Doxyfile
	fi
}

src_install() {
	emake INST_LOCATION="${D}"/usr INST_EXAMPLES="${D}"/usr/bin \
		INST_EXAMPLE_SRC="${D}"/usr/share/doc/${P}/examples \
		INST_SRC="${D}"/usr/share/doc/${P}/src install \
		|| die "emake install failed"

	insinto /usr/$(get_libdir)/pkgconfig
	doins Make/openscenegraph.pc

	dodoc AUTHORS.txt ChangeLog NEWS.txt README.txt

	if use doc; then
		dodoc doc/ProgrammingGuide/ProgrammingGuide.odt
		dohtml -r doc/doxygen/html
	fi
}