Copy from Berkano Overlay
[otih-overlay.git] / media-libs / x264 / .svn / text-base / x264-9999.ebuild.svn-base
blobdfbc32e5eb2a445619fc2d240856cc2668a2cd78
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 inherit git multilib toolchain-funcs
7 EGIT_REPO_URI="git://git.videolan.org/x264.git"
9 DESCRIPTION="A free library for encoding H264/AVC video streams"
10 HOMEPAGE="http://www.videolan.org/developers/x264.html"
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS=""
14 IUSE="debug mp4 threads X"
16 RDEPEND="mp4? ( media-video/gpac )
17         X? ( x11-libs/libX11 )"
19 DEPEND="${RDEPEND}
20         amd64? ( >=dev-lang/yasm-0.6.2 )
21         x86? ( >=dev-lang/yasm-0.7.0 )
22         x86-fbsd? ( >=dev-lang/yasm-0.6.2 )
23         dev-util/pkgconfig
24         !media-video/x264-encoder"
26 src_unpack() {
27         git_src_unpack
28         cd "${S}"
29         EPATCH_OPTS="-l"
30         epatch "${FILESDIR}/${PN}-nostrip.patch"
32         # use git 1.6 command style
33         sed -i -e "s:git-rev-list:git rev-list:g" \
34                         -e "s:git-status:git status:" \
35                         "${S}"/version.sh
38 src_compile() {
39         local myconf=""
40         use debug && myconf="${myconf} --enable-debug"
41         ./configure --prefix=/usr \
42                 --libdir=/usr/$(get_libdir) \
43                 --enable-pic --enable-shared \
44                 "--extra-cflags=${CFLAGS}" \
45                 "--extra-ldflags=${LDFLAGS}" \
46                 "--extra-asflags=${ASFLAGS}" \
47                 $(use_enable X visualize) \
48                 $(use_enable threads pthread) \
49                 $(use_enable debug) \
50                 $(use_enable mp4 mp4-output) \
51                 ${myconf} \
52                 || die "configure failed"
53         emake CC="$(tc-getCC)" || die "make failed"
56 src_install() {
57         make DESTDIR="${D}" install || die
58         dodoc AUTHORS doc/*txt