/[gentoo-x86]/media-gfx/freewrl/freewrl-1.22.5.ebuild
Gentoo

Contents of /media-gfx/freewrl/freewrl-1.22.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Mon Oct 5 15:42:05 2009 UTC (10 years, 11 months ago) by patrick
Branch: MAIN
Bump to 1.22.5, fixes #192840. Thanks to Ian Stakenvicius for the updated ebuild
(Portage version: 2.2_rc43/cvs/Linux x86_64)

1 patrick 1.1 # Copyright 1999-2009 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: $
4    
5     EAPI="2"
6    
7     inherit nsplugins eutils flag-o-matic
8    
9     DESCRIPTION="VRML2 and X3D compliant browser"
10     SRC_URI="mirror://sourceforge/freewrl/${P}.tar.bz2"
11     HOMEPAGE="http://freewrl.sourceforge.net/"
12    
13     LICENSE="GPL-3"
14     SLOT="0"
15     KEYWORDS="~amd64 ~x86"
16     IUSE="curl debug libeai +motif nsplugin +sox spidermonkey static +xulrunner"
17    
18     COMMONDEPEND="x11-libs/libXau
19     x11-libs/libXdmcp
20     x11-libs/libXext
21     x11-libs/libX11
22     motif? ( x11-libs/openmotif )
23     media-libs/mesa
24     media-libs/glew
25     virtual/opengl
26     media-libs/libpng
27     media-libs/jpeg
28     media-libs/imlib2
29     >=media-libs/freetype-2
30     curl? ( net-misc/curl )
31     xulrunner? ( net-libs/xulrunner )
32     !xulrunner? (
33     spidermonkey? ( dev-lang/spidermonkey )
34     !spidermonkey? ( || (
35     =www-client/mozilla-firefox-3*[-xulrunner]
36     =www-client/mozilla-firefox-2*
37     ) )
38     )
39     nsplugin? ( || ( xulrunner? ( net-libs/xulrunner )
40     >=www-client/mozilla-firefox-2.0 ) )"
41     DEPEND="${COMMONDEPEND}
42     >=dev-util/pkgconfig-0.22"
43     RDEPEND="${COMMONDEPEND}
44     media-fonts/ttf-bitstream-vera
45     media-gfx/imagemagick
46     app-arch/unzip
47     sox? ( media-sound/sox )"
48    
49     pkg_setup() {
50     if use xulrunner && use spidermonkey; then
51     eerror "Please choose only one of xulrunner or spidermonkey."
52     die "Cannot USE both spidermonkey and xulrunner"
53     fi
54     }
55    
56     src_configure() {
57     local myconf="--with-fontsdir=/usr/share/fonts/ttf-bitstream-vera
58     --with-imageconvert=/usr/bin/convert
59     --with-unzip=/usr/bin/unzip"
60     if use motif; then
61     myconf="${myconf} --with-x --with-target=motif"
62     else
63     myconf="${myconf} --with-x --with-target=x11"
64     fi
65     if use nsplugin; then
66     myconf="${myconf} --with-plugindir=/usr/$(get_libdir)/${PLUGINS_DIR}"
67     fi
68     if use sox; then
69     myconf="${myconf} --with-soundconv=/usr/bin/sox"
70     fi
71     if use xulrunner; then
72     if has_version net-libs/xulrunner:1.9 ; then
73     # fix missing library path to xulrunner-1.9 libraries
74     append-ldflags "-R/usr/$(get_libdir)/xulrunner-1.9/lib"
75     fi
76     elif use spidermonkey; then
77     # disable the checks for other js libs, in case they are installed
78     myconf="${myconf} --disable-mozilla-js --disable-xulrunner-js --disable-firefox-js --disable-seamonkey-js"
79     # spidermonkey has no pkg-config, so override ./configure
80     JAVASCRIPT_ENGINE_CFLAGS="-I/usr/include/js -DXP_UNIX"
81     JAVASCRIPT_ENGINE_LIBS="-ljs"
82     if has_version dev-lang/spidermonkey[threadsafe] ; then
83     JAVASCRIPT_ENGINE_CFLAGS="${JAVASCRIPT_ENGINE_CFLAGS} -DJS_THREADSAFE $(pkg-config --cflags nspr)"
84     JAVASCRIPT_ENGINE_LIBS="$(pkg-config --libs nspr) ${JAVASCRIPT_ENGINE_LIBS}"
85     fi
86     export JAVASCRIPT_ENGINE_CFLAGS
87     export JAVASCRIPT_ENGINE_LIBS
88     else
89     # disable checks for xulrunner libs, in case they are installed
90     myconf="${myconf} --disable-mozilla-js --disable-xulrunner-js"
91     # not using xulrunner, so ./configure grabs js directly from firefox/mozilla/thunderbird/wherever
92     if has_version =www-client/mozilla-firefox-3* ; then
93     # override ./configure for firefox-3 as pkg-config doesn't detect the right settings
94     export MOZILLA_PLUGIN_CFLAGS="-I/usr/include/mozilla-firefox/stable $(pkg-config --cflags nspr)"
95     export MOZILLA_PLUGIN_LIBS=" "
96     export JAVASCRIPT_ENGINE_CFLAGS="-DXP_UNIX -DJS_THREADSAFE -DMOZILLA_JS_UNSTABLE_INCLUDES ${MOZILLA_PLUGIN_CFLAGS}"
97     export JAVASCRIPT_ENGINE_LIBS="$(pkg-config --libs nspr) -L/usr/$(get_libdir)/mozilla-firefox -lmozjs"
98     append-ldflags "-R/usr/$(get_libdir)/mozilla-firefox"
99     fi
100     fi
101     econf ${myconf} \
102     $(use_enable curl libcurl) \
103     $(use_enable debug) \
104     $(use_enable libeai) \
105     $(use_enable nsplugin plugin) \
106     $(use_enable static) \
107     $(use_enable sox sound)
108     }
109    
110     src_install() {
111     emake DESTDIR="${D}" install || die "emake install failed"
112    
113     # remove unneeded .la files (as per Flameeyes' rant)
114     cd "${D}"
115     rm "usr/$(get_libdir)"/*.la "usr/$(get_libdir)/${PLUGINS_DIR}"/*.la
116     }

  ViewVC Help
Powered by ViewVC 1.1.20