]> Pileus Git - ~andy/sunrise/blob - media-gfx/openvrml/openvrml-9999.ebuild
media-gfx/xaralx: Actually use the patches
[~andy/sunrise] / media-gfx / openvrml / openvrml-9999.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 subversion autotools
8
9 DESCRIPTION="VRML97 library"
10 HOMEPAGE="http://openvrml.org"
11
12 #SRC_URI="mirror://sourceforge/openvrml/${P}.tar.gz"
13 ESVN_REPO_URI="http://svn.openvrml.org/svnroot/openvrml/trunk"
14
15 LICENSE="BSD GPL-2 LGPL-2.1 public-domain"
16 SLOT="0"
17 KEYWORDS=""
18
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
21
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
28
29 OPENGL_DEPS="
30         virtual/opengl
31         media-libs/freeglut"
32 GTK_DEPS="
33         x11-libs/gtk+:2
34         x11-libs/gtkglext"
35
36 RDEPEND="
37         dev-libs/libxml2
38         >=dev-libs/boost-1.37
39         dev-libs/glib:2
40         sys-libs/zlib
41         png? ( media-libs/libpng )
42         jpeg? ( virtual/jpeg )
43         truetype? ( >=media-libs/freetype-2 media-libs/fontconfig )
44         opengl? ( ${OPENGL_DEPS} )
45         xembed? (
46                 ${GTK_DEPS}
47                 ${OPENGL_DEPS} )
48         player? (
49                 gnome-base/libgnomeui
50                 gnome-base/libgnome
51                 gnome-base/libglade
52                 net-misc/curl
53                 ${GTK_DEPS}
54                 ${OPENGL_DEPS} )
55         nsplugin? (
56                 net-libs/xulrunner
57                 ${GTK_DEPS}
58                 ${OPENGL_DEPS} )
59         examples? ( media-libs/libsdl )"
60
61 DEPEND="${RDEPEND}
62         app-doc/doxygen
63         virtual/tex-base"
64
65 src_prepare() {
66         eautoreconf
67 }
68
69 src_configure() {
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)"
77
78         if use opengl || use xembed || use player || use nsplugin ; then
79                 myconf="${myconf} --enable-gl-renderer"
80                 if ! use opengl ; then
81                         elog ""
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."
85                         elog ""
86                 fi
87         else
88                 myconf="${myconf} --disable-gl-renderer"
89         fi
90
91         if use xembed || use player || use nsplugin ; then
92                 myconf="${myconf} --enable-xembed"
93                 if ! use xembed ; then
94                         elog ""
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."
98                         elog ""
99                 fi
100         else
101                 myconf="${myconf} --disable-xembed"
102         fi
103
104         myconf="${myconf} \
105                 $(use_enable player) \
106                 $(use_enable nsplugin mozilla-plugin)"
107
108         econf ${myconf}
109 }
110
111 src_compile() {
112         default
113         emake html || die
114 }
115
116 src_install() {
117         emake DESTDIR="${D}" install || die "make install failed"
118
119         if use nsplugin ; then
120                 # Clean up a bit to do things more the Gentoo way
121
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
125         fi
126
127         dodoc AUTHORS ChangeLog NEWS README THANKS || die
128 }