Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-plugins/gnash/
Date: Sun, 09 Oct 2016 15:19:40
Message-Id: 1476026363.c5acc39c723614b23169f8239abc1c120c10b8e8.pacho@gentoo
1 commit: c5acc39c723614b23169f8239abc1c120c10b8e8
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 9 15:17:46 2016 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 9 15:19:23 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5acc39c
7
8 www-plugins/gnash: Disable optional gconf and gstreamer:0.10 support (#594884), prevent sandbox violations (#591014), handle gui options properly (#491120), use new ways for handling ffmpeg and openssl providers.
9
10 Package-Manager: portage-2.3.1
11
12 www-plugins/gnash/gnash-0.8.10_p20160329-r1.ebuild | 288 +++++++++++++++++++++
13 1 file changed, 288 insertions(+)
14
15 diff --git a/www-plugins/gnash/gnash-0.8.10_p20160329-r1.ebuild b/www-plugins/gnash/gnash-0.8.10_p20160329-r1.ebuild
16 new file mode 100644
17 index 00000000..43f2888
18 --- /dev/null
19 +++ b/www-plugins/gnash/gnash-0.8.10_p20160329-r1.ebuild
20 @@ -0,0 +1,288 @@
21 +# Copyright 1999-2016 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=6
26 +CMAKE_REQUIRED="never"
27 +KDE_REQUIRED="optional"
28 +AT_M4DIR="cygnal"
29 +# won't build with python-3, bug #392969
30 +PYTHON_COMPAT=( python2_7 )
31 +
32 +inherit autotools eutils kde4-base multilib nsplugins python-any-r1 flag-o-matic xdg-utils
33 +
34 +DESCRIPTION="GNU Flash movie player that supports many SWF v7,8,9 features"
35 +HOMEPAGE="https://www.gnu.org/software/gnash/"
36 +
37 +if [[ ${PV} = 9999* ]]; then
38 + SRC_URI=""
39 + EGIT_REPO_URI="git://git.savannah.gnu.org/gnash.git"
40 + inherit git-2
41 +else
42 +# Release tarball is b0rked, upstream #35612
43 +# SRC_URI="mirror://gnu/${PN}/${PV}/${P}.tar.bz2"
44 + SRC_URI="mirror://gentoo/${P}.tar.xz"
45 +fi
46 +
47 +LICENSE="GPL-3"
48 +SLOT="0"
49 +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
50 +IUSE="X +agg cairo cygnal dbus directfb doc dump egl fbcon +ffmpeg libav libressl gnome gtk harden jemalloc kde lirc mysql +nls nsplugin opengl openvg python sdl +sdl-sound ssh ssl test vaapi"
51 +REQUIRED_USE="
52 + dump? ( agg ffmpeg )
53 + fbcon? ( agg )
54 + nsplugin? ( gtk )
55 + openvg? ( egl )
56 + python? ( gtk )
57 + vaapi? ( agg ffmpeg )
58 + || ( agg cairo opengl openvg )
59 + || ( dump fbcon gtk kde sdl )
60 +"
61 +
62 +RDEPEND="
63 + >=dev-libs/boost-1.41.0:0=
64 + dev-libs/expat
65 + dev-libs/libxml2:2
66 + virtual/jpeg:0
67 + media-libs/libpng:0=
68 + net-misc/curl
69 + x11-libs/libX11
70 + x11-libs/libXi
71 + x11-libs/libXmu
72 + x11-libs/libXt
73 + media-libs/giflib:=
74 + x11-proto/xproto
75 + agg? ( x11-libs/agg )
76 + cairo? ( x11-libs/cairo )
77 + directfb? (
78 + dev-libs/DirectFB
79 + )
80 + doc? (
81 + >=app-text/docbook2X-0.8.8
82 + app-text/docbook-sgml-utils
83 + )
84 + egl? (
85 + media-libs/mesa[egl]
86 + )
87 + fbcon? (
88 + x11-libs/tslib
89 + )
90 + ffmpeg? (
91 + libav? ( media-video/libav:0=[vaapi?] )
92 + !libav? ( media-video/ffmpeg:0=[vaapi?] )
93 + )
94 + gtk? (
95 + x11-libs/gtk+:2
96 + python? ( dev-python/pygtk:2 )
97 + )
98 + jemalloc? ( dev-libs/jemalloc )
99 + kde? (
100 + $(add_kdebase_dep kdebase-startkde)
101 + dev-qt/qtwebkit:4
102 + )
103 + opengl? (
104 + virtual/glu
105 + virtual/opengl
106 + gtk? ( x11-libs/gtkglext )
107 + )
108 + openvg? (
109 + media-libs/mesa[openvg]
110 + )
111 + sdl? ( media-libs/libsdl[X] )
112 + sdl-sound? ( media-libs/libsdl )
113 + media-libs/speex[ogg]
114 + sys-libs/zlib
115 + >=sys-devel/libtool-2.2
116 + mysql? ( virtual/mysql )
117 + lirc? ( app-misc/lirc )
118 + dbus? ( sys-apps/dbus )
119 + ssh? ( >=net-libs/libssh-0.4[server] )
120 + ssl? (
121 + libressl? ( dev-libs/libressl:0= )
122 + !libressl? ( dev-libs/openssl:0= )
123 + )
124 + vaapi? ( x11-libs/libva[opengl?] )
125 + "
126 +DEPEND="${RDEPEND}
127 + virtual/pkgconfig
128 + nls? ( sys-devel/gettext )
129 + gnome? ( app-text/rarian )
130 + nsplugin? ( net-misc/npapi-sdk )
131 + test? ( dev-util/dejagnu )
132 +"
133 +# Tests hang with sandbox, bug #321017
134 +RESTRICT="test"
135 +
136 +pkg_setup() {
137 + kde4-base_pkg_setup
138 + python-any-r1_pkg_setup
139 +
140 + if use !ffmpeg; then
141 + ewarn "You are trying to build Gnash without choosing a media handler."
142 + ewarn "Sound and video playback will not work."
143 + fi
144 +}
145 +
146 +src_unpack() {
147 + default
148 + # rename git snapshot directory to what portage expects
149 + mv ${PN}-*/ ${P} || die
150 +}
151 +
152 +src_prepare() {
153 + default
154 +
155 + xdg_environment_reset # 591014
156 +
157 + # Fix paths for klash, bug #339610
158 + eapply "${FILESDIR}"/${PN}-0.8.9-klash.patch
159 +
160 + # Use external dejagnu for tests, bug #321017
161 + eapply "${FILESDIR}"/${PN}-0.8.9-external-dejagnu.patch
162 +
163 + # Fix building on ppc64, bug #342535
164 + use ppc64 && append-flags -mminimal-toc
165 +
166 + # Fix kde multilib library path, bug #391283
167 + eapply "${FILESDIR}"/${PN}-0.8.9-kde4-libdir.patch
168 +
169 + # Fix libamf includes
170 + eapply "${FILESDIR}"/${PN}-0.8.10-amf-include.patch
171 +
172 + # Fix new adjacent_tokens_only() in >=boost-1.59 (bug 579142)
173 + # See https://savannah.gnu.org/bugs/?46148
174 + eapply "${FILESDIR}"/${PN}-0.8.10_p20150316-boost-1.60.patch
175 +
176 + eautoreconf
177 +}
178 +src_configure() {
179 + local device gui input media myconf myext renderers
180 +
181 + # Set nsplugin install directory.
182 + use nsplugin && myconf="${myconf} --with-npapi-plugindir=/usr/$(get_libdir)/gnash/npapi/"
183 +
184 + # Set hardware acceleration.
185 + use X && device+=",x11"
186 + use directfb && device+=",directfb"
187 + use egl && device+=",egl"
188 + use fbcon && device+=",rawfb"
189 + use vaapi && device+=",vaapi"
190 + [[ "${device}x" == "x" ]] && device+=",none"
191 +
192 + # Set rendering engine.
193 + use agg && renderers+=",agg"
194 + use cairo && renderers+=",cairo"
195 + use opengl && renderers+=",opengl"
196 + use openvg && renderers+=",openvg"
197 +
198 + # Set kde and konqueror plugin directories.
199 + if use kde; then
200 + myconf="${myconf}
201 + --with-plugins-install=system
202 + --with-kde4-incl=${KDEDIR}/include
203 + --with-kde4-configdir=${KDEDIR}/share/config
204 + --with-kde4-prefix=${KDEDIR}
205 + --with-kde4-lib=${KDEDIR}/$(get_libdir)
206 + --with-kde-appsdatadir=${KDEDIR}/share/apps/klash
207 + --with-kde4-servicesdir=${KDEDIR}/share/kde4/services
208 + --with-kde4-plugindir=${KDEDIR}/$(get_libdir)/kde4"
209 + fi
210 +
211 + # Set media handler.
212 + use ffmpeg || media+=",none"
213 + use ffmpeg && media+=",ffmpeg"
214 +
215 + # Set gui.
216 + use dump && gui+=",dump"
217 + use fbcon && gui+=",fb"
218 + use gtk && gui+=",gtk"
219 + use kde && gui+=",kde4"
220 + use sdl && gui+=",sdl"
221 +
222 + if use sdl-sound; then
223 + myconf="${myconf} --enable-sound=sdl"
224 + else
225 + myconf="${myconf} --enable-sound=none"
226 + fi
227 +
228 + # Set extensions
229 + use mysql && myext=",mysql"
230 + use gtk && myext="${myext},gtk"
231 + use lirc && myext="${myext},lirc"
232 + use dbus && myext="${myext},dbus"
233 +
234 + # Strip extra comma from gui, myext, hwaccel and renderers.
235 + device=$( echo $device | sed -e 's/,//' )
236 + gui=$( echo $gui | sed -e 's/^,//' )
237 + myext=$( echo $myext | sed -e 's/,//' )
238 + renderers=$( echo $renderers | sed -e 's/,//' )
239 + media=$( echo $media | sed -e 's/,//' )
240 +
241 + econf \
242 + --disable-kparts3 \
243 + --without-gconf \
244 + $(use_enable cygnal) \
245 + $(use_enable cygnal cgibins) \
246 + $(use_enable doc docbook) \
247 + $(use_enable gnome ghelp) \
248 + $(use_enable harden) \
249 + $(use_enable jemalloc) \
250 + $(use_enable kde kparts4) \
251 + $(use_enable nls) \
252 + $(use_enable nsplugin npapi) \
253 + $(use_enable python) \
254 + $(use_enable ssh) \
255 + $(use_enable ssl) \
256 + $(use_enable test testsuite) \
257 + --enable-gui=${gui} \
258 + --enable-device=${device} \
259 + --enable-extensions=${myext} \
260 + --enable-renderer=${renderers} \
261 + --enable-media=${media} \
262 + ${myconf}
263 +}
264 +src_test() {
265 + local log=testsuite-results.txt
266 + cd testsuite
267 + emake check || die "make check failed"
268 + ./anaylse-results.sh > $log || die "results analyze failed"
269 + cat $log
270 +}
271 +src_install() {
272 + emake DESTDIR="${D}" install || die "emake install failed"
273 +
274 + # Install nsplugin in directory set by --with-npapi-plugindir.
275 + if use nsplugin; then
276 + emake DESTDIR="${D}" install-plugin || die "install plugins failed"
277 + fi
278 +
279 + # Install kde konqueror plugin.
280 + if use kde; then
281 + pushd "${S}/plugin/klash4" >& /dev/null || die
282 + emake DESTDIR="${D}" install-plugin || die "install kde plugins failed"
283 + popd >& /dev/null
284 + fi
285 + # Create a symlink in /usr/$(get_libdir)/nsbrowser/plugins to the nsplugin install directory.
286 + use nsplugin && inst_plugin /usr/$(get_libdir)/gnash/npapi/libgnashplugin.so
287 +
288 + # Remove eglinfo, bug #463654
289 + if use egl; then
290 + rm -f "${D}"/usr/bin/eglinfo || die
291 + fi
292 +
293 + einstalldocs
294 +}
295 +pkg_postinst() {
296 + if use !gnome || use !ffmpeg ; then
297 + ewarn ""
298 + ewarn "Gnash was built without a media handler and or http handler !"
299 + ewarn ""
300 + ewarn "If you want Gnash to support video then you will need to"
301 + ewarn "rebuild Gnash with the ffmpeg and gnome use flags set."
302 + ewarn ""
303 + fi
304 + ewarn "${PN} is still in heavy development"
305 + ewarn "Please first report bugs on upstream gnashdevs and deal with them"
306 + ewarn "And then report a Gentoo bug to the maintainer"
307 + use kde && kde4-base_pkg_postinst
308 +}