1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils multilib toolchain-funcs versionator
8 MY_P="x264-snapshot-$(get_version_component_range 3)-2245"
10 DESCRIPTION="A free library for encoding H264/AVC video streams"
11 HOMEPAGE="http://www.videolan.org/developers/x264.html"
12 SRC_URI="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/${MY_P}.tar.bz2"
15 KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
16 IUSE="debug gtk +mp4 +psyrdo psytrellis +threads X"
18 RDEPEND="gtk? ( >=x11-libs/gtk+-2.6.10
19 >=dev-libs/glib-2.10.3 )
20 mp4? ( media-video/gpac )
21 X? ( x11-libs/libX11 )"
23 amd64? ( >=dev-lang/yasm-0.6.2 )
24 x86? ( >=dev-lang/yasm-0.7.0 )
25 x86-fbsd? ( >=dev-lang/yasm-0.6.2 )
27 !media-video/x264-encoder"
29 S="${WORKDIR}/${MY_P}"
34 epatch "${FILESDIR}/${PN}-nostrip.patch"
35 # Psy-RDO see http://forum.doom9.org/showthread.php?t=138293
36 if ( use psyrdo && use !psytrellis ); then
37 epatch "${FILESDIR}/x264-psyrdo-0.6.diff"
39 use psytrellis && epatch "${FILESDIR}/x264-psyrd-0.6-psytrellis-0.1.diff"
44 use debug && myconf="${myconf} --enable-debug"
45 ./configure --prefix=/usr \
46 --libdir=/usr/$(get_libdir) \
47 --enable-pic --enable-shared \
48 "--extra-cflags=${CFLAGS}" \
49 "--extra-ldflags=${LDFLAGS}" \
50 "--extra-asflags=${ASFLAGS}" \
51 $(use_enable X visualize) \
52 $(use_enable threads pthread) \
54 $(use_enable mp4 mp4-output) \
57 || die "configure failed"
58 emake CC="$(tc-getCC)" || die "make failed"
62 make DESTDIR="${D}" install || die
63 dodoc AUTHORS doc/*txt