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