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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Fri Apr 25 20:03:08 2014 UTC (6 years, 3 months ago) by axs
Branch: MAIN
Changes since 1.1: +2 -2 lines
fixed distfile on new version

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

1 axs 1.1 # Copyright 1999-2014 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 axs 1.2 # $Header: /var/cvsroot/gentoo-x86/media-gfx/freewrl/freewrl-2.3.3.ebuild,v 1.1 2014/04/22 19:22:43 axs Exp $
4 axs 1.1
5     EAPI=5
6    
7     inherit 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 axs 1.2 SRC_URI="mirror://sourceforge/freewrl/${P}.1.tar.gz"
17 axs 1.1 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 java libeai motif +nsplugin opencl 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     virtual/opengl
34     media-libs/libpng
35     virtual/jpeg
36     media-libs/imlib2
37     >=media-libs/freetype-2
38     media-libs/fontconfig
39     curl? ( net-misc/curl )
40     osc? ( media-libs/liblo )
41     opencl? ( virtual/opencl )
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_configure() {
56     # list of js libs without .pc support, to disable ./configure auto-checking
57     local spidermonkeys=( mozilla-js xulrunner-js firefox-js firefox2-js seamonkey-js )
58     # list of .pc supported spidermonkeys, to disable ./configure auto-checking
59     local spidermonkeys_pc=( mozjs187 mozjs185 )
60    
61     local myconf="--enable-fontconfig
62     --without-expat
63     --with-x
64     --with-imageconvert=/usr/bin/convert
65     --with-unzip=/usr/bin/unzip
66     ${spidermonkeys[@]/#/ --disable-}"
67    
68     if has_version "<dev-lang/spidermonkey-1.8.5" ; then
69     # spidermonkey pre-1.8.5 has no pkg-config, so override ./configure
70     myconf+="${spidermonkeys_pc[@]/#/ --disable-}"
71     JAVASCRIPT_ENGINE_CFLAGS="-I/usr/include/js -DXP_UNIX"
72     if has_version ">=dev-lang/spidermonkey-1.8:0" ; then
73     # spidermonkey-1.8 changed the name of the lib
74     JAVASCRIPT_ENGINE_LIBS="-lmozjs"
75     else
76     JAVASCRIPT_ENGINE_LIBS="-ljs"
77     fi
78     if has_version "dev-lang/spidermonkey:0[threadsafe]" ; then
79     JAVASCRIPT_ENGINE_CFLAGS+=" -DJS_THREADSAFE $(pkg-config --cflags nspr)"
80     JAVASCRIPT_ENGINE_LIBS="$(pkg-config --libs nspr) ${JAVASCRIPT_ENGINE_LIBS}"
81     fi
82     export JAVASCRIPT_ENGINE_CFLAGS
83     export JAVASCRIPT_ENGINE_LIBS
84     fi
85     if use nsplugin; then
86     myconf+=" --with-plugindir=/usr/$(get_libdir)/${PLUGINS_DIR}"
87     myconf+=" --disable-mozilla-plugin --disable-xulrunner-plugin"
88     fi
89     econf ${myconf} \
90     $(use_enable curl libcurl) \
91     $(use_with opencl OpenCL) \
92     $(use_enable debug) $(use_enable debug thread_colorized) \
93     $(use_enable libeai) \
94     $(use_enable java) \
95     $(use_enable nsplugin plugin) \
96     $(use_enable osc) \
97     $(use_enable static-libs static) \
98     $(use_enable sox sound) \
99     $(usex sox "--with-soundconv=/usr/bin/sox") \
100     $(usex motif "--with-target=motif" "--with-target=x11") \
101     $(usex motif "--with-statusbar=standard" "--with-statusbar=hud")
102     }
103    
104     src_install() {
105     emake DESTDIR="${D}" install
106    
107     if use java; then
108     insinto /usr/share/${PN}/lib
109     doins src/java/java.policy
110     java-pkg_regjar src/java/vrml.jar
111     # install vrml.jar as a JRE extension
112     dodir /usr/java/packages/lib/ext
113     dosym /usr/share/${PN}/lib/vrml.jar /usr/java/packages/lib/ext/vrml.jar
114     if ! has_version "media-gfx/freewrl[java]" ; then
115     elog "Because vrml.jar requires access to sockets, you will need to incorporate the"
116     elog "contents of /usr/share/${PN}/lib/java.policy into your system or user's default"
117     elog "java policy:"
118     elog " cat /usr/share/${PN}/lib/java.policy >>~/.java.policy"
119     fi
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     if [[ -z ${REPLACING_VERSIONS} ]]; then
129     elog "By default, FreeWRL expects to find the 'firefox' binary in your include"
130     elog "path. If you do not have firefox installed or you wish to use a different"
131     elog "web browser to open links that are within VRML / X3D files, please be sure to"
132     elog "specify the command via your BROWSER environment variable."
133     fi
134     }

  ViewVC Help
Powered by ViewVC 1.1.20