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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Mar 12 14:24:13 2014 UTC (6 years, 4 months ago) by axs
Branch: MAIN
Changes since 1.3: +5 -10 lines
fixed configuration error when building against spidermonkeys older than 1.8.5; migrated live ebuild to new git upstream repo

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 2B6559ED)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/freewrl/freewrl-9999.ebuild,v 1.3 2013/12/23 16:20:49 axs Exp $
4
5 EAPI=5
6
7 inherit autotools nsplugins eutils flag-o-matic java-pkg-opt-2 multilib
8
9 if [[ ${PV} == "9999" ]]; then
10 inherit git-r3
11 EGIT_REPO_URI="git://git.code.sf.net/p/freewrl/git"
12 S="${WORKDIR}/${P}/freex3d"
13 SRC_URI=
14 KEYWORDS=
15 else
16 SRC_URI="mirror://sourceforge/freewrl/${P}.1.tar.bz2"
17 KEYWORDS="~amd64 ~x86"
18 fi
19
20 DESCRIPTION="VRML97 and X3D compliant browser, library, and web-browser plugin"
21 HOMEPAGE="http://freewrl.sourceforge.net/"
22 LICENSE="GPL-3"
23 SLOT="0"
24 IUSE="curl debug +glew java libeai motif +nsplugin osc +sox static-libs"
25
26 COMMONDEPEND="x11-libs/libXau
27 x11-libs/libXdmcp
28 x11-libs/libXext
29 x11-libs/libX11
30 motif? ( x11-libs/motif )
31 !motif? ( x11-libs/libXaw )
32 media-libs/mesa
33 glew? ( media-libs/glew )
34 virtual/opengl
35 media-libs/libpng
36 virtual/jpeg
37 media-libs/imlib2
38 >=media-libs/freetype-2
39 media-libs/fontconfig
40 curl? ( net-misc/curl )
41 osc? ( media-libs/liblo )
42 dev-lang/spidermonkey:0="
43 DEPEND="${COMMONDEPEND}
44 virtual/pkgconfig
45 java? ( >=virtual/jdk-1.4 )
46 nsplugin? ( net-misc/npapi-sdk )"
47 RDEPEND="${COMMONDEPEND}
48 media-fonts/dejavu
49 || ( media-gfx/imagemagick
50 media-gfx/graphicsmagick[imagemagick] )
51 app-arch/unzip
52 java? ( >=virtual/jre-1.4 )
53 sox? ( media-sound/sox )"
54
55 src_prepare() {
56 if [[ ${PV} != "9999" ]]; then
57 epatch "${FILESDIR}"/${P}-fontconfig-match.patch
58 epatch "${FILESDIR}"/${P}-mozjs187-config.patch
59 fi
60 epatch_user
61 eautoreconf
62 }
63
64 src_configure() {
65 # list of js libs without .pc support, to disable ./configure auto-checking
66 local spidermonkeys=( mozilla-js xulrunner-js firefox-js firefox2-js seamonkey-js )
67 # list of .pc supported spidermonkeys, to disable ./configure auto-checking
68 local spidermonkeys_pc=( mozjs187 mozjs185 )
69
70 local myconf="--enable-fontconfig
71 --without-expat
72 --without-glu
73 --with-x
74 --with-imageconvert=/usr/bin/convert
75 --with-unzip=/usr/bin/unzip
76 --disable-mozjs-17.0
77 ${spidermonkeys[@]/#/ --disable-}"
78
79 if has_version "<dev-lang/spidermonkey-1.8.5" ; then
80 # spidermonkey pre-1.8.5 has no pkg-config, so override ./configure
81 myconf+="${spidermonkeys_pc[@]/#/ --disable-}"
82 JAVASCRIPT_ENGINE_CFLAGS="-I/usr/include/js -DXP_UNIX"
83 if has_version ">=dev-lang/spidermonkey-1.8" ; then
84 # spidermonkey-1.8 changed the name of the lib
85 JAVASCRIPT_ENGINE_LIBS="-lmozjs"
86 else
87 JAVASCRIPT_ENGINE_LIBS="-ljs"
88 fi
89 if has_version dev-lang/spidermonkey[threadsafe] ; then
90 JAVASCRIPT_ENGINE_CFLAGS+=" -DJS_THREADSAFE $(pkg-config --cflags nspr)"
91 JAVASCRIPT_ENGINE_LIBS="$(pkg-config --libs nspr) ${JAVASCRIPT_ENGINE_LIBS}"
92 fi
93 export JAVASCRIPT_ENGINE_CFLAGS
94 export JAVASCRIPT_ENGINE_LIBS
95 fi
96 if use nsplugin; then
97 myconf+=" --with-plugindir=/usr/$(get_libdir)/${PLUGINS_DIR}"
98 myconf+=" --disable-mozilla-plugin --disable-xulrunner-plugin"
99 fi
100 econf ${myconf} \
101 $(use_enable curl libcurl) \
102 $(use_with glew) \
103 $(use_enable debug) $(use_enable debug thread_colorized) \
104 $(use_enable libeai) \
105 $(use_enable java) \
106 $(use_enable nsplugin plugin) \
107 $(use_enable osc) \
108 $(use_enable static-libs static) \
109 $(use_enable sox sound) \
110 $(usex sox "--with-soundconv=/usr/bin/sox") \
111 $(usex motif "--with-target=motif" "--with-target=x11") \
112 $(usex motif "--with-statusbar=standard" "--with-statusbar=hud")
113 }
114
115 src_install() {
116 emake DESTDIR="${D}" install
117
118 if use java; then
119 insinto /usr/share/${PN}/lib
120 doins src/java/java.policy
121 java-pkg_regjar src/java/vrml.jar
122 # install vrml.jar as a JRE extension
123 dodir /usr/java/packages/lib/ext
124 dosym /usr/share/${PN}/lib/vrml.jar /usr/java/packages/lib/ext/vrml.jar
125 if ! has_version "media-gfx/freewrl[java]" ; then
126 elog "Because vrml.jar requires access to sockets, you will need to incorporate the"
127 elog "contents of /usr/share/${PN}/lib/java.policy into your system or user's default"
128 elog "java policy:"
129 elog " cat /usr/share/${PN}/lib/java.policy >>~/.java.policy"
130 fi
131 fi
132
133 # remove unneeded .la files (as per Flameeyes' rant)
134 cd "${D}"
135 rm "usr/$(get_libdir)"/*.la "usr/$(get_libdir)/${PLUGINS_DIR}"/*.la
136 }
137
138 pkg_postinst() {
139 if [[ -z ${REPLACING_VERSIONS} ]]; then
140 elog "By default, FreeWRL expects to find the 'firefox' binary in your include"
141 elog "path. If you do not have firefox installed or you wish to use a different"
142 elog "web browser to open links that are within VRML / X3D files, please be sure to"
143 elog "specify the command via your BROWSER environment variable."
144 fi
145 }

  ViewVC Help
Powered by ViewVC 1.1.20