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

Contents of /media-gfx/freewrl/freewrl-1.22.10-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Sat May 21 05:38:28 2011 UTC (9 years, 2 months ago) by ssuominen
Branch: MAIN
Changes since 1.2: +3 -3 lines
Use -lmozjs instead of -ljs and force at least spidermonkey >= 1.9 wrt #361663 by Ian Stakenvicius.

(Portage version: 2.2.0_alpha33/cvs/Linux x86_64)

1 ssuominen 1.1 # Copyright 1999-2011 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 ssuominen 1.3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/freewrl/freewrl-1.22.10-r1.ebuild,v 1.2 2011/04/03 19:39:54 mr_bones_ Exp $
4 ssuominen 1.1
5     EAPI="2"
6    
7     inherit nsplugins eutils flag-o-matic java-pkg-opt-2
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 +java +motif +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     media-libs/mesa
24     glew? ( media-libs/glew )
25     virtual/opengl
26     media-libs/libpng
27     virtual/jpeg
28     media-libs/imlib2
29     >=media-libs/freetype-2
30     media-libs/fontconfig
31     curl? ( net-misc/curl )
32 ssuominen 1.3 >=dev-lang/spidermonkey-1.9"
33 ssuominen 1.1 DEPEND="${COMMONDEPEND}
34     >=dev-util/pkgconfig-0.22
35     java? ( >=virtual/jdk-1.4 )"
36     RDEPEND="${COMMONDEPEND}
37     media-fonts/dejavu
38     || ( media-gfx/imagemagick
39     media-gfx/graphicsmagick[imagemagick] )
40     app-arch/unzip
41     java? ( >=virtual/jre-1.4 )
42     sox? ( media-sound/sox )"
43    
44     src_prepare() {
45     # A hack to get around expat being grabbed from xulrunner
46     mkdir "${S}/src/lib/include";
47     cp /usr/include/expat.h "${S}/src/lib/include/";
48     cp /usr/include/expat_external.h "${S}/src/lib/include/";
49     }
50    
51     src_configure() {
52     local myconf="--enable-fontconfig --disable-plugin
53     --with-imageconvert=/usr/bin/convert
54     --with-unzip=/usr/bin/unzip"
55     if use motif; then
56     myconf="${myconf} --with-x --with-target=motif"
57     else
58     myconf="${myconf} --with-x --with-target=x11"
59     fi
60     if use sox; then
61     myconf="${myconf} --with-soundconv=/usr/bin/sox"
62     fi
63     # disable the checks for other js libs, in case they are installed
64     myconf="${myconf} --disable-mozilla-js --disable-xulrunner-js --disable-firefox-js --disable-seamonkey-js"
65     # spidermonkey has no pkg-config, so override ./configure
66     JAVASCRIPT_ENGINE_CFLAGS="-I/usr/include/js -DXP_UNIX"
67 ssuominen 1.3 JAVASCRIPT_ENGINE_LIBS="-lmozjs"
68 ssuominen 1.1 if has_version dev-lang/spidermonkey[threadsafe] ; then
69     JAVASCRIPT_ENGINE_CFLAGS="${JAVASCRIPT_ENGINE_CFLAGS} -DJS_THREADSAFE $(pkg-config --cflags nspr)"
70     JAVASCRIPT_ENGINE_LIBS="$(pkg-config --libs nspr) ${JAVASCRIPT_ENGINE_LIBS}"
71     fi
72     export JAVASCRIPT_ENGINE_CFLAGS
73     export JAVASCRIPT_ENGINE_LIBS
74     econf ${myconf} \
75     $(use_enable curl libcurl) \
76     $(use_with glew) \
77     $(use_enable debug) $(use_enable debug thread_colorized) \
78     $(use_enable libeai) \
79     $(use_enable java) \
80     $(use_enable static-libs static) \
81     $(use_enable sox sound)
82     }
83    
84     src_install() {
85     emake DESTDIR="${D}" install || die "emake install failed"
86    
87     if use java; then
88     java-pkg_dojar src/java/vrml.jar
89     insinto /usr/share/${PN}/lib
90     doins src/java/java.policy
91     elog "Because vrml.jar requires access to sockets, you will need to incorporate the"
92     elog "contents of /usr/share/${PN}/lib/java.policy into your system or user's default"
93     elog "java policy."
94     fi
95    
96     # remove unneeded .la files (as per Flameeyes' rant)
97     cd "${D}"
98     rm "usr/$(get_libdir)"/*.la "usr/$(get_libdir)/${PLUGINS_DIR}"/*.la
99     }
100    
101     pkg_postinst() {
102     elog "All versions of FreeWRL are incompatible with xulrunner-2.0 and above."
103     elog "This ebuild gets around it by removing support for browser plugins and forcing"
104     elog "the javascript engine to spidermonkey. If you are willing to downgrade to"
105     elog "xulrunner-1.9 (as well as downgrade/rebuild all packages depending on it), then"
106     elog "you can get this functionality back by adding =media-gfx/freewrl-1.22.10-r1 to your"
107     elog "package.mask"
108 mr_bones_ 1.2 }

  ViewVC Help
Powered by ViewVC 1.1.20