/[gentoo-x86]/media-video/x264-encoder/x264-encoder-9999.ebuild
Gentoo

Contents of /media-video/x264-encoder/x264-encoder-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (hide annotations) (download)
Sun Mar 9 10:19:46 2014 UTC (4 years, 9 months ago) by aballier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +3 -2 lines
disable lsmash to avoid automagic for now

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 160F534A)

1 aballier 1.8 # Copyright 1999-2014 Gentoo Foundation
2 radhermit 1.1 # Distributed under the terms of the GNU General Public License v2
3 aballier 1.8 # $Header: /var/cvsroot/gentoo-x86/media-video/x264-encoder/x264-encoder-9999.ebuild,v 1.7 2013/06/26 04:40:11 chutzpah Exp $
4 radhermit 1.1
5 chutzpah 1.5 EAPI=5
6 radhermit 1.1
7 chutzpah 1.5 inherit flag-o-matic multilib toolchain-funcs
8 radhermit 1.1
9     DESCRIPTION="A free commandline encoder for X264/AVC streams"
10     HOMEPAGE="http://www.videolan.org/developers/x264.html"
11 chutzpah 1.5 if [[ ${PV} == 9999 ]]; then
12     inherit git-2
13 radhermit 1.1 EGIT_REPO_URI="git://git.videolan.org/x264.git"
14     SRC_URI=""
15     else
16 chutzpah 1.5 inherit versionator
17     MY_P="x264-snapshot-$(get_version_component_range 3)-2245"
18 maksbotan 1.2 SRC_URI="http://download.videolan.org/pub/videolan/x264/snapshots/${MY_P}.tar.bz2"
19 chutzpah 1.5 KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
20     S="${WORKDIR}/${MY_P}"
21 radhermit 1.1 fi
22    
23     LICENSE="GPL-2"
24     SLOT="0"
25 chutzpah 1.6 IUSE="10bit avs custom-cflags ffmpeg ffmpegsource +interlaced mp4 +threads"
26 maksbotan 1.2
27     REQUIRED_USE="ffmpegsource? ( ffmpeg )"
28 radhermit 1.1
29 chutzpah 1.5 RDEPEND="ffmpeg? ( virtual/ffmpeg )
30 chutzpah 1.6 ~media-libs/x264-${PV}[10bit=,interlaced=,threads=]
31 maksbotan 1.2 ffmpegsource? ( media-libs/ffmpegsource )
32 chutzpah 1.5 mp4? ( >=media-video/gpac-0.4.1_pre20060122 )"
33    
34     ASM_DEP=">=dev-lang/yasm-1.2.0"
35 radhermit 1.1 DEPEND="${RDEPEND}
36     amd64? ( ${ASM_DEP} )
37 chutzpah 1.5 x86? ( ${ASM_DEP} )
38 radhermit 1.1 x86-fbsd? ( ${ASM_DEP} )
39 chutzpah 1.5 virtual/pkgconfig"
40 radhermit 1.1
41     src_configure() {
42     tc-export CC
43    
44 chutzpah 1.5 # let upstream pick the optimization level by default
45     use custom-cflags || filter-flags -O?
46 radhermit 1.1
47     ./configure \
48     --prefix="${EPREFIX}"/usr \
49     --libdir="${EPREFIX}"/usr/$(get_libdir) \
50 chutzpah 1.5 --system-libx264 \
51 radhermit 1.1 --host="${CHOST}" \
52 aballier 1.8 --disable-lsmash \
53 chutzpah 1.5 $(usex 10bit "--bit-depth=10" "") \
54     $(usex avs "" "--disable-avs") \
55     $(usex ffmpeg "" "--disable-lavf --disable-swscale") \
56     $(usex ffmpegsource "" "--disable-ffms") \
57     $(usex interlaced "" "--disable-interlaced") \
58     $(usex mp4 "" "--disable-gpac") \
59     $(usex threads "" "--disable-thread") || die
60    
61     # this is a nasty workaround for bug #376925 for x264 that also applies
62     # here, needed because as upstream doesn't like us fiddling with their CFLAGS
63     if use custom-cflags; then
64     local cflags
65     cflags="$(grep "^CFLAGS=" config.mak | sed 's/CFLAGS=//')"
66     cflags="${cflags//$(get-flag O)/}"
67     cflags="${cflags//-O? /$(get-flag O) }"
68     cflags="${cflags//-g /}"
69     sed -i "s:^CFLAGS=.*:CFLAGS=${cflags//:/\\:}:" config.mak
70     fi
71 radhermit 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20