blob: 21a461c6ce07801df12c73b15bdc7b8553b91a2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit nsplugins multilib
DESCRIPTION="VRML97 library"
HOMEPAGE="http://openvrml.org"
SRC_URI="mirror://sourceforge/openvrml/${P}.tar.gz"
LICENSE="BSD GPL-2 LGPL-2.1 public-domain"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="examples jpeg nsplugin opengl player png truetype xembed"
# java and javascript are disabled at the moment since they need some more fiddling
# about the use-flag controlled dependencies:
# * the embedded control xembed requires opengl
# * the player requires xembed
# * the nsplugin requires xembed
# the dependencies are done so that this can be resolved automatically
# in the configure phase, all required functionality is then switched on
OPENGL_DEPS="
virtual/opengl
media-libs/freeglut"
GTK_DEPS="
x11-libs/gtk+:2
x11-libs/gtkglext"
RDEPEND="
dev-libs/libxml2
>=dev-libs/boost-1.37
dev-libs/glib:2
sys-libs/zlib
png? ( media-libs/libpng )
jpeg? ( virtual/jpeg )
truetype? ( >=media-libs/freetype-2 media-libs/fontconfig )
opengl? ( ${OPENGL_DEPS} )
xembed? (
${GTK_DEPS}
${OPENGL_DEPS} )
player? (
gnome-base/libgnomeui
gnome-base/libgnome
gnome-base/libglade
net-misc/curl
${GTK_DEPS}
${OPENGL_DEPS} )
nsplugin? (
net-libs/xulrunner
${GTK_DEPS}
${OPENGL_DEPS} )
examples? ( media-libs/libsdl )"
DEPEND="${RDEPEND}
app-doc/doxygen"
src_configure() {
local myconf="--with-x \
$(use_enable png png-textures) \
$(use_enable jpeg jpeg-textures) \
--disable-script-node-java \
--disable-script-node-javascript \
$(use_enable truetype render-text-node) \
$(use_enable examples)"
if use opengl || use xembed || use player || use nsplugin ; then
myconf="${myconf} --enable-gl-renderer"
if ! use opengl ; then
elog ""
elog "Use-flags xembed, player, and nsplugin require opengl functionality."
elog "Activating it automatically..."
elog "To silence this message, activate use-flag opengl."
elog ""
fi
else
myconf="${myconf} --disable-gl-renderer"
fi
if use xembed || use player || use nsplugin ; then
myconf="${myconf} --enable-xembed"
if ! use xembed ; then
elog ""
elog "Use-flags player and nsplugin require the xembed module."
elog "Activating it automatically..."
elog "To silence this message, activate use-flag xembed."
elog ""
fi
else
myconf="${myconf} --disable-xembed"
fi
myconf="${myconf} \
$(use_enable player) \
$(use_enable nsplugin mozilla-plugin)"
econf ${myconf}
}
src_install() {
emake DESTDIR="${D}" install || die "make install failed"
if use nsplugin ; then
# Clean up a bit to do things more the Gentoo way
mv "${D}/usr/$(get_libdir)/mozilla/plugins" "${D}/usr/$(get_libdir)/${PN}/" || die
rmdir "${D}/usr/$(get_libdir)/mozilla" || die
inst_plugin "/usr/$(get_libdir)/${PN}/plugins/openvrml.so" || die
fi
dodoc AUTHORS ChangeLog NEWS README THANKS || die
}
|