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

IUSE="imagetexture javascript nsplugin opengl truetype truetype zlib" # java

DESCRIPTION="VRML97 library"
SRC_URI="mirror://sourceforge/openvrml/${P}.tar.gz"
HOMEPAGE="http://openvrml.org"

SLOT="0"
LICENSE="BSD GPL-2 LGPL-2.1 public-domain"
KEYWORDS="~amd64 ~x86"

RDEPEND="gnome-base/libgnomeui
	net-misc/curl
	zlib? ( sys-libs/zlib )
	imagetexture? ( media-libs/libpng media-libs/jpeg )
	truetype? ( media-libs/freetype media-libs/fontconfig )
	javascript? ( www-client/mozilla-firefox )
	nsplugin? ( www-client/mozilla-firefox )
	opengl? ( virtual/opengl virtual/glut )"
	# java? ( virtual/jre )

DEPEND="${RDEPEND}
	dev-libs/boost
	app-doc/doxygen"
	# java? ( virtual/jdk )

# TODO: add support for java via libmozjs (http://www.mozilla.org/js/spidermonkey/)

pkg_setup() {
	ewarn "Java is currently unsupported in this version!"
	ewarn "Building openvrml with --disable-script-node-java."
}

src_compile() {
	local myconf=""

	# Java is currently unsupported
	myconf="${myconf} --with-x --disable-script-node-java \
		    $(use_enable zlib gzip) \
		    $(use_enable imagetexture imagetexture-node) \
		    $(use_enable truetype text-node) \
		    $(use_enable javascript script-node-javascript) \
		    $(use_enable opengl gl-renderer) \
		    $(use_enable opengl lookat) \
		    $(use_enable nsplugin mozilla-plugin)"
		    # $(use_enable java script-node-java)

#	use java && myconf="${myconf} --with-jdk=`java-config -O`"
	./configure --prefix=/usr ${myconf} || die "configure failed"

	make || die "make failed"
}

src_install() {
	make DESTDIR="${D}" install || die "make install failed"

	dodoc AUTHORS ChangeLog NEWS README THANKS
}