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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Oct 31 17:26:47 2012 UTC (20 months, 1 week ago) by flameeyes
Branch: MAIN
Changes since 1.1: +1 -3 lines
Remove blocker on unslotted boost, now that it's unslotted.

(Portage version: 2.2.0_alpha141/cvs/Linux x86_64, signed Manifest commit with key 1CD13C8AD4301342)

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_p20120903.ebuild,v 1.1 2012/10/16 00:25:32 chithanh 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.xz"
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 harden 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_unpack() {
128 default
129 # rename git snapshot directory to what portage expects
130 mv ${PN}-*/ ${P} || die
131 }
132
133 src_prepare() {
134 # Fix paths for klash, bug #339610
135 epatch "${FILESDIR}"/${PN}-0.8.9-klash.patch
136
137 # Use external dejagnu for tests, bug #321017
138 epatch "${FILESDIR}"/${PN}-0.8.9-external-dejagnu.patch
139
140 # Fix building on ppc64, bug #342535
141 use ppc64 && append-flags -mminimal-toc
142
143 # Fix kde multilib library path, bug #391283
144 epatch "${FILESDIR}"/${PN}-0.8.9-kde4-libdir.patch
145
146 # Fix gettext macros build failure
147 epatch "${FILESDIR}"/${PN}-0.8.10-gettext-macro.patch
148
149 # Fix libamf includes
150 epatch "${FILESDIR}"/${PN}-0.8.10-amf-include.patch
151
152 # Allow building against npapi-sdk, bug #383071
153 epatch "${FILESDIR}"/${PN}-0.8.10-npapi-sdk.patch
154
155 # Allow building against boost-1.50, bug #425442
156 epatch "${FILESDIR}"/${PN}-0.8.10-boost-1.50.patch
157
158 eautoreconf
159 }
160 src_configure() {
161 local device gui input media myconf myext renderers
162
163 # Set nsplugin install directory.
164 use nsplugin && myconf="${myconf} --with-npapi-plugindir=/usr/$(get_libdir)/gnash/npapi/"
165
166 # Set hardware acceleration.
167 use X && device+=",x11"
168 use directfb && device+=",directfb"
169 use egl && device+=",egl"
170 use fbcon && device+=",rawfb"
171 use vaapi && device+=",vaapi"
172 [[ "${device}x" == "x" ]] && device+=",none"
173
174 # Set rendering engine.
175 use agg && renderers+=",agg"
176 use cairo && renderers+=",cairo"
177 use opengl && renderers+=",opengl"
178 use openvg && renderers+=",openvg"
179
180 # Set kde and konqueror plugin directories.
181 if use kde; then
182 myconf="${myconf}
183 --with-plugins-install=system
184 --with-kde4-incl=${KDEDIR}/include
185 --with-kde4-configdir=${KDEDIR}/share/config
186 --with-kde4-prefix=${KDEDIR}
187 --with-kde4-lib=${KDEDIR}/$(get_libdir)
188 --with-kde-appsdatadir=${KDEDIR}/share/apps/klash
189 --with-kde4-servicesdir=${KDEDIR}/share/kde4/services
190 --with-kde4-plugindir=${KDEDIR}/$(get_libdir)/kde4"
191 fi
192
193 # Set media handler.
194 use ffmpeg || use gstreamer || media+=",none"
195 use ffmpeg && media+=",ffmpeg"
196 use gstreamer && media+=",gst"
197
198 # Set gui.
199 use dump && gui="${gui},dump"
200 use fbcon && gui="${gui},fb"
201 use gtk && gui=",gtk"
202 use kde && gui="${gui},kde4"
203 use sdl && gui="${gui},sdl"
204
205 if use sdl-sound; then
206 myconf="${myconf} --enable-sound=sdl"
207 else
208 myconf="${myconf} --enable-sound=none"
209 fi
210
211 # Set extensions
212 use mysql && myext=",mysql"
213 use gtk && myext="${myext},gtk"
214 use lirc && myext="${myext},lirc"
215 use dbus && myext="${myext},dbus"
216
217 # Strip extra comma from gui, myext, hwaccel and renderers.
218 device=$( echo $device | sed -e 's/,//' )
219 gui=$( echo $gui | sed -e 's/,//' )
220 myext=$( echo $myext | sed -e 's/,//' )
221 renderers=$( echo $renderers | sed -e 's/,//' )
222 media=$( echo $media | sed -e 's/,//' )
223
224 econf \
225 --docdir=/usr/share/doc/${PF} \
226 --disable-dependency-tracking \
227 --disable-kparts3 \
228 $(use_enable cygnal) \
229 $(use_enable cygnal cgibins) \
230 $(use_enable doc docbook) \
231 $(use_enable gnome ghelp) \
232 $(use_enable harden) \
233 $(use_enable kde kparts4) \
234 $(use_enable nls) \
235 $(use_enable nsplugin npapi) \
236 $(use_enable python) \
237 $(use_enable ssh) \
238 $(use_enable ssl) \
239 $(use_enable test testsuite) \
240 $(use_with gconf) \
241 --enable-gui=${gui} \
242 --enable-device=${device} \
243 --enable-extensions=${myext} \
244 --enable-renderer=${renderers} \
245 --enable-media=${media} \
246 ${myconf}
247 }
248 src_test() {
249 local log=testsuite-results.txt
250 cd testsuite
251 emake check || die "make check failed"
252 ./anaylse-results.sh > $log || die "results analyze failed"
253 cat $log
254 }
255 src_install() {
256 emake DESTDIR="${D}" install || die "emake install failed"
257
258 # Install nsplugin in directory set by --with-npapi-plugindir.
259 if use nsplugin; then
260 emake DESTDIR="${D}" install-plugin || die "install plugins failed"
261 fi
262
263 # Install kde konqueror plugin.
264 if use kde; then
265 pushd "${S}/plugin/klash4" >& /dev/null || die
266 emake DESTDIR="${D}" install-plugin || die "install kde plugins failed"
267 popd >& /dev/null
268 fi
269 # Create a symlink in /usr/$(get_libdir)/nsbrowser/plugins to the nsplugin install directory.
270 use nsplugin && inst_plugin /usr/$(get_libdir)/gnash/npapi/libgnashplugin.so \
271
272 dodoc AUTHORS ChangeLog NEWS README || die "dodoc failed"
273 }
274 pkg_postinst() {
275 if use !gnome || use !gstreamer && use !ffmpeg ; then
276 ewarn ""
277 ewarn "Gnash was built without a media handler and or http handler !"
278 ewarn ""
279 ewarn "If you want Gnash to support video then you will need to"
280 ewarn "rebuild Gnash with either the ffmpeg or gstreamer and gnome use flags set."
281 ewarn ""
282 fi
283 ewarn "${PN} is still in heavy development"
284 ewarn "Please first report bugs on upstream gnashdevs and deal with them"
285 ewarn "And then report a Gentoo bug to the maintainer"
286 use kde && kde4-base_pkg_postinst
287 }

  ViewVC Help
Powered by ViewVC 1.1.20