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.13.ebuild ChangeLog libav-10.2.ebuild libav-9.14.ebuild
Date: Fri, 27 Jun 2014 13:39:53
Message-Id: 20140627133920.0BCCD2004E@flycatcher.gentoo.org
1 lu_zero 14/06/27 13:39:19
2
3 Modified: ChangeLog
4 Added: libav-0.8.13.ebuild libav-10.2.ebuild
5 libav-9.14.ebuild
6 Log:
7 Security point releases
8
9 (Portage version: 2.2.10/cvs/Linux x86_64, unsigned Manifest commit)
10
11 Revision Changes Path
12 1.199 media-video/libav/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/ChangeLog?rev=1.199&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/ChangeLog?rev=1.199&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/ChangeLog?r1=1.198&r2=1.199
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v
21 retrieving revision 1.198
22 retrieving revision 1.199
23 diff -u -r1.198 -r1.199
24 --- ChangeLog 24 Jun 2014 19:20:31 -0000 1.198
25 +++ ChangeLog 27 Jun 2014 13:39:19 -0000 1.199
26 @@ -1,6 +1,14 @@
27 # ChangeLog for media-video/libav
28 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v 1.198 2014/06/24 19:20:31 maekke Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v 1.199 2014/06/27 13:39:19 lu_zero Exp $
31 +
32 +*libav-10.2 (27 Jun 2014)
33 +*libav-9.14 (27 Jun 2014)
34 +*libav-0.8.13 (27 Jun 2014)
35 +
36 + 27 Jun 2014; Luca Barbato <lu_zero@g.o> +libav-0.8.13.ebuild,
37 + +libav-9.14.ebuild, +libav-10.2.ebuild:
38 + Security point releases
39
40 24 Jun 2014; Markus Meier <maekke@g.o> libav-9.13.ebuild:
41 arm stable, bug #512024
42
43
44
45 1.1 media-video/libav/libav-0.8.13.ebuild
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-0.8.13.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-0.8.13.ebuild?rev=1.1&content-type=text/plain
49
50 Index: libav-0.8.13.ebuild
51 ===================================================================
52 # Copyright 1999-2014 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-0.8.13.ebuild,v 1.1 2014/06/27 13:39:19 lu_zero Exp $
55
56 EAPI=5
57
58 if [[ ${PV} == *9999 ]] ; then
59 SCM="git-2"
60 EGIT_REPO_URI="git://git.libav.org/libav.git"
61 [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
62 fi
63
64 inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
65
66 DESCRIPTION="Complete solution to record, convert and stream audio and video."
67 HOMEPAGE="http://libav.org/"
68 if [[ ${PV} == *9999 ]] ; then
69 SRC_URI=""
70 elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
71 SRC_URI="http://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
72 else # Official release
73 SRC_URI="http://${PN}.org/releases/${P}.tar.xz"
74 fi
75
76 SRC_URI+=" test? ( http://dev.gentoo.org/~lu_zero/libav/fate-0.8.2.tar.xz )"
77
78 LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
79 SLOT="0/0.8"
80 [[ ${PV} == *9999 ]] || \
81 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"
82
83 IUSE="+3dnow +3dnowext aac alsa altivec amr bindist +bzip2 cdio cpudetection
84 custom-cflags debug dirac doc +encode faac truetype frei0r +gpl gsm
85 +hardcoded-tables ieee1394 jack jpeg2k +mmx +mmxext mp3 +network openssl
86 oss pic pulseaudio +qt-faststart rtmp schroedinger sdl speex ssl +ssse3
87 static-libs test theora threads v4l vaapi vdpau vorbis vpx X x264 xvid
88 +zlib"
89
90 CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext altivec avx mmx mmxext:mmx2
91 neon ssse3 vis"
92
93 for i in ${CPU_FEATURES}; do
94 IUSE+=" ${i%:*}"
95 done
96
97 RDEPEND="
98 !media-video/ffmpeg
99 alsa? ( media-libs/alsa-lib )
100 amr? ( media-libs/opencore-amr )
101 bzip2? ( app-arch/bzip2 )
102 cdio? (
103 || (
104 dev-libs/libcdio-paranoia
105 <dev-libs/libcdio-0.90[-minimal]
106 )
107 )
108 dirac? ( media-video/dirac )
109 encode? (
110 aac? ( media-libs/vo-aacenc )
111 amr? ( media-libs/vo-amrwbenc )
112 faac? ( media-libs/faac )
113 mp3? ( >=media-sound/lame-3.98.3 )
114 theora? ( >=media-libs/libtheora-1.1.1[encode] media-libs/libogg )
115 vorbis? ( media-libs/libvorbis media-libs/libogg )
116 x264? ( >=media-libs/x264-0.0.20111017:= )
117 xvid? ( >=media-libs/xvid-1.1.0 )
118 )
119 truetype? ( media-libs/freetype:2 )
120 frei0r? ( media-plugins/frei0r-plugins )
121 gsm? ( >=media-sound/gsm-1.0.12-r1 )
122 ieee1394? ( media-libs/libdc1394 sys-libs/libraw1394 )
123 jack? ( media-sound/jack-audio-connection-kit )
124 jpeg2k? ( >=media-libs/openjpeg-1.3-r2:0 )
125 pulseaudio? ( media-sound/pulseaudio )
126 rtmp? ( >=media-video/rtmpdump-2.2f )
127 ssl? ( openssl? ( dev-libs/openssl )
128 !openssl? ( net-libs/gnutls ) )
129 sdl? ( >=media-libs/libsdl-1.2.13-r1[sound,video] )
130 schroedinger? ( media-libs/schroedinger )
131 speex? ( >=media-libs/speex-1.2_beta3 )
132 vaapi? ( x11-libs/libva )
133 vdpau? ( x11-libs/libvdpau )
134 vpx? ( >=media-libs/libvpx-0.9.6 )
135 X? ( x11-libs/libX11 x11-libs/libXext x11-libs/libXfixes )
136 zlib? ( sys-libs/zlib )
137 "
138
139 DEPEND="${RDEPEND}
140 >=sys-devel/make-3.81
141 dirac? ( virtual/pkgconfig )
142 doc? ( app-text/texi2html )
143 mmx? ( dev-lang/yasm )
144 rtmp? ( virtual/pkgconfig )
145 schroedinger? ( virtual/pkgconfig )
146 truetype? ( virtual/pkgconfig )
147 test? ( net-misc/wget )
148 v4l? ( sys-kernel/linux-headers )
149 "
150
151 # faac can't be binary distributed
152 # openssl support marked as nonfree
153 # faac and aac are concurent implementations
154 # amr and aac require at least lgpl3
155 # x264 requires gpl2
156 REQUIRED_USE="bindist? ( !faac !openssl )
157 rtmp? ( network )
158 amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl ) cdio? ( gpl )
159 test? ( encode )"
160
161 src_prepare() {
162 # if we have snapshot then we need to hardcode the version
163 if [[ ${PV%_p*} != ${PV} ]]; then
164 sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
165 fi
166 epatch "${FILESDIR}/${PN}-0.8.5-support-libcdio-paranoia.patch"
167 }
168
169 src_configure() {
170 local myconf="${EXTRA_LIBAV_CONF}"
171 local uses i
172
173 myconf+="
174 $(use_enable gpl)
175 $(use_enable gpl version3)
176 --enable-avfilter
177 "
178
179 # enabled by default
180 uses="debug doc network zlib"
181 for i in ${uses}; do
182 use ${i} || myconf+=" --disable-${i}"
183 done
184 use bzip2 || myconf+=" --disable-bzlib"
185 use sdl || myconf+=" --disable-avplay"
186
187 if use ssl; then
188 use openssl && myconf+=" --enable-openssl --enable-nonfree" \
189 || myconf+=" --enable-gnutls"
190 fi
191
192 use custom-cflags && myconf+=" --disable-optimizations"
193 use cpudetection && myconf+=" --enable-runtime-cpudetect"
194
195 #for i in h264_vdpau mpeg1_vdpau mpeg_vdpau vc1_vdpau wmv3_vdpau; do
196 # use video_cards_nvidia || myconf="${myconf} --disable-decoder=${i}"
197 # use vdpau || myconf="${myconf} --disable-decoder=${i}"
198 #done
199 use vdpau || myconf+=" --disable-vdpau"
200
201 use vaapi && myconf+=" --enable-vaapi"
202
203 # Encoders
204 if use encode; then
205 use mp3 && myconf+=" --enable-libmp3lame"
206 use amr && myconf+=" --enable-libvo-amrwbenc"
207 use faac && myconf+=" --enable-libfaac --enable-nonfree"
208 use aac && myconf+=" --enable-libvo-aacenc"
209 uses="theora vorbis x264 xvid"
210 for i in ${uses}; do
211 use ${i} && myconf+=" --enable-lib${i}"
212 done
213 else
214 myconf+=" --disable-encoders"
215 fi
216
217 # libavdevice options
218 use cdio && myconf+=" --enable-libcdio"
219 use ieee1394 && myconf+=" --enable-libdc1394"
220 use pulseaudio && myconf+=" --enable-libpulse"
221 # Indevs
222 # v4l1 is gone since linux-headers-2.6.38
223 myconf+=" --disable-indev=v4l"
224 use v4l || myconf+=" --disable-indev=v4l2"
225 for i in alsa oss jack; do
226 use ${i} || myconf+=" --disable-indev=${i}"
227 done
228 use X && myconf+=" --enable-x11grab"
229 # Outdevs
230 for i in alsa oss ; do
231 use ${i} || myconf+=" --disable-outdev=${i}"
232 done
233 # libavfilter options
234 use frei0r && myconf+=" --enable-frei0r"
235 use truetype && myconf+=" --enable-libfreetype"
236
237 # Threads; we only support pthread for now but ffmpeg supports more
238 use threads && myconf+=" --enable-pthreads"
239
240 # Decoders
241 use amr && myconf+=" --enable-libopencore-amrwb --enable-libopencore-amrnb"
242 uses="gsm dirac rtmp schroedinger speex vpx"
243 for i in ${uses}; do
244 use ${i} && myconf+=" --enable-lib${i}"
245 done
246 use jpeg2k && myconf+=" --enable-libopenjpeg"
247
248 # CPU features
249 for i in ${CPU_FEATURES}; do
250 use ${i%:*} || myconf+=" --disable-${i#*:}"
251 done
252
253 # pass the right -mfpu as extra
254 use neon && myconf+=" --extra-cflags=-mfpu=neon"
255
256 # disable mmx accelerated code if PIC is required
257 # as the provided asm decidedly is not PIC for x86.
258 if use pic && use x86 ; then
259 myconf+=" --disable-mmx --disable-mmx2"
260 fi
261
262 # Option to force building pic
263 use pic && myconf+=" --enable-pic"
264
265 # Try to get cpu type based on CFLAGS.
266 # Bug #172723
267 # We need to do this so that features of that CPU will be better used
268 # If they contain an unknown CPU it will not hurt since ffmpeg's configure
269 # will just ignore it.
270 for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
271 [ "${i}" = "native" ] && i="host" # bug #273421
272 [[ ${i} = *-sse3 ]] && i="${i%-sse3}" # bug 283968
273 myconf+=" --cpu=${i}"
274 break
275 done
276
277 # cross compile support
278 if tc-is-cross-compiler ; then
279 myconf+=" --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
280 case ${CHOST} in
281 *freebsd*)
282 myconf+=" --target-os=freebsd"
283 ;;
284 mingw32*)
285 myconf+=" --target-os=mingw32"
286 ;;
287 *linux*)
288 myconf+=" --target-os=linux"
289 ;;
290 esac
291 fi
292
293 # Misc stuff
294 use hardcoded-tables && myconf+=" --enable-hardcoded-tables"
295
296 # Specific workarounds for too-few-registers arch...
297 if [[ $(tc-arch) == "x86" ]]; then
298 filter-flags -fforce-addr -momit-leaf-frame-pointer
299 append-flags -fomit-frame-pointer
300 is-flag -O? || append-flags -O2
301 if use debug; then
302 # no need to warn about debug if not using debug flag
303 ewarn ""
304 ewarn "Debug information will be almost useless as the frame pointer is omitted."
305 ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
306 ewarn "difficult to fix. Please have that in mind."
307 ewarn ""
308 fi
309 fi
310
311 cd "${S}"
312 ./configure \
313 --prefix="${EPREFIX}"/usr \
314 --libdir="${EPREFIX}"/usr/$(get_libdir) \
315 --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
316 --mandir="${EPREFIX}"/usr/share/man \
317 --enable-shared \
318 --cc="$(tc-getCC)" \
319 --ar="$(tc-getAR)" \
320 $(use_enable static-libs static) \
321 ${myconf} || die
322
323 MAKEOPTS+=" V=1"
324 }
325
326 src_compile() {
327 emake
328
329 if use qt-faststart; then
330 tc-export CC
331 emake tools/qt-faststart
332 fi
333 }
334
335 src_install() {
336 emake DESTDIR="${D}" install install-man
337
338 dodoc Changelog README INSTALL doc/*.txt
339 use doc && dodoc doc/*.html
340
341 use qt-faststart && dobin tools/qt-faststart
342
343 for i in $(usex sdl avplay "") $(usex network avserver "") avprobe; do
344 dosym ${i} /usr/bin/${i/av/ff}
345 done
346 }
347
348 pkg_postinst() {
349 elog "Please note that the programs formerly known as ffplay, ffserver"
350 elog "and ffprobe are now called avplay, avserver and avprobe."
351 elog
352 elog "ffmpeg had been replaced by the feature incompatible avconv thus"
353 elog "the legacy ffmpeg is provided for compatibility with older scripts"
354 elog "but will be removed in the next version"
355 }
356
357 src_test() {
358 LD_LIBRARY_PATH="${S}/libavcore:${S}/libswscale:${S}/libavcodec:${S}/libavdevice:${S}/libavfilter:${S}/libavformat:${S}/libavutil" \
359 emake fate SAMPLES="${WORKDIR}/fate"
360 }
361
362
363
364 1.1 media-video/libav/libav-10.2.ebuild
365
366 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-10.2.ebuild?rev=1.1&view=markup
367 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-10.2.ebuild?rev=1.1&content-type=text/plain
368
369 Index: libav-10.2.ebuild
370 ===================================================================
371 # Copyright 1999-2014 Gentoo Foundation
372 # Distributed under the terms of the GNU General Public License v2
373 # $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-10.2.ebuild,v 1.1 2014/06/27 13:39:19 lu_zero Exp $
374
375 EAPI=5
376
377 if [[ ${PV} == *9999 ]] ; then
378 SCM="git-2"
379 EGIT_REPO_URI="git://git.libav.org/libav.git"
380 [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
381 fi
382
383 inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
384
385 DESCRIPTION="Complete solution to record, convert and stream audio and video."
386 HOMEPAGE="http://libav.org/"
387 if [[ ${PV} == *9999 ]] ; then
388 SRC_URI=""
389 elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
390 SRC_URI="http://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
391 else # Official release
392 SRC_URI="http://${PN}.org/releases/${P}.tar.xz"
393 fi
394
395 SRC_URI+=" test? ( http://dev.gentoo.org/~lu_zero/libav/fate-10.tar.xz )"
396
397 LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
398 SLOT="0/10"
399 [[ ${PV} == *9999 ]] || KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64
400 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos
401 ~x64-solaris ~x86-solaris"
402 IUSE="aac alsa amr bindist +bzip2 cdio cpudetection custom-cflags debug doc
403 +encode faac fdk frei0r +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k mp3
404 +network openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
405 static-libs test theora threads tools truetype v4l vaapi vdpau vorbis vpx X
406 wavpack webp x264 xvid +zlib"
407
408 # String for CPU features in the useflag[:configure_option] form
409 # if :configure_option isn't set, it will use 'useflag' as configure option
410 CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext altivec avx mmx mmxext neon ssse3 vis avx2"
411 for i in ${CPU_FEATURES} ; do
412 IUSE+=" ${i%:*}"
413 done
414
415 RDEPEND="
416 !media-video/ffmpeg:0
417 alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
418 amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
419 bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
420 cdio? (
421 || (
422 >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}]
423 <dev-libs/libcdio-0.90[-minimal,${MULTILIB_USEDEP}]
424 )
425 )
426 encode? (
427 aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
428 amr? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
429 faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
430 fdk? ( >=media-libs/fdk-aac-0.1.2[${MULTILIB_USEDEP}] )
431 mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
432 theora? (
433 >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
434 >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
435 )
436 vorbis? (
437 >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
438 >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
439 )
440 webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
441 wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
442 x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
443 xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
444 )
445 frei0r? ( media-plugins/frei0r-plugins )
446 gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
447 ieee1394? (
448 >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
449 >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
450 )
451 jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
452 jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
453 opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
454 pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
455 rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
456 ssl? (
457 openssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
458 !openssl? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
459 )
460 sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
461 schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
462 speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
463 truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
464 vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
465 vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
466 vpx? ( >=media-libs/libvpx-1.2.0_pre20130625[${MULTILIB_USEDEP}] )
467 X? (
468 >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
469 >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
470 >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}]
471 )
472 zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
473 "
474
475 DEPEND="${RDEPEND}
476 >=sys-devel/make-3.81
477 doc? ( app-text/texi2html )
478 ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
479 mmx? ( dev-lang/yasm )
480 rtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
481 schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
482 ssl? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
483 test? ( sys-devel/bc )
484 truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
485 v4l? ( sys-kernel/linux-headers )
486 "
487
488 RDEPEND="${RDEPEND}
489 abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
490 !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
491
492 # faac can't be binary distributed
493 # openssl support marked as nonfree
494 # faac and aac are concurent implementations
495 # amr and aac require at least lgpl3
496 # x264 requires gpl2
497 REQUIRED_USE="bindist? ( !faac !openssl !fdk )
498 rtmp? ( network )
499 amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl ) cdio? ( gpl )
500 test? ( encode zlib )
501 "
502
503 MULTILIB_WRAPPED_HEADERS=(
504 /usr/include/libavutil/avconfig.h
505 )
506
507 src_prepare() {
508 # if we have snapshot then we need to hardcode the version
509 if [[ ${PV%_p*} != ${PV} ]]; then
510 sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
511 fi
512
513 TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
514 use zlib && TOOLS+=( cws2fws )
515
516 MAKEOPTS+=" V=1"
517 }
518
519 multilib_src_configure() {
520 local myconf=( ${EXTRA_LIBAV_CONF} )
521 local uses i
522
523 myconf+=(
524 $(use_enable gpl)
525 $(use_enable gpl version3)
526 --enable-avfilter
527 )
528
529 # enabled by default
530 uses="debug doc network zlib"
531 for i in ${uses}; do
532 use ${i} || myconf+=( --disable-${i} )
533 done
534 use bzip2 || myconf+=( --disable-bzlib )
535 use sdl || myconf+=( --disable-avplay )
536
537 if use ssl; then
538 use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
539 || myconf+=( --enable-gnutls )
540 fi
541
542 use custom-cflags && myconf+=( --disable-optimizations )
543 use cpudetection && myconf+=( --enable-runtime-cpudetect )
544
545 use vdpau || myconf+=( --disable-vdpau )
546
547 use vaapi && myconf+=( --enable-vaapi )
548
549 # Encoders
550 if use encode; then
551 use faac && myconf+=( --enable-nonfree )
552 use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
553 use mp3 && myconf+=( --enable-libmp3lame )
554 use amr && myconf+=( --enable-libvo-amrwbenc )
555 use aac && myconf+=( --enable-libvo-aacenc )
556 uses="faac theora vorbis wavpack webp x264 xvid"
557 for i in ${uses}; do
558 use ${i} && myconf+=( --enable-lib${i} )
559 done
560 else
561 myconf+=( --disable-encoders )
562 fi
563
564 # libavdevice options
565 use cdio && myconf+=( --enable-libcdio )
566 use ieee1394 && myconf+=( --enable-libdc1394 )
567 use pulseaudio && myconf+=( --enable-libpulse )
568
569 # Indevs
570 # v4l1 is gone since linux-headers-2.6.38
571 myconf+=( --disable-indev=v4l )
572 use v4l || myconf+=( --disable-indev=v4l2 )
573 for i in alsa oss jack; do
574 use ${i} || myconf+=( --disable-indev=${i} )
575 done
576 use X && myconf+=( --enable-x11grab )
577 # Outdevs
578 for i in alsa oss ; do
579 use ${i} || myconf+=( --disable-outdev=${i} )
580 done
581 # libavfilter options
582 multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
583 use truetype && myconf+=( --enable-libfreetype )
584
585 # Threads; we only support pthread for now
586 use threads && myconf+=( --enable-pthreads )
587
588 # Decoders
589 use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
590 uses="gsm opus rtmp schroedinger speex vpx"
591 for i in ${uses}; do
592 use ${i} && myconf+=( --enable-lib${i} )
593 done
594 use jpeg2k && myconf+=( --enable-libopenjpeg )
595
596 # CPU features
597 for i in ${CPU_FEATURES}; do
598 use ${i%:*} || myconf+=( --disable-${i#*:} )
599 done
600
601 # pass the right -mfpu as extra
602 use neon && myconf+=( --extra-cflags=-mfpu=neon )
603
604 # disable mmx accelerated code if PIC is required
605 # as the provided asm decidedly is not PIC for x86.
606 if use pic && [[ ${ABI} == x86 ]]; then
607 myconf+=( --disable-mmx --disable-mmxext )
608 fi
609
610 # Option to force building pic
611 use pic && myconf+=( --enable-pic )
612
613 # cross compile support
614 if tc-is-cross-compiler ; then
615 myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
616 case ${CHOST} in
617 *freebsd*)
618 myconf+=( --target-os=freebsd )
619 ;;
620 mingw32*)
621 myconf+=( --target-os=mingw32 )
622 ;;
623 *linux*)
624 myconf+=( --target-os=linux )
625 ;;
626 esac
627 fi
628
629 # Misc stuff
630 use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
631
632 # Specific workarounds for too-few-registers arch...
633 if [[ ${ABI} == x86 ]]; then
634 local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
635 filter-flags -fforce-addr -momit-leaf-frame-pointer
636 append-flags -fomit-frame-pointer
637 is-flag -O? || append-flags -O2
638 if use debug; then
639 # no need to warn about debug if not using debug flag
640 ewarn ""
641 ewarn "Debug information will be almost useless as the frame pointer is omitted."
642 ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
643 ewarn "difficult to fix. Please have that in mind."
644 ewarn ""
645 fi
646 fi
647
648 "${S}"/configure \
649 --prefix="${EPREFIX}"/usr \
650 --libdir="${EPREFIX}"/usr/$(get_libdir) \
651 --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
652 --mandir="${EPREFIX}"/usr/share/man \
653 --enable-shared \
654 --cc="$(tc-getCC)" \
655 --ar="$(tc-getAR)" \
656 --optflags="${CFLAGS}" \
657 --extra-cflags="${CFLAGS}" \
658 $(use_enable static-libs static) \
659 "${myconf[@]}" || die
660 }
661
662 multilib_src_compile() {
663 emake
664
665 if use tools; then
666 tc-export CC
667
668 emake ${TOOLS[@]/#/tools/}
669 fi
670 }
671
672 multilib_src_install() {
673 emake DESTDIR="${D}" install install-man
674
675 if use tools; then
676 dobin ${TOOLS[@]/#/tools/}
677 fi
678 }
679
680 multilib_src_install_all() {
681 dodoc Changelog README INSTALL
682 dodoc doc/*.txt
683 use doc && dodoc doc/*.html
684 }
685
686 multilib_src_test() {
687 LD_LIBRARY_PATH="${BUILD_DIR}/libavcore:${BUILD_DIR}/libswscale:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil" \
688 emake -j1 fate
689 }
690
691
692
693 1.1 media-video/libav/libav-9.14.ebuild
694
695 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-9.14.ebuild?rev=1.1&view=markup
696 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-9.14.ebuild?rev=1.1&content-type=text/plain
697
698 Index: libav-9.14.ebuild
699 ===================================================================
700 # Copyright 1999-2014 Gentoo Foundation
701 # Distributed under the terms of the GNU General Public License v2
702 # $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-9.14.ebuild,v 1.1 2014/06/27 13:39:19 lu_zero Exp $
703
704 EAPI=5
705
706 if [[ ${PV} == *9999 ]] ; then
707 SCM="git-2"
708 EGIT_REPO_URI="git://git.libav.org/libav.git"
709 [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
710 fi
711
712 inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
713
714 DESCRIPTION="Complete solution to record, convert and stream audio and video."
715 HOMEPAGE="http://libav.org/"
716 if [[ ${PV} == *9999 ]] ; then
717 SRC_URI=""
718 elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
719 SRC_URI="http://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
720 else # Official release
721 SRC_URI="http://${PN}.org/releases/${P}.tar.xz"
722 fi
723
724 SRC_URI+=" test? ( http://dev.gentoo.org/~lu_zero/libav/fate-9.tar.xz )"
725
726 LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
727 SLOT="0/9"
728
729 # Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
730 [[ ${PV} == *9999 ]] || \
731 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"
732
733 IUSE="aac alsa amr bindist +bzip2 cdio cpudetection custom-cflags debug doc
734 +encode faac fdk frei0r +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k mp3
735 +network openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
736 static-libs test theora threads tools truetype v4l vaapi vdpau vorbis vpx X
737 x264 xvid +zlib"
738
739 # String for CPU features in the useflag[:configure_option] form
740 # if :configure_option isn't set, it will use 'useflag' as configure option
741 CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext altivec avx mmx mmxext neon ssse3 vis"
742 for i in ${CPU_FEATURES} ; do
743 IUSE+=" ${i%:*}"
744 done
745
746 RDEPEND="
747 !media-video/ffmpeg:0
748 alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
749 amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
750 bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
751 cdio? (
752 || (
753 >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}]
754 <dev-libs/libcdio-0.90[-minimal,${MULTILIB_USEDEP}]
755 )
756 )
757 encode? (
758 aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
759 amr? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
760 faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
761 fdk? ( >=media-libs/fdk-aac-0.1.2[${MULTILIB_USEDEP}] )
762 mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
763 theora? (
764 >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
765 >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
766 )
767 vorbis? (
768 >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
769 >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
770 )
771 x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
772 xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
773 )
774 frei0r? ( media-plugins/frei0r-plugins )
775 gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
776 ieee1394? (
777 >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
778 >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
779 )
780 jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
781 jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
782 opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
783 pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
784 rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
785 ssl? (
786 openssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
787 !openssl? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
788 )
789 sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
790 schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
791 speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
792 truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
793 vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
794 vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
795 vpx? ( >=media-libs/libvpx-1.2.0_pre20130625[${MULTILIB_USEDEP}] )
796 X? (
797 >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
798 >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
799 >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}]
800 )
801 zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
802 "
803
804 DEPEND="${RDEPEND}
805 >=sys-devel/make-3.81
806 doc? ( app-text/texi2html )
807 ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
808 mmx? ( dev-lang/yasm )
809 rtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
810 schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
811 ssl? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
812 test? ( sys-devel/bc )
813 truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
814 v4l? ( sys-kernel/linux-headers )
815 "
816
817 RDEPEND="${RDEPEND}
818 abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
819 !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
820
821 # faac can't be binary distributed
822 # openssl support marked as nonfree
823 # faac and aac are concurent implementations
824 # amr and aac require at least lgpl3
825 # x264 requires gpl2
826 REQUIRED_USE="bindist? ( !faac !openssl !fdk )
827 rtmp? ( network )
828 amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl ) cdio? ( gpl )
829 test? ( encode zlib )
830 "
831
832 MULTILIB_WRAPPED_HEADERS=(
833 /usr/include/libavutil/avconfig.h
834 )
835
836 src_prepare() {
837 # if we have snapshot then we need to hardcode the version
838 if [[ ${PV%_p*} != ${PV} ]]; then
839 sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
840 fi
841
842 TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
843 use zlib && TOOLS+=( cws2fws )
844
845 MAKEOPTS+=" V=1"
846 }
847
848 multilib_src_configure() {
849 local myconf=( ${EXTRA_LIBAV_CONF} )
850 local uses i
851
852 myconf+=(
853 $(use_enable gpl)
854 $(use_enable gpl version3)
855 --enable-avfilter
856 )
857
858 # enabled by default
859 uses="debug doc network zlib"
860 for i in ${uses}; do
861 use ${i} || myconf+=( --disable-${i} )
862 done
863 use bzip2 || myconf+=( --disable-bzlib )
864 use sdl || myconf+=( --disable-avplay )
865
866 if use ssl; then
867 use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
868 || myconf+=( --enable-gnutls )
869 fi
870
871 use custom-cflags && myconf+=( --disable-optimizations )
872 use cpudetection && myconf+=( --enable-runtime-cpudetect )
873
874 use vdpau || myconf+=( --disable-vdpau )
875
876 use vaapi && myconf+=( --enable-vaapi )
877
878 # Encoders
879 if use encode; then
880 use faac && myconf+=( --enable-nonfree )
881 use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
882 use mp3 && myconf+=( --enable-libmp3lame )
883 use amr && myconf+=( --enable-libvo-amrwbenc )
884 use aac && myconf+=( --enable-libvo-aacenc )
885 uses="faac theora vorbis x264 xvid"
886 for i in ${uses}; do
887 use ${i} && myconf+=( --enable-lib${i} )
888 done
889 else
890 myconf+=( --disable-encoders )
891 fi
892
893 # libavdevice options
894 use cdio && myconf+=( --enable-libcdio )
895 use ieee1394 && myconf+=( --enable-libdc1394 )
896 use pulseaudio && myconf+=( --enable-libpulse )
897
898 # Indevs
899 # v4l1 is gone since linux-headers-2.6.38
900 myconf+=( --disable-indev=v4l )
901 use v4l || myconf+=( --disable-indev=v4l2 )
902 for i in alsa oss jack; do
903 use ${i} || myconf+=( --disable-indev=${i} )
904 done
905 use X && myconf+=( --enable-x11grab )
906 # Outdevs
907 for i in alsa oss ; do
908 use ${i} || myconf+=( --disable-outdev=${i} )
909 done
910 # libavfilter options
911 multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
912 use truetype && myconf+=( --enable-libfreetype )
913
914 # Threads; we only support pthread for now
915 use threads && myconf+=( --enable-pthreads )
916
917 # Decoders
918 use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
919 uses="gsm opus rtmp schroedinger speex vpx"
920 for i in ${uses}; do
921 use ${i} && myconf+=( --enable-lib${i} )
922 done
923 use jpeg2k && myconf+=( --enable-libopenjpeg )
924
925 # CPU features
926 for i in ${CPU_FEATURES}; do
927 use ${i%:*} || myconf+=( --disable-${i#*:} )
928 done
929
930 # pass the right -mfpu as extra
931 use neon && myconf+=( --extra-cflags=-mfpu=neon )
932
933 # disable mmx accelerated code if PIC is required
934 # as the provided asm decidedly is not PIC for x86.
935 if use pic && [[ ${ABI} == x86 ]] ; then
936 myconf+=( --disable-mmx --disable-mmxext )
937 fi
938
939 # Option to force building pic
940 use pic && myconf+=( --enable-pic )
941
942 # cross compile support
943 if tc-is-cross-compiler ; then
944 myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
945 case ${CHOST} in
946 *freebsd*)
947 myconf+=( --target-os=freebsd )
948 ;;
949 mingw32*)
950 myconf+=( --target-os=mingw32 )
951 ;;
952 *linux*)
953 myconf+=( --target-os=linux )
954 ;;
955 esac
956 fi
957
958 # Misc stuff
959 use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
960
961 # Specific workarounds for too-few-registers arch...
962 if [[ ${ABI} == x86 ]]; then
963 local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
964 filter-flags -fforce-addr -momit-leaf-frame-pointer
965 append-flags -fomit-frame-pointer
966 is-flag -O? || append-flags -O2
967 if use debug; then
968 # no need to warn about debug if not using debug flag
969 ewarn ""
970 ewarn "Debug information will be almost useless as the frame pointer is omitted."
971 ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
972 ewarn "difficult to fix. Please have that in mind."
973 ewarn ""
974 fi
975 fi
976
977 "${S}"/configure \
978 --prefix="${EPREFIX}"/usr \
979 --libdir="${EPREFIX}"/usr/$(get_libdir) \
980 --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
981 --mandir="${EPREFIX}"/usr/share/man \
982 --enable-shared \
983 --cc="$(tc-getCC)" \
984 --ar="$(tc-getAR)" \
985 --optflags="${CFLAGS}" \
986 --extra-cflags="${CFLAGS}" \
987 $(use_enable static-libs static) \
988 "${myconf[@]}" || die
989 }
990
991 multilib_src_compile() {
992 emake
993
994 if multilib_is_native_abi && use tools; then
995 tc-export CC
996
997 emake ${TOOLS[@]/#/tools/}
998 fi
999 }
1000
1001 multilib_src_install() {
1002 emake DESTDIR="${D}" install install-man
1003
1004 use doc && dodoc doc/*.html
1005
1006 if multilib_is_native_abi && use tools; then
1007 dobin ${TOOLS[@]/#/tools/}
1008 fi
1009 }
1010
1011 multilib_src_install_all() {
1012 dodoc Changelog README INSTALL
1013 dodoc doc/*.txt
1014 }
1015
1016 multilib_src_test() {
1017 echo ${WORKDIR}/fate
1018 LD_LIBRARY_PATH="${BUILD_DIR}/libswscale:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavresample:${BUILD_DIR}/libavutil" \
1019 emake -j1 fate SAMPLES="${WORKDIR}/fate"
1020 }