/[gentoo-x86]/www-plugins/gnash/gnash-0.8.10-r2.ebuild
Gentoo

Contents of /www-plugins/gnash/gnash-0.8.10-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Thu Mar 28 22:06:54 2013 UTC (16 months, 3 weeks ago) by chithanh
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +1 -1 lines
FILE REMOVED
Do not install eglinfo, bug #463654.

(Portage version: 2.1.11.55/cvs/Linux x86_64, unsigned Manifest commit)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-plugins/gnash/gnash-0.8.10-r2.ebuild,v 1.10 2012/11/04 04:38:36 flameeyes Exp $
4
5 EAPI=4
6 CMAKE_REQUIRED="never"
7 KDE_REQUIRED="optional"
8 AT_M4DIR="cygnal"
9 PYTHON_DEPEND="python? 2"
10 RESTRICT_PYTHON_ABIS="3.*"
11
12 inherit autotools eutils kde4-base multilib nsplugins python flag-o-matic
13
14 DESCRIPTION="GNU Flash movie player that supports many SWF v7,8,9 features"
15 HOMEPAGE="http://www.gnu.org/software/gnash/"
16
17 if [[ ${PV} = 9999* ]]; then
18 SRC_URI=""
19 EGIT_REPO_URI="git://git.savannah.gnu.org/gnash.git"
20 inherit git-2
21 else
22 # Release tarball is b0rked, upstream #35612
23 # SRC_URI="mirror://gnu/${PN}/${PV}/${P}.tar.bz2"
24 SRC_URI="mirror://gentoo/${P}.tar.gz"
25 fi
26
27 LICENSE="GPL-3"
28 SLOT="0"
29 KEYWORDS="amd64 ppc ~ppc64 ~sparc x86"
30 IUSE="X +agg cairo cygnal dbus directfb doc dump egl fbcon +ffmpeg gconf gnome gstreamer gtk kde lirc mysql +nls nsplugin opengl openvg python sdl +sdl-sound ssh ssl test vaapi"
31 REQUIRED_USE="dump? ( agg ffmpeg )
32 fbcon? ( agg )
33 nsplugin? ( gtk )
34 openvg? ( egl )
35 python? ( gtk )
36 vaapi? ( agg ffmpeg )
37 || ( agg cairo opengl openvg )
38 || ( dump fbcon gtk kde sdl )
39 "
40
41 RDEPEND=">=dev-libs/boost-1.41.0
42 dev-libs/expat
43 dev-libs/libxml2
44 virtual/jpeg
45 media-libs/libpng
46 net-misc/curl
47 x11-libs/libX11
48 x11-libs/libXi
49 x11-libs/libXmu
50 x11-libs/libXt
51 media-libs/giflib
52 x11-proto/xproto
53 agg? ( x11-libs/agg )
54 cairo? ( x11-libs/cairo )
55 directfb? (
56 dev-libs/DirectFB
57 )
58 doc? (
59 >=app-text/docbook2X-0.8.8
60 app-text/docbook-sgml-utils
61 )
62 egl? (
63 media-libs/mesa[egl]
64 )
65 fbcon? (
66 x11-libs/tslib
67 )
68 ffmpeg? (
69 virtual/ffmpeg[vaapi?]
70 )
71 gconf? (
72 gnome-base/gconf
73 )
74 gstreamer? (
75 media-plugins/gst-plugins-ffmpeg
76 media-plugins/gst-plugins-mad
77 media-plugins/gst-plugins-meta
78 )
79 gtk? (
80 x11-libs/gtk+:2
81 python? ( dev-python/pygtk:2 )
82 )
83 kde? ( $(add_kdebase_dep kdebase-startkde) )
84 opengl? (
85 virtual/glu
86 virtual/opengl
87 gtk? ( x11-libs/gtkglext )
88 )
89 openvg? (
90 media-libs/mesa[openvg]
91 )
92 sdl? ( media-libs/libsdl[X] )
93 sdl-sound? ( media-libs/libsdl )
94 media-libs/speex[ogg]
95 sys-libs/zlib
96 >=sys-devel/libtool-2.2
97 mysql? ( virtual/mysql )
98 lirc? ( app-misc/lirc )
99 dbus? ( sys-apps/dbus )
100 ssh? ( >=net-libs/libssh-0.4[server] )
101 ssl? ( dev-libs/openssl )
102 vaapi? ( x11-libs/libva[opengl?] )
103 "
104 DEPEND="${RDEPEND}
105 virtual/pkgconfig
106 nls? ( sys-devel/gettext )
107 gnome? ( app-text/rarian )
108 nsplugin? ( net-misc/npapi-sdk )
109 test? ( dev-util/dejagnu )"
110 # Tests hang with sandbox, bug #321017
111 RESTRICT="test"
112
113 pkg_setup() {
114 kde4-base_pkg_setup
115
116 if use !ffmpeg && use !gstreamer; then
117 ewarn "You are trying to build Gnash without choosing a media handler."
118 ewarn "Sound and video playback will not work."
119 fi
120
121 # won't build with python-3, bug #392969
122 if use python; then
123 python_set_active_version 2
124 fi
125 }
126
127 src_prepare() {
128 # Fix paths for klash, bug #339610
129 epatch "${FILESDIR}"/${PN}-0.8.9-klash.patch
130
131 # Use external dejagnu for tests, bug #321017
132 epatch "${FILESDIR}"/${PN}-0.8.9-external-dejagnu.patch
133
134 # Fix building on ppc64, bug #342535
135 use ppc64 && append-flags -mminimal-toc
136
137 # Fix kde multilib library path, bug #391283
138 epatch "${FILESDIR}"/${PN}-0.8.9-kde4-libdir.patch
139
140 # Fix gettext macros build failure
141 epatch "${FILESDIR}"/${PN}-0.8.10-gettext-macro.patch
142
143 # Fix libamf includes
144 epatch "${FILESDIR}"/${PN}-0.8.10-amf-include.patch
145
146 # Allow building against npapi-sdk, bug #383071
147 epatch "${FILESDIR}"/${PN}-0.8.10-npapi-sdk.patch
148
149 # Fix broken jemalloc, bug #405993
150 epatch "${FILESDIR}"/${PN}-0.8.10-jemalloc-aslr-fix.patch
151
152 # Fix security bug bug #408209
153 epatch "${FILESDIR}"/${PN}-0.8.10-cve-2012-1175.patch
154
155 eautoreconf
156 }
157 src_configure() {
158 local device gui input media myconf myext renderers
159
160 # Set nsplugin install directory.
161 use nsplugin && myconf="${myconf} --with-npapi-plugindir=/usr/$(get_libdir)/gnash/npapi/"
162
163 # Set hardware acceleration.
164 use X && device+=",x11"
165 use directfb && device+=",directfb"
166 use egl && device+=",egl"
167 use fbcon && device+=",rawfb"
168 use vaapi && device+=",vaapi"
169 [[ "${device}x" == "x" ]] && device+=",none"
170
171 # Set rendering engine.
172 use agg && renderers+=",agg"
173 use cairo && renderers+=",cairo"
174 use opengl && renderers+=",opengl"
175 use openvg && renderers+=",openvg"
176
177 # Set kde and konqueror plugin directories.
178 if use kde; then
179 myconf="${myconf}
180 --with-plugins-install=system
181 --with-kde4-incl=${KDEDIR}/include
182 --with-kde4-configdir=${KDEDIR}/share/config
183 --with-kde4-prefix=${KDEDIR}
184 --with-kde4-lib=${KDEDIR}/$(get_libdir)
185 --with-kde-appsdatadir=${KDEDIR}/share/apps/klash
186 --with-kde4-servicesdir=${KDEDIR}/share/kde4/services"
187 fi
188
189 # Set media handler.
190 use ffmpeg || use gstreamer || media+=",none"
191 use ffmpeg && media+=",ffmpeg"
192 use gstreamer && media+=",gst"
193
194 # Set gui.
195 use dump && gui="${gui},dump"
196 use fbcon && gui="${gui},fb"
197 use gtk && gui=",gtk"
198 use kde && gui="${gui},kde4"
199 use sdl && gui="${gui},sdl"
200
201 if use sdl-sound; then
202 myconf="${myconf} --enable-sound=sdl"
203 else
204 myconf="${myconf} --enable-sound=none"
205 fi
206
207 # Set extensions
208 use mysql && myext=",mysql"
209 use gtk && myext="${myext},gtk"
210 use lirc && myext="${myext},lirc"
211 use dbus && myext="${myext},dbus"
212
213 # Strip extra comma from gui, myext, hwaccel and renderers.
214 device=$( echo $device | sed -e 's/,//' )
215 gui=$( echo $gui | sed -e 's/,//' )
216 myext=$( echo $myext | sed -e 's/,//' )
217 renderers=$( echo $renderers | sed -e 's/,//' )
218 media=$( echo $media | sed -e 's/,//' )
219
220 econf \
221 --docdir=/usr/share/doc/${PF} \
222 --disable-dependency-tracking \
223 --disable-kparts3 \
224 $(use_enable cygnal) \
225 $(use_enable cygnal cgibins) \
226 $(use_enable doc docbook) \
227 $(use_enable gnome ghelp) \
228 $(use_enable kde kparts4) \
229 $(use_enable nls) \
230 $(use_enable nsplugin npapi) \
231 $(use_enable python) \
232 $(use_enable ssh) \
233 $(use_enable ssl) \
234 $(use_enable test testsuite) \
235 $(use_with gconf) \
236 --enable-gui=${gui} \
237 --enable-device=${device} \
238 --enable-extensions=${myext} \
239 --enable-renderer=${renderers} \
240 --enable-media=${media} \
241 ${myconf}
242 }
243 src_test() {
244 local log=testsuite-results.txt
245 cd testsuite
246 emake check || die "make check failed"
247 ./anaylse-results.sh > $log || die "results analyze failed"
248 cat $log
249 }
250 src_install() {
251 emake DESTDIR="${D}" install || die "emake install failed"
252
253 # Install nsplugin in directory set by --with-npapi-plugindir.
254 if use nsplugin; then
255 emake DESTDIR="${D}" install-plugin || die "install plugins failed"
256 fi
257
258 # Install kde konqueror plugin.
259 if use kde; then
260 pushd "${S}/plugin/klash4" >& /dev/null || die
261 emake DESTDIR="${D}" install-plugin || die "install kde plugins failed"
262 popd >& /dev/null
263 fi
264 # Create a symlink in /usr/$(get_libdir)/nsbrowser/plugins to the nsplugin install directory.
265 use nsplugin && inst_plugin /usr/$(get_libdir)/gnash/npapi/libgnashplugin.so \
266
267 dodoc AUTHORS ChangeLog NEWS README || die "dodoc failed"
268 }
269 pkg_postinst() {
270 if use !gnome || use !gstreamer && use !ffmpeg ; then
271 ewarn ""
272 ewarn "Gnash was built without a media handler and or http handler !"
273 ewarn ""
274 ewarn "If you want Gnash to support video then you will need to"
275 ewarn "rebuild Gnash with either the ffmpeg or gstreamer and gnome use flags set."
276 ewarn ""
277 fi
278 ewarn "${PN} is still in heavy development"
279 ewarn "Please first report bugs on upstream gnashdevs and deal with them"
280 ewarn "And then report a Gentoo bug to the maintainer"
281 use kde && kde4-base_pkg_postinst
282 }

  ViewVC Help
Powered by ViewVC 1.1.20