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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Jan 19 17:20:15 2008 UTC (11 years, 9 months ago) by genstef
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
remove old, dont offer fltk because we do not have fltk2, bug 205408
(Portage version: 2.1.4)

1 # Copyright 1999-2007 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.1.ebuild,v 1.1 2007/11/21 09:19:53 uid895 Exp $
4
5 inherit nsplugins kde-functions qt3 multilib
6 set-kdedir eutils
7
8 DESCRIPTION="Gnash is a GNU Flash movie player that supports many SWF v7 features"
9 HOMEPAGE="http://www.gnu.org/software/gnash"
10 SRC_URI="mirror://gnu/${PN}/${PV}/${P}.tar.bz2"
11
12 LICENSE="GPL-3"
13 SLOT="0"
14 KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-fbsd"
15 IUSE="agg opengl cairo gtk kde nsplugin gstreamer ffmpeg video_cards_i810"
16
17 RDEPEND="
18 agg? ( >=x11-libs/agg-2.5 )
19 cairo? ( x11-libs/cairo )
20 opengl? (
21 virtual/opengl
22 gtk? (
23 x11-libs/gtkglext
24 )
25 )
26 gtk? (
27 >x11-libs/gtk+-2
28 x11-libs/pango
29 dev-libs/glib
30 dev-libs/atk
31 )
32 kde? ( kde-base/kdelibs )
33 dev-libs/libxml2
34 sys-libs/zlib
35 media-libs/jpeg
36 media-libs/libpng
37 net-misc/curl
38 ffmpeg? (
39 media-libs/libsdl
40 media-video/ffmpeg
41 )
42 gstreamer? (
43 media-plugins/gst-plugins-ffmpeg
44 media-plugins/gst-plugins-mad
45 )
46 dev-libs/boost
47 x11-libs/libX11
48 x11-libs/libXi
49 x11-libs/libXmu
50 x11-libs/libXt
51 x11-proto/xproto
52 "
53
54 DEPEND="${RDEPEND}
55 dev-util/pkgconfig"
56
57 pkg_setup() {
58 if ! ( use agg || use opengl || use cairo ); then
59 eerror "No renderer was selected. Select one between AGG, OpenGL and cairo"
60 eerror "They correspond to the agg, opengl and cairo USE flags"
61 eerror "AGG is upstream's default, so it is probably a safe choice"
62 die "None of the opengl, agg and cairo USE flags enabled"
63
64 elif use agg && use opengl || use cairo && ( use agg || use opengl ); then
65 eerror "More than one renderer was selected"
66 eerror "Please select only one renderer between AGG, OpenGL and cairo"
67 eerror "They correspond to the agg, opengl and cairo USE flags"
68 eerror "AGG is upstream's default, so it is probably a safe choice"
69 die "More than one USE flag enabled between opengl, agg and cairo"
70 fi
71
72 if use cairo && use kde; then
73 eerror "The cairo renderer and the kde gui were selected"
74 eerror "They are incompatible with each other"
75 eerror "Disable one of them through the respective USE flag"
76 die "cairo and kde USE flags enabled at the same time"
77 fi
78
79 if has_version '<dev-libs/boost-1.34' && ! built_with_use dev-libs/boost threads; then
80 eerror "dev-libs/boost must have been built with the 'threads' USE flag enabled"
81 die "dev-libs/boost not built with threads USE flag enabled"
82 fi
83
84 if use !ffmpeg && use !gstreamer; then
85 eerror "No media handler was selected. Select one between FFmpeg and GStreamer"
86 eerror "Enable one (and only one) of the ffmpeg and gstreamer USE flags"
87 die "ffmpeg and gstreamer USE flags both disabled: no media handler selected"
88
89 elif use ffmpeg && use gstreamer; then
90 eerror "Both FFmpeg and GStreamer media handlers were selected"
91 eerror "One, and only one, of the ffmpeg and gstreamer USE flags must be enabled"
92 die "Both ffmpeg and gstreamer USE flags enabled"
93 fi
94
95 if use !kde && use !gtk; then
96 eerror "No frontend was selected"
97 eerror "At least one of the kde and gtk USE flags must be enabled"
98 die "Both kde and gtk USE flags disabled: no frontend selected"
99 fi
100
101 if use nsplugin && use !gtk; then
102 eerror "The Firefox plugin was selected but not the GTK frontend."
103 eerror "Disable the nsplugin USE flag or enable the gtk USE flag"
104 die "nsplugin USE flag enabled with required gtk USE flag disabled"
105 fi
106 }
107
108 src_compile() {
109 local myconf
110 local gui
111
112 if use nsplugin; then
113 myconf="${myconf} --with-plugindir=/opt/netscape/plugins"
114 else
115 myconf="${myconf} --disable-nsapi"
116 fi
117
118 if use !kde; then
119 myconf="${myconf} --disable-kparts"
120 fi
121
122 if use agg; then
123 myconf="${myconf} --enable-renderer=agg"
124 elif use opengl; then
125 myconf="${myconf} --enable-renderer=ogl"
126 else
127 myconf="${myconf} --enable-renderer=cairo"
128 fi
129
130 if use gtk; then
131 if use kde; then
132 gui="gtk,kde";
133 else
134 gui=gtk
135 fi
136 else
137 gui=kde
138 fi
139
140 if use gstreamer; then
141 myconf="${myconf} --enable-media=gst"
142 else
143 myconf="${myconf} --enable-media=ffmpeg"
144 fi
145
146 econf ${myconf} \
147 $(use_enable video_cards_i810 i810-lod-bias) \
148 --enable-gui=${gui} \
149 || die "econf failed"
150 emake || die "emake failed"
151 }
152
153 src_install() {
154 emake DESTDIR="${D}" install || die "emake install failed"
155 use nsplugin && inst_plugin /opt/netscape/plugins/libgnashplugin.so \
156 || rm -rf "${D}/opt"
157 dodoc AUTHORS ChangeLog NEWS README
158 }
159
160 pkg_postinst() {
161 ewarn "ALPHA"
162 ewarn "gnash is still in heavy development"
163 ewarn "please report gnash bugs upstream to the gnash devs"
164 }

  ViewVC Help
Powered by ViewVC 1.1.20