* modules/codec/ffmpeg: fixed a couple of corner cases during initialization.
[vlc.git] / vlc.ebuild
bloba66e5b7f6b8a32bf61a77173c0716aa5253e8bad
1 ###############################################################################
2 # vlc.ebuild: A Gentoo ebuild for vlc
3 ###############################################################################
4 # Copyright (C) 2003-2004 VideoLAN
5 # $Id$
7 # Authors: Derk-Jan Hartman <hartman at videolan dot org>
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 ###############################################################################
23 # Some of the ideas in this ebuild are derived from the official Gentoo ebuild
24 # Thanks to the Gentoo Team for supporting us.
25 ###############################################################################
27 inherit libtool gcc eutils
29 # Missing support for...
30 # tarkin - package not in portage yet - experimental
31 # theora - package not in portage yet - experimental
32 # tremor - package not in portage yet - experimental
34 IUSE="arts ncurses dvd gtk nls 3dfx svga fbcon esd X alsa ggi speex
35 oggvorbis gnome xv oss sdl aalib slp bidi truetype v4l lirc
36 wxwindows imlib matroska dvb mozilla debug faad
37 xosd altivec png dts"
39 S=${WORKDIR}/${P}
41 DESCRIPTION="VLC media player - Video player and streamer"
42 SRC_URI="http://download.videolan.org/pub/${PN}/${PV}/${P}.tar.bz2"
44 HOMEPAGE="http://www.videolan.org/vlc"
46 SLOT="0"
47 LICENSE="GPL-2"
48 KEYWORDS="~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~amd64 ~ia64 ~ppc64"
50 RDEPEND="X? ( virtual/x11 )
51 aalib? ( >=media-libs/aalib-1.4_rc4-r2
52 >=media-libs/libcaca-0.9 )
53 alsa? ( >=media-libs/alsa-lib-0.9_rc2 )
54 dvb? ( media-libs/libdvb
55 media-tv/linuxtv-dvb )
56 dvd? ( >=media-libs/libdvdread-0.9.4
57 >=media-libs/libdvdcss-1.2.8
58 >=media-libs/libdvdnav-0.1.9
59 >=media-libs/libdvdplay-1.0.1 )
60 esd? ( >=media-sound/esound-0.2.22 )
61 faad? ( >=media-libs/faad2-2.0 )
62 ggi? ( >=media-libs/libggi-2.0_beta3 )
63 gnome? ( >=gnome-base/gnome-libs-1.4.1.2-r1 )
64 gtk? ( =x11-libs/gtk+-1.2* )
65 imlib? ( >=media-libs/imlib2-1.0.6 )
66 lirc? ( app-misc/lirc )
67 mad? ( media-libs/libmad
68 media-libs/libid3tag )
69 matroska? ( >=media-libs/libmatroska-0.7.0 )
70 mozilla? ( >=net-www/mozilla-1.5 )
71 ncurses? ( sys-libs/ncurses )
72 nls? ( >=sys-devel/gettext-0.12.1 )
73 oggvorbis? ( >=media-libs/libvorbis-1.0.1
74 >=media-libs/libogg-1.1 )
75 sdl? ( >=media-libs/libsdl-1.2.5 )
76 slp? ( >=net-libs/openslp-1.0.10 )
77 bidi? ( >=dev-libs/fribidi-0.10.4 )
78 truetype? ( >=media-libs/freetype-2.1.4 )
79 wxwindows? ( >=x11-libs/wxGTK-2.4.2 )
80 xosd? ( >=x11-libs/xosd-2.0 )
81 3dfx? ( media-libs/glide-v3 )
82 png? ( >=media-libs/libpng-1.2.5 )
83 speex? ( >=media-libs/speex-1.1.5 )
84 dts? ( >=media-libs/libdts-0.0.2 )
85 svga? ( media-libs/svgalib )
86 >=media-sound/lame-3.93.1
87 >=media-libs/libdvbpsi-0.1.3
88 >=media-libs/a52dec-0.7.4
89 >=media-libs/libmpeg2-0.4.0
90 >=media-video/ffmpeg-0.4.8.20040222
91 >=media-plugins/live-2004.03.05
92 >=media-libs/flac-1.1.0"
94 DEPEND="$RDEPEND >=sys-devel/autoconf-2.5.8"
96 src_unpack() {
98 unpack ${A}
100 # Change the location of the glide headers
101 cd ${S}
102 sed -i \
103 -e "s:/usr/include/glide:/usr/include/glide3:" \
104 -e "s:glide2x:glide3:" \
105 configure
107 cd ${S}/modules/video_output
108 epatch ${FILESDIR}/glide.patch
109 cd ${S}
113 src_compile(){
114 # Configure and build VLC
115 cd ${S}
116 local myconf
117 myconf="--disable-mga --enable-flac --with-gnu-ld \
118 --enable-a52 --enable-dvbpsi --enable-libmpeg2 \
119 --disable-qt --disable-kde --disable-gnome --disable-gtk \
120 --disable-libcdio --disable-libcddb --disable-vcdx \
121 --enable-ffmpeg --with-ffmpeg-mp3lame \
122 --enable-livedotcom --with-livedotcom-tree=/usr/lib/live"
124 # qt, kde, gnome and gtk interfaces are deprecated and in a bad condition
125 # the same for mga video, libdv and xvid decoders
126 # cddax and vcdx (which depend on libcdio and libcddb) are not ready yet
128 #--enable-pth GNU Pth support (default disabled)
129 #--enable-st State Threads (default disabled)
130 #--enable-gprof gprof profiling (default disabled)
131 #--enable-cprof cprof profiling (default disabled)
132 #--enable-mostly-builtin most modules will be built-in (default enabled)
133 #--disable-optimizations disable compiler optimizations (default disabled)
134 #--enable-testsuite build test modules (default disabled)
135 #--disable-plugins make all plugins built-in (default plugins enabled)
137 use debug && myconf="${myconf} --enable-debug" \
138 || myconf="${myconf} --enable-release"
140 (use imlib && use wxwindows) && myconf="${myconf} --enable-skins --enable-skins2"
142 use mozilla \
143 && myconf="${myconf} --enable-mozilla \
144 MOZILLA_CONFIG=/usr/lib/mozilla/mozilla-config \
145 XPIDL=/usr/bin/xpidl"
147 # vlc uses its own ultraoptimizaed CXXFLAGS
148 # and forcing custom ones generally fails building
149 export CXXFLAGS=""
150 export CFLAGS=""
151 export WANT_AUTOCONF_2_5=1
152 export WANT_AUTOMAKE_1_6=1
154 # Avoid timestamp skews with autotools
155 touch configure.ac
156 touch aclocal.m4
157 touch configure
158 touch config.h.in
159 touch `find . -name Makefile.in`
161 econf \
162 $(use_enable nls) \
163 $(use_enable slp) \
164 $(use_enable xosd) \
165 $(use_enable ncurses) \
166 $(use_enable alsa) \
167 $(use_enable esd) \
168 $(use_enable oss) \
169 $(use_enable ggi) \
170 $(use_enable sdl) \
171 $(use_enable mad) \
172 $(use_enable faad) \
173 $(use_enable v4l) \
174 $(use_enable dvd) \
175 $(use_enable dvd vcd) \
176 $(use_enable dvdread) \
177 $(use_enable dvd dvdplay) \
178 $(use_enable dvd dvdnav) \
179 $(use_enable dvb) \
180 $(use_enable dvb pvr) \
181 $(use_enable joystick) $(use_enable lirc) \
182 $(use_enable arts) \
183 $(use_enable oggvorbis ogg) $(use_enable oggvorbis vorbis) \
184 $(use_enable speex) \
185 $(use_enable matroska mkv) \
186 $(use_enable truetype freetype) \
187 $(use_enable bidi fribidi) \
188 $(use_enable svga svgalib) \
189 $(use_enable fbcon fb) \
190 $(use_enable aalib aa) $(use_enable aalib caca) \
191 $(use_enable xv xvideo) \
192 $(use_enable X x11) \
193 $(use_enable 3dfx glide) \
194 $(use_enable altivec) \
195 $(use_enable dts) \
196 ${myconf} || die "configure of VLC failed"
198 if [[ $(gcc-major-version) == 2 ]]; then
199 sed -i -e s:"-fomit-frame-pointer":: vlc-config || die "-fomit-frame-pointer patching failed"
202 # parallel make doesn't work with our complicated makefile
203 # this is also the reason as why you shouldn't run autoconf
204 # or automake yourself. (or bootstrap for that matter)
205 MAKEOPTS="${MAKEOPTS} -j1"
206 emake || die "make of VLC failed"
209 src_install() {
211 einstall || die "make install failed"
213 dodoc ABOUT-NLS AUTHORS COPYING ChangeLog HACKING INSTALL* \
214 MAINTAINERS NEWS README* THANKS doc/ChangeLog-*