1 ###############################################################################
2 # vlc.ebuild: A Gentoo ebuild for vlc
3 ###############################################################################
4 # Copyright (C) 2003-2004 VideoLAN
5 # $Id: vlc.ebuild,v 1.25 2004/01/09 22:11:04 hartman Exp $
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 ###############################################################################
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
36 IUSE="arts ncurses dvd gtk nls 3dfx svga fbcon esd X alsa ggi speex
37 oggvorbis gnome xv oss sdl aalib slp bidi truetype v4l lirc
38 wxwindows imlib matroska dvb mozilla debug faad xosd altivec png"
40 # Change these to correspond with the
41 # unpacked dirnames of the CVS snapshots.
46 SFFM=${WORKDIR}/${PFFM}
47 SLIVE=${WORKDIR}/${PLIVE}
49 DESCRIPTION="VLC media player - Video player and streamer"
50 SRC_URI="http://download.videolan.org/pub/${PN}/${PV}/${P}.tar.bz2
51 http://download.videolan.org/pub/${PN}/${PV}/contrib/ffmpeg-20040103.tar.bz2
52 http://download.videolan.org/pub/${PN}/${PV}/contrib/live.2003.11.06.tar.gz"
54 HOMEPAGE="http://www.videolan.org/vlc"
58 KEYWORDS="~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~amd64 ~ia64 ~ppc64"
60 DEPEND="X? ( virtual/x11 )
61 aalib? ( >=media-libs/aalib-1.4_rc4-r2
62 >=media-libs/libcaca-0.2 )
63 alsa? ( >=media-libs/alsa-lib-0.9_rc2 )
64 dvb? ( media-libs/libdvb
65 media-tv/linuxtv-dvb )
66 dvd? ( >=media-libs/libdvdread-0.9.4
67 >=media-libs/libdvdcss-1.2.8
68 >=media-libs/libdvdplay-1.0.1 )
69 esd? ( >=media-sound/esound-0.2.22 )
70 faad? ( >=media-libs/faad2-2.0-rc3 )
71 ggi? ( >=media-libs/libggi-2.0_beta3 )
72 gnome? ( >=gnome-base/gnome-libs-1.4.1.2-r1 )
73 gtk? ( =x11-libs/gtk+-1.2* )
74 imlib? ( >=media-libs/imlib2-1.0.6 )
75 lirc? ( app-misc/lirc )
76 mad? ( media-libs/libmad
77 media-libs/libid3tag )
78 matroska? ( >=media-libs/libmatroska-0.6.2 )
79 mozilla? ( >=net-www/mozilla-1.4 )
80 ncurses? ( sys-libs/ncurses )
81 nls? ( >=sys-devel/gettext-0.12.1 )
82 oggvorbis? ( >=media-libs/libvorbis-1.0
83 >=media-libs/libogg-1.0 )
84 sdl? ( >=media-libs/libsdl-1.2.5 )
85 slp? ( >=net-libs/openslp-1.0.10 )
86 bidi? ( >=dev-libs/fribidi-0.10.4 )
87 truetype? ( >=media-libs/freetype-2.1.4 )
88 wxwindows? ( >=x11-libs/wxGTK-2.4.1 )
89 xosd? ( >=x11-libs/xosd-2.0 )
90 3dfx? ( media-libs/glide-v3 )
91 png? ( >=media-libs/libpng-1.2.5 )
92 speex? ( >=media-libs/speex-1.0.3 )
93 >=media-sound/lame-3.93.1
94 >=media-libs/libdvbpsi-0.1.3
95 >=media-libs/a52dec-0.7.4
96 >=media-libs/libmpeg2-0.4.0
97 >=media-libs/flac-1.1.0"
99 # mplayer is a required depandancy until the libpostproc code becomes
100 # a seperate package or until ffmpeg gets support for installing
103 # liveMedia (live.com) is not a true library but needs to be 'imported'
104 # into your own sourcetree. This is against VLC coding policy.
110 # Change the location of the glide headers
113 -e "s:/usr/include/glide:/usr/include/glide3:" \
114 -e "s:glide2x:glide3:" \
117 cd ${S}/modules/video_output
118 epatch ${FILESDIR}/glide.patch
121 # Avoid timestamp skews with autotools
126 touch `find . -name Makefile.in`
130 # configure and building of livedotcom
132 ./genMakefiles linux || die "Creating liveMedia Makefiles failed."
133 make || die "liveMedia code failed to compile."
135 # configure and building of ffmpeg
140 --disable-vorbis || die "ffmpeg failed to configure"
143 make || die "ffmpeg->libavcodec failed to compile"
145 make || die "ffmpeg->libpostproc failed to compile"
147 # Configure and build VLC
150 myconf="--disable-mga --enable-flac --with-gnu-ld \
151 --enable-a52 --enable-dvbpsi --enable-libmpeg2 \
152 --disable-qt --disable-kde"
154 #--enable-pth GNU Pth support (default disabled)
155 #--enable-st State Threads (default disabled)
156 #--enable-gprof gprof profiling (default disabled)
157 #--enable-cprof cprof profiling (default disabled)
158 #--enable-mostly-builtin most modules will be built-in (default enabled)
159 #--disable-optimizations disable compiler optimizations (default disabled)
160 #--enable-testsuite build test modules (default disabled)
161 #--disable-plugins make all plugins built-in (default plugins enabled)
163 use debug && myconf="${myconf} --enable-debug" \
164 || myconf="${myconf} --enable-release"
166 (use imlib && use wxwindows) && myconf="${myconf} --enable-skins"
169 && myconf="${myconf} --enable-mozilla \
170 MOZILLA_CONFIG=/usr/lib/mozilla/mozilla-config \
171 XPIDL=/usr/bin/xpidl"
173 # vlc uses its own ultraoptimizaed CXXFLAGS
174 # and forcing custom ones generally fails building
177 export WANT_AUTOCONF_2_5=1
178 export WANT_AUTOMAKE_1_6=1
180 myconf="${myconf} --enable-ffmpeg \
181 --with-ffmpeg-tree=${SFFM} \
182 --with-ffmpeg-mp3lame \
183 --enable-livedotcom \
184 --with-livedotcom-tree=${SLIVE}"
190 `use_enable ncurses` \
200 `use_enable dvd vcd` `use_enable dvdread` `use_enable dvd dvdplay` \
201 `use_enable dvb satellite` `use_enable dvb pvr` \
202 `use_enable joystick` `use_enable lirc` \
204 `use_enable gtk` `use_enable gnome` \
205 `use_enable oggvorbis ogg` `use_enable oggvorbis vorbis` \
207 `use_enable matroska mkv` \
208 `use_enable truetype freetype` \
209 `use_enable bidi fribidi` \
210 `use_enable svga svgalib` \
211 `use_enable fbcon fb` \
212 `use_enable aalib aa` `use_enable aalib caca` \
213 `use_enable xv xvideo` \
214 `use_enable X x11 ` \
215 `use_enable 3dfx glide` \
216 `use_enable altivec` \
217 ${myconf} || die "configure of VLC failed"
219 if [ `gcc-major-version` -eq 2 ]; then
220 sed -i s:"-fomit-frame-pointer":: vlc-config
223 # parallel make doesn't work with our complicated makefile
224 # this is also the reason as why you shouldn't run autoconf
225 # or automake yourself. (or bootstrap for that matter)
226 MAKEOPTS="${MAKEOPTS} -j1"
227 emake || die "make of VLC failed"
232 einstall || die "make install failed"
234 dodoc ABOUT-NLS AUTHORS COPYING ChangeLog HACKING INSTALL* \
235 MAINTAINERS NEWS README* THANKS doc/ChangeLog-*