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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Thu Aug 26 20:37:22 2010 UTC (9 years, 10 months ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Bump

(Portage version: 2.2_rc69/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/freewrl/freewrl-1.22.8.ebuild,v 1.3 2010/07/25 19:17:49 nirbheek Exp $
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 +glew +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 glew? ( 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/firefox-3*[-xulrunner]
36 =www-client/firefox-2*
37 ) )
38 )
39 nsplugin? ( || ( xulrunner? ( net-libs/xulrunner )
40 >=www-client/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_prepare() {
57 # A hack to get around expat being grabbed from xulrunner
58 if use xulrunner && has_version ">=net-libs/xulrunner-1.9.2"; then
59 mkdir "${S}/src/lib/include";
60 cp /usr/include/expat.h "${S}/src/lib/include/";
61 cp /usr/include/expat_external.h "${S}/src/lib/include/";
62 fi
63 }
64
65 src_configure() {
66 local myconf="--with-fontsdir=/usr/share/fonts/ttf-bitstream-vera
67 --with-imageconvert=/usr/bin/convert
68 --with-unzip=/usr/bin/unzip"
69 if use motif; then
70 myconf="${myconf} --with-x --with-target=motif"
71 else
72 myconf="${myconf} --with-x --with-target=x11"
73 fi
74 if use nsplugin; then
75 myconf="${myconf} --with-plugindir=/usr/$(get_libdir)/${PLUGINS_DIR}"
76 fi
77 if ! use glew; then
78 myconf="${myconf} --without-glew"
79 fi
80 if use sox; then
81 myconf="${myconf} --with-soundconv=/usr/bin/sox"
82 fi
83 if use xulrunner; then
84 if has_version net-libs/xulrunner:1.9 ; then
85 if has_version ">=net-libs/xulrunner-1.9.2"; then
86 # more hack to get around expat being grabbed from xulrunner
87 myconf="${myconf} --with-expat=${S}/src/lib"
88 else
89 # fix missing library path to xulrunner-1.9 libraries
90 append-ldflags "-R/usr/$(get_libdir)/xulrunner-1.9/lib"
91 fi
92 fi
93 elif use spidermonkey; then
94 # disable the checks for other js libs, in case they are installed
95 myconf="${myconf} --disable-mozilla-js --disable-xulrunner-js --disable-firefox-js --disable-seamonkey-js"
96 # spidermonkey has no pkg-config, so override ./configure
97 JAVASCRIPT_ENGINE_CFLAGS="-I/usr/include/js -DXP_UNIX"
98 JAVASCRIPT_ENGINE_LIBS="-ljs"
99 if has_version dev-lang/spidermonkey[threadsafe] ; then
100 JAVASCRIPT_ENGINE_CFLAGS="${JAVASCRIPT_ENGINE_CFLAGS} -DJS_THREADSAFE $(pkg-config --cflags nspr)"
101 JAVASCRIPT_ENGINE_LIBS="$(pkg-config --libs nspr) ${JAVASCRIPT_ENGINE_LIBS}"
102 fi
103 export JAVASCRIPT_ENGINE_CFLAGS
104 export JAVASCRIPT_ENGINE_LIBS
105 else
106 # disable checks for xulrunner libs, in case they are installed
107 myconf="${myconf} --disable-mozilla-js --disable-xulrunner-js"
108 # not using xulrunner, so ./configure grabs js directly from firefox/mozilla/thunderbird/wherever
109 if has_version =www-client/firefox-3* ; then
110 # override ./configure for firefox-3 as pkg-config doesn't detect the right settings
111 export MOZILLA_PLUGIN_CFLAGS="-I/usr/include/mozilla-firefox/stable $(pkg-config --cflags nspr)"
112 export MOZILLA_PLUGIN_LIBS=" "
113 export JAVASCRIPT_ENGINE_CFLAGS="-DXP_UNIX -DJS_THREADSAFE -DMOZILLA_JS_UNSTABLE_INCLUDES ${MOZILLA_PLUGIN_CFLAGS}"
114 export JAVASCRIPT_ENGINE_LIBS="$(pkg-config --libs nspr) -L/usr/$(get_libdir)/mozilla-firefox -lmozjs"
115 append-ldflags "-R/usr/$(get_libdir)/mozilla-firefox"
116 fi
117 fi
118 econf ${myconf} \
119 $(use_enable curl libcurl) \
120 $(use_enable debug) \
121 $(use_enable libeai) \
122 $(use_enable nsplugin plugin) \
123 $(use_enable static) \
124 $(use_enable sox sound)
125 }
126
127 src_install() {
128 emake DESTDIR="${D}" install || die "emake install failed"
129
130 # remove unneeded .la files (as per Flameeyes' rant)
131 cd "${D}"
132 rm "usr/$(get_libdir)"/*.la "usr/$(get_libdir)/${PLUGINS_DIR}"/*.la
133 }

  ViewVC Help
Powered by ViewVC 1.1.20