/[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.3 - (hide annotations) (download)
Mon Dec 23 16:20:49 2013 UTC (6 years, 7 months ago) by axs
Branch: MAIN
Changes since 1.2: +5 -3 lines
fixed freewrl.desktop as per bug 495108

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

1 axs 1.1 # Copyright 1999-2013 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 axs 1.3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/freewrl/freewrl-9999.ebuild,v 1.2 2013/08/09 13:42:13 axs Exp $
4 axs 1.1
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 axs 1.2 dev-lang/spidermonkey:0="
48 axs 1.1 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 axs 1.3 local spidermonkeys_pc=( mozjs187 mozjs185 )
74 axs 1.1
75     local myconf="--enable-fontconfig
76     --without-expat
77 axs 1.3 --without-glu
78 axs 1.1 --with-x
79     --with-imageconvert=/usr/bin/convert
80     --with-unzip=/usr/bin/unzip
81 axs 1.3 --disable-mozjs-17.0
82 axs 1.1 ${spidermonkeys[@]/#/ --disable-}"
83    
84     if has_version "<dev-lang/spidermonkey-1.8.5" ; then
85     # spidermonkey pre-1.8.5 has no pkg-config, so override ./configure
86     myconf+="${spidermonkeys_pc[@]/#/ --disable-}"
87     JAVASCRIPT_ENGINE_CFLAGS="-I/usr/include/js -DXP_UNIX"
88     if has_version ">=dev-lang/spidermonkey-1.8" ; then
89     # spidermonkey-1.8 changed the name of the lib
90     JAVASCRIPT_ENGINE_LIBS="-lmozjs"
91     else
92     JAVASCRIPT_ENGINE_LIBS="-ljs"
93     fi
94     if has_version dev-lang/spidermonkey[threadsafe] ; then
95     JAVASCRIPT_ENGINE_CFLAGS+=" -DJS_THREADSAFE $(pkg-config --cflags nspr)"
96     JAVASCRIPT_ENGINE_LIBS="$(pkg-config --libs nspr) ${JAVASCRIPT_ENGINE_LIBS}"
97     fi
98     export JAVASCRIPT_ENGINE_CFLAGS
99     export JAVASCRIPT_ENGINE_LIBS
100     fi
101     if use nsplugin; then
102     myconf+=" --with-plugindir=/usr/$(get_libdir)/${PLUGINS_DIR}"
103     myconf+=" --disable-mozilla-plugin --disable-xulrunner-plugin"
104     fi
105     econf ${myconf} \
106     $(use_enable curl libcurl) \
107     $(use_with glew) \
108     $(use_enable debug) $(use_enable debug thread_colorized) \
109     $(use_enable libeai) \
110     $(use_enable java) \
111     $(use_enable nsplugin plugin) \
112     $(use_enable osc) \
113     $(use_enable static-libs static) \
114     $(use_enable sox sound) \
115     $(usex sox "--with-soundconv=/usr/bin/sox") \
116 axs 1.3 $(usex motif "--with-target=motif" "--with-target=x11") \
117 axs 1.1 $(usex motif "--with-statusbar=standard" "--with-statusbar=hud")
118     }
119    
120     src_install() {
121     emake DESTDIR="${D}" install
122    
123     if use java; then
124     insinto /usr/share/${PN}/lib
125     doins src/java/java.policy
126     java-pkg_regjar src/java/vrml.jar
127     # install vrml.jar as a JRE extension
128     dodir /usr/java/packages/lib/ext
129     dosym /usr/share/${PN}/lib/vrml.jar /usr/java/packages/lib/ext/vrml.jar
130     if ! has_version "media-gfx/freewrl[java]" ; then
131     elog "Because vrml.jar requires access to sockets, you will need to incorporate the"
132     elog "contents of /usr/share/${PN}/lib/java.policy into your system or user's default"
133     elog "java policy:"
134     elog " cat /usr/share/${PN}/lib/java.policy >>~/.java.policy"
135     fi
136     fi
137    
138     # remove unneeded .la files (as per Flameeyes' rant)
139     cd "${D}"
140     rm "usr/$(get_libdir)"/*.la "usr/$(get_libdir)/${PLUGINS_DIR}"/*.la
141     }
142    
143     pkg_postinst() {
144     if [[ -z ${REPLACING_VERSIONS} ]]; then
145     elog "By default, FreeWRL expects to find the 'firefox' binary in your include"
146     elog "path. If you do not have firefox installed or you wish to use a different"
147     elog "web browser to open links that are within VRML / X3D files, please be sure to"
148     elog "specify the command via your BROWSER environment variable."
149     fi
150     }

  ViewVC Help
Powered by ViewVC 1.1.20