]> git.sesse.net Git - vlc/blob - vlc-cvs.ebuild
* New menu-items referencing forum
[vlc] / vlc-cvs.ebuild
1 ###############################################################################
2 # vlc.ebuild: A Gentoo ebuild for vlc
3 ###############################################################################
4 # Copyright (C) 2003 VideoLAN
5 # $Id: vlc-cvs.ebuild,v 1.1 2003/11/01 14:35:38 hartman Exp $
6 #
7 # Authors: Derk-Jan Hartman <thedj at users.sf.net>
8 #
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.
13
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.
18 #
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 ###############################################################################
27
28 inherit gcc cvs eutils flag-o-matic libtool
29
30 # Missing support for...
31 #       tarkin - package not in portage yet - experimental
32 #       theora - package not in portage yet - experimental
33 #       tremor - package not in portage yet - experimental
34
35 IUSE="arts ncurses dvd gtk nls 3dfx svga fbcon esd X alsa ggi
36       oggvorbis gnome xv oss sdl aalib slp truetype v4l xvid lirc 
37           wxwindows imlib matroska dvb mozilla debug faad xosd altivec"
38
39 DESCRIPTION="VLC media player - Video player and streamer"
40 HOMEPAGE="http://www.videolan.org/vlc"
41
42 ECVS_SERVER="anoncvs.videolan.org:/var/cvs/videolan"
43 ECVS_USER="anonymous"
44 ECVS_MODULE="vlc"
45
46 SLOT="0"
47 LICENSE="GPL-2"
48 KEYWORDS="~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~amd64"
49
50 DEPEND="X? ( virtual/x11 )
51         aalib? ( >=media-libs/aalib-1.4_rc4-r2 )
52         alsa? ( >=media-libs/alsa-lib-0.9_rc2 )
53         dvb? ( media-libs/libdvb
54                 media-tv/linuxtv-dvb )
55         dvd? ( >=media-libs/libdvdread-0.9.3
56                 >=media-libs/libdvdcss-1.2.8
57                 >=media-libs/libdvdplay-1.0.1 )
58         esd? ( >=media-sound/esound-0.2.22 )
59         faad? ( >=media-libs/faad2-1.1 )
60         ggi? ( >=media-libs/libggi-2.0_beta3 )
61         gnome? ( >=gnome-base/gnome-libs-1.4.1.2-r1 )
62         gtk? ( =x11-libs/gtk+-1.2* )
63         imlib? ( >=media-libs/imlib2-1.0.6 )
64         lirc? ( app-misc/lirc )
65         mad? ( media-libs/libmad
66                 media-libs/libid3tag )
67         matroska? ( >=media-libs/libmatroska-0.4.4 )
68         mozilla? ( >=net-www/mozilla-1.4 )
69         ncurses? ( sys-libs/ncurses )
70         nls? ( sys-devel/gettext )
71         oggvorbis? ( >=media-libs/libvorbis-1.0
72                 >=media-libs/libogg-1.0 )
73         sdl? ( >=media-libs/libsdl-1.2.5 )
74         slp? ( >=net-libs/openslp-1.0.10 )
75         truetype? ( >=media-libs/freetype-2.1.4 )
76         wxwindows? ( >=x11-libs/wxGTK-2.4.1 )
77         xosd? ( >=x11-libs/xosd-2.0 )
78         xvid? ( >=media-libs/xvid-0.9.1 )
79         >=media-sound/lame-3.93.1
80         >=media-libs/libdvbpsi-0.1.3
81         >=media-video/ffmpeg-0.4.8
82         >media-libs/libmpeg2-0.3.1
83         >=media-libs/a52dec-0.7.4
84         >=media-libs/flac-1.1.0"
85
86 S=${WORKDIR}/vlc
87 RESTRICT="nostrip"
88
89 src_compile(){
90         ./bootstrap
91         
92         local myconf
93         myconf="--disable-glide --disable-mga --enable-flac --with-gnu-ld"
94
95     #--enable-pth                               GNU Pth support (default disabled)
96         #--enable-st                            State Threads (default disabled)
97         #--enable-gprof                         gprof profiling (default disabled)
98         #--enable-cprof                         cprof profiling (default disabled)
99         #--enable-mostly-builtin        most modules will be built-in (default enabled)
100         #--disable-optimizations        disable compiler optimizations (default disabled)
101         #--enable-testsuite                     build test modules (default disabled)
102         #--disable-plugins                      make all plugins built-in (default disabled)
103
104         use nls || myconf="${myconf} --disable-nls"
105         
106         use debug && myconf="${myconf} --enable-debug" \
107                 || myconf="${myconf} --enable-release"
108         
109         use dvd \
110                 && myconf="${myconf} --enable-dvdread" \
111                 || myconf="${myconf} \
112                         --disable-dvd \
113                         --disable-dvdread \
114                         --disable-dvdplay \
115                         --disable-vcd"
116
117         use v4l && myconf="${myconf} --enable-v4l"
118
119         use dvb && myconf="${myconf} --enable-satellite --enable-pvr --enable-dvb"
120
121         use oggvorbis || myconf="${myconf} --disable-vorbis --disable-ogg"
122
123         use matroska || myconf="${myconf} --disable-mkv"
124
125         use mad || myconf="${myconf} --disable-mad"
126
127         use faad && myconf="${myconf} --enable-faad"
128
129         use xvid && myconf="${myconf} --enable-xvid"
130
131         use X || myconf="${myconf} --disable-x11"
132
133         use xv || myconf="${myconf} --disable-xvideo"
134
135         use sdl || myconf="${myconf} --disable-sdl"
136
137         use truetype || myconf="${myconf} --disable-freetype"
138
139         use fbcon || myconf="${myconf} --disable-fb"
140
141         use svga && myconf="${myconf} --enable-svgalib"
142
143         use ggi && myconf="${myconf} --enable-ggi"
144
145         use aalib && myconf="${myconf} --enable-aa"
146
147         use oss || myconf="${myconf} --disable-oss"
148
149         use esd && myconf="${myconf} --enable-esd"
150
151         use arts && myconf="${myconf} --enable-arts"
152
153         use alsa && myconf="${myconf} --enable-alsa"
154
155         (use imlib && use wxwindows) && myconf="${myconf} --enable-skins"
156
157         use gtk || myconf="${myconf} --disable-gtk"
158
159         use gnome && myconf="${myconf} --enable-gnome"
160
161         use ncurses && myconf="${myconf} --enable-ncurses"
162
163         use xosd && myconf="${myconf} --enable-xosd"
164
165         use slp || myconf="${myconf} --disable-slp"
166
167         use lirc && myconf="${myconf} --enable-lirc"
168
169         use joystick && myconf="${myconf} --enable-joystick"
170
171         use mozilla && \
172                 myconf="${myconf} --enable-mozilla \
173             MOZILLA_CONFIG=/usr/lib/mozilla/mozilla-config \
174             XPIDL=/usr/bin/xpidl"
175
176         use altivec || myconf="${myconf} --disable-altivec"
177
178         # vlc uses its own ultraoptimizaed CXXFLAGS
179         # and forcing custom ones generally fails building
180         export CXXFLAGS=""
181         export CFLAGS=""
182         export WANT_AUTOCONF_2_5=1
183         export WANT_AUTOMAKE_1_6=1
184
185         myconf="${myconf} --enable-ffmpeg \
186                 --with-ffmpeg-mp3lame \
187                 --enable-libmpeg2 \
188                 --enable-flac \
189                 --disable-kde \
190                 --disable-qt"
191
192         econf ${myconf} || die "configure of VLC failed"
193
194         if [ `gcc-major-version` -eq 2 ]; then
195                 sed -i s:"-fomit-frame-pointer":: vlc-config
196         fi
197
198         # parallel make doesn't work with our complicated makefile
199         # this is also the reason as why you shouldn't run autoconf
200         # or automake yourself. (or bootstrap for that matter)
201         MAKEOPTS="${MAKEOPTS} -j1"
202         emake || die "make of VLC failed"
203 }
204
205 src_install() {
206         
207         einstall || die "make install failed"
208
209         dodoc ABOUT-NLS AUTHORS COPYING ChangeLog HACKING INSTALL* \
210         MAINTAINERS NEWS README* THANKS doc/ChangeLog-*
211
212 }