1 ###############################################################################
2 # vlc.ebuild: A Gentoo ebuild for vlc
3 ###############################################################################
4 # Copyright (C) 2003 VideoLAN
5 # $Id: vlc.ebuild,v 1.19 2003/08/24 08:12:01 hartman Exp $
7 # Authors: Derk-Jan Hartman <thedj at users.sf.net>
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 # Instructions: http://wiki.videolan.org/index.php/Linux%20Gentoo
24 # Some of the ideas in this ebuild are derived from the official Gentoo ebuild
25 # Thanks to the Gentoo Team for supporting us.
26 ###############################################################################
28 # Missing support for...
29 # tarkin - package not in portage yet - experimental
30 # theora - package not in portage yet - experimental
31 # tremor - package not in portage yet - experimental
33 IUSE
="arts ncurses dvd gtk nls 3dfx svga fbcon esd X alsa ggi
34 oggvorbis gnome xv oss sdl aalib slp truetype v4l xvid lirc
35 wxwindows imlib matroska dvb mozilla debug faad xosd altivec"
37 # Change these to correspond with the
38 # unpacked dirnames of the CVS snapshots.
39 PFFMPEG
=ffmpeg-20030813
40 PLIBMPEG2
=mpeg2dec-20030612
43 SFFMPEG
=${WORKDIR}/${PFFMPEG}
44 SLIBMPEG2
=${WORKDIR}/${PLIBMPEG2}
46 DESCRIPTION
="VLC media player - Video player and streamer"
47 SRC_URI
="http://www.videolan.org/pub/${PN}/${PV}/${P}.tar.bz2
48 http://www.videolan.org/pub/${PN}/${PV}/contrib/mpeg2dec-20030612.tar.bz2
49 http://www.videolan.org/pub/${PN}/${PV}/contrib/ffmpeg-20030813.tar.bz2"
51 HOMEPAGE
="http://www.videolan.org/vlc"
55 KEYWORDS
="~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~amd64"
57 DEPEND
="X? ( virtual/x11 )
58 aalib? ( >=media-libs/aalib-1.4_rc4-r2 )
59 alsa? ( >=media-libs/alsa-lib-0.9_rc2 )
60 dvb? ( media-libs/libdvb
61 media-tv/linuxtv-dvb )
62 dvd? ( >=media-libs/libdvdread-0.9.3
63 >=media-libs/libdvdcss-1.2.8
64 >=media-libs/libdvdplay-1.0.1 )
65 esd? ( >=media-sound/esound-0.2.22 )
66 faad? ( >=media-libs/faad2-1.1 )
67 ggi? ( >=media-libs/libggi-2.0_beta3 )
68 gnome? ( >=gnome-base/gnome-libs-1.4.1.2-r1 )
69 gtk? ( =x11-libs/gtk+-1.2* )
70 imlib? ( >=media-libs/imlib2-1.0.6 )
71 lirc? ( app-misc/lirc )
72 mad? ( media-libs/libmad
73 media-libs/libid3tag )
74 matroska? ( >=media-libs/libmatroska-0.4.4 )
75 mozilla? ( >=net-www/mozilla-1.4 )
76 ncurses? ( sys-libs/ncurses )
77 nls? ( sys-devel/gettext )
78 oggvorbis? ( >=media-libs/libvorbis-1.0
79 >=media-libs/libogg-1.0 )
80 sdl? ( >=media-libs/libsdl-1.2.5 )
81 slp? ( >=net-libs/openslp-1.0.10 )
82 truetype? ( >=media-libs/freetype-2.1.4 )
83 wxwindows? ( >=x11-libs/wxGTK-2.4.1 )
84 xosd? ( >=x11-libs/xosd-2.0 )
85 xvid? ( >=media-libs/xvid-0.9.1 )
86 3dfx? ( media-libs/glide-v3 )
87 >=media-sound/lame-3.93.1
88 >=media-libs/libdvbpsi-0.1.3
89 >=media-libs/a52dec-0.7.4
90 >=media-libs/flac-1.1.0"
99 # Change the location of the glide headers
101 sed -i -e "s:/usr/include/glide:/usr/include/glide3:" configure
102 sed -i -e "s:glide2x:glide3:" configure
103 cd ${S}/modules
/video_output
104 epatch
${FILESDIR}/glide.
patch
109 sed -i -e 's:OPT_CFLAGS=\"$CFLAGS -mcpu=.*\":OPT_CFLAGS=\"$CFLAGS\":g' configure
114 # configure and building of libmpeg2
116 econf
--disable-sdl --without-x \
117 || die
"./configure of libmpeg2 failed"
119 emake ||
make || die
"make of libmpeg2 failed"
121 # configure and building of ffmpeg
124 use mmx || myconf
="--disable-mmx"
126 .
/configure
${myconf} \
128 --disable-vorbis || die
"./configure of ffmpeg failed"
131 make || die
"make of libpostproc failed"
133 make || die
"make of libavcodec failed"
135 # Configure and build VLC
138 # Avoid timestamp skews with autotools
143 touch `find . -name Makefile.in`
146 myconf
="--disable-mga --enable-flac --with-gnu-ld"
148 #--enable-pth GNU Pth support (default disabled)
149 #--enable-st State Threads (default disabled)
150 #--enable-gprof gprof profiling (default disabled)
151 #--enable-cprof cprof profiling (default disabled)
152 #--enable-mostly-builtin most modules will be built-in (default enabled)
153 #--disable-optimizations disable compiler optimizations (default disabled)
154 #--enable-testsuite build test modules (default disabled)
155 #--disable-plugins make all plugins built-in (default disabled)
157 use nls || myconf
="${myconf} --disable-nls"
159 use debug
&& myconf
="${myconf} --enable-debug" \
160 || myconf
="${myconf} --enable-release"
163 && myconf
="${myconf} --enable-dvdread" \
164 || myconf
="${myconf} \
170 use v4l
&& myconf
="${myconf} --enable-v4l"
172 use dvb
&& myconf
="${myconf} --enable-satellite --enable-pvr --enable-dvb"
174 use oggvorbis || myconf
="${myconf} --disable-vorbis --disable-ogg"
176 use matroska || myconf
="${myconf} --disable-mkv"
178 use mad || myconf
="${myconf} --disable-mad"
180 use faad
&& myconf
="${myconf} --enable-faad"
182 use xvid
&& myconf
="${myconf} --enable-xvid"
184 use X || myconf
="${myconf} --disable-x11"
186 use xv || myconf
="${myconf} --disable-xvideo"
188 use sdl || myconf
="${myconf} --disable-sdl"
190 use truetype || myconf
="${myconf} --disable-freetype"
192 use fbcon || myconf
="${myconf} --disable-fb"
194 use svga
&& myconf
="${myconf} --enable-svgalib"
196 use ggi
&& myconf
="${myconf} --enable-ggi"
198 use
3dfx
&& myconf
="${myconf} --enable-glide"
200 use aalib
&& myconf
="${myconf} --enable-aa"
202 use oss || myconf
="${myconf} --disable-oss"
204 use esd
&& myconf
="${myconf} --enable-esd"
206 use arts
&& myconf
="${myconf} --enable-arts"
208 use alsa
&& myconf
="${myconf} --enable-alsa"
210 (use imlib
&& use wxwindows
) && myconf
="${myconf} --enable-skins"
212 use gtk || myconf
="${myconf} --disable-gtk"
214 use gnome
&& myconf
="${myconf} --enable-gnome"
216 use ncurses
&& myconf
="${myconf} --enable-ncurses"
218 use xosd
&& myconf
="${myconf} --enable-xosd"
220 use slp || myconf
="${myconf} --disable-slp"
222 use lirc
&& myconf
="${myconf} --enable-lirc"
224 use joystick
&& myconf
="${myconf} --enable-joystick"
227 myconf
="${myconf} --enable-mozilla \
228 MOZILLA_CONFIG=/usr/lib/mozilla/mozilla-config \
229 XPIDL=/usr/bin/xpidl"
231 use altivec || myconf
="${myconf} --disable-altivec"
233 # vlc uses its own ultraoptimizaed CXXFLAGS
234 # and forcing custom ones generally fails building
237 export WANT_AUTOCONF_2_5
=1
238 export WANT_AUTOMAKE_1_6
=1
240 myconf
="${myconf} --enable-ffmpeg --with-ffmpeg-tree=${SFFMPEG} \
241 --with-ffmpeg-mp3lame \
242 --enable-libmpeg2 --with-libmpeg2-tree=${SLIBMPEG2} \
247 econf
${myconf} || die
"configure of VLC failed"
249 if [ `gcc-major-version` -eq 2 ]; then
250 sed -i s
:"-fomit-frame-pointer":: vlc-config
253 # parallel make doesn't work with our complicated makefile
254 # this is also the reason as why you shouldn't run autoconf
255 # or automake yourself. (or bootstrap for that matter)
256 MAKEOPTS
="${MAKEOPTS} -j1"
257 emake || die
"make of VLC failed"
262 einstall || die
"make install failed"
264 dodoc ABOUT-NLS AUTHORS COPYING ChangeLog HACKING INSTALL
* \
265 MAINTAINERS NEWS README
* THANKS
doc
/ChangeLog-
*