]> Pileus Git - ~andy/sunrise/blob - media-gfx/openvrml/openvrml-0.18.8.ebuild
media-gfx/xaralx: Fix deps for gnome3, Make it compile again, included patches from...
[~andy/sunrise] / media-gfx / openvrml / openvrml-0.18.8.ebuild
1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 inherit nsplugins multilib
8
9 DESCRIPTION="VRML97 library"
10 HOMEPAGE="http://openvrml.org"
11 SRC_URI="mirror://sourceforge/openvrml/${P}.tar.gz"
12
13 LICENSE="BSD GPL-2 LGPL-2.1 public-domain"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16
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
19
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
26
27 OPENGL_DEPS="
28         virtual/opengl
29         media-libs/freeglut"
30 GTK_DEPS="
31         x11-libs/gtk+:2
32         x11-libs/gtkglext"
33
34 RDEPEND="
35         dev-libs/libxml2
36         >=dev-libs/boost-1.37
37         dev-libs/glib:2
38         sys-libs/zlib
39         png? ( media-libs/libpng )
40         jpeg? ( media-libs/jpeg )
41         truetype? ( >=media-libs/freetype-2 media-libs/fontconfig )
42         opengl? ( ${OPENGL_DEPS} )
43         xembed? (
44                 ${GTK_DEPS}
45                 ${OPENGL_DEPS} )
46         player? (
47                 gnome-base/libgnomeui
48                 gnome-base/libgnome
49                 gnome-base/libglade
50                 net-misc/curl
51                 ${GTK_DEPS}
52                 ${OPENGL_DEPS} )
53         nsplugin? (
54                 net-libs/xulrunner
55                 ${GTK_DEPS}
56                 ${OPENGL_DEPS} )
57         examples? ( media-libs/libsdl )"
58
59 DEPEND="${RDEPEND}
60         app-doc/doxygen"
61
62 src_configure() {
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)"
70
71         if use opengl || use xembed || use player || use nsplugin ; then
72                 myconf="${myconf} --enable-gl-renderer"
73                 if ! use opengl ; then
74                         elog ""
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."
78                         elog ""
79                 fi
80         else
81                 myconf="${myconf} --disable-gl-renderer"
82         fi
83
84         if use xembed || use player || use nsplugin ; then
85                 myconf="${myconf} --enable-xembed"
86                 if ! use xembed ; then
87                         elog ""
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."
91                         elog ""
92                 fi
93         else
94                 myconf="${myconf} --disable-xembed"
95         fi
96
97         myconf="${myconf} \
98                 $(use_enable player) \
99                 $(use_enable nsplugin mozilla-plugin)"
100
101         econf ${myconf}
102 }
103
104 src_install() {
105         emake DESTDIR="${D}" install || die "make install failed"
106
107         if use nsplugin ; then
108                 # Clean up a bit to do things more the Gentoo way
109
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
113         fi
114
115         dodoc AUTHORS ChangeLog NEWS README THANKS || die
116 }