Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-video/ffmpeg: ChangeLog ffmpeg-2.2.3.ebuild
Date: Tue, 03 Jun 2014 06:18:05
Message-Id: 20140603061801.5364F2004E@flycatcher.gentoo.org
1 aballier 14/06/03 06:18:01
2
3 Modified: ChangeLog
4 Added: ffmpeg-2.2.3.ebuild
5 Log:
6 verison bump
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
9
10 Revision Changes Path
11 1.738 media-video/ffmpeg/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/ffmpeg/ChangeLog?rev=1.738&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/ffmpeg/ChangeLog?rev=1.738&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/ffmpeg/ChangeLog?r1=1.737&r2=1.738
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v
20 retrieving revision 1.737
21 retrieving revision 1.738
22 diff -u -r1.737 -r1.738
23 --- ChangeLog 20 May 2014 18:30:09 -0000 1.737
24 +++ ChangeLog 3 Jun 2014 06:18:01 -0000 1.738
25 @@ -1,6 +1,11 @@
26 # ChangeLog for media-video/ffmpeg
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.737 2014/05/20 18:30:09 aballier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.738 2014/06/03 06:18:01 aballier Exp $
30 +
31 +*ffmpeg-2.2.3 (03 Jun 2014)
32 +
33 + 03 Jun 2014; Alexis Ballier <aballier@g.o> +ffmpeg-2.2.3.ebuild:
34 + verison bump
35
36 20 May 2014; Alexis Ballier <aballier@g.o> ffmpeg-2.2.2.ebuild:
37 leverage x265 deps now that it works
38
39
40
41 1.1 media-video/ffmpeg/ffmpeg-2.2.3.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/ffmpeg/ffmpeg-2.2.3.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/ffmpeg/ffmpeg-2.2.3.ebuild?rev=1.1&content-type=text/plain
45
46 Index: ffmpeg-2.2.3.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-2.2.3.ebuild,v 1.1 2014/06/03 06:18:01 aballier Exp $
51
52 EAPI="5"
53
54 # Subslot: libavutil major.libavcodec major.libavformat major
55 # Since FFmpeg ships several libraries, subslot is kind of limited here.
56 # Most consumers will use those three libraries, if a "less used" library
57 # changes its soname, consumers will have to be rebuilt the old way
58 # (preserve-libs).
59 # If, for example, a package does not link to libavformat and only libavformat
60 # changes its ABI then this package will be rebuilt needlessly. Hence, such a
61 # package is free _not_ to := depend on FFmpeg but I would strongly encourage
62 # doing so since such a case is unlikely.
63 FFMPEG_SUBSLOT=52.55.55
64
65 SCM=""
66 if [ "${PV#9999}" != "${PV}" ] ; then
67 SCM="git-2"
68 EGIT_REPO_URI="git://source.ffmpeg.org/ffmpeg.git"
69 fi
70
71 inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
72
73 DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec."
74 HOMEPAGE="http://ffmpeg.org/"
75 if [ "${PV#9999}" != "${PV}" ] ; then
76 SRC_URI=""
77 elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
78 SRC_URI="mirror://gentoo/${P}.tar.bz2"
79 else # Release
80 SRC_URI="http://ffmpeg.org/releases/${P/_/-}.tar.bz2"
81 fi
82 FFMPEG_REVISION="${PV#*_p}"
83
84 LICENSE="GPL-2 amr? ( GPL-3 ) encode? ( aac? ( GPL-3 ) )"
85 SLOT="0/${FFMPEG_SUBSLOT}"
86 if [ "${PV#9999}" = "${PV}" ] ; then
87 KEYWORDS="~amd64 ~hppa ~mips ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
88 fi
89 IUSE="
90 aac aacplus alsa amr amrenc bindist bluray +bzip2 cdio celt
91 cpudetection debug doc +encode examples faac fdk flite fontconfig frei0r
92 gme gnutls gsm +hardcoded-tables +iconv iec61883 ieee1394 jack jpeg2k
93 ladspa libass libcaca libsoxr libv4l modplug mp3 +network openal opengl
94 openssl opus oss pic pulseaudio quvi rtmp schroedinger sdl speex ssh
95 static-libs test theora threads truetype twolame v4l vaapi vdpau vorbis vpx
96 wavpack webp X x264 x265 xvid +zlib zvbi
97 "
98
99 ARM_CPU_FEATURES="armv5te armv6 armv6t2 neon armvfp:vfp"
100 MIPS_CPU_FEATURES="mips32r2 mipsdspr1 mipsdspr2 mipsfpu"
101 PPC_CPU_FEATURES="altivec"
102 X86_CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext avx avx2 fma3 fma4 mmx mmxext sse sse2 sse3 ssse3 sse4 sse4_2:sse42"
103
104 # String for CPU features in the useflag[:configure_option] form
105 # if :configure_option isn't set, it will use 'useflag' as configure option
106 CPU_FEATURES="
107 ${ARM_CPU_FEATURES}
108 ${MIPS_CPU_FEATURES}
109 ${PPC_CPU_FEATURES}
110 ${X86_CPU_FEATURES}
111 "
112
113 for i in ${CPU_FEATURES}; do
114 IUSE="${IUSE} ${i%:*}"
115 done
116
117 FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart trasher"
118
119 for i in ${FFTOOLS}; do
120 IUSE="${IUSE} +fftools_$i"
121 done
122
123 RDEPEND="
124 alsa? ( media-libs/alsa-lib )
125 amr? ( media-libs/opencore-amr )
126 bluray? ( media-libs/libbluray )
127 bzip2? ( app-arch/bzip2 )
128 cdio? ( || ( dev-libs/libcdio-paranoia <dev-libs/libcdio-0.90[-minimal] ) )
129 celt? ( >=media-libs/celt-0.11.1 )
130 encode? (
131 aac? ( media-libs/vo-aacenc )
132 aacplus? ( media-libs/libaacplus )
133 amrenc? ( media-libs/vo-amrwbenc )
134 faac? ( media-libs/faac )
135 mp3? ( >=media-sound/lame-3.98.3 )
136 theora? ( >=media-libs/libtheora-1.1.1[encode] media-libs/libogg )
137 twolame? ( media-sound/twolame )
138 wavpack? ( media-sound/wavpack )
139 webp? ( media-libs/libwebp )
140 x264? ( >=media-libs/x264-0.0.20111017:= )
141 x265? ( media-libs/x265:= )
142 xvid? ( >=media-libs/xvid-1.1.0 )
143 )
144 fdk? ( >=media-libs/fdk-aac-0.1.3 )
145 flite? ( app-accessibility/flite )
146 fontconfig? ( media-libs/fontconfig )
147 frei0r? ( media-plugins/frei0r-plugins )
148 gme? ( media-libs/game-music-emu )
149 gnutls? ( >=net-libs/gnutls-2.12.16 )
150 gsm? ( >=media-sound/gsm-1.0.12-r1 )
151 iconv? ( virtual/libiconv )
152 iec61883? ( media-libs/libiec61883 sys-libs/libraw1394 sys-libs/libavc1394 )
153 ieee1394? ( media-libs/libdc1394 sys-libs/libraw1394 )
154 jack? ( media-sound/jack-audio-connection-kit )
155 jpeg2k? ( >=media-libs/openjpeg-1.3-r2:0 )
156 libass? ( media-libs/libass )
157 libcaca? ( media-libs/libcaca )
158 libsoxr? ( media-libs/soxr )
159 libv4l? ( media-libs/libv4l )
160 modplug? ( media-libs/libmodplug )
161 openal? ( >=media-libs/openal-1.1 )
162 opengl? ( virtual/opengl )
163 openssl? ( dev-libs/openssl )
164 opus? ( media-libs/opus )
165 pulseaudio? ( media-sound/pulseaudio )
166 quvi? ( media-libs/libquvi:0.4 )
167 rtmp? ( >=media-video/rtmpdump-2.2f )
168 sdl? ( >=media-libs/libsdl-1.2.13-r1[sound,video] )
169 schroedinger? ( media-libs/schroedinger )
170 speex? ( >=media-libs/speex-1.2_beta3 )
171 ssh? ( net-libs/libssh )
172 truetype? ( media-libs/freetype:2 )
173 vaapi? ( >=x11-libs/libva-0.32 )
174 vdpau? ( x11-libs/libvdpau )
175 vorbis? ( media-libs/libvorbis media-libs/libogg )
176 vpx? ( >=media-libs/libvpx-0.9.6 )
177 X? ( x11-libs/libX11 x11-libs/libXext x11-libs/libXfixes )
178 zlib? ( sys-libs/zlib )
179 zvbi? ( media-libs/zvbi )
180 !media-video/qt-faststart
181 !media-libs/libpostproc
182 "
183
184 DEPEND="${RDEPEND}
185 >=sys-devel/make-3.81
186 doc? ( app-text/texi2html )
187 fontconfig? ( virtual/pkgconfig )
188 gnutls? ( virtual/pkgconfig )
189 ieee1394? ( virtual/pkgconfig )
190 ladspa? ( media-libs/ladspa-sdk )
191 libv4l? ( virtual/pkgconfig )
192 mmx? ( >=dev-lang/yasm-1.2 )
193 rtmp? ( virtual/pkgconfig )
194 schroedinger? ( virtual/pkgconfig )
195 test? ( net-misc/wget )
196 truetype? ( virtual/pkgconfig )
197 v4l? ( sys-kernel/linux-headers )
198 "
199 # faac is license-incompatible with ffmpeg
200 REQUIRED_USE="bindist? ( encode? ( !faac !aacplus ) !openssl )
201 libv4l? ( v4l )
202 fftools_cws2fws? ( zlib )
203 test? ( encode )"
204
205 S=${WORKDIR}/${P/_/-}
206 BUILD_DIR=${S}_build
207
208 src_prepare() {
209 if [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
210 export revision=git-N-${FFMPEG_REVISION}
211 fi
212 epatch "${FILESDIR}/ladspadl.patch"
213 epatch_user
214 }
215
216 src_configure() {
217 mkdir -p "${BUILD_DIR}"
218 cd "${BUILD_DIR}"
219
220 local myconf="${EXTRA_FFMPEG_CONF}"
221
222 # options to use as use_enable in the foo[:bar] form.
223 # This will feed configure with $(use_enable foo bar)
224 # or $(use_enable foo foo) if no :bar is set.
225 local ffuse="bzip2:bzlib cpudetection:runtime-cpudetect debug doc
226 gnutls hardcoded-tables iconv network openssl sdl:ffplay vaapi
227 vdpau zlib"
228 use openssl && myconf="${myconf} --enable-nonfree"
229
230 # Encoders
231 if use encode
232 then
233 ffuse="${ffuse} aac:libvo-aacenc amrenc:libvo-amrwbenc mp3:libmp3lame"
234 for i in aacplus faac theora twolame wavpack webp x264 x265 xvid; do
235 ffuse="${ffuse} ${i}:lib${i}"
236 done
237
238 # Licensing.
239 if use aac || use amrenc ; then
240 myconf="${myconf} --enable-version3"
241 fi
242 if use aacplus || use faac ; then
243 myconf="${myconf} --enable-nonfree"
244 fi
245 else
246 myconf="${myconf} --disable-encoders"
247 fi
248
249 # libavdevice options
250 ffuse="${ffuse} cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal opengl"
251
252 # Indevs
253 use v4l || myconf="${myconf} --disable-indev=v4l2 --disable-outdev=v4l2"
254 for i in alsa oss jack ; do
255 use ${i} || myconf="${myconf} --disable-indev=${i}"
256 done
257 ffuse="${ffuse} libv4l:libv4l2 pulseaudio:libpulse X:x11grab"
258
259 # Outdevs
260 for i in alsa oss sdl ; do
261 use ${i} || myconf="${myconf} --disable-outdev=${i}"
262 done
263
264 # libavfilter options
265 ffuse="${ffuse} flite:libflite frei0r fontconfig ladspa libass truetype:libfreetype"
266
267 # libswresample options
268 ffuse="${ffuse} libsoxr"
269
270 # Threads; we only support pthread for now but ffmpeg supports more
271 ffuse="${ffuse} threads:pthreads"
272
273 # Decoders
274 ffuse="${ffuse} amr:libopencore-amrwb amr:libopencore-amrnb fdk:libfdk-aac jpeg2k:libopenjpeg"
275 use amr && myconf="${myconf} --enable-version3"
276 for i in bluray celt gme gsm modplug opus quvi rtmp ssh schroedinger speex vorbis vpx zvbi; do
277 ffuse="${ffuse} ${i}:lib${i}"
278 done
279 use fdk && myconf="${myconf} --enable-nonfree"
280
281 for i in ${ffuse} ; do
282 myconf="${myconf} $(use_enable ${i%:*} ${i#*:})"
283 done
284
285 # CPU features
286 for i in ${CPU_FEATURES}; do
287 use ${i%:*} || myconf="${myconf} --disable-${i#*:}"
288 done
289 if use pic ; then
290 myconf="${myconf} --enable-pic"
291 # disable asm code if PIC is required
292 # as the provided asm decidedly is not PIC for x86.
293 use x86 && myconf="${myconf} --disable-asm"
294 fi
295 [[ ${ABI} == "x32" ]] && myconf+=" --disable-asm" #427004
296
297 # Try to get cpu type based on CFLAGS.
298 # Bug #172723
299 # We need to do this so that features of that CPU will be better used
300 # If they contain an unknown CPU it will not hurt since ffmpeg's configure
301 # will just ignore it.
302 for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
303 [ "${i}" = "native" ] && i="host" # bug #273421
304 myconf="${myconf} --cpu=${i}"
305 break
306 done
307
308 # Mandatory configuration
309 myconf="
310 --enable-gpl
311 --enable-postproc
312 --enable-avfilter
313 --enable-avresample
314 --disable-stripping
315 ${myconf}"
316
317 # cross compile support
318 if tc-is-cross-compiler ; then
319 myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
320 case ${CHOST} in
321 *freebsd*)
322 myconf="${myconf} --target-os=freebsd"
323 ;;
324 mingw32*)
325 myconf="${myconf} --target-os=mingw32"
326 ;;
327 *linux*)
328 myconf="${myconf} --target-os=linux"
329 ;;
330 esac
331 fi
332
333 "${S}/configure" \
334 --prefix="${EPREFIX}/usr" \
335 --libdir="${EPREFIX}/usr/$(get_libdir)" \
336 --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
337 --mandir="${EPREFIX}/usr/share/man" \
338 --enable-shared \
339 --cc="$(tc-getCC)" \
340 --cxx="$(tc-getCXX)" \
341 --ar="$(tc-getAR)" \
342 --optflags="${CFLAGS}" \
343 --extra-cflags="${CFLAGS}" \
344 --extra-cxxflags="${CXXFLAGS}" \
345 $(use_enable static-libs static) \
346 ${myconf} || die
347 }
348
349 src_compile() {
350 cd "${BUILD_DIR}"
351 emake V=1
352
353 for i in ${FFTOOLS} ; do
354 if use fftools_$i ; then
355 emake V=1 tools/$i
356 fi
357 done
358 }
359
360 src_install() {
361 cd "${BUILD_DIR}"
362 emake V=1 DESTDIR="${D}" install install-man
363
364 for i in ${FFTOOLS} ; do
365 if use fftools_$i ; then
366 dobin tools/$i
367 fi
368 done
369
370 cd "${S}"
371 dodoc Changelog README CREDITS doc/*.txt doc/APIchanges doc/RELEASE_NOTES
372 use doc && dohtml -r doc/*
373 if use examples ; then
374 dodoc -r doc/examples
375 docompress -x /usr/share/doc/${PF}/examples
376 fi
377 }
378
379 src_test() {
380 cd "${BUILD_DIR}"
381 LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil:${BUILD_DIR}/libavresample" \
382 emake V=1 fate
383 }