/[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.1 - (show annotations) (download)
Wed May 29 20:40:01 2013 UTC (7 years, 2 months ago) by axs
Branch: MAIN
added live ebuild. NOTE, upstream does NOT keep HEAD in a buildable state, ymmv

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

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

  ViewVC Help
Powered by ViewVC 1.1.20