1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils flag-o-matic toolchain-funcs libtool multilib subversion autotools
9 ESVN_REPO_URI="svn://jusst.de/xine-vdpau"
11 S="${WORKDIR}/xine-vdpau"
13 DESCRIPTION="Core libraries for Xine movie player, VDPAU branch"
14 HOMEPAGE="http://xine.sourceforge.net"
20 IUSE="aalib libcaca -arts esd win32codecs nls +dvd +X directfb +vorbis +alsa
21 gnome sdl speex +theora ipv6 altivec opengl +aac fbcon +xv xvmc
22 samba dxr3 vidix mng +flac oss v4l xinerama vcd +a52 +mad imagemagick +dts
23 debug modplug -gtk pulseaudio -mmap truetype wavpack +musepack +xcb jack
26 RDEPEND="X? ( x11-libs/libXext
28 xv? ( x11-libs/libXv )
29 xvmc? ( x11-libs/libXvMC )
30 xinerama? ( x11-libs/libXinerama )
31 win32codecs? ( >=media-libs/win32codecs-0.50 )
32 esd? ( media-sound/esound )
33 dvd? ( >=media-libs/libdvdcss-1.2.7 )
34 arts? ( kde-base/arts )
35 alsa? ( media-libs/alsa-lib )
36 aalib? ( media-libs/aalib )
37 directfb? ( >=dev-libs/DirectFB-0.9.9 )
38 gnome? ( >=gnome-base/gnome-vfs-2.0 )
39 flac? ( >=media-libs/flac-1.1.2 )
40 sdl? ( >=media-libs/libsdl-1.1.5 )
41 dxr3? ( >=media-libs/libfame-0.9.0 )
42 vorbis? ( media-libs/libogg media-libs/libvorbis )
43 theora? ( media-libs/libogg media-libs/libvorbis >=media-libs/libtheora-1.0_alpha6 )
44 speex? ( media-libs/libogg media-libs/libvorbis media-libs/speex )
45 libcaca? ( >=media-libs/libcaca-0.99_beta1 )
46 samba? ( net-fs/samba )
47 mng? ( media-libs/libmng )
48 vcd? ( media-video/vcdimager )
49 a52? ( >=media-libs/a52dec-0.7.4-r5 )
50 mad? ( media-libs/libmad )
51 imagemagick? ( media-gfx/imagemagick )
52 dts? ( media-libs/libdca )
53 aac? ( >=media-libs/faad2-2.6.1 )
55 modplug? ( media-libs/libmodplug )
56 nls? ( virtual/libintl )
57 gtk? ( x11-libs/gtk+:2 )
58 pulseaudio? ( media-sound/pulseaudio )
59 truetype? ( media-libs/freetype:2 media-libs/fontconfig )
61 wavpack? ( >=media-sound/wavpack-4.31 )
62 musepack? ( media-libs/libmpcdec )
63 xcb? ( >=x11-libs/libxcb-1.0 )
64 jack? ( >=media-sound/jack-audio-connection-kit-0.100 )
66 x86? ( media-libs/win32codecs )
67 x86-fbsd? ( media-libs/win32codecs )
68 amd64? ( media-libs/amd64codecs ) )"
74 x11-proto/xf86vidmodeproto
75 xinerama? ( x11-proto/xineramaproto ) )
76 v4l? ( virtual/os-headers )
79 nls? ( sys-devel/gettext )"
82 # download and copy files
90 #prevent quicktime crashing
91 append-flags -frename-registers -ffunction-sections
93 # Specific workarounds for too-few-registers arch...
94 if [[ $(tc-arch) == "x86" ]]; then
95 filter-flags -fforce-addr
96 filter-flags -momit-leaf-frame-pointer # break on gcc 3.4/4.x
97 filter-flags -fno-omit-frame-pointer #breaks per bug #149704
98 is-flag -O? || append-flags -O2
101 # Set the correct win32 dll path, bug #197236
103 if has_multilib_profile ; then
104 win32dir=/usr/$(ABI="x86" get_libdir)/win32
106 win32dir=/usr/$(get_libdir)/win32
109 # Too many file names are the same (xine_decoder.c), change the builddir
110 # So that the relative path is used to identify them.
111 mkdir "${WORKDIR}/build"
114 ECONF_SOURCE="${S}" econf \
115 $(use_enable gnome gnomevfs) \
118 $(use_enable samba) \
119 $(use_enable altivec) \
122 $(use_with imagemagick) \
123 $(use_enable gtk gdkpixbuf) \
124 $(use_enable aac faad) --with-external-libfaad \
125 $(use_with flac libflac) \
129 $(use_with wavpack) \
130 $(use_enable modplug) \
131 $(use_enable a52 a52dec) --with-external-a52dec \
132 $(use_enable mad) --with-external-libmad \
133 $(use_enable dts) --with-external-libdts \
134 $(use_enable musepack) --with-external-libmpcdec \
136 $(use_enable xinerama) \
137 $(use_enable vidix) \
139 $(use_enable directfb) \
140 $(use_enable fbcon fb) \
141 $(use_enable opengl) \
142 $(use_enable aalib) \
143 $(use_with libcaca caca) \
150 $(use_with esd esound) \
151 $(use_with pulseaudio) \
153 $(use_enable vcd) --without-internal-vcdlibs \
154 $(use_enable win32codecs w32dll) \
155 $(use_enable real real-codecs) \
157 $(use_with truetype freetype) $(use_with truetype fontconfig) \
158 $(use_enable debug) \
161 --with-external-ffmpeg \
162 --disable-optimizations \
164 --with-xv-path=/usr/$(get_libdir) \
165 --with-w32-path=${win32dir} \
166 --with-real-codecs-path=/usr/$(get_libdir)/codecs \
167 --enable-fast-install \
168 --disable-dependency-tracking || die "econf failed."
170 emake || die "emake failed."
174 emake DESTDIR="${D}" \
175 docdir="/usr/share/doc/${PF}" htmldir="/usr/share/doc/${PF}/html" \
176 install || die "emake install failed."