1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit nsplugins multilib subversion autotools
9 DESCRIPTION="VRML97 library"
10 HOMEPAGE="http://openvrml.org"
12 #SRC_URI="mirror://sourceforge/openvrml/${P}.tar.gz"
13 ESVN_REPO_URI="http://svn.openvrml.org/svnroot/openvrml/trunk"
15 LICENSE="BSD GPL-2 LGPL-2.1 public-domain"
19 IUSE="examples jpeg nsplugin opengl player png truetype xembed"
20 # java and javascript are disabled at the moment since they need some more fiddling
22 # about the use-flag controlled dependencies:
23 # * the embedded control xembed requires opengl
24 # * the player requires xembed
25 # * the nsplugin requires xembed
26 # the dependencies are done so that this can be resolved automatically
27 # in the configure phase, all required functionality is then switched on
41 png? ( media-libs/libpng )
42 jpeg? ( virtual/jpeg )
43 truetype? ( >=media-libs/freetype-2 media-libs/fontconfig )
44 opengl? ( ${OPENGL_DEPS} )
59 examples? ( media-libs/libsdl )"
70 local myconf="--with-x \
71 $(use_enable png png-textures) \
72 $(use_enable jpeg jpeg-textures) \
73 --disable-script-node-java \
74 --disable-script-node-javascript \
75 $(use_enable truetype render-text-node) \
76 $(use_enable examples)"
78 if use opengl || use xembed || use player || use nsplugin ; then
79 myconf="${myconf} --enable-gl-renderer"
80 if ! use opengl ; then
82 elog "Use-flags xembed, player, and nsplugin require opengl functionality."
83 elog "Activating it automatically..."
84 elog "To silence this message, activate use-flag opengl."
88 myconf="${myconf} --disable-gl-renderer"
91 if use xembed || use player || use nsplugin ; then
92 myconf="${myconf} --enable-xembed"
93 if ! use xembed ; then
95 elog "Use-flags player and nsplugin require the xembed module."
96 elog "Activating it automatically..."
97 elog "To silence this message, activate use-flag xembed."
101 myconf="${myconf} --disable-xembed"
105 $(use_enable player) \
106 $(use_enable nsplugin mozilla-plugin)"
117 emake DESTDIR="${D}" install || die "make install failed"
119 if use nsplugin ; then
120 # Clean up a bit to do things more the Gentoo way
122 mv "${D}/usr/$(get_libdir)/mozilla/plugins" "${D}/usr/$(get_libdir)/${PN}/" || die
123 rmdir "${D}/usr/$(get_libdir)/mozilla" || die
124 inst_plugin "/usr/$(get_libdir)/${PN}/plugins/openvrml.so" || die
127 dodoc AUTHORS ChangeLog NEWS README THANKS || die