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 )
79 app-text/docbook-xml-dtd:4.4
82 nls? ( sys-devel/gettext )
83 || ( www-client/lynx www-client/w3m )" # needed for xmlto
87 cd "${WORKDIR}" || die
"cd to workdir failed"
89 cd "${S}" || die
"cd failed"
92 epatch
"${WORKDIR}"/${MY_P}.
diff
95 epatch
"${FILESDIR}"/xine-lib-1.2
-hg-compile-error.
diff
97 use vdr
&& sed -i src
/vdr
/input_vdr.c
-e '/define VDR_ABS_FIFO_DIR/s|".*"|"/var/vdr/xine"|'
99 .
/autogen.sh noconfig || die
"autogen failed"
104 #prevent quicktime crashing
105 append-flags
-frename-registers -ffunction-sections
107 # Specific workarounds for too-few-registers arch...
108 if [[ $
(tc-arch
) == "x86" ]]; then
109 filter-flags
-fforce-addr
110 filter-flags
-momit-leaf-frame-pointer # break on gcc 3.4/4.x
111 filter-flags
-fno-omit-frame-pointer #breaks per bug #149704
112 is-flag
-O? || append-flags
-O2
117 # enable/disable appropiate optimizations on sparc
118 [[ "${PROFILE_ARCH}" == "sparc64" ]] && myconf
="${myconf} --enable-vis"
119 [[ "${PROFILE_ARCH}" == "sparc" ]] && myconf
="${myconf} --disable-vis"
121 # The default CFLAGS (-O) is the only thing working on hppa.
122 use hppa
&& unset CFLAGS
124 # Too many file names are the same (xine_decoder.c), change the builddir
125 # So that the relative path is used to identify them.
126 mkdir
"${WORKDIR}/build"
129 ECONF_SOURCE
="${S}" econf \
130 $
(use_enable gnome gnomevfs
) \
133 $
(use_enable samba
) \
134 $
(use_enable altivec
) \
137 $
(use_with imagemagick
) \
138 $
(use_enable gtk gdkpixbuf
) \
139 $
(use_enable aac faad
) \
140 $
(use_with flac libflac
) \
144 $
(use_with wavpack
) \
145 $
(use_enable modplug
) \
146 $
(use_enable a52 a52dec
) --with-external-a52dec \
147 $
(use_enable mad
) --with-external-libmad \
148 $
(use_enable dts
) --with-external-libdts \
149 $
(use_enable musepack
) --with-external-libmpcdec \
151 $
(use_enable xinerama
) \
152 $
(use_enable vidix
) \
154 $
(use_enable directfb
) \
155 $
(use_enable fbcon fb
) \
156 $
(use_enable opengl
) \
157 $
(use_enable aalib
) \
158 $
(use_with libcaca caca
) \
165 $
(use_with esd esound
) \
166 $
(use_with pulseaudio
) \
168 $
(use_enable vcd
) --without-internal-vcdlibs \
169 $
(use_enable win32codecs w32dll
) \
170 $
(use_enable real real-codecs
) \
172 $
(use_with truetype freetype
) $
(use_with truetype fontconfig
) \
174 $
(use_enable debug
) \
176 --with-external-ffmpeg \
177 --disable-optimizations \
180 --with-xv-path=/usr
/$
(get_libdir
) \
181 --with-w32-path=/usr
/$
(ABI
=x86 get_libdir
)/win32 \
182 --with-real-codecs-path=/usr
/$
(get_libdir
)/codecs \
183 --enable-fast-install \
184 --disable-dependency-tracking || die
"econf failed."
186 emake || die
"emake failed."
190 emake
-j1 DESTDIR
="${D}" \
191 docdir
="/usr/share/doc/${PF}" htmldir
="/usr/share/doc/${PF}/html" \
192 install || die
"emake install failed."