1 # Copyright 1999-2009 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
29 RDEPEND="dev-libs/libxml2
33 png? ( media-libs/libpng )
34 jpeg? ( media-libs/jpeg )
35 truetype? ( >=media-libs/freetype-2 media-libs/fontconfig )
36 opengl? ( virtual/opengl virtual/glut )
37 xembed? ( x11-libs/gtk+ x11-libs/gtkglext
38 virtual/opengl virtual/glut )
39 player? ( gnome-base/libgnomeui >=gnome-base/libgnome-2.14.1 gnome-base/libglade net-misc/curl
40 x11-libs/gtk+ x11-libs/gtkglext
41 virtual/opengl virtual/glut )
42 nsplugin? ( net-libs/xulrunner
43 x11-libs/gtk+ x11-libs/gtkglext
44 virtual/opengl virtual/glut )
45 examples? ( media-libs/libsdl )"
56 local myconf="--with-x \
57 $(use_enable png png-textures) \
58 $(use_enable jpeg jpeg-textures) \
59 --disable-script-node-java \
60 --disable-script-node-javascript \
61 $(use_enable truetype render-text-node) \
62 $(use_enable examples)"
64 if use opengl || use xembed || use player || use nsplugin ; then
65 myconf="${myconf} --enable-gl-renderer"
66 if ! use opengl ; then
68 elog "Use-flags xembed, player, and nsplugin require opengl functionality."
69 elog "Activating it automatically..."
70 elog "To silence this message, activate use-flag opengl."
74 myconf="${myconf} --disable-gl-renderer"
77 if use xembed || use player || use nsplugin ; then
78 myconf="${myconf} --enable-xembed"
79 if ! use xembed ; then
81 elog "Use-flags player and nsplugin require the xembed module."
82 elog "Activating it automatically..."
83 elog "To silence this message, activate use-flag xembed."
87 myconf="${myconf} --disable-xembed"
91 $(use_enable player) \
92 $(use_enable nsplugin mozilla-plugin)"
103 emake DESTDIR="${D}" install || die "make install failed"
105 if use nsplugin ; then
106 # Clean up a bit to do things more the Gentoo way
108 mv "${D}/usr/$(get_libdir)/mozilla/plugins" "${D}/usr/$(get_libdir)/${PN}/" || die
109 rmdir "${D}/usr/$(get_libdir)/mozilla" || die
110 inst_plugin "/usr/$(get_libdir)/${PN}/plugins/openvrml.so" || die
113 dodoc AUTHORS ChangeLog NEWS README THANKS || die