1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils flag-o-matic toolchain-funcs libtool mercurial
8 MY_PV=${PV/.9999_p/-vdpau-r}
10 S="${WORKDIR}/xine-lib-1.2"
12 : ${EHG_REPO_URI:=http://hg.debian.org/hg/xine-lib/xine-lib-1.2}
14 DESCRIPTION="Core libraries for Xine movie player - 1.2 development branch"
15 HOMEPAGE="http://hg.debian.org/hg/xine-lib/xine-lib-1.2/"
16 SRC_URI="http://www.jusst.de/vdpau/files/xine-lib-1.2/${MY_P}.diff.bz2"
22 IUSE="aalib libcaca -arts esd win32codecs nls +dvd +X directfb +vorbis +alsa
23 gnome sdl speex +theora ipv6 altivec opengl +aac fbcon +xv xvmc
24 samba dxr3 vidix mng +flac oss v4l xinerama vcd +a52 +mad imagemagick +dts
25 debug modplug -gtk pulseaudio -mmap truetype vdpau wavpack +musepack +xcb jack
28 RDEPEND="X? ( x11-libs/libXext
30 xv? ( x11-libs/libXv )
31 xvmc? ( x11-libs/libXvMC )
32 xinerama? ( x11-libs/libXinerama )
33 win32codecs? ( >=media-libs/win32codecs-0.50 )
34 esd? ( media-sound/esound )
35 dvd? ( >=media-libs/libdvdcss-1.2.7 )
36 arts? ( kde-base/arts )
37 alsa? ( media-libs/alsa-lib )
38 aalib? ( media-libs/aalib )
39 directfb? ( >=dev-libs/DirectFB-0.9.9 )
40 gnome? ( >=gnome-base/gnome-vfs-2.0 )
41 flac? ( >=media-libs/flac-1.1.2 )
42 sdl? ( >=media-libs/libsdl-1.1.5 )
43 dxr3? ( >=media-libs/libfame-0.9.0 )
44 vorbis? ( media-libs/libogg media-libs/libvorbis )
45 theora? ( media-libs/libogg media-libs/libvorbis >=media-libs/libtheora-1.0_alpha6 )
46 speex? ( media-libs/libogg media-libs/libvorbis media-libs/speex )
47 libcaca? ( >=media-libs/libcaca-0.99_beta1 )
48 samba? ( net-fs/samba )
49 mng? ( media-libs/libmng )
50 vcd? ( media-video/vcdimager )
51 a52? ( >=media-libs/a52dec-0.7.4-r5 )
52 mad? ( media-libs/libmad )
53 imagemagick? ( media-gfx/imagemagick )
54 dts? ( || ( media-libs/libdca media-libs/libdts ) )
55 >=media-video/ffmpeg-0.4.9_p20070129
56 modplug? ( media-libs/libmodplug )
57 nls? ( virtual/libintl )
58 gtk? ( x11-libs/gtk+:2 )
59 pulseaudio? ( media-sound/pulseaudio )
60 truetype? ( media-libs/freetype:2 media-libs/fontconfig )
61 vdpau? ( >=x11-drivers/nvidia-drivers-180.22 )
63 wavpack? ( >=media-sound/wavpack-4.31 )
64 musepack? ( media-libs/libmpcdec )
65 xcb? ( >=x11-libs/libxcb-1.0 )
66 jack? ( >=media-sound/jack-audio-connection-kit-0.100 )
68 x86? ( media-libs/win32codecs )
69 x86-fbsd? ( media-libs/win32codecs )
70 amd64? ( media-libs/amd64codecs ) )"
76 x11-proto/xf86vidmodeproto
77 xinerama? ( x11-proto/xineramaproto ) )
78 v4l? ( virtual/os-headers )
81 nls? ( sys-devel/gettext )"
87 cd "${S}" || die "cd failed"
90 epatch "${WORKDIR}"/${MY_P}.diff
93 epatch "${FILESDIR}"/xine-lib-1.2-hg-compile-error.diff
95 use vdr && sed -i src/vdr/input_vdr.c -e '/define VDR_ABS_FIFO_DIR/s|".*"|"/var/vdr/xine"|'
97 ./autogen.sh noconfig || die "autogen failed"
102 #prevent quicktime crashing
103 append-flags -frename-registers -ffunction-sections
105 # Specific workarounds for too-few-registers arch...
106 if [[ $(tc-arch) == "x86" ]]; then
107 filter-flags -fforce-addr
108 filter-flags -momit-leaf-frame-pointer # break on gcc 3.4/4.x
109 filter-flags -fno-omit-frame-pointer #breaks per bug #149704
110 is-flag -O? || append-flags -O2
115 # enable/disable appropiate optimizations on sparc
116 [[ "${PROFILE_ARCH}" == "sparc64" ]] && myconf="${myconf} --enable-vis"
117 [[ "${PROFILE_ARCH}" == "sparc" ]] && myconf="${myconf} --disable-vis"
119 # The default CFLAGS (-O) is the only thing working on hppa.
120 use hppa && unset CFLAGS
122 # Too many file names are the same (xine_decoder.c), change the builddir
123 # So that the relative path is used to identify them.
124 mkdir "${WORKDIR}/build"
127 ECONF_SOURCE="${S}" econf \
128 $(use_enable gnome gnomevfs) \
131 $(use_enable samba) \
132 $(use_enable altivec) \
135 $(use_with imagemagick) \
136 $(use_enable gtk gdkpixbuf) \
137 $(use_enable aac faad) \
138 $(use_with flac libflac) \
142 $(use_with wavpack) \
143 $(use_enable modplug) \
144 $(use_enable a52 a52dec) --with-external-a52dec \
145 $(use_enable mad) --with-external-libmad \
146 $(use_enable dts) --with-external-libdts \
147 $(use_enable musepack) --with-external-libmpcdec \
149 $(use_enable xinerama) \
150 $(use_enable vidix) \
152 $(use_enable directfb) \
153 $(use_enable fbcon fb) \
154 $(use_enable opengl) \
155 $(use_enable aalib) \
156 $(use_with libcaca caca) \
163 $(use_with esd esound) \
164 $(use_with pulseaudio) \
166 $(use_enable vcd) --without-internal-vcdlibs \
167 $(use_enable win32codecs w32dll) \
168 $(use_enable real real-codecs) \
170 $(use_with truetype freetype) $(use_with truetype fontconfig) \
172 $(use_enable debug) \
174 --with-external-ffmpeg \
175 --disable-optimizations \
178 --with-xv-path=/usr/$(get_libdir) \
179 --with-w32-path=/usr/$(ABI=x86 get_libdir)/win32 \
180 --with-real-codecs-path=/usr/$(get_libdir)/codecs \
181 --enable-fast-install \
182 --disable-dependency-tracking || die "econf failed."
184 emake || die "emake failed."
188 emake -j1 DESTDIR="${D}" \
189 docdir="/usr/share/doc/${PF}" htmldir="/usr/share/doc/${PF}/html" \
190 install || die "emake install failed."