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

Contents of /media-gfx/freewrl/freewrl-1.22.12_pre2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Wed Jun 6 19:33:31 2012 UTC (8 years, 2 months ago) by axs
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
New release + remove old

(Portage version: 2.1.10.49/cvs/Linux x86_64)

1 # Copyright 1999-2012 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.12_pre2.ebuild,v 1.5 2012/05/05 07:00:20 jdhore Exp $
4
5 EAPI="2"
6
7 inherit nsplugins eutils flag-o-matic java-pkg-opt-2
8
9 DESCRIPTION="VRML97 and X3D compliant browser, library, and web-browser plugin"
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 expat +glew java libeai motif +nsplugin osc +sox static-libs"
17
18 COMMONDEPEND="x11-libs/libXau
19 x11-libs/libXdmcp
20 x11-libs/libXext
21 x11-libs/libX11
22 motif? ( x11-libs/openmotif )
23 !motif? ( x11-libs/libXaw )
24 media-libs/mesa
25 glew? ( media-libs/glew )
26 virtual/opengl
27 media-libs/libpng
28 virtual/jpeg
29 media-libs/imlib2
30 >=media-libs/freetype-2
31 media-libs/fontconfig
32 curl? ( net-misc/curl )
33 expat? ( dev-libs/expat )
34 osc? ( media-libs/liblo )
35 dev-lang/spidermonkey"
36 DEPEND="${COMMONDEPEND}
37 virtual/pkgconfig
38 java? ( >=virtual/jdk-1.4 )
39 nsplugin? ( =net-misc/npapi-sdk-0.27 )"
40 RDEPEND="${COMMONDEPEND}
41 media-fonts/dejavu
42 || ( media-gfx/imagemagick
43 media-gfx/graphicsmagick[imagemagick] )
44 app-arch/unzip
45 java? ( >=virtual/jre-1.4 )
46 sox? ( media-sound/sox )"
47
48 src_configure() {
49 local myconf="--enable-fontconfig
50 --with-x
51 --with-imageconvert=/usr/bin/convert
52 --with-unzip=/usr/bin/unzip"
53 if use motif; then
54 myconf="${myconf} --with-target=motif --with-statusbar=standard"
55 else
56 myconf="${myconf} --with-target=x11 --with-statusbar=hud"
57 fi
58 if use nsplugin; then
59 myconf="${myconf} --with-plugindir=/usr/$(get_libdir)/${PLUGINS_DIR}"
60 # override auto-detection for npapi headers, can be removed for next upstream release
61 myconf="${myconf} --disable-mozilla-plugin --disable-xulrunner-plugin --disable-seamonkey-plugin --disable-firefox-plugin"
62 MOZILLA_PLUGIN_CFLAGS="$(pkg-config --cflags npapi-sdk)"
63 MOZILLA_PLUGIN_LIBS="$(pkg-config --libs npapi-sdk)"
64 export MOZILLA_PLUGIN_CFLAGS
65 export MOZILLA_PLUGIN_LIBS
66 fi
67 if use sox; then
68 myconf="${myconf} --with-soundconv=/usr/bin/sox"
69 fi
70 # disable the checks for other js libs, in case they are installed
71 if has_version ">=dev-lang/spidermonkey-1.8.5" ; then
72 # spidermonkey-1.8.5 provides a .pc to pkg-config, it should be findable via mozjs185
73 myconf="${myconf} --disable-mozilla-js --disable-xulrunner-js --disable-firefox-js --disable-seamonkey-js --disable-firefox2-js"
74 else
75 myconf="${myconf} --disable-mozjs185 --disable-mozilla-js --disable-xulrunner-js --disable-firefox-js --disable-seamonkey-js"
76 # spidermonkey pre-1.8.5 has no pkg-config, so override ./configure
77 JAVASCRIPT_ENGINE_CFLAGS="-I/usr/include/js -DXP_UNIX"
78 if has_version ">=dev-lang/spidermonkey-1.8" ; then
79 # spidermonkey-1.8 changed the name of the lib
80 JAVASCRIPT_ENGINE_LIBS="-lmozjs"
81 else
82 JAVASCRIPT_ENGINE_LIBS="-ljs"
83 fi
84 if has_version dev-lang/spidermonkey[threadsafe] ; then
85 JAVASCRIPT_ENGINE_CFLAGS="${JAVASCRIPT_ENGINE_CFLAGS} -DJS_THREADSAFE $(pkg-config --cflags nspr)"
86 JAVASCRIPT_ENGINE_LIBS="$(pkg-config --libs nspr) ${JAVASCRIPT_ENGINE_LIBS}"
87 fi
88 export JAVASCRIPT_ENGINE_CFLAGS
89 export JAVASCRIPT_ENGINE_LIBS
90 fi
91 if ! use expat; then
92 myconf="${myconf} --without-expat"
93 fi
94 econf ${myconf} \
95 $(use_enable curl libcurl) \
96 $(use_with glew) \
97 $(use_enable debug) $(use_enable debug thread_colorized) \
98 $(use_enable libeai) \
99 $(use_enable java) \
100 $(use_enable nsplugin plugin) \
101 $(use_enable osc) \
102 $(use_enable static-libs static) \
103 $(use_enable sox sound)
104 }
105
106 src_install() {
107 emake DESTDIR="${D}" install || die "emake install failed"
108
109 if use java; then
110 insinto /usr/share/${PN}/lib
111 doins src/java/java.policy
112 java-pkg_regjar src/java/vrml.jar
113 # install vrml.jar as a JRE extension
114 dodir /usr/java/packages/lib/ext
115 dosym /usr/share/${PN}/lib/vrml.jar /usr/java/packages/lib/ext/vrml.jar
116 elog "Because vrml.jar requires access to sockets, you will need to incorporate the"
117 elog "contents of /usr/share/${PN}/lib/java.policy into your system or user's default"
118 elog "java policy:"
119 elog " cat /usr/share/${PN}/lib/java.policy >>~/.java.policy"
120 fi
121
122 # remove unneeded .la files (as per Flameeyes' rant)
123 cd "${D}"
124 rm "usr/$(get_libdir)"/*.la "usr/$(get_libdir)/${PLUGINS_DIR}"/*.la
125 }
126
127 pkg_postinst() {
128 elog "By default, FreeWRL expects to find the 'firefox' binary in your include"
129 elog "path. If you do not have firefox installed or you wish to use a different"
130 elog "web browser to open links that are within VRML / X3D files, please be sure to"
131 elog "specify the command via your BROWSER environment variable."
132 }

  ViewVC Help
Powered by ViewVC 1.1.20