1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit nsplugins multilib
9 DESCRIPTION="VRML97 library"
10 HOMEPAGE="http://openvrml.org"
11 SRC_URI="mirror://sourceforge/openvrml/${P}.tar.gz"
13 LICENSE="BSD GPL-2 LGPL-2.1 public-domain"
15 KEYWORDS="~amd64 ~x86"
17 IUSE="examples jpeg nsplugin opengl player png truetype xembed"
18 # java and javascript are disabled at the moment since they need some more fiddling
20 # about the use-flag controlled dependencies:
21 # * the embedded control xembed requires opengl
22 # * the player requires xembed
23 # * the nsplugin requires xembed
24 # the dependencies are done so that this can be resolved automatically
25 # in the configure phase, all required functionality is then switched on
39 png? ( media-libs/libpng )
40 jpeg? ( media-libs/jpeg )
41 truetype? ( >=media-libs/freetype-2 media-libs/fontconfig )
42 opengl? ( ${OPENGL_DEPS} )
57 examples? ( media-libs/libsdl )"
63 local myconf="--with-x \
64 $(use_enable png png-textures) \
65 $(use_enable jpeg jpeg-textures) \
66 --disable-script-node-java \
67 --disable-script-node-javascript \
68 $(use_enable truetype render-text-node) \
69 $(use_enable examples)"
71 if use opengl || use xembed || use player || use nsplugin ; then
72 myconf="${myconf} --enable-gl-renderer"
73 if ! use opengl ; then
75 elog "Use-flags xembed, player, and nsplugin require opengl functionality."
76 elog "Activating it automatically..."
77 elog "To silence this message, activate use-flag opengl."
81 myconf="${myconf} --disable-gl-renderer"
84 if use xembed || use player || use nsplugin ; then
85 myconf="${myconf} --enable-xembed"
86 if ! use xembed ; then
88 elog "Use-flags player and nsplugin require the xembed module."
89 elog "Activating it automatically..."
90 elog "To silence this message, activate use-flag xembed."
94 myconf="${myconf} --disable-xembed"
98 $(use_enable player) \
99 $(use_enable nsplugin mozilla-plugin)"
105 emake DESTDIR="${D}" install || die "make install failed"
107 if use nsplugin ; then
108 # Clean up a bit to do things more the Gentoo way
110 mv "${D}/usr/$(get_libdir)/mozilla/plugins" "${D}/usr/$(get_libdir)/${PN}/" || die
111 rmdir "${D}/usr/$(get_libdir)/mozilla" || die
112 inst_plugin "/usr/$(get_libdir)/${PN}/plugins/openvrml.so" || die
115 dodoc AUTHORS ChangeLog NEWS README THANKS || die