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

EAPI="2"

inherit cmake-utils mercurial flag-o-matic python

DESCRIPTION="A GPL unbiased renderer"
HOMEPAGE="http://www.luxrender.net"
EHG_REPO_URI="https://bitbucket.org/luxrender/lux"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="sse2 doc debug +blender"

RDEPEND=">=dev-libs/boost-1.43[python]
	media-libs/openexr
	media-libs/tiff
	media-libs/libpng
	media-libs/libjpeg-turbo
	media-libs/ilmbase
	>=media-libs/freeimage-3.15.0
	virtual/opengl"
DEPEND="${RDEPEND}
	sys-devel/bison
	sys-devel/flex
	media-libs/luxrays[debug?]
	doc? ( >=app-doc/doxygen-1.5.7[-nodot] )"
PDEPEND="blender? ( =media-gfx/luxblend25-9999 )"

src_configure() {
	append-flags "-DLUXRAYS_DISABLE_OPENCL"
	use sse2 && append-flags "-msse -msse2 -DLUX_USE_SSE"
	use debug && append-flags -ggdb

	mycmakeargs=( -DLUXRAYS_DISABLE_OPENCL=ON )
	cmake-utils_src_configure
}

src_install() {
	cmake-utils_src_install
	dodoc AUTHORS.txt || die

	# installing API(s) docs
	if use doc; then
		pushd "${S}"/doxygen > /dev/null
		doxygen doxygen.template
		dohtml html/* || die "Couldn't install API docs"
		popd > /dev/null
	fi
	
	if use blender; then
		insinto /usr/share/blender/2.5/scripts/addons/luxrender/
		doins "${CMAKE_BUILD_DIR}"/pylux.so || die "Couldn't install Pylux"
	fi
}