/[gentoo-x86]/net-www/gnash/gnash-0.8.3.ebuild
Gentoo

Contents of /net-www/gnash/gnash-0.8.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sat Dec 13 16:37:03 2008 UTC (10 years, 10 months ago) by loki_val
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
Dropped old ebuilds per ssuominen's request on -dev ml, since they do not build with next stable ffmpeg.
(Portage version: 2.2_rc17/cvs/Linux 2.6.28-rc6 x86_64)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-www/gnash/gnash-0.8.3.ebuild,v 1.7 2008/10/19 11:49:10 loki_val Exp $
4
5 EAPI=1
6
7 inherit autotools nsplugins kde-functions qt3 multilib
8
9 set-kdedir 3.5
10
11 DESCRIPTION="Gnash is a GNU Flash movie player that supports many SWF v7 features"
12 HOMEPAGE="http://www.gnu.org/software/gnash"
13 SRC_URI="mirror://gnu/${PN}/${PV}/${P}.tar.bz2"
14
15 LICENSE="GPL-3"
16 SLOT="0"
17 KEYWORDS="~amd64 ~ppc ~x86"
18 IUSE="+agg -cairo dbus -fbcon -ffmpeg +gstreamer +gtk +kde +nsplugin -opengl -qt3 -sdl test video_cards_i810"
19
20 RDEPEND="
21 agg? ( >=x11-libs/agg-2.5 )
22 opengl? (
23 !agg? (
24 virtual/opengl
25 gtk? ( x11-libs/gtkglext )
26 )
27 )
28 cairo? (
29 !opengl? (
30 !agg? (
31 x11-libs/cairo
32 )
33 )
34 )
35
36 !agg? ( !cairo? ( !opengl? ( >=x11-libs/agg-2.5 ) ) )
37 gtk? (
38 x11-libs/gtk+:2
39 x11-libs/pango
40 dev-libs/glib
41 dev-libs/atk
42 )
43 kde? ( kde-base/kdelibs:3.5 )
44 qt3? ( x11-libs/qt:3 )
45 sdl? ( media-libs/libsdl )
46 !gtk? ( !kde? ( !qt3? ( !sdl? ( !fbcon? (
47 x11-libs/gtk+:2
48 x11-libs/pango
49 dev-libs/glib
50 dev-libs/atk
51 kde-base/kdelibs:3.5
52 ) ) ) ) )
53 dev-libs/libxml2
54 sys-libs/zlib
55 media-libs/jpeg
56 media-libs/libpng
57 net-misc/curl
58
59 ffmpeg? (
60 !gstreamer? (
61 media-libs/libsdl
62 =media-video/ffmpeg-0.4.9_p20080326
63 )
64 )
65
66 gstreamer? (
67 media-plugins/gst-plugins-ffmpeg
68 media-plugins/gst-plugins-mad
69 )
70 >=dev-libs/boost-1.35.0
71 x11-libs/libX11
72 x11-libs/libXi
73 x11-libs/libXmu
74 x11-libs/libXt
75 x11-proto/xproto
76 dbus? ( sys-apps/dbus )
77 sys-devel/libtool
78 "
79 DEPEND="${RDEPEND}
80 dev-util/pkgconfig
81 test? ( dev-util/dejagnu
82 media-gfx/swftools
83 >=media-libs/ming-0.4.0_beta5 )"
84
85 pkg_setup() {
86 if use !gtk && use !kde && use !fbcon && use !qt3
87 then
88 einfo "No Graphical User Interface selected. Enabling kde and gtk"
89 einfo "since they are the defaults."
90 export defaultguis=1
91 fi
92
93 if use !agg && use !opengl && use cairo && use kde
94 then
95 eerror "The cairo renderer and the kde gui were selected"
96 eerror "They are incompatible with each other"
97 eerror "Disable one of them through the respective USE flag"
98 die "cairo and kde USE flags enabled at the same time"
99 fi
100
101 if use !agg && use opengl && use fbcon
102 then
103 eerror "The opengl renderer and the fbcon gui were selected"
104 eerror "They are incompatible with each other"
105 eerror "Disable one of them through the respective USE flag"
106 die "opengl and fbcon USE flags enabled at the same time"
107 fi
108
109 if use nsplugin && use !gtk && [ -z ${defaultguis} ]
110 then
111 eerror "The Firefox plugin was selected but not the GTK frontend."
112 eerror "Disable the nsplugin USE flag or enable the gtk USE flag"
113 die "nsplugin USE flag enabled with required gtk USE flag disabled"
114 fi
115
116 if use ffmpeg && use gstreamer
117 then
118 einfo "Only 1 audio output source can be compiled into ${PN}."
119 einfo "Selecting gstreamer, since that's upstream default."
120 einfo "To enable ffmpeg you must also disable gstreamer."
121 fi
122
123 if use agg
124 then
125 if use opengl || use cairo
126 then
127 einfo "Only 1 renderer can be activated at any one time."
128 einfo "If more than one renderer is activated, the order of preference is:"
129 einfo "agg > opengl > cairo"
130 fi
131 else
132 if use !opengl && use !cairo
133 then
134 einfo "No renderer selected from agg, opengl, cairo"
135 einfo "Default renderer agg selected."
136 fi
137 fi
138
139 if use !ffmpeg && use !gstreamer
140 then
141 ewarn "You did not select any media: ffmpeg gstreamer"
142 ewarn "You will not have sound!"
143 fi
144
145 }
146
147 src_unpack() {
148 unpack ${A}
149 cd "${S}"
150 sed -i \
151 -e 's,config.h,gnashconfig.h,' \
152 ./extensions/dbus/dbus_ext.h || die
153 epatch "${FILESDIR}"/${P}-boost-dynamic-link.patch
154 epatch "${FILESDIR}"/${P}-libtool-2.2.patch
155 eautoreconf
156 }
157
158 src_compile() {
159 local myconf
160
161 if use nsplugin ; then
162 myconf="${myconf} --enable-nsapi --with-npapi-plugindir=/opt/netscape/plugins"
163 else
164 myconf="${myconf} --disable-nsapi"
165 fi
166
167 #Select renderer.
168 if use agg ; then
169 myconf="${myconf} --enable-renderer=agg"
170 elif use opengl ; then
171 myconf="${myconf} --enable-renderer=ogl"
172 elif use cairo ; then
173 myconf="${myconf} --enable-renderer=cairo"
174 else
175 myconf="${myconf} --enable-renderer=agg"
176 fi
177
178 #Select which Graphical User Interfaces to build.
179 local guis="" \
180 gui=""
181 for gui in fbcon-FB gtk-GTK2 kde-KDE qt3-QT sdl-SDL
182 do
183 use ${gui/-*} && guis="${guis},${gui/*-}"
184 done
185 guis=${guis#,}
186 if [ -z "${guis}" ]
187 then
188 guis="GTK2,KDE"
189 fi
190
191 #Select which extensions to build.
192 local extensions="FILEIO" \
193 extension=""
194 for extension in dbus-DBUS gtk-GTK2 test-DEJAGNU
195 do
196 use ${extension%-*} && extensions="${extensions},${extension#*-}"
197 done
198
199 #Select audio output extension.
200 if use gstreamer
201 then
202 myconf="${myconf} --enable-media=gst"
203 elif use ffmpeg
204 then
205 myconf="${myconf} --enable-media=ffmpeg"
206 else
207 myconf="${myconf} --enable-media=none"
208 fi
209
210 econf \
211 $(use_enable video_cards_i810 i810-lod-bias) \
212 --enable-gui=${guis} \
213 --with-extensions=${extensions} \
214 --with-ffmpeg-incl=/usr/include \
215 --with-kde-pluginprefix=${KDEDIR} \
216 --without-included-ltdl \
217 --with-ltdl-include=/usr/include \
218 --with-ltdl-lib=/usr/lib \
219 ${myconf} \
220 || die "econf failed"
221 emake || die "emake failed"
222 }
223
224 src_test() {
225 cd testsuite
226 make check || die "make check failed"
227 ./anaylse-results.sh > TESTRESULTS.txt
228 cat TESTRESULTS.txt
229 }
230
231 src_install() {
232 emake DESTDIR="${D}" install || die "emake install failed"
233
234 if use nsplugin
235 then
236 emake DESTDIR="${D}" install-plugin \
237 || die "emake install-plugin failed"
238 inst_plugin /opt/netscape/plugins/libgnashplugin.so
239 else
240 rm -rf "${D}/opt"
241 fi
242
243 if use kde
244 then
245 pushd plugin/klash &> /dev/null
246 make DESTDIR="${D}" install-plugin
247 popd &> /dev/null
248 fi
249
250 use test && dodoc testsuite/TESTRESULTS.txt
251
252 dodoc AUTHORS ChangeLog* NEWS README
253 }
254
255 pkg_postinst() {
256 ewarn "BETA"
257 ewarn "gnash is still in heavy development"
258 ewarn "please report gnash bugs upstream to the gnash devs"
259 if use test
260 then
261 ewarn "Test results can be found in /usr/share/doc/${PF}/TESTRESULTS.txt"
262 ewarn "Currently \"acceptable\" failing tests:"
263 ewarn "Unexpected failures follow:"
264 ewarn " --=[ ./actionscript.all ]=--"
265 ewarn "FAIL: astests-v5-Runner: expected: 584 obtained: 64 [./Date.as:549]"
266 ewarn "FAIL: astests-v5-Runner: expected: 0 obtained: 8 [./Date.as:550]"
267 ewarn "FAIL: astests-v5-Runner: expected: 4 obtained: 45 [./Date.as:551]"
268 ewarn "FAIL: astests-v6-Runner: expected: 584 obtained: 64 [./Date.as:549]"
269 ewarn "FAIL: astests-v6-Runner: expected: 0 obtained: 8 [./Date.as:550]"
270 ewarn "FAIL: astests-v6-Runner: expected: 4 obtained: 45 [./Date.as:551]"
271 ewarn "FAIL: astests-v7-Runner: expected: 584 obtained: 64 [./Date.as:549]"
272 ewarn "FAIL: astests-v7-Runner: expected: 0 obtained: 8 [./Date.as:550]"
273 ewarn "FAIL: astests-v7-Runner: expected: 4 obtained: 45 [./Date.as:551]"
274 ewarn "FAIL: astests-v8-Runner: expected: 584 obtained: 64 [./Date.as:549]"
275 ewarn "FAIL: astests-v8-Runner: expected: 0 obtained: 8 [./Date.as:550]"
276 ewarn "FAIL: astests-v8-Runner: expected: 4 obtained: 45 [./Date.as:551]"
277 fi
278 }

  ViewVC Help
Powered by ViewVC 1.1.20