Gentoo Archives: gentoo-commits

From: "Luca Barbato (lu_zero)" <lu_zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-video/libav: libav-0.8.9-r1.ebuild ChangeLog libav-9.11.ebuild libav-0.8.10.ebuild
Date: Sun, 09 Feb 2014 22:07:07
Message-Id: 20140209220701.891A22004C@flycatcher.gentoo.org
1 lu_zero 14/02/09 22:07:01
2
3 Modified: libav-0.8.9-r1.ebuild ChangeLog
4 Added: libav-9.11.ebuild libav-0.8.10.ebuild
5 Log:
6 New security updates
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, unsigned Manifest commit)
9
10 Revision Changes Path
11 1.3 media-video/libav/libav-0.8.9-r1.ebuild
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-0.8.9-r1.ebuild?rev=1.3&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-0.8.9-r1.ebuild?rev=1.3&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-0.8.9-r1.ebuild?r1=1.2&r2=1.3
16
17 Index: libav-0.8.9-r1.ebuild
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-video/libav/libav-0.8.9-r1.ebuild,v
20 retrieving revision 1.2
21 retrieving revision 1.3
22 diff -u -r1.2 -r1.3
23 --- libav-0.8.9-r1.ebuild 30 Dec 2013 14:36:38 -0000 1.2
24 +++ libav-0.8.9-r1.ebuild 9 Feb 2014 22:07:01 -0000 1.3
25 @@ -1,6 +1,6 @@
26 -# Copyright 1999-2013 Gentoo Foundation
27 +# Copyright 1999-2014 Gentoo Foundation
28 # Distributed under the terms of the GNU General Public License v2
29 -# $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-0.8.9-r1.ebuild,v 1.2 2013/12/30 14:36:38 lu_zero Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-0.8.9-r1.ebuild,v 1.3 2014/02/09 22:07:01 lu_zero Exp $
31
32 EAPI=5
33
34 @@ -316,7 +316,7 @@
35 elog "but will be removed in the next version"
36 }
37
38 -src_test() {
39 - LD_LIBRARY_PATH="${S}/libavcore:${S}/libswscale:${S}/libavcodec:${S}/libavdevice:${S}/libavfilter:${S}/libavformat:${S}/libavutil" \
40 +multilib_src_test() {
41 + LD_LIBRARY_PATH="${BUILD_DIR}/libavcore:${BUILD_DIR}/libswscale:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:$BUILD_DIRS}/libavutil" \
42 emake fate SAMPLES="${WORKDIR}/fate"
43 }
44
45
46
47 1.177 media-video/libav/ChangeLog
48
49 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/ChangeLog?rev=1.177&view=markup
50 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/ChangeLog?rev=1.177&content-type=text/plain
51 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/ChangeLog?r1=1.176&r2=1.177
52
53 Index: ChangeLog
54 ===================================================================
55 RCS file: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v
56 retrieving revision 1.176
57 retrieving revision 1.177
58 diff -u -r1.176 -r1.177
59 --- ChangeLog 29 Jan 2014 18:35:18 -0000 1.176
60 +++ ChangeLog 9 Feb 2014 22:07:01 -0000 1.177
61 @@ -1,6 +1,13 @@
62 # ChangeLog for media-video/libav
63 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
64 -# $Header: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v 1.176 2014/01/29 18:35:18 axs Exp $
65 +# $Header: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v 1.177 2014/02/09 22:07:01 lu_zero Exp $
66 +
67 +*libav-9.11 (09 Feb 2014)
68 +*libav-0.8.10 (09 Feb 2014)
69 +
70 + 09 Feb 2014; Luca Barbato <lu_zero@g.o> libav-0.8.9-r1.ebuild,
71 + +libav-0.8.10.ebuild, +libav-9.11.ebuild:
72 + New security updates
73
74 *libav-10_alpha1-r1 (29 Jan 2014)
75 *libav-9.10-r1 (29 Jan 2014)
76
77
78
79 1.1 media-video/libav/libav-9.11.ebuild
80
81 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-9.11.ebuild?rev=1.1&view=markup
82 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-9.11.ebuild?rev=1.1&content-type=text/plain
83
84 Index: libav-9.11.ebuild
85 ===================================================================
86 # Copyright 1999-2014 Gentoo Foundation
87 # Distributed under the terms of the GNU General Public License v2
88 # $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-9.11.ebuild,v 1.1 2014/02/09 22:07:01 lu_zero Exp $
89
90 EAPI=5
91
92 if [[ ${PV} == *9999 ]] ; then
93 SCM="git-2"
94 EGIT_REPO_URI="git://git.libav.org/libav.git"
95 [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
96 fi
97
98 inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
99
100 DESCRIPTION="Complete solution to record, convert and stream audio and video."
101 HOMEPAGE="http://libav.org/"
102 if [[ ${PV} == *9999 ]] ; then
103 SRC_URI=""
104 elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
105 SRC_URI="http://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
106 else # Official release
107 SRC_URI="http://${PN}.org/releases/${P}.tar.xz"
108 fi
109
110 SRC_URI+=" test? ( http://dev.gentoo.org/~lu_zero/libav/fate-9.tar.xz )"
111
112 LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
113 SLOT="0/9"
114
115 # Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
116 [[ ${PV} == *9999 ]] || \
117 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
118
119 IUSE="aac alsa amr bindist +bzip2 cdio cpudetection custom-cflags debug doc
120 +encode faac fdk frei0r +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k mp3
121 network openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
122 static-libs test theora threads tools truetype v4l vaapi vdpau vorbis vpx X
123 x264 xvid +zlib"
124
125 # String for CPU features in the useflag[:configure_option] form
126 # if :configure_option isn't set, it will use 'useflag' as configure option
127 CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext altivec avx mmx mmxext neon ssse3 vis"
128 for i in ${CPU_FEATURES} ; do
129 IUSE+=" ${i%:*}"
130 done
131
132 TOOLS="aviocat graph2dot ismindex pktdumper qt-faststart trasher"
133
134 RDEPEND="
135 !media-video/ffmpeg:0
136 alsa? ( media-libs/alsa-lib )
137 amr? ( media-libs/opencore-amr )
138 bzip2? ( app-arch/bzip2 )
139 cdio? (
140 || (
141 dev-libs/libcdio-paranoia
142 <dev-libs/libcdio-0.90[-minimal]
143 )
144 )
145 encode? (
146 aac? ( media-libs/vo-aacenc )
147 amr? ( media-libs/vo-amrwbenc )
148 faac? ( media-libs/faac )
149 fdk? ( media-libs/fdk-aac )
150 mp3? ( >=media-sound/lame-3.98.3 )
151 theora? (
152 >=media-libs/libtheora-1.1.1[encode]
153 media-libs/libogg
154 )
155 vorbis? ( media-libs/libvorbis media-libs/libogg )
156 x264? ( >=media-libs/x264-0.0.20111017:= )
157 xvid? ( >=media-libs/xvid-1.1.0 )
158 )
159 frei0r? ( media-plugins/frei0r-plugins )
160 gsm? ( >=media-sound/gsm-1.0.12-r1 )
161 ieee1394? (
162 media-libs/libdc1394
163 sys-libs/libraw1394
164 )
165 jack? ( media-sound/jack-audio-connection-kit )
166 jpeg2k? ( >=media-libs/openjpeg-1.3-r2:0 )
167 opus? ( media-libs/opus )
168 pulseaudio? ( media-sound/pulseaudio )
169 rtmp? ( >=media-video/rtmpdump-2.2f )
170 ssl? (
171 openssl? ( dev-libs/openssl )
172 !openssl? ( net-libs/gnutls )
173 )
174 sdl? ( >=media-libs/libsdl-1.2.13-r1[audio,video] )
175 schroedinger? ( media-libs/schroedinger )
176 speex? ( >=media-libs/speex-1.2_beta3 )
177 truetype? ( media-libs/freetype:2 )
178 vaapi? ( x11-libs/libva )
179 vdpau? ( x11-libs/libvdpau )
180 vpx? ( >=media-libs/libvpx-0.9.6 )
181 X? (
182 x11-libs/libX11
183 x11-libs/libXext
184 x11-libs/libXfixes
185 )
186 zlib? ( sys-libs/zlib )
187 "
188
189 DEPEND="${RDEPEND}
190 >=sys-devel/make-3.81
191 doc? ( app-text/texi2html )
192 ieee1394? ( virtual/pkgconfig )
193 mmx? ( dev-lang/yasm )
194 rtmp? ( virtual/pkgconfig )
195 schroedinger? ( virtual/pkgconfig )
196 ssl? ( virtual/pkgconfig )
197 test? ( sys-devel/bc )
198 truetype? ( virtual/pkgconfig )
199 v4l? ( sys-kernel/linux-headers )
200 "
201
202 # faac can't be binary distributed
203 # openssl support marked as nonfree
204 # faac and aac are concurent implementations
205 # amr and aac require at least lgpl3
206 # x264 requires gpl2
207 REQUIRED_USE="bindist? ( !faac !openssl !fdk )
208 rtmp? ( network )
209 amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl ) cdio? ( gpl )
210 test? ( encode zlib )
211 "
212
213 src_prepare() {
214 # if we have snapshot then we need to hardcode the version
215 if [[ ${PV%_p*} != ${PV} ]]; then
216 sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
217 fi
218 }
219
220 src_configure() {
221 local myconf="${EXTRA_LIBAV_CONF}"
222 local uses i
223
224 use zlib && TOOLS+=" cws2fws"
225
226 myconf+="
227 $(use_enable gpl)
228 $(use_enable gpl version3)
229 --enable-avfilter
230 "
231
232 # enabled by default
233 uses="debug doc network zlib"
234 for i in ${uses}; do
235 use ${i} || myconf+=" --disable-${i}"
236 done
237 use bzip2 || myconf+=" --disable-bzlib"
238 use sdl || myconf+=" --disable-avplay"
239
240 if use ssl; then
241 use openssl && myconf+=" --enable-openssl --enable-nonfree" \
242 || myconf+=" --enable-gnutls"
243 fi
244
245 use custom-cflags && myconf+=" --disable-optimizations"
246 use cpudetection && myconf+=" --enable-runtime-cpudetect"
247
248 use vdpau || myconf+=" --disable-vdpau"
249
250 use vaapi && myconf+=" --enable-vaapi"
251
252 # Encoders
253 if use encode; then
254 use faac && myconf+=" --enable-nonfree"
255 use fdk && myconf+=" --enable-nonfree --enable-libfdk-aac"
256 use mp3 && myconf+=" --enable-libmp3lame"
257 use amr && myconf+=" --enable-libvo-amrwbenc"
258 use aac && myconf+=" --enable-libvo-aacenc"
259 uses="faac theora vorbis x264 xvid"
260 for i in ${uses}; do
261 use ${i} && myconf+=" --enable-lib${i}"
262 done
263 else
264 myconf+=" --disable-encoders"
265 fi
266
267 # libavdevice options
268 use cdio && myconf+=" --enable-libcdio"
269 use ieee1394 && myconf+=" --enable-libdc1394"
270 use pulseaudio && myconf+=" --enable-libpulse"
271
272 # Indevs
273 # v4l1 is gone since linux-headers-2.6.38
274 myconf+=" --disable-indev=v4l"
275 use v4l || myconf+=" --disable-indev=v4l2"
276 for i in alsa oss jack; do
277 use ${i} || myconf+=" --disable-indev=${i}"
278 done
279 use X && myconf+=" --enable-x11grab"
280 # Outdevs
281 for i in alsa oss ; do
282 use ${i} || myconf+=" --disable-outdev=${i}"
283 done
284 # libavfilter options
285 use frei0r && myconf+=" --enable-frei0r"
286 use truetype && myconf+=" --enable-libfreetype"
287
288 # Threads; we only support pthread for now
289 use threads && myconf+=" --enable-pthreads"
290
291 # Decoders
292 use amr && myconf+=" --enable-libopencore-amrwb --enable-libopencore-amrnb"
293 uses="gsm opus rtmp schroedinger speex vpx"
294 for i in ${uses}; do
295 use ${i} && myconf+=" --enable-lib${i}"
296 done
297 use jpeg2k && myconf+=" --enable-libopenjpeg"
298
299 # CPU features
300 for i in ${CPU_FEATURES}; do
301 use ${i%:*} || myconf+=" --disable-${i#*:}"
302 done
303
304 # pass the right -mfpu as extra
305 use neon && myconf+=" --extra-cflags=-mfpu=neon"
306
307 # disable mmx accelerated code if PIC is required
308 # as the provided asm decidedly is not PIC for x86.
309 if use pic && use x86 ; then
310 myconf+=" --disable-mmx --disable-mmxext"
311 fi
312
313 # Option to force building pic
314 use pic && myconf+=" --enable-pic"
315
316 # cross compile support
317 if tc-is-cross-compiler ; then
318 myconf+=" --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
319 case ${CHOST} in
320 *freebsd*)
321 myconf+=" --target-os=freebsd"
322 ;;
323 mingw32*)
324 myconf+=" --target-os=mingw32"
325 ;;
326 *linux*)
327 myconf+=" --target-os=linux"
328 ;;
329 esac
330 fi
331
332 # Misc stuff
333 use hardcoded-tables && myconf+=" --enable-hardcoded-tables"
334
335 # Specific workarounds for too-few-registers arch...
336 if [[ $(tc-arch) == "x86" ]]; then
337 filter-flags -fforce-addr -momit-leaf-frame-pointer
338 append-flags -fomit-frame-pointer
339 is-flag -O? || append-flags -O2
340 if use debug; then
341 # no need to warn about debug if not using debug flag
342 ewarn ""
343 ewarn "Debug information will be almost useless as the frame pointer is omitted."
344 ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
345 ewarn "difficult to fix. Please have that in mind."
346 ewarn ""
347 fi
348 fi
349
350 cd "${S}"
351 ./configure \
352 --prefix="${EPREFIX}"/usr \
353 --libdir="${EPREFIX}"/usr/$(get_libdir) \
354 --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
355 --mandir="${EPREFIX}"/usr/share/man \
356 --enable-shared \
357 --cc="$(tc-getCC)" \
358 --ar="$(tc-getAR)" \
359 --optflags="${CFLAGS}" \
360 --extra-cflags="${CFLAGS}" \
361 $(use_enable static-libs static) \
362 ${myconf} || die
363
364 MAKEOPTS+=" V=1"
365 }
366
367 src_compile() {
368 local i
369
370 emake
371
372 if use tools; then
373 tc-export CC
374
375 for i in ${TOOLS}; do
376 emake tools/${i}
377 done
378 fi
379 }
380
381 src_install() {
382 local i
383
384 emake DESTDIR="${D}" install install-man
385
386 dodoc Changelog README INSTALL
387 dodoc doc/*.txt
388 use doc && dodoc doc/*.html
389
390 if use tools; then
391 for i in ${TOOLS}; do
392 dobin tools/${i}
393 done
394 fi
395 }
396
397 src_test() {
398 echo ${WORKDIR}/fate
399 LD_LIBRARY_PATH="${S}/libswscale:${S}/libavcodec:${S}/libavdevice:${S}/libavfilter:${S}/libavformat:${S}/libavresample:${S}/libavutil" \
400 emake -j1 fate SAMPLES="${WORKDIR}/fate"
401 }
402
403
404
405 1.1 media-video/libav/libav-0.8.10.ebuild
406
407 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-0.8.10.ebuild?rev=1.1&view=markup
408 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-0.8.10.ebuild?rev=1.1&content-type=text/plain
409
410 Index: libav-0.8.10.ebuild
411 ===================================================================
412 # Copyright 1999-2014 Gentoo Foundation
413 # Distributed under the terms of the GNU General Public License v2
414 # $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-0.8.10.ebuild,v 1.1 2014/02/09 22:07:01 lu_zero Exp $
415
416 EAPI=5
417
418 if [[ ${PV} == *9999 ]] ; then
419 SCM="git-2"
420 EGIT_REPO_URI="git://git.libav.org/libav.git"
421 [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
422 fi
423
424 inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
425
426 DESCRIPTION="Complete solution to record, convert and stream audio and video."
427 HOMEPAGE="http://libav.org/"
428 if [[ ${PV} == *9999 ]] ; then
429 SRC_URI=""
430 elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
431 SRC_URI="http://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
432 else # Official release
433 SRC_URI="http://${PN}.org/releases/${P}.tar.xz"
434 fi
435
436 SRC_URI+=" test? ( http://dev.gentoo.org/~lu_zero/libav/fate-0.8.2.tar.xz )"
437
438 LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
439 SLOT="0/0.8"
440 [[ ${PV} == *9999 ]] || \
441 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
442
443 IUSE="+3dnow +3dnowext aac alsa altivec amr bindist +bzip2 cdio cpudetection
444 custom-cflags debug dirac doc +encode faac truetype frei0r +gpl gsm
445 +hardcoded-tables ieee1394 jack jpeg2k +mmx +mmxext mp3 network openssl
446 oss pic pulseaudio +qt-faststart rtmp schroedinger sdl speex ssl +ssse3
447 static-libs test theora threads v4l vaapi vdpau vorbis vpx X x264 xvid
448 +zlib"
449
450 CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext altivec avx mmx mmxext:mmx2
451 neon ssse3 vis"
452
453 for i in ${CPU_FEATURES}; do
454 IUSE+=" ${i%:*}"
455 done
456
457 RDEPEND="
458 !media-video/ffmpeg
459 alsa? ( media-libs/alsa-lib )
460 amr? ( media-libs/opencore-amr )
461 bzip2? ( app-arch/bzip2 )
462 cdio? (
463 || (
464 dev-libs/libcdio-paranoia
465 <dev-libs/libcdio-0.90[-minimal]
466 )
467 )
468 dirac? ( media-video/dirac )
469 encode? (
470 aac? ( media-libs/vo-aacenc )
471 amr? ( media-libs/vo-amrwbenc )
472 faac? ( media-libs/faac )
473 mp3? ( >=media-sound/lame-3.98.3 )
474 theora? ( >=media-libs/libtheora-1.1.1[encode] media-libs/libogg )
475 vorbis? ( media-libs/libvorbis media-libs/libogg )
476 x264? ( >=media-libs/x264-0.0.20111017:= )
477 xvid? ( >=media-libs/xvid-1.1.0 )
478 )
479 truetype? ( media-libs/freetype:2 )
480 frei0r? ( media-plugins/frei0r-plugins )
481 gsm? ( >=media-sound/gsm-1.0.12-r1 )
482 ieee1394? ( media-libs/libdc1394 sys-libs/libraw1394 )
483 jack? ( media-sound/jack-audio-connection-kit )
484 jpeg2k? ( >=media-libs/openjpeg-1.3-r2:0 )
485 pulseaudio? ( media-sound/pulseaudio )
486 rtmp? ( >=media-video/rtmpdump-2.2f )
487 ssl? ( openssl? ( dev-libs/openssl )
488 !openssl? ( net-libs/gnutls ) )
489 sdl? ( >=media-libs/libsdl-1.2.13-r1[audio,video] )
490 schroedinger? ( media-libs/schroedinger )
491 speex? ( >=media-libs/speex-1.2_beta3 )
492 vaapi? ( x11-libs/libva )
493 vdpau? ( x11-libs/libvdpau )
494 vpx? ( >=media-libs/libvpx-0.9.6 )
495 X? ( x11-libs/libX11 x11-libs/libXext x11-libs/libXfixes )
496 zlib? ( sys-libs/zlib )
497 "
498
499 DEPEND="${RDEPEND}
500 >=sys-devel/make-3.81
501 dirac? ( virtual/pkgconfig )
502 doc? ( app-text/texi2html )
503 mmx? ( dev-lang/yasm )
504 rtmp? ( virtual/pkgconfig )
505 schroedinger? ( virtual/pkgconfig )
506 truetype? ( virtual/pkgconfig )
507 test? ( net-misc/wget )
508 v4l? ( sys-kernel/linux-headers )
509 "
510
511 # faac can't be binary distributed
512 # openssl support marked as nonfree
513 # faac and aac are concurent implementations
514 # amr and aac require at least lgpl3
515 # x264 requires gpl2
516 REQUIRED_USE="bindist? ( !faac !openssl )
517 rtmp? ( network )
518 amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl ) cdio? ( gpl )
519 test? ( encode )"
520
521 src_prepare() {
522 # if we have snapshot then we need to hardcode the version
523 if [[ ${PV%_p*} != ${PV} ]]; then
524 sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
525 fi
526 epatch "${FILESDIR}/${PN}-0.8.5-support-libcdio-paranoia.patch"
527 }
528
529 src_configure() {
530 local myconf="${EXTRA_LIBAV_CONF}"
531 local uses i
532
533 myconf+="
534 $(use_enable gpl)
535 $(use_enable gpl version3)
536 --enable-avfilter
537 "
538
539 # enabled by default
540 uses="debug doc network zlib"
541 for i in ${uses}; do
542 use ${i} || myconf+=" --disable-${i}"
543 done
544 use bzip2 || myconf+=" --disable-bzlib"
545 use sdl || myconf+=" --disable-avplay"
546
547 if use ssl; then
548 use openssl && myconf+=" --enable-openssl --enable-nonfree" \
549 || myconf+=" --enable-gnutls"
550 fi
551
552 use custom-cflags && myconf+=" --disable-optimizations"
553 use cpudetection && myconf+=" --enable-runtime-cpudetect"
554
555 #for i in h264_vdpau mpeg1_vdpau mpeg_vdpau vc1_vdpau wmv3_vdpau; do
556 # use video_cards_nvidia || myconf="${myconf} --disable-decoder=${i}"
557 # use vdpau || myconf="${myconf} --disable-decoder=${i}"
558 #done
559 use vdpau || myconf+=" --disable-vdpau"
560
561 use vaapi && myconf+=" --enable-vaapi"
562
563 # Encoders
564 if use encode; then
565 use mp3 && myconf+=" --enable-libmp3lame"
566 use amr && myconf+=" --enable-libvo-amrwbenc"
567 use faac && myconf+=" --enable-libfaac --enable-nonfree"
568 use aac && myconf+=" --enable-libvo-aacenc"
569 uses="theora vorbis x264 xvid"
570 for i in ${uses}; do
571 use ${i} && myconf+=" --enable-lib${i}"
572 done
573 else
574 myconf+=" --disable-encoders"
575 fi
576
577 # libavdevice options
578 use cdio && myconf+=" --enable-libcdio"
579 use ieee1394 && myconf+=" --enable-libdc1394"
580 use pulseaudio && myconf+=" --enable-libpulse"
581 # Indevs
582 # v4l1 is gone since linux-headers-2.6.38
583 myconf+=" --disable-indev=v4l"
584 use v4l || myconf+=" --disable-indev=v4l2"
585 for i in alsa oss jack; do
586 use ${i} || myconf+=" --disable-indev=${i}"
587 done
588 use X && myconf+=" --enable-x11grab"
589 # Outdevs
590 for i in alsa oss ; do
591 use ${i} || myconf+=" --disable-outdev=${i}"
592 done
593 # libavfilter options
594 use frei0r && myconf+=" --enable-frei0r"
595 use truetype && myconf+=" --enable-libfreetype"
596
597 # Threads; we only support pthread for now but ffmpeg supports more
598 use threads && myconf+=" --enable-pthreads"
599
600 # Decoders
601 use amr && myconf+=" --enable-libopencore-amrwb --enable-libopencore-amrnb"
602 uses="gsm dirac rtmp schroedinger speex vpx"
603 for i in ${uses}; do
604 use ${i} && myconf+=" --enable-lib${i}"
605 done
606 use jpeg2k && myconf+=" --enable-libopenjpeg"
607
608 # CPU features
609 for i in ${CPU_FEATURES}; do
610 use ${i%:*} || myconf+=" --disable-${i#*:}"
611 done
612
613 # pass the right -mfpu as extra
614 use neon && myconf+=" --extra-cflags=-mfpu=neon"
615
616 # disable mmx accelerated code if PIC is required
617 # as the provided asm decidedly is not PIC for x86.
618 if use pic && use x86 ; then
619 myconf+=" --disable-mmx --disable-mmx2"
620 fi
621
622 # Option to force building pic
623 use pic && myconf+=" --enable-pic"
624
625 # Try to get cpu type based on CFLAGS.
626 # Bug #172723
627 # We need to do this so that features of that CPU will be better used
628 # If they contain an unknown CPU it will not hurt since ffmpeg's configure
629 # will just ignore it.
630 for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
631 [ "${i}" = "native" ] && i="host" # bug #273421
632 [[ ${i} = *-sse3 ]] && i="${i%-sse3}" # bug 283968
633 myconf+=" --cpu=${i}"
634 break
635 done
636
637 # cross compile support
638 if tc-is-cross-compiler ; then
639 myconf+=" --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
640 case ${CHOST} in
641 *freebsd*)
642 myconf+=" --target-os=freebsd"
643 ;;
644 mingw32*)
645 myconf+=" --target-os=mingw32"
646 ;;
647 *linux*)
648 myconf+=" --target-os=linux"
649 ;;
650 esac
651 fi
652
653 # Misc stuff
654 use hardcoded-tables && myconf+=" --enable-hardcoded-tables"
655
656 # Specific workarounds for too-few-registers arch...
657 if [[ $(tc-arch) == "x86" ]]; then
658 filter-flags -fforce-addr -momit-leaf-frame-pointer
659 append-flags -fomit-frame-pointer
660 is-flag -O? || append-flags -O2
661 if use debug; then
662 # no need to warn about debug if not using debug flag
663 ewarn ""
664 ewarn "Debug information will be almost useless as the frame pointer is omitted."
665 ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
666 ewarn "difficult to fix. Please have that in mind."
667 ewarn ""
668 fi
669 fi
670
671 cd "${S}"
672 ./configure \
673 --prefix="${EPREFIX}"/usr \
674 --libdir="${EPREFIX}"/usr/$(get_libdir) \
675 --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
676 --mandir="${EPREFIX}"/usr/share/man \
677 --enable-shared \
678 --cc="$(tc-getCC)" \
679 --ar="$(tc-getAR)" \
680 $(use_enable static-libs static) \
681 ${myconf} || die
682
683 MAKEOPTS+=" V=1"
684 }
685
686 src_compile() {
687 emake
688
689 if use qt-faststart; then
690 tc-export CC
691 emake tools/qt-faststart
692 fi
693 }
694
695 src_install() {
696 emake DESTDIR="${D}" install install-man
697
698 dodoc Changelog README INSTALL doc/*.txt
699 use doc && dodoc doc/*.html
700
701 use qt-faststart && dobin tools/qt-faststart
702
703 for i in $(usex sdl avplay "") $(usex network avserver "") avprobe; do
704 dosym ${i} /usr/bin/${i/av/ff}
705 done
706 }
707
708 pkg_postinst() {
709 elog "Please note that the programs formerly known as ffplay, ffserver"
710 elog "and ffprobe are now called avplay, avserver and avprobe."
711 elog
712 elog "ffmpeg had been replaced by the feature incompatible avconv thus"
713 elog "the legacy ffmpeg is provided for compatibility with older scripts"
714 elog "but will be removed in the next version"
715 }
716
717 src_test() {
718 LD_LIBRARY_PATH="${S}/libavcore:${S}/libswscale:${S}/libavcodec:${S}/libavdevice:${S}/libavfilter:${S}/libavformat:${S}/libavutil" \
719 emake fate SAMPLES="${WORKDIR}/fate"
720 }