1 ###############################################################################
2 # vlc.ebuild: A Gentoo ebuild for vlc
3 ###############################################################################
4 # Copyright (C) 2003-2004 VideoLAN
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 pvr satellite mozilla debug faad
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"
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_rc3 )
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.6.3 )
70 mozilla? ( >=net-www/mozilla-1.4 )
71 ncurses? ( sys-libs/ncurses )
72 nls? ( >=sys-devel/gettext-0.12.1 )
73 oggvorbis? ( >=media-libs/libvorbis-1.0
74 >=media-libs/libogg-1.0 )
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.1 )
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.0.3 )
84 dts? ( >=media-libs/libdts-0.0.2 )
85 >=media-sound/lame-3.93.1
86 >=media-libs/libdvbpsi-0.1.3
87 >=media-libs/a52dec-0.7.4
88 >=media-libs/libmpeg2-0.4.0
89 >=media-video/ffmpeg-0.4.8.20040222
90 >=media-plugins/live-2004.03.05
91 >=media-libs/flac-1.1.0"
93 DEPEND="$RDEPEND >=sys-devel/autoconf-2.5.8"
99 # Change the location of the glide headers
102 -e "s:/usr/include/glide:/usr/include/glide3:" \
103 -e "s:glide2x:glide3:" \
106 cd ${S}/modules/video_output
107 epatch ${FILESDIR}/glide.patch
113 # Configure and build VLC
116 myconf="--disable-mga --enable-flac --with-gnu-ld \
117 --enable-a52 --enable-dvbpsi --enable-libmpeg2 \
118 --disable-qt --disable-kde --disable-libcdio --disable-libcddb \
119 --disable-vcdx --enable-ffmpeg --with-ffmpeg-mp3lame \
120 --enable-livedotcom --with-livedotcom-tree=/usr/lib/live \
121 --disable-skins2" #keep the new skins disabled for now
123 #--enable-pth GNU Pth support (default disabled)
124 #--enable-st State Threads (default disabled)
125 #--enable-gprof gprof profiling (default disabled)
126 #--enable-cprof cprof profiling (default disabled)
127 #--enable-mostly-builtin most modules will be built-in (default enabled)
128 #--disable-optimizations disable compiler optimizations (default disabled)
129 #--enable-testsuite build test modules (default disabled)
130 #--disable-plugins make all plugins built-in (default plugins enabled)
132 use debug && myconf="${myconf} --enable-debug" \
133 || myconf="${myconf} --enable-release"
135 (use imlib && use wxwindows) && myconf="${myconf} --enable-skins"
138 && myconf="${myconf} --enable-mozilla \
139 MOZILLA_CONFIG=/usr/lib/mozilla/mozilla-config \
140 XPIDL=/usr/bin/xpidl"
142 # vlc uses its own ultraoptimizaed CXXFLAGS
143 # and forcing custom ones generally fails building
146 export WANT_AUTOCONF_2_5=1
147 export WANT_AUTOMAKE_1_6=1
149 # Avoid timestamp skews with autotools
154 touch `find . -name Makefile.in`
160 $(use_enable ncurses) \
170 $(use_enable dvd vcd) \
171 $(use_enable dvdread) \
172 $(use_enable dvd dvdplay) \
173 $(use_enable dvd dvdnav) \
176 $(use_enable satellite) \
177 $(use_enable joystick) $(use_enable lirc) \
179 $(use_enable gtk) $(use_enable gnome) \
180 $(use_enable oggvorbis ogg) $(use_enable oggvorbis vorbis) \
181 $(use_enable speex) \
182 $(use_enable matroska mkv) \
183 $(use_enable truetype freetype) \
184 $(use_enable bidi fribidi) \
185 $(use_enable svga svgalib) \
186 $(use_enable fbcon fb) \
187 $(use_enable aalib aa) $(use_enable aalib caca) \
188 $(use_enable xv xvideo) \
189 $(use_enable X x11) \
190 $(use_enable 3dfx glide) \
191 $(use_enable altivec) \
193 ${myconf} || die "configure of VLC failed"
195 if [[ $(gcc-major-version) == 2 ]]; then
196 sed -i -e s:"-fomit-frame-pointer":: vlc-config || die "-fomit-frame-pointer patching failed"
199 # parallel make doesn't work with our complicated makefile
200 # this is also the reason as why you shouldn't run autoconf
201 # or automake yourself. (or bootstrap for that matter)
202 MAKEOPTS="${MAKEOPTS} -j1"
203 emake || die "make of VLC failed"
208 einstall || die "make install failed"
210 dodoc ABOUT-NLS AUTHORS COPYING ChangeLog HACKING INSTALL* \
211 MAINTAINERS NEWS README* THANKS doc/ChangeLog-*