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

EAPI=4
PYTHON_DEPEND="3:3.1"
inherit scons-utils toolchain-funcs multilib

MY_PV="cb6e89af8012"
MY_P="${PN}-${MY_PV}"

SRC_URI="https://www.mitsuba-renderer.org/hg/mitsuba/archive/${MY_PV}.tar.bz2"

DESCRIPTION="Mitsuba physically based renderer"
HOMEPAGE="https://www.mitsuba-renderer.org"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RDEPEND="virtual/jpeg
        media-libs/libpng
	x11-libs/libX11
	media-libs/glew
	x11-libs/qt-core
	x11-libs/qt-gui
	x11-libs/qt-opengl
	media-libs/openexr
	dev-libs/xerces-c
	dev-libs/boost
	media-libs/collada-dom"
DEPEND="dev-util/scons
	${RDEPEND}"
S=${WORKDIR}/${MY_P}

src_prepare() {
	mkdir -p "${S}/dependencies"
	echo "${PV}" > "${S}/dependencies/version"
}

src_configure() {
	ln -s "${S}/build/config-linux.py" "${S}/config.py"
}

src_compile() {
	escons || die "Scons failed"
}

src_install() {
	cd dist
	
	exeinto /usr/bin
	doexe mitsuba mtssrv mtsgui mtsutil mtsimport || die
	dolib.so libmitsuba-hw.so libmitsuba-render.so libmitsuba-core.so libmitsuba-bidir.so || die
	
	insinto "/usr/share/${P}"
	doins -r "${S}/data/ior"
	doins -r "${S}/data/schema"

	local my_plugins="/usr/$(get_libdir)/${PN}/plugins"
	into ${my_plugins}
	dolib.so plugins/*.so || die

	local my_python="/usr/$(get_libdir)/${PN}/python"
	into ${my_python}
	dolib.so python/*.so || die
}