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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Fri Apr 10 21:08:08 2009 UTC (10 years, 6 months ago) by ulm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Package moved from net-www to www-plugins, bug 265569.

1 # Copyright 1999-2009 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.4.ebuild,v 1.5 2009/04/06 17:09:53 bluebird 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 ~sparc ~x86"
18 IUSE="+agg -cairo dbus -fbcon -ffmpeg +gstreamer +gtk +kde +nsplugin -opengl -qt3 -sdl 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/giflib
57 media-libs/libpng
58 net-misc/curl
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
82 #Tests currently not functional. Compilation fails. Use youtube instead.
83 RESTRICT="test"
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 epatch "${FILESDIR}"/${PN}-0.8.3-boost-dynamic-link.patch
151 if has_version '<sys-devel/libtool-2'
152 then
153 sed -i \
154 -e 's:libltdl.*Makefile::' configure.ac \
155 || die "Sedding configure.ac failed."
156 fi
157 eautoreconf
158 }
159
160 src_compile() {
161 local myconf
162
163 if use nsplugin ; then
164 myconf="${myconf} --enable-npapi --with-npapi-plugindir=/opt/netscape/plugins"
165 else
166 myconf="${myconf} --disable-npapi"
167 fi
168
169 #Select renderer.
170 if use agg ; then
171 myconf="${myconf} --enable-renderer=agg"
172 elif use opengl ; then
173 myconf="${myconf} --enable-renderer=ogl"
174 elif use cairo ; then
175 myconf="${myconf} --enable-renderer=cairo"
176 else
177 myconf="${myconf} --enable-renderer=agg"
178 fi
179
180 #Select which Graphical User Interfaces to build.
181 local guis="" \
182 gui=""
183 for gui in fbcon-FB gtk-GTK2 kde-KDE qt3-QT sdl-SDL
184 do
185 use ${gui/-*} && guis="${guis},${gui/*-}"
186 done
187 guis=${guis#,}
188 if [ -z "${guis}" ]
189 then
190 guis="GTK2,KDE"
191 fi
192
193 #Select which extensions to build.
194 local extensions="FILEIO" \
195 extension=""
196 for extension in dbus-DBUS gtk-GTK2
197 do
198 use ${extension%-*} && extensions="${extensions},${extension#*-}"
199 done
200
201 #Select audio output extension.
202 if use gstreamer
203 then
204 myconf="${myconf} --enable-media=gst"
205 elif use ffmpeg
206 then
207 myconf="${myconf} --enable-media=ffmpeg"
208 else
209 myconf="${myconf} --enable-media=none"
210 fi
211
212 econf \
213 $(use_enable video_cards_i810 i810-lod-bias) \
214 --disable-testsuite \
215 --enable-shared \
216 --disable-allstatic \
217 --enable-sdkinstall \
218 --enable-gui=${guis} \
219 --enable-extensions=${extensions} \
220 --with-ffmpeg-incl=/usr/include \
221 --with-kde-pluginprefix=${KDEDIR} \
222 --without-included-ltdl \
223 --with-ltdl-include=/usr/include \
224 --with-ltdl-lib=/usr/$(get_libdir) \
225 --with-plugins-install=system \
226 ${myconf} \
227 || die "econf failed"
228 emake || die "emake failed"
229 }
230
231 src_test() {
232 cd testsuite
233 make check || die "make check failed"
234 ./anaylse-results.sh > TESTRESULTS.txt
235 cat TESTRESULTS.txt
236 }
237
238 src_install() {
239 emake DESTDIR="${D}" install || die "emake install failed"
240
241 if use nsplugin
242 then
243 emake DESTDIR="${D}" install-plugin \
244 || die "emake install-plugin failed"
245 inst_plugin /opt/netscape/plugins/libgnashplugin.so
246 else
247 rm -rf "${D}/opt"
248 fi
249
250 if use kde
251 then
252 pushd plugin/klash &> /dev/null
253 make DESTDIR="${D}" install-plugin
254 popd &> /dev/null
255 fi
256
257 dodoc AUTHORS ChangeLog* NEWS README
258
259 }
260
261 pkg_postinst() {
262 ewarn "BETA"
263 ewarn "gnash is still in heavy development"
264 ewarn "please report gnash bugs upstream to the gnash devs"
265 }

  ViewVC Help
Powered by ViewVC 1.1.20