Copy from Berkano Overlay
[otih-overlay.git] / media-libs / xine-lib / .svn / text-base / xine-lib-1.1.9999.ebuild.svn-base
blobfddc143da60e7d77c1d2747ca17d7b4221c548be
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 EAPI=1
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"
16 LICENSE="GPL-2"
17 SLOT="1"
18 KEYWORDS=""
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
24 -real +vis vdr"
26 RDEPEND="X? ( x11-libs/libXext
27                 x11-libs/libX11 )
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 )
54         media-video/ffmpeg
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 )
60         virtual/libiconv
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 )
65         real? (
66                 x86? ( media-libs/win32codecs )
67                 x86-fbsd? ( media-libs/win32codecs )
68                 amd64? ( media-libs/amd64codecs ) )"
70 DEPEND="${RDEPEND}
71         X? ( x11-libs/libXt
72                  x11-proto/xproto
73                  x11-proto/videoproto
74                  x11-proto/xf86vidmodeproto
75                  xinerama? ( x11-proto/xineramaproto ) )
76         v4l? ( virtual/os-headers )
77         dev-util/pkgconfig
78         sys-devel/libtool
79         nls? ( sys-devel/gettext )"
81 src_unpack() {
82         # download and copy files
83         subversion_src_unpack
84         cd "${S}"
85         # Generate configure
86         ./autogen.sh
89 src_compile() {
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
99         fi
101         # Set the correct win32 dll path, bug #197236
102         local win32dir
103         if has_multilib_profile ; then
104                 win32dir=/usr/$(ABI="x86" get_libdir)/win32
105         else
106                 win32dir=/usr/$(get_libdir)/win32
107         fi
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"
113         elibtoolize
114         ECONF_SOURCE="${S}" econf \
115                 $(use_enable gnome gnomevfs) \
116                 $(use_enable nls) \
117                 $(use_enable ipv6) \
118                 $(use_enable samba) \
119                 $(use_enable altivec) \
120                 $(use_enable v4l) \
121                 $(use_enable mng) \
122                 $(use_with imagemagick) \
123                 $(use_enable gtk gdkpixbuf) \
124                 $(use_enable aac faad) --with-external-libfaad \
125                 $(use_with flac libflac) \
126                 $(use_with vorbis) \
127                 $(use_with speex) \
128                 $(use_with theora) \
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 \
135                 $(use_with X x) \
136                 $(use_enable xinerama) \
137                 $(use_enable vidix) \
138                 $(use_enable dxr3) \
139                 $(use_enable directfb) \
140                 $(use_enable fbcon fb) \
141                 $(use_enable opengl) \
142                 $(use_enable aalib) \
143                 $(use_with libcaca caca) \
144                 $(use_with sdl) \
145                 $(use_enable xvmc) \
146                 $(use_with xcb) \
147                 $(use_enable oss) \
148                 $(use_with alsa) \
149                 $(use_with arts) \
150                 $(use_with esd esound) \
151                 $(use_with pulseaudio) \
152                 $(use_with jack) \
153                 $(use_enable vcd) --without-internal-vcdlibs \
154                 $(use_enable win32codecs w32dll) \
155                 $(use_enable real real-codecs) \
156                 $(use_enable mmap) \
157                 $(use_with truetype freetype) $(use_with truetype fontconfig) \
158                 $(use_enable debug) \
159                 $(use_enable vis) \
160                 --enable-asf \
161                 --with-external-ffmpeg \
162                 --disable-optimizations \
163                 --disable-syncfb \
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."
173 src_install() {
174         emake DESTDIR="${D}" \
175                 docdir="/usr/share/doc/${PF}" htmldir="/usr/share/doc/${PF}/html" \
176                 install || die "emake install failed."
178         dodoc ChangeLog