aboutsummaryrefslogtreecommitdiff
blob: 9ee4e2183ba566c3907a00a0bbe5e7a47ec6f88c (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

DESCRIPTION="WebGL Framework for Data Vis, Creative Coding and Game Development"
HOMEPAGE="http://www.senchalabs.org/philogl/"
SRC_URI="http://www.senchalabs.org/philogl/downloads/${P}.zip"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="examples"

S=${WORKDIR}

src_prepare() {
	if use examples ; then
		for f in $(find "${S}"/examples -name index.html); do
	   		sed -e "s:../../../build:/usr/share/${PN}/build:g" \
				-e "s:../../build:/usr/share/${PN}/build:g" \
				-i ${f} || die
		done
		sed -e "s:../../../shaders/:/usr/share/${PN}/shaders/:" \
			-i examples/lessons/{14,15,16}/index.js || die
	fi
}

src_install() {
	insinto /usr/share/${PN}
	doins -r build shaders

	if use examples ; then
		insinto /usr/share/doc/${PF}
		doins -r examples
	fi
}