Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-video/libav: libav-9.13-r1.ebuild libav-10.9999.ebuild libav-9.9999.ebuild libav-9999.ebuild libav-10.1-r1.ebuild ChangeLog
Date: Sat, 07 Jun 2014 21:32:09
Message-Id: 20140607213206.5BCB12004E@flycatcher.gentoo.org
1 mgorny 14/06/07 21:32:06
2
3 Modified: libav-10.9999.ebuild libav-9.9999.ebuild
4 libav-9999.ebuild ChangeLog
5 Added: libav-9.13-r1.ebuild libav-10.1-r1.ebuild
6 Log:
7 Enable multilib support, bug #489816.
8
9 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
10
11 Revision Changes Path
12 1.4 media-video/libav/libav-10.9999.ebuild
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-10.9999.ebuild?rev=1.4&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-10.9999.ebuild?rev=1.4&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-10.9999.ebuild?r1=1.3&r2=1.4
17
18 Index: libav-10.9999.ebuild
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/media-video/libav/libav-10.9999.ebuild,v
21 retrieving revision 1.3
22 retrieving revision 1.4
23 diff -u -r1.3 -r1.4
24 --- libav-10.9999.ebuild 4 Jun 2014 13:34:15 -0000 1.3
25 +++ libav-10.9999.ebuild 7 Jun 2014 21:32:06 -0000 1.4
26 @@ -1,6 +1,6 @@
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-10.9999.ebuild,v 1.3 2014/06/04 13:34:15 lu_zero Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-10.9999.ebuild,v 1.4 2014/06/07 21:32:06 mgorny Exp $
31
32 EAPI=5
33
34 @@ -10,7 +10,7 @@
35 [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
36 fi
37
38 -inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
39 +inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
40
41 DESCRIPTION="Complete solution to record, convert and stream audio and video."
42 HOMEPAGE="http://libav.org/"
43 @@ -42,78 +42,83 @@
44 IUSE+=" ${i%:*}"
45 done
46
47 -TOOLS="aviocat graph2dot ismindex pktdumper qt-faststart trasher"
48 -
49 RDEPEND="
50 !media-video/ffmpeg:0
51 - alsa? ( media-libs/alsa-lib )
52 - amr? ( media-libs/opencore-amr )
53 - bzip2? ( app-arch/bzip2 )
54 + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
55 + amr? ( media-libs/opencore-amr[${MULTILIB_USEDEP}] )
56 + bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
57 cdio? (
58 || (
59 - dev-libs/libcdio-paranoia
60 - <dev-libs/libcdio-0.90[-minimal]
61 + dev-libs/libcdio-paranoia[${MULTILIB_USEDEP}]
62 + <dev-libs/libcdio-0.90[-minimal,${MULTILIB_USEDEP}]
63 )
64 )
65 encode? (
66 - aac? ( media-libs/vo-aacenc )
67 - amr? ( media-libs/vo-amrwbenc )
68 - faac? ( media-libs/faac )
69 - fdk? ( media-libs/fdk-aac )
70 - mp3? ( >=media-sound/lame-3.98.3 )
71 + aac? ( media-libs/vo-aacenc[${MULTILIB_USEDEP}] )
72 + amr? ( media-libs/vo-amrwbenc[${MULTILIB_USEDEP}] )
73 + faac? ( media-libs/faac[${MULTILIB_USEDEP}] )
74 + fdk? ( media-libs/fdk-aac[${MULTILIB_USEDEP}] )
75 + mp3? ( >=media-sound/lame-3.98.3[${MULTILIB_USEDEP}] )
76 theora? (
77 - >=media-libs/libtheora-1.1.1[encode]
78 - media-libs/libogg
79 + >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
80 + media-libs/libogg[${MULTILIB_USEDEP}]
81 + )
82 + vorbis? (
83 + media-libs/libvorbis[${MULTILIB_USEDEP}]
84 + media-libs/libogg[${MULTILIB_USEDEP}]
85 )
86 - vorbis? ( media-libs/libvorbis media-libs/libogg )
87 - webp? ( media-libs/libwebp )
88 - wavpack? ( media-sound/wavpack )
89 - x264? ( >=media-libs/x264-0.0.20111017:= )
90 - xvid? ( >=media-libs/xvid-1.1.0 )
91 + webp? ( media-libs/libwebp[${MULTILIB_USEDEP}] )
92 + wavpack? ( media-sound/wavpack[${MULTILIB_USEDEP}] )
93 + x264? ( >=media-libs/x264-0.0.20111017:=[${MULTILIB_USEDEP}] )
94 + xvid? ( >=media-libs/xvid-1.1.0[${MULTILIB_USEDEP}] )
95 )
96 frei0r? ( media-plugins/frei0r-plugins )
97 - gsm? ( >=media-sound/gsm-1.0.12-r1 )
98 + gsm? ( >=media-sound/gsm-1.0.12-r1[${MULTILIB_USEDEP}] )
99 ieee1394? (
100 - media-libs/libdc1394
101 - sys-libs/libraw1394
102 + media-libs/libdc1394[${MULTILIB_USEDEP}]
103 + sys-libs/libraw1394[${MULTILIB_USEDEP}]
104 )
105 - jack? ( media-sound/jack-audio-connection-kit )
106 - jpeg2k? ( >=media-libs/openjpeg-1.3-r2:0 )
107 - opus? ( media-libs/opus )
108 - pulseaudio? ( media-sound/pulseaudio )
109 - rtmp? ( >=media-video/rtmpdump-2.2f )
110 + jack? ( media-sound/jack-audio-connection-kit[${MULTILIB_USEDEP}] )
111 + jpeg2k? ( >=media-libs/openjpeg-1.3-r2:0[${MULTILIB_USEDEP}] )
112 + opus? ( media-libs/opus[${MULTILIB_USEDEP}] )
113 + pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
114 + rtmp? ( >=media-video/rtmpdump-2.2f[${MULTILIB_USEDEP}] )
115 ssl? (
116 - openssl? ( dev-libs/openssl )
117 - !openssl? ( net-libs/gnutls )
118 + openssl? ( dev-libs/openssl[${MULTILIB_USEDEP}] )
119 + !openssl? ( net-libs/gnutls[${MULTILIB_USEDEP}] )
120 )
121 - sdl? ( >=media-libs/libsdl-1.2.13-r1[sound,video] )
122 - schroedinger? ( media-libs/schroedinger )
123 - speex? ( >=media-libs/speex-1.2_beta3 )
124 - truetype? ( media-libs/freetype:2 )
125 - vaapi? ( x11-libs/libva )
126 - vdpau? ( x11-libs/libvdpau )
127 - vpx? ( >=media-libs/libvpx-0.9.6 )
128 + sdl? ( >=media-libs/libsdl-1.2.13-r1[sound,video,${MULTILIB_USEDEP}] )
129 + schroedinger? ( media-libs/schroedinger[${MULTILIB_USEDEP}] )
130 + speex? ( >=media-libs/speex-1.2_beta3[${MULTILIB_USEDEP}] )
131 + truetype? ( media-libs/freetype:2[${MULTILIB_USEDEP}] )
132 + vaapi? ( x11-libs/libva[${MULTILIB_USEDEP}] )
133 + vdpau? ( x11-libs/libvdpau[${MULTILIB_USEDEP}] )
134 + vpx? ( >=media-libs/libvpx-0.9.6[${MULTILIB_USEDEP}] )
135 X? (
136 - x11-libs/libX11
137 - x11-libs/libXext
138 - x11-libs/libXfixes
139 + x11-libs/libX11[${MULTILIB_USEDEP}]
140 + x11-libs/libXext[${MULTILIB_USEDEP}]
141 + x11-libs/libXfixes[${MULTILIB_USEDEP}]
142 )
143 - zlib? ( sys-libs/zlib )
144 + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
145 "
146
147 DEPEND="${RDEPEND}
148 >=sys-devel/make-3.81
149 doc? ( app-text/texi2html )
150 - ieee1394? ( virtual/pkgconfig )
151 + ieee1394? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
152 mmx? ( dev-lang/yasm )
153 - rtmp? ( virtual/pkgconfig )
154 - schroedinger? ( virtual/pkgconfig )
155 - ssl? ( virtual/pkgconfig )
156 + rtmp? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
157 + schroedinger? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
158 + ssl? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
159 test? ( sys-devel/bc )
160 - truetype? ( virtual/pkgconfig )
161 + truetype? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
162 v4l? ( sys-kernel/linux-headers )
163 "
164
165 +RDEPEND="${RDEPEND}
166 + abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
167 + !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
168 +
169 # faac can't be binary distributed
170 # openssl support marked as nonfree
171 # faac and aac are concurent implementations
172 @@ -133,125 +138,129 @@
173 if [[ ${PV%_p*} != ${PV} ]]; then
174 sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
175 fi
176 +
177 + TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
178 + use zlib && TOOLS+=( cws2fws )
179 +
180 + MAKEOPTS+=" V=1"
181 }
182
183 -src_configure() {
184 - local myconf="${EXTRA_LIBAV_CONF}"
185 +multilib_src_configure() {
186 + local myconf=( ${EXTRA_LIBAV_CONF} )
187 local uses i
188
189 - use zlib && TOOLS+=" cws2fws"
190 -
191 - myconf+="
192 + myconf+=(
193 $(use_enable gpl)
194 $(use_enable gpl version3)
195 --enable-avfilter
196 - "
197 + )
198
199 # enabled by default
200 uses="debug doc network zlib"
201 for i in ${uses}; do
202 - use ${i} || myconf+=" --disable-${i}"
203 + use ${i} || myconf+=( --disable-${i} )
204 done
205 - use bzip2 || myconf+=" --disable-bzlib"
206 - use sdl || myconf+=" --disable-avplay"
207 + use bzip2 || myconf+=( --disable-bzlib )
208 + use sdl || myconf+=( --disable-avplay )
209
210 if use ssl; then
211 - use openssl && myconf+=" --enable-openssl --enable-nonfree" \
212 - || myconf+=" --enable-gnutls"
213 + use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
214 + || myconf+=( --enable-gnutls )
215 fi
216
217 - use custom-cflags && myconf+=" --disable-optimizations"
218 - use cpudetection && myconf+=" --enable-runtime-cpudetect"
219 + use custom-cflags && myconf+=( --disable-optimizations )
220 + use cpudetection && myconf+=( --enable-runtime-cpudetect )
221
222 - use vdpau || myconf+=" --disable-vdpau"
223 + use vdpau || myconf+=( --disable-vdpau )
224
225 - use vaapi && myconf+=" --enable-vaapi"
226 + use vaapi && myconf+=( --enable-vaapi )
227
228 # Encoders
229 if use encode; then
230 - use faac && myconf+=" --enable-nonfree"
231 - use fdk && myconf+=" --enable-nonfree --enable-libfdk-aac"
232 - use mp3 && myconf+=" --enable-libmp3lame"
233 - use amr && myconf+=" --enable-libvo-amrwbenc"
234 - use aac && myconf+=" --enable-libvo-aacenc"
235 + use faac && myconf+=( --enable-nonfree )
236 + use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
237 + use mp3 && myconf+=( --enable-libmp3lame )
238 + use amr && myconf+=( --enable-libvo-amrwbenc )
239 + use aac && myconf+=( --enable-libvo-aacenc )
240 uses="faac theora vorbis wavpack webp x264 xvid"
241 for i in ${uses}; do
242 - use ${i} && myconf+=" --enable-lib${i}"
243 + use ${i} && myconf+=( --enable-lib${i} )
244 done
245 else
246 - myconf+=" --disable-encoders"
247 + myconf+=( --disable-encoders )
248 fi
249
250 # libavdevice options
251 - use cdio && myconf+=" --enable-libcdio"
252 - use ieee1394 && myconf+=" --enable-libdc1394"
253 - use pulseaudio && myconf+=" --enable-libpulse"
254 + use cdio && myconf+=( --enable-libcdio )
255 + use ieee1394 && myconf+=( --enable-libdc1394 )
256 + use pulseaudio && myconf+=( --enable-libpulse )
257
258 # Indevs
259 # v4l1 is gone since linux-headers-2.6.38
260 - myconf+=" --disable-indev=v4l"
261 - use v4l || myconf+=" --disable-indev=v4l2"
262 + myconf+=( --disable-indev=v4l )
263 + use v4l || myconf+=( --disable-indev=v4l2 )
264 for i in alsa oss jack; do
265 - use ${i} || myconf+=" --disable-indev=${i}"
266 + use ${i} || myconf+=( --disable-indev=${i} )
267 done
268 - use X && myconf+=" --enable-x11grab"
269 + use X && myconf+=( --enable-x11grab )
270 # Outdevs
271 for i in alsa oss ; do
272 - use ${i} || myconf+=" --disable-outdev=${i}"
273 + use ${i} || myconf+=( --disable-outdev=${i} )
274 done
275 # libavfilter options
276 - use frei0r && myconf+=" --enable-frei0r"
277 - use truetype && myconf+=" --enable-libfreetype"
278 + multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
279 + use truetype && myconf+=( --enable-libfreetype )
280
281 # Threads; we only support pthread for now
282 - use threads && myconf+=" --enable-pthreads"
283 + use threads && myconf+=( --enable-pthreads )
284
285 # Decoders
286 - use amr && myconf+=" --enable-libopencore-amrwb --enable-libopencore-amrnb"
287 + use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
288 uses="gsm opus rtmp schroedinger speex vpx"
289 for i in ${uses}; do
290 - use ${i} && myconf+=" --enable-lib${i}"
291 + use ${i} && myconf+=( --enable-lib${i} )
292 done
293 - use jpeg2k && myconf+=" --enable-libopenjpeg"
294 + use jpeg2k && myconf+=( --enable-libopenjpeg )
295
296 # CPU features
297 for i in ${CPU_FEATURES}; do
298 - use ${i%:*} || myconf+=" --disable-${i#*:}"
299 + use ${i%:*} || myconf+=( --disable-${i#*:} )
300 done
301
302 # pass the right -mfpu as extra
303 - use neon && myconf+=" --extra-cflags=-mfpu=neon"
304 + use neon && myconf+=( --extra-cflags=-mfpu=neon )
305
306 # disable mmx accelerated code if PIC is required
307 # as the provided asm decidedly is not PIC for x86.
308 - if use pic && use x86 ; then
309 - myconf+=" --disable-mmx --disable-mmxext"
310 + if use pic && [[ ${ABI} == x86 ]]; then
311 + myconf+=( --disable-mmx --disable-mmxext )
312 fi
313
314 # Option to force building pic
315 - use pic && myconf+=" --enable-pic"
316 + use pic && myconf+=( --enable-pic )
317
318 # cross compile support
319 if tc-is-cross-compiler ; then
320 - myconf+=" --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
321 + myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
322 case ${CHOST} in
323 *freebsd*)
324 - myconf+=" --target-os=freebsd"
325 + myconf+=( --target-os=freebsd )
326 ;;
327 mingw32*)
328 - myconf+=" --target-os=mingw32"
329 + myconf+=( --target-os=mingw32 )
330 ;;
331 *linux*)
332 - myconf+=" --target-os=linux"
333 + myconf+=( --target-os=linux )
334 ;;
335 esac
336 fi
337
338 # Misc stuff
339 - use hardcoded-tables && myconf+=" --enable-hardcoded-tables"
340 + use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
341
342 # Specific workarounds for too-few-registers arch...
343 - if [[ $(tc-arch) == "x86" ]]; then
344 + if [[ ${ABI} == x86 ]]; then
345 + local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
346 filter-flags -fforce-addr -momit-leaf-frame-pointer
347 append-flags -fomit-frame-pointer
348 is-flag -O? || append-flags -O2
349 @@ -265,8 +274,7 @@
350 fi
351 fi
352
353 - cd "${S}"
354 - ./configure \
355 + "${S}"/configure \
356 --prefix="${EPREFIX}"/usr \
357 --libdir="${EPREFIX}"/usr/$(get_libdir) \
358 --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
359 @@ -277,42 +285,34 @@
360 --optflags="${CFLAGS}" \
361 --extra-cflags="${CFLAGS}" \
362 $(use_enable static-libs static) \
363 - ${myconf} || die
364 -
365 - MAKEOPTS+=" V=1"
366 + "${myconf[@]}" || die
367 }
368
369 -src_compile() {
370 - local i
371 -
372 +multilib_src_compile() {
373 emake
374
375 if use tools; then
376 tc-export CC
377
378 - for i in ${TOOLS}; do
379 - emake tools/${i}
380 - done
381 + emake ${TOOLS[@]/#/tools/}
382 fi
383 }
384
385 -src_install() {
386 - local i
387 -
388 +multilib_src_install() {
389 emake DESTDIR="${D}" install install-man
390
391 + if use tools; then
392 + dobin ${TOOLS[@]/#/tools/}
393 + fi
394 +}
395 +
396 +multilib_src_install_all() {
397 dodoc Changelog README INSTALL
398 dodoc doc/*.txt
399 use doc && dodoc doc/*.html
400 -
401 - if use tools; then
402 - for i in ${TOOLS}; do
403 - dobin tools/${i}
404 - done
405 - fi
406 }
407
408 -src_test() {
409 - LD_LIBRARY_PATH="${S}/libavcore:${S}/libswscale:${S}/libavcodec:${S}/libavdevice:${S}/libavfilter:${S}/libavformat:${S}/libavutil" \
410 +multilib_src_test() {
411 + LD_LIBRARY_PATH="${BUILD_DIR}/libavcore:${BUILD_DIR}/libswscale:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil" \
412 emake -j1 fate
413 }
414
415
416
417 1.12 media-video/libav/libav-9.9999.ebuild
418
419 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-9.9999.ebuild?rev=1.12&view=markup
420 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-9.9999.ebuild?rev=1.12&content-type=text/plain
421 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-9.9999.ebuild?r1=1.11&r2=1.12
422
423 Index: libav-9.9999.ebuild
424 ===================================================================
425 RCS file: /var/cvsroot/gentoo-x86/media-video/libav/libav-9.9999.ebuild,v
426 retrieving revision 1.11
427 retrieving revision 1.12
428 diff -u -r1.11 -r1.12
429 --- libav-9.9999.ebuild 15 May 2014 17:12:08 -0000 1.11
430 +++ libav-9.9999.ebuild 7 Jun 2014 21:32:06 -0000 1.12
431 @@ -1,6 +1,6 @@
432 # Copyright 1999-2014 Gentoo Foundation
433 # Distributed under the terms of the GNU General Public License v2
434 -# $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-9.9999.ebuild,v 1.11 2014/05/15 17:12:08 ulm Exp $
435 +# $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-9.9999.ebuild,v 1.12 2014/06/07 21:32:06 mgorny Exp $
436
437 EAPI=5
438
439 @@ -10,7 +10,7 @@
440 [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
441 fi
442
443 -inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
444 +inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
445
446 DESCRIPTION="Complete solution to record, convert and stream audio and video."
447 HOMEPAGE="http://libav.org/"
448 @@ -44,76 +44,81 @@
449 IUSE+=" ${i%:*}"
450 done
451
452 -TOOLS="aviocat graph2dot ismindex pktdumper qt-faststart trasher"
453 -
454 RDEPEND="
455 !media-video/ffmpeg:0
456 - alsa? ( media-libs/alsa-lib )
457 - amr? ( media-libs/opencore-amr )
458 - bzip2? ( app-arch/bzip2 )
459 + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
460 + amr? ( media-libs/opencore-amr[${MULTILIB_USEDEP}] )
461 + bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
462 cdio? (
463 || (
464 - dev-libs/libcdio-paranoia
465 - <dev-libs/libcdio-0.90[-minimal]
466 + dev-libs/libcdio-paranoia[${MULTILIB_USEDEP}]
467 + <dev-libs/libcdio-0.90[-minimal,${MULTILIB_USEDEP}]
468 )
469 )
470 encode? (
471 - aac? ( media-libs/vo-aacenc )
472 - amr? ( media-libs/vo-amrwbenc )
473 - faac? ( media-libs/faac )
474 - fdk? ( media-libs/fdk-aac )
475 - mp3? ( >=media-sound/lame-3.98.3 )
476 + aac? ( media-libs/vo-aacenc[${MULTILIB_USEDEP}] )
477 + amr? ( media-libs/vo-amrwbenc[${MULTILIB_USEDEP}] )
478 + faac? ( media-libs/faac[${MULTILIB_USEDEP}] )
479 + fdk? ( media-libs/fdk-aac[${MULTILIB_USEDEP}] )
480 + mp3? ( >=media-sound/lame-3.98.3[${MULTILIB_USEDEP}] )
481 theora? (
482 - >=media-libs/libtheora-1.1.1[encode]
483 - media-libs/libogg
484 + >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
485 + media-libs/libogg[${MULTILIB_USEDEP}]
486 + )
487 + vorbis? (
488 + media-libs/libvorbis[${MULTILIB_USEDEP}]
489 + media-libs/libogg[${MULTILIB_USEDEP}]
490 )
491 - vorbis? ( media-libs/libvorbis media-libs/libogg )
492 - x264? ( >=media-libs/x264-0.0.20111017:= )
493 - xvid? ( >=media-libs/xvid-1.1.0 )
494 + x264? ( >=media-libs/x264-0.0.20111017:=[${MULTILIB_USEDEP}] )
495 + xvid? ( >=media-libs/xvid-1.1.0[${MULTILIB_USEDEP}] )
496 )
497 frei0r? ( media-plugins/frei0r-plugins )
498 - gsm? ( >=media-sound/gsm-1.0.12-r1 )
499 + gsm? ( >=media-sound/gsm-1.0.12-r1[${MULTILIB_USEDEP}] )
500 ieee1394? (
501 - media-libs/libdc1394
502 - sys-libs/libraw1394
503 + media-libs/libdc1394[${MULTILIB_USEDEP}]
504 + sys-libs/libraw1394[${MULTILIB_USEDEP}]
505 )
506 - jack? ( media-sound/jack-audio-connection-kit )
507 - jpeg2k? ( >=media-libs/openjpeg-1.3-r2:0 )
508 - opus? ( media-libs/opus )
509 - pulseaudio? ( media-sound/pulseaudio )
510 - rtmp? ( >=media-video/rtmpdump-2.2f )
511 + jack? ( media-sound/jack-audio-connection-kit[${MULTILIB_USEDEP}] )
512 + jpeg2k? ( >=media-libs/openjpeg-1.3-r2:0[${MULTILIB_USEDEP}] )
513 + opus? ( media-libs/opus[${MULTILIB_USEDEP}] )
514 + pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
515 + rtmp? ( >=media-video/rtmpdump-2.2f[${MULTILIB_USEDEP}] )
516 ssl? (
517 - openssl? ( dev-libs/openssl )
518 - !openssl? ( net-libs/gnutls )
519 + openssl? ( dev-libs/openssl[${MULTILIB_USEDEP}] )
520 + !openssl? ( net-libs/gnutls[${MULTILIB_USEDEP}] )
521 )
522 - sdl? ( >=media-libs/libsdl-1.2.13-r1[sound,video] )
523 - schroedinger? ( media-libs/schroedinger )
524 - speex? ( >=media-libs/speex-1.2_beta3 )
525 - truetype? ( media-libs/freetype:2 )
526 - vaapi? ( x11-libs/libva )
527 - vdpau? ( x11-libs/libvdpau )
528 - vpx? ( >=media-libs/libvpx-0.9.6 )
529 + sdl? ( >=media-libs/libsdl-1.2.13-r1[sound,video,${MULTILIB_USEDEP}] )
530 + schroedinger? ( media-libs/schroedinger[${MULTILIB_USEDEP}] )
531 + speex? ( >=media-libs/speex-1.2_beta3[${MULTILIB_USEDEP}] )
532 + truetype? ( media-libs/freetype:2[${MULTILIB_USEDEP}] )
533 + vaapi? ( x11-libs/libva[${MULTILIB_USEDEP}] )
534 + vdpau? ( x11-libs/libvdpau[${MULTILIB_USEDEP}] )
535 + vpx? ( >=media-libs/libvpx-0.9.6[${MULTILIB_USEDEP}] )
536 X? (
537 - x11-libs/libX11
538 - x11-libs/libXext
539 - x11-libs/libXfixes
540 + x11-libs/libX11[${MULTILIB_USEDEP}]
541 + x11-libs/libXext[${MULTILIB_USEDEP}]
542 + x11-libs/libXfixes[${MULTILIB_USEDEP}]
543 )
544 - zlib? ( sys-libs/zlib )
545 + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
546 "
547
548 DEPEND="${RDEPEND}
549 >=sys-devel/make-3.81
550 doc? ( app-text/texi2html )
551 - ieee1394? ( virtual/pkgconfig )
552 + ieee1394? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
553 mmx? ( dev-lang/yasm )
554 - rtmp? ( virtual/pkgconfig )
555 - schroedinger? ( virtual/pkgconfig )
556 - ssl? ( virtual/pkgconfig )
557 + rtmp? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
558 + schroedinger? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
559 + ssl? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
560 test? ( sys-devel/bc )
561 - truetype? ( virtual/pkgconfig )
562 + truetype? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
563 v4l? ( sys-kernel/linux-headers )
564 "
565
566 +RDEPEND="${RDEPEND}
567 + abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
568 + !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
569 +
570 # faac can't be binary distributed
571 # openssl support marked as nonfree
572 # faac and aac are concurent implementations
573 @@ -130,125 +135,129 @@
574 if [[ ${PV%_p*} != ${PV} ]]; then
575 sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
576 fi
577 +
578 + TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
579 + use zlib && TOOLS+=( cws2fws )
580 +
581 + MAKEOPTS+=" V=1"
582 }
583
584 -src_configure() {
585 - local myconf="${EXTRA_LIBAV_CONF}"
586 +multilib_src_configure() {
587 + local myconf=( ${EXTRA_LIBAV_CONF} )
588 local uses i
589
590 - use zlib && TOOLS+=" cws2fws"
591 -
592 - myconf+="
593 + myconf+=(
594 $(use_enable gpl)
595 $(use_enable gpl version3)
596 --enable-avfilter
597 - "
598 + )
599
600 # enabled by default
601 uses="debug doc network zlib"
602 for i in ${uses}; do
603 - use ${i} || myconf+=" --disable-${i}"
604 + use ${i} || myconf+=( --disable-${i} )
605 done
606 - use bzip2 || myconf+=" --disable-bzlib"
607 - use sdl || myconf+=" --disable-avplay"
608 + use bzip2 || myconf+=( --disable-bzlib )
609 + use sdl || myconf+=( --disable-avplay )
610
611 if use ssl; then
612 - use openssl && myconf+=" --enable-openssl --enable-nonfree" \
613 - || myconf+=" --enable-gnutls"
614 + use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
615 + || myconf+=( --enable-gnutls )
616 fi
617
618 - use custom-cflags && myconf+=" --disable-optimizations"
619 - use cpudetection && myconf+=" --enable-runtime-cpudetect"
620 + use custom-cflags && myconf+=( --disable-optimizations )
621 + use cpudetection && myconf+=( --enable-runtime-cpudetect )
622
623 - use vdpau || myconf+=" --disable-vdpau"
624 + use vdpau || myconf+=( --disable-vdpau )
625
626 - use vaapi && myconf+=" --enable-vaapi"
627 + use vaapi && myconf+=( --enable-vaapi )
628
629 # Encoders
630 if use encode; then
631 - use faac && myconf+=" --enable-nonfree"
632 - use fdk && myconf+=" --enable-nonfree --enable-libfdk-aac"
633 - use mp3 && myconf+=" --enable-libmp3lame"
634 - use amr && myconf+=" --enable-libvo-amrwbenc"
635 - use aac && myconf+=" --enable-libvo-aacenc"
636 + use faac && myconf+=( --enable-nonfree )
637 + use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
638 + use mp3 && myconf+=( --enable-libmp3lame )
639 + use amr && myconf+=( --enable-libvo-amrwbenc )
640 + use aac && myconf+=( --enable-libvo-aacenc )
641 uses="faac theora vorbis x264 xvid"
642 for i in ${uses}; do
643 - use ${i} && myconf+=" --enable-lib${i}"
644 + use ${i} && myconf+=( --enable-lib${i} )
645 done
646 else
647 - myconf+=" --disable-encoders"
648 + myconf+=( --disable-encoders )
649 fi
650
651 # libavdevice options
652 - use cdio && myconf+=" --enable-libcdio"
653 - use ieee1394 && myconf+=" --enable-libdc1394"
654 - use pulseaudio && myconf+=" --enable-libpulse"
655 + use cdio && myconf+=( --enable-libcdio )
656 + use ieee1394 && myconf+=( --enable-libdc1394 )
657 + use pulseaudio && myconf+=( --enable-libpulse )
658
659 # Indevs
660 # v4l1 is gone since linux-headers-2.6.38
661 - myconf+=" --disable-indev=v4l"
662 - use v4l || myconf+=" --disable-indev=v4l2"
663 + myconf+=( --disable-indev=v4l )
664 + use v4l || myconf+=( --disable-indev=v4l2 )
665 for i in alsa oss jack; do
666 - use ${i} || myconf+=" --disable-indev=${i}"
667 + use ${i} || myconf+=( --disable-indev=${i} )
668 done
669 - use X && myconf+=" --enable-x11grab"
670 + use X && myconf+=( --enable-x11grab )
671 # Outdevs
672 for i in alsa oss ; do
673 - use ${i} || myconf+=" --disable-outdev=${i}"
674 + use ${i} || myconf+=( --disable-outdev=${i} )
675 done
676 # libavfilter options
677 - use frei0r && myconf+=" --enable-frei0r"
678 - use truetype && myconf+=" --enable-libfreetype"
679 + multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
680 + use truetype && myconf+=( --enable-libfreetype )
681
682 # Threads; we only support pthread for now
683 - use threads && myconf+=" --enable-pthreads"
684 + use threads && myconf+=( --enable-pthreads )
685
686 # Decoders
687 - use amr && myconf+=" --enable-libopencore-amrwb --enable-libopencore-amrnb"
688 + use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
689 uses="gsm opus rtmp schroedinger speex vpx"
690 for i in ${uses}; do
691 - use ${i} && myconf+=" --enable-lib${i}"
692 + use ${i} && myconf+=( --enable-lib${i} )
693 done
694 - use jpeg2k && myconf+=" --enable-libopenjpeg"
695 + use jpeg2k && myconf+=( --enable-libopenjpeg )
696
697 # CPU features
698 for i in ${CPU_FEATURES}; do
699 - use ${i%:*} || myconf+=" --disable-${i#*:}"
700 + use ${i%:*} || myconf+=( --disable-${i#*:} )
701 done
702
703 # pass the right -mfpu as extra
704 - use neon && myconf+=" --extra-cflags=-mfpu=neon"
705 + use neon && myconf+=( --extra-cflags=-mfpu=neon )
706
707 # disable mmx accelerated code if PIC is required
708 # as the provided asm decidedly is not PIC for x86.
709 - if use pic && use x86 ; then
710 - myconf+=" --disable-mmx --disable-mmxext"
711 + if use pic && [[ ${ABI} == x86 ]] ; then
712 + myconf+=( --disable-mmx --disable-mmxext )
713 fi
714
715 # Option to force building pic
716 - use pic && myconf+=" --enable-pic"
717 + use pic && myconf+=( --enable-pic )
718
719 # cross compile support
720 if tc-is-cross-compiler ; then
721 - myconf+=" --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
722 + myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
723 case ${CHOST} in
724 *freebsd*)
725 - myconf+=" --target-os=freebsd"
726 + myconf+=( --target-os=freebsd )
727 ;;
728 mingw32*)
729 - myconf+=" --target-os=mingw32"
730 + myconf+=( --target-os=mingw32 )
731 ;;
732 *linux*)
733 - myconf+=" --target-os=linux"
734 + myconf+=( --target-os=linux )
735 ;;
736 esac
737 fi
738
739 # Misc stuff
740 - use hardcoded-tables && myconf+=" --enable-hardcoded-tables"
741 + use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
742
743 # Specific workarounds for too-few-registers arch...
744 - if [[ $(tc-arch) == "x86" ]]; then
745 + if [[ ${ABI} == x86 ]]; then
746 + local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
747 filter-flags -fforce-addr -momit-leaf-frame-pointer
748 append-flags -fomit-frame-pointer
749 is-flag -O? || append-flags -O2
750 @@ -262,8 +271,7 @@
751 fi
752 fi
753
754 - cd "${S}"
755 - ./configure \
756 + "${S}"/configure \
757 --prefix="${EPREFIX}"/usr \
758 --libdir="${EPREFIX}"/usr/$(get_libdir) \
759 --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
760 @@ -274,43 +282,36 @@
761 --optflags="${CFLAGS}" \
762 --extra-cflags="${CFLAGS}" \
763 $(use_enable static-libs static) \
764 - ${myconf} || die
765 -
766 - MAKEOPTS+=" V=1"
767 + "${myconf[@]}" || die
768 }
769
770 -src_compile() {
771 - local i
772 -
773 +multilib_src_compile() {
774 emake
775
776 - if use tools; then
777 + if multilib_is_native_abi && use tools; then
778 tc-export CC
779
780 - for i in ${TOOLS}; do
781 - emake tools/${i}
782 - done
783 + emake ${TOOLS[@]/#/tools/}
784 fi
785 }
786
787 -src_install() {
788 - local i
789 -
790 +multilib_src_install() {
791 emake DESTDIR="${D}" install install-man
792
793 - dodoc Changelog README INSTALL
794 - dodoc doc/*.txt
795 use doc && dodoc doc/*.html
796
797 - if use tools; then
798 - for i in ${TOOLS}; do
799 - dobin tools/${i}
800 - done
801 + if multilib_is_native_abi && use tools; then
802 + dobin ${TOOLS[@]/#/tools/}
803 fi
804 }
805
806 -src_test() {
807 +multilib_src_install_all() {
808 + dodoc Changelog README INSTALL
809 + dodoc doc/*.txt
810 +}
811 +
812 +multilib_src_test() {
813 echo ${WORKDIR}/fate
814 - LD_LIBRARY_PATH="${S}/libswscale:${S}/libavcodec:${S}/libavdevice:${S}/libavfilter:${S}/libavformat:${S}/libavresample:${S}/libavutil" \
815 + LD_LIBRARY_PATH="${BUILD_DIR}/libswscale:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavresample:${BUILD_DIR}/libavutil" \
816 emake -j1 fate SAMPLES="${WORKDIR}/fate"
817 }
818
819
820
821 1.67 media-video/libav/libav-9999.ebuild
822
823 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-9999.ebuild?rev=1.67&view=markup
824 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-9999.ebuild?rev=1.67&content-type=text/plain
825 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-9999.ebuild?r1=1.66&r2=1.67
826
827 Index: libav-9999.ebuild
828 ===================================================================
829 RCS file: /var/cvsroot/gentoo-x86/media-video/libav/libav-9999.ebuild,v
830 retrieving revision 1.66
831 retrieving revision 1.67
832 diff -u -r1.66 -r1.67
833 --- libav-9999.ebuild 4 Jun 2014 13:34:15 -0000 1.66
834 +++ libav-9999.ebuild 7 Jun 2014 21:32:06 -0000 1.67
835 @@ -1,6 +1,6 @@
836 # Copyright 1999-2014 Gentoo Foundation
837 # Distributed under the terms of the GNU General Public License v2
838 -# $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-9999.ebuild,v 1.66 2014/06/04 13:34:15 lu_zero Exp $
839 +# $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-9999.ebuild,v 1.67 2014/06/07 21:32:06 mgorny Exp $
840
841 EAPI=5
842
843 @@ -10,7 +10,7 @@
844 [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
845 fi
846
847 -inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
848 +inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
849
850 DESCRIPTION="Complete solution to record, convert and stream audio and video."
851 HOMEPAGE="http://libav.org/"
852 @@ -40,79 +40,84 @@
853 IUSE+=" ${i%:*}"
854 done
855
856 -TOOLS="aviocat graph2dot ismindex pktdumper qt-faststart trasher"
857 -
858 RDEPEND="
859 !media-video/ffmpeg:0
860 - alsa? ( media-libs/alsa-lib )
861 - amr? ( media-libs/opencore-amr )
862 - bzip2? ( app-arch/bzip2 )
863 + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
864 + amr? ( media-libs/opencore-amr[${MULTILIB_USEDEP}] )
865 + bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
866 cdio? (
867 || (
868 - dev-libs/libcdio-paranoia
869 - <dev-libs/libcdio-0.90[-minimal]
870 + dev-libs/libcdio-paranoia[${MULTILIB_USEDEP}]
871 + <dev-libs/libcdio-0.90[-minimal,${MULTILIB_USEDEP}]
872 )
873 )
874 encode? (
875 - aac? ( media-libs/vo-aacenc )
876 - amr? ( media-libs/vo-amrwbenc )
877 - faac? ( media-libs/faac )
878 - fdk? ( media-libs/fdk-aac )
879 - mp3? ( >=media-sound/lame-3.98.3 )
880 + aac? ( media-libs/vo-aacenc[${MULTILIB_USEDEP}] )
881 + amr? ( media-libs/vo-amrwbenc[${MULTILIB_USEDEP}] )
882 + faac? ( media-libs/faac[${MULTILIB_USEDEP}] )
883 + fdk? ( media-libs/fdk-aac[${MULTILIB_USEDEP}] )
884 + mp3? ( >=media-sound/lame-3.98.3[${MULTILIB_USEDEP}] )
885 theora? (
886 - >=media-libs/libtheora-1.1.1[encode]
887 - media-libs/libogg
888 + >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
889 + media-libs/libogg[${MULTILIB_USEDEP}]
890 + )
891 + vorbis? (
892 + media-libs/libvorbis[${MULTILIB_USEDEP}]
893 + media-libs/libogg[${MULTILIB_USEDEP}]
894 )
895 - vorbis? ( media-libs/libvorbis media-libs/libogg )
896 - webp? ( media-libs/libwebp )
897 - wavpack? ( media-sound/wavpack )
898 - x264? ( >=media-libs/x264-0.0.20111017:= )
899 - x265? ( >=media-libs/x265-1:= )
900 - xvid? ( >=media-libs/xvid-1.1.0 )
901 + webp? ( media-libs/libwebp[${MULTILIB_USEDEP}] )
902 + wavpack? ( media-sound/wavpack[${MULTILIB_USEDEP}] )
903 + x264? ( >=media-libs/x264-0.0.20111017:=[${MULTILIB_USEDEP}] )
904 + x265? ( >=media-libs/x265-1:=[${MULTILIB_USEDEP}] )
905 + xvid? ( >=media-libs/xvid-1.1.0[${MULTILIB_USEDEP}] )
906 )
907 frei0r? ( media-plugins/frei0r-plugins )
908 - gsm? ( >=media-sound/gsm-1.0.12-r1 )
909 + gsm? ( >=media-sound/gsm-1.0.12-r1[${MULTILIB_USEDEP}] )
910 ieee1394? (
911 - media-libs/libdc1394
912 - sys-libs/libraw1394
913 + media-libs/libdc1394[${MULTILIB_USEDEP}]
914 + sys-libs/libraw1394[${MULTILIB_USEDEP}]
915 )
916 - jack? ( media-sound/jack-audio-connection-kit )
917 - jpeg2k? ( >=media-libs/openjpeg-1.3-r2:0 )
918 - opus? ( media-libs/opus )
919 - pulseaudio? ( media-sound/pulseaudio )
920 - rtmp? ( >=media-video/rtmpdump-2.2f )
921 + jack? ( media-sound/jack-audio-connection-kit[${MULTILIB_USEDEP}] )
922 + jpeg2k? ( >=media-libs/openjpeg-1.3-r2:0[${MULTILIB_USEDEP}] )
923 + opus? ( media-libs/opus[${MULTILIB_USEDEP}] )
924 + pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
925 + rtmp? ( >=media-video/rtmpdump-2.2f[${MULTILIB_USEDEP}] )
926 ssl? (
927 - openssl? ( dev-libs/openssl )
928 - !openssl? ( net-libs/gnutls )
929 + openssl? ( dev-libs/openssl[${MULTILIB_USEDEP}] )
930 + !openssl? ( net-libs/gnutls[${MULTILIB_USEDEP}] )
931 )
932 - sdl? ( >=media-libs/libsdl-1.2.13-r1[sound,video] )
933 - schroedinger? ( media-libs/schroedinger )
934 - speex? ( >=media-libs/speex-1.2_beta3 )
935 - truetype? ( media-libs/freetype:2 )
936 - vaapi? ( x11-libs/libva )
937 - vdpau? ( x11-libs/libvdpau )
938 - vpx? ( >=media-libs/libvpx-0.9.6 )
939 + sdl? ( >=media-libs/libsdl-1.2.13-r1[sound,video,${MULTILIB_USEDEP}] )
940 + schroedinger? ( media-libs/schroedinger[${MULTILIB_USEDEP}] )
941 + speex? ( >=media-libs/speex-1.2_beta3[${MULTILIB_USEDEP}] )
942 + truetype? ( media-libs/freetype:2[${MULTILIB_USEDEP}] )
943 + vaapi? ( x11-libs/libva[${MULTILIB_USEDEP}] )
944 + vdpau? ( x11-libs/libvdpau[${MULTILIB_USEDEP}] )
945 + vpx? ( >=media-libs/libvpx-0.9.6[${MULTILIB_USEDEP}] )
946 X? (
947 - x11-libs/libX11
948 - x11-libs/libXext
949 - x11-libs/libXfixes
950 + x11-libs/libX11[${MULTILIB_USEDEP}]
951 + x11-libs/libXext[${MULTILIB_USEDEP}]
952 + x11-libs/libXfixes[${MULTILIB_USEDEP}]
953 )
954 - zlib? ( sys-libs/zlib )
955 + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
956 "
957
958 DEPEND="${RDEPEND}
959 >=sys-devel/make-3.81
960 doc? ( app-text/texi2html )
961 - ieee1394? ( virtual/pkgconfig )
962 + ieee1394? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
963 mmx? ( dev-lang/yasm )
964 - rtmp? ( virtual/pkgconfig )
965 - schroedinger? ( virtual/pkgconfig )
966 - ssl? ( virtual/pkgconfig )
967 + rtmp? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
968 + schroedinger? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
969 + ssl? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
970 test? ( sys-devel/bc )
971 - truetype? ( virtual/pkgconfig )
972 + truetype? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
973 v4l? ( sys-kernel/linux-headers )
974 "
975
976 +RDEPEND="${RDEPEND}
977 + abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
978 + !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
979 +
980 # faac can't be binary distributed
981 # openssl support marked as nonfree
982 # faac and aac are concurent implementations
983 @@ -132,125 +137,129 @@
984 if [[ ${PV%_p*} != ${PV} ]]; then
985 sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
986 fi
987 +
988 + TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
989 + use zlib && TOOLS+=( cws2fws )
990 +
991 + MAKEOPTS+=" V=1"
992 }
993
994 -src_configure() {
995 - local myconf="${EXTRA_LIBAV_CONF}"
996 +multilib_src_configure() {
997 + local myconf=( ${EXTRA_LIBAV_CONF} )
998 local uses i
999
1000 - use zlib && TOOLS+=" cws2fws"
1001 -
1002 - myconf+="
1003 + myconf+=(
1004 $(use_enable gpl)
1005 $(use_enable gpl version3)
1006 --enable-avfilter
1007 - "
1008 + )
1009
1010 # enabled by default
1011 uses="debug doc network zlib"
1012 for i in ${uses}; do
1013 - use ${i} || myconf+=" --disable-${i}"
1014 + use ${i} || myconf+=( --disable-${i} )
1015 done
1016 - use bzip2 || myconf+=" --disable-bzlib"
1017 - use sdl || myconf+=" --disable-avplay"
1018 + use bzip2 || myconf+=( --disable-bzlib )
1019 + use sdl || myconf+=( --disable-avplay )
1020
1021 if use ssl; then
1022 - use openssl && myconf+=" --enable-openssl --enable-nonfree" \
1023 - || myconf+=" --enable-gnutls"
1024 + use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
1025 + || myconf+=( --enable-gnutls )
1026 fi
1027
1028 - use custom-cflags && myconf+=" --disable-optimizations"
1029 - use cpudetection && myconf+=" --enable-runtime-cpudetect"
1030 + use custom-cflags && myconf+=( --disable-optimizations )
1031 + use cpudetection && myconf+=( --enable-runtime-cpudetect )
1032
1033 - use vdpau || myconf+=" --disable-vdpau"
1034 + use vdpau || myconf+=( --disable-vdpau )
1035
1036 - use vaapi && myconf+=" --enable-vaapi"
1037 + use vaapi && myconf+=( --enable-vaapi )
1038
1039 # Encoders
1040 if use encode; then
1041 - use faac && myconf+=" --enable-nonfree"
1042 - use fdk && myconf+=" --enable-nonfree --enable-libfdk-aac"
1043 - use mp3 && myconf+=" --enable-libmp3lame"
1044 - use amr && myconf+=" --enable-libvo-amrwbenc"
1045 - use aac && myconf+=" --enable-libvo-aacenc"
1046 + use faac && myconf+=( --enable-nonfree )
1047 + use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
1048 + use mp3 && myconf+=( --enable-libmp3lame )
1049 + use amr && myconf+=( --enable-libvo-amrwbenc )
1050 + use aac && myconf+=( --enable-libvo-aacenc )
1051 uses="faac theora vorbis wavpack webp x264 x265 xvid"
1052 for i in ${uses}; do
1053 - use ${i} && myconf+=" --enable-lib${i}"
1054 + use ${i} && myconf+=( --enable-lib${i} )
1055 done
1056 else
1057 - myconf+=" --disable-encoders"
1058 + myconf+=( --disable-encoders )
1059 fi
1060
1061 # libavdevice options
1062 - use cdio && myconf+=" --enable-libcdio"
1063 - use ieee1394 && myconf+=" --enable-libdc1394"
1064 - use pulseaudio && myconf+=" --enable-libpulse"
1065 + use cdio && myconf+=( --enable-libcdio )
1066 + use ieee1394 && myconf+=( --enable-libdc1394 )
1067 + use pulseaudio && myconf+=( --enable-libpulse )
1068
1069 # Indevs
1070 # v4l1 is gone since linux-headers-2.6.38
1071 - myconf+=" --disable-indev=v4l"
1072 - use v4l || myconf+=" --disable-indev=v4l2"
1073 + myconf+=( --disable-indev=v4l )
1074 + use v4l || myconf+=( --disable-indev=v4l2 )
1075 for i in alsa oss jack; do
1076 - use ${i} || myconf+=" --disable-indev=${i}"
1077 + use ${i} || myconf+=( --disable-indev=${i} )
1078 done
1079 - use X && myconf+=" --enable-x11grab"
1080 + use X && myconf+=( --enable-x11grab )
1081 # Outdevs
1082 for i in alsa oss ; do
1083 - use ${i} || myconf+=" --disable-outdev=${i}"
1084 + use ${i} || myconf+=( --disable-outdev=${i} )
1085 done
1086 # libavfilter options
1087 - use frei0r && myconf+=" --enable-frei0r"
1088 - use truetype && myconf+=" --enable-libfreetype"
1089 + multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
1090 + use truetype && myconf+=( --enable-libfreetype )
1091
1092 # Threads; we only support pthread for now
1093 - use threads && myconf+=" --enable-pthreads"
1094 + use threads && myconf+=( --enable-pthreads )
1095
1096 # Decoders
1097 - use amr && myconf+=" --enable-libopencore-amrwb --enable-libopencore-amrnb"
1098 + use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
1099 uses="gsm opus rtmp schroedinger speex vpx"
1100 for i in ${uses}; do
1101 - use ${i} && myconf+=" --enable-lib${i}"
1102 + use ${i} && myconf+=( --enable-lib${i} )
1103 done
1104 - use jpeg2k && myconf+=" --enable-libopenjpeg"
1105 + use jpeg2k && myconf+=( --enable-libopenjpeg )
1106
1107 # CPU features
1108 for i in ${CPU_FEATURES}; do
1109 - use ${i%:*} || myconf+=" --disable-${i#*:}"
1110 + use ${i%:*} || myconf+=( --disable-${i#*:} )
1111 done
1112
1113 # pass the right -mfpu as extra
1114 - use neon && myconf+=" --extra-cflags=-mfpu=neon"
1115 + use neon && myconf+=( --extra-cflags=-mfpu=neon )
1116
1117 # disable mmx accelerated code if PIC is required
1118 # as the provided asm decidedly is not PIC for x86.
1119 - if use pic && use x86 ; then
1120 - myconf+=" --disable-mmx --disable-mmxext"
1121 + if use pic && [[ ${ABI} == x86 ]]; then
1122 + myconf+=( --disable-mmx --disable-mmxext )
1123 fi
1124
1125 # Option to force building pic
1126 - use pic && myconf+=" --enable-pic"
1127 + use pic && myconf+=( --enable-pic )
1128
1129 # cross compile support
1130 if tc-is-cross-compiler ; then
1131 - myconf+=" --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
1132 + myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
1133 case ${CHOST} in
1134 *freebsd*)
1135 - myconf+=" --target-os=freebsd"
1136 + myconf+=( --target-os=freebsd )
1137 ;;
1138 mingw32*)
1139 - myconf+=" --target-os=mingw32"
1140 + myconf+=( --target-os=mingw32 )
1141 ;;
1142 *linux*)
1143 - myconf+=" --target-os=linux"
1144 + myconf+=( --target-os=linux )
1145 ;;
1146 esac
1147 fi
1148
1149 # Misc stuff
1150 - use hardcoded-tables && myconf+=" --enable-hardcoded-tables"
1151 + use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
1152
1153 # Specific workarounds for too-few-registers arch...
1154 - if [[ $(tc-arch) == "x86" ]]; then
1155 + if [[ ${ABI} == x86 ]]; then
1156 + local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
1157 filter-flags -fforce-addr -momit-leaf-frame-pointer
1158 append-flags -fomit-frame-pointer
1159 is-flag -O? || append-flags -O2
1160 @@ -264,8 +273,7 @@
1161 fi
1162 fi
1163
1164 - cd "${S}"
1165 - ./configure \
1166 + "${S}"/configure \
1167 --prefix="${EPREFIX}"/usr \
1168 --libdir="${EPREFIX}"/usr/$(get_libdir) \
1169 --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
1170 @@ -276,42 +284,34 @@
1171 --optflags="${CFLAGS}" \
1172 --extra-cflags="${CFLAGS}" \
1173 $(use_enable static-libs static) \
1174 - ${myconf} || die
1175 -
1176 - MAKEOPTS+=" V=1"
1177 + "${myconf[@]}" || die
1178 }
1179
1180 -src_compile() {
1181 - local i
1182 -
1183 +multilib_src_compile() {
1184 emake
1185
1186 if use tools; then
1187 tc-export CC
1188
1189 - for i in ${TOOLS}; do
1190 - emake tools/${i}
1191 - done
1192 + emake ${TOOLS[@]/#/tools/}
1193 fi
1194 }
1195
1196 -src_install() {
1197 - local i
1198 -
1199 +multilib_src_install() {
1200 emake DESTDIR="${D}" install install-man
1201
1202 + if use tools; then
1203 + dobin ${TOOLS[@]/#/tools/}
1204 + fi
1205 +}
1206 +
1207 +multilib_src_install_all() {
1208 dodoc Changelog README INSTALL
1209 dodoc doc/*.txt
1210 use doc && dodoc doc/*.html
1211 -
1212 - if use tools; then
1213 - for i in ${TOOLS}; do
1214 - dobin tools/${i}
1215 - done
1216 - fi
1217 }
1218
1219 -src_test() {
1220 - LD_LIBRARY_PATH="${S}/libavcore:${S}/libswscale:${S}/libavcodec:${S}/libavdevice:${S}/libavfilter:${S}/libavformat:${S}/libavutil" \
1221 +multilib_src_test() {
1222 + LD_LIBRARY_PATH="${BUILD_DIR}/libavcore:${BUILD_DIR}/libswscale:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil" \
1223 emake -j1 fate
1224 }
1225
1226
1227
1228 1.190 media-video/libav/ChangeLog
1229
1230 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/ChangeLog?rev=1.190&view=markup
1231 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/ChangeLog?rev=1.190&content-type=text/plain
1232 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/ChangeLog?r1=1.189&r2=1.190
1233
1234 Index: ChangeLog
1235 ===================================================================
1236 RCS file: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v
1237 retrieving revision 1.189
1238 retrieving revision 1.190
1239 diff -u -r1.189 -r1.190
1240 --- ChangeLog 4 Jun 2014 21:56:29 -0000 1.189
1241 +++ ChangeLog 7 Jun 2014 21:32:06 -0000 1.190
1242 @@ -1,6 +1,14 @@
1243 # ChangeLog for media-video/libav
1244 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
1245 -# $Header: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v 1.189 2014/06/04 21:56:29 lu_zero Exp $
1246 +# $Header: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v 1.190 2014/06/07 21:32:06 mgorny Exp $
1247 +
1248 +*libav-9.13-r1 (07 Jun 2014)
1249 +*libav-10.1-r1 (07 Jun 2014)
1250 +
1251 + 07 Jun 2014; Michał Górny <mgorny@g.o> +libav-10.1-r1.ebuild,
1252 + +libav-9.13-r1.ebuild, libav-10.9999.ebuild, libav-9.9999.ebuild,
1253 + libav-9999.ebuild:
1254 + Enable multilib support, bug #489816.
1255
1256 04 Jun 2014; Luca Barbato <lu_zero@g.o> libav-10.1.ebuild:
1257 Drop spurious restrict
1258
1259
1260
1261 1.1 media-video/libav/libav-9.13-r1.ebuild
1262
1263 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-9.13-r1.ebuild?rev=1.1&view=markup
1264 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-9.13-r1.ebuild?rev=1.1&content-type=text/plain
1265
1266 Index: libav-9.13-r1.ebuild
1267 ===================================================================
1268 # Copyright 1999-2014 Gentoo Foundation
1269 # Distributed under the terms of the GNU General Public License v2
1270 # $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-9.13-r1.ebuild,v 1.1 2014/06/07 21:32:06 mgorny Exp $
1271
1272 EAPI=5
1273
1274 if [[ ${PV} == *9999 ]] ; then
1275 SCM="git-2"
1276 EGIT_REPO_URI="git://git.libav.org/libav.git"
1277 [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
1278 fi
1279
1280 inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
1281
1282 DESCRIPTION="Complete solution to record, convert and stream audio and video."
1283 HOMEPAGE="http://libav.org/"
1284 if [[ ${PV} == *9999 ]] ; then
1285 SRC_URI=""
1286 elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
1287 SRC_URI="http://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
1288 else # Official release
1289 SRC_URI="http://${PN}.org/releases/${P}.tar.xz"
1290 fi
1291
1292 SRC_URI+=" test? ( http://dev.gentoo.org/~lu_zero/libav/fate-9.tar.xz )"
1293
1294 LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
1295 SLOT="0/9"
1296
1297 # Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
1298 [[ ${PV} == *9999 ]] || \
1299 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"
1300
1301 IUSE="aac alsa amr bindist +bzip2 cdio cpudetection custom-cflags debug doc
1302 +encode faac fdk frei0r +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k mp3
1303 +network openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
1304 static-libs test theora threads tools truetype v4l vaapi vdpau vorbis vpx X
1305 x264 xvid +zlib"
1306
1307 # String for CPU features in the useflag[:configure_option] form
1308 # if :configure_option isn't set, it will use 'useflag' as configure option
1309 CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext altivec avx mmx mmxext neon ssse3 vis"
1310 for i in ${CPU_FEATURES} ; do
1311 IUSE+=" ${i%:*}"
1312 done
1313
1314 RDEPEND="
1315 !media-video/ffmpeg:0
1316 alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
1317 amr? ( media-libs/opencore-amr[${MULTILIB_USEDEP}] )
1318 bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
1319 cdio? (
1320 || (
1321 dev-libs/libcdio-paranoia[${MULTILIB_USEDEP}]
1322 <dev-libs/libcdio-0.90[-minimal,${MULTILIB_USEDEP}]
1323 )
1324 )
1325 encode? (
1326 aac? ( media-libs/vo-aacenc[${MULTILIB_USEDEP}] )
1327 amr? ( media-libs/vo-amrwbenc[${MULTILIB_USEDEP}] )
1328 faac? ( media-libs/faac[${MULTILIB_USEDEP}] )
1329 fdk? ( media-libs/fdk-aac[${MULTILIB_USEDEP}] )
1330 mp3? ( >=media-sound/lame-3.98.3[${MULTILIB_USEDEP}] )
1331 theora? (
1332 >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
1333 media-libs/libogg[${MULTILIB_USEDEP}]
1334 )
1335 vorbis? (
1336 media-libs/libvorbis[${MULTILIB_USEDEP}]
1337 media-libs/libogg[${MULTILIB_USEDEP}]
1338 )
1339 x264? ( >=media-libs/x264-0.0.20111017:=[${MULTILIB_USEDEP}] )
1340 xvid? ( >=media-libs/xvid-1.1.0[${MULTILIB_USEDEP}] )
1341 )
1342 frei0r? ( media-plugins/frei0r-plugins )
1343 gsm? ( >=media-sound/gsm-1.0.12-r1[${MULTILIB_USEDEP}] )
1344 ieee1394? (
1345 media-libs/libdc1394[${MULTILIB_USEDEP}]
1346 sys-libs/libraw1394[${MULTILIB_USEDEP}]
1347 )
1348 jack? ( media-sound/jack-audio-connection-kit[${MULTILIB_USEDEP}] )
1349 jpeg2k? ( >=media-libs/openjpeg-1.3-r2:0[${MULTILIB_USEDEP}] )
1350 opus? ( media-libs/opus[${MULTILIB_USEDEP}] )
1351 pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
1352 rtmp? ( >=media-video/rtmpdump-2.2f[${MULTILIB_USEDEP}] )
1353 ssl? (
1354 openssl? ( dev-libs/openssl[${MULTILIB_USEDEP}] )
1355 !openssl? ( net-libs/gnutls[${MULTILIB_USEDEP}] )
1356 )
1357 sdl? ( >=media-libs/libsdl-1.2.13-r1[sound,video,${MULTILIB_USEDEP}] )
1358 schroedinger? ( media-libs/schroedinger[${MULTILIB_USEDEP}] )
1359 speex? ( >=media-libs/speex-1.2_beta3[${MULTILIB_USEDEP}] )
1360 truetype? ( media-libs/freetype:2[${MULTILIB_USEDEP}] )
1361 vaapi? ( x11-libs/libva[${MULTILIB_USEDEP}] )
1362 vdpau? ( x11-libs/libvdpau[${MULTILIB_USEDEP}] )
1363 vpx? ( >=media-libs/libvpx-0.9.6[${MULTILIB_USEDEP}] )
1364 X? (
1365 x11-libs/libX11[${MULTILIB_USEDEP}]
1366 x11-libs/libXext[${MULTILIB_USEDEP}]
1367 x11-libs/libXfixes[${MULTILIB_USEDEP}]
1368 )
1369 zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
1370 "
1371
1372 DEPEND="${RDEPEND}
1373 >=sys-devel/make-3.81
1374 doc? ( app-text/texi2html )
1375 ieee1394? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
1376 mmx? ( dev-lang/yasm )
1377 rtmp? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
1378 schroedinger? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
1379 ssl? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
1380 test? ( sys-devel/bc )
1381 truetype? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
1382 v4l? ( sys-kernel/linux-headers )
1383 "
1384
1385 RDEPEND="${RDEPEND}
1386 abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
1387 !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
1388
1389 # faac can't be binary distributed
1390 # openssl support marked as nonfree
1391 # faac and aac are concurent implementations
1392 # amr and aac require at least lgpl3
1393 # x264 requires gpl2
1394 REQUIRED_USE="bindist? ( !faac !openssl !fdk )
1395 rtmp? ( network )
1396 amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl ) cdio? ( gpl )
1397 test? ( encode zlib )
1398 "
1399
1400 src_prepare() {
1401 # if we have snapshot then we need to hardcode the version
1402 if [[ ${PV%_p*} != ${PV} ]]; then
1403 sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
1404 fi
1405
1406 TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
1407 use zlib && TOOLS+=( cws2fws )
1408
1409 MAKEOPTS+=" V=1"
1410 }
1411
1412 multilib_src_configure() {
1413 local myconf=( ${EXTRA_LIBAV_CONF} )
1414 local uses i
1415
1416 myconf+=(
1417 $(use_enable gpl)
1418 $(use_enable gpl version3)
1419 --enable-avfilter
1420 )
1421
1422 # enabled by default
1423 uses="debug doc network zlib"
1424 for i in ${uses}; do
1425 use ${i} || myconf+=( --disable-${i} )
1426 done
1427 use bzip2 || myconf+=( --disable-bzlib )
1428 use sdl || myconf+=( --disable-avplay )
1429
1430 if use ssl; then
1431 use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
1432 || myconf+=( --enable-gnutls )
1433 fi
1434
1435 use custom-cflags && myconf+=( --disable-optimizations )
1436 use cpudetection && myconf+=( --enable-runtime-cpudetect )
1437
1438 use vdpau || myconf+=( --disable-vdpau )
1439
1440 use vaapi && myconf+=( --enable-vaapi )
1441
1442 # Encoders
1443 if use encode; then
1444 use faac && myconf+=( --enable-nonfree )
1445 use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
1446 use mp3 && myconf+=( --enable-libmp3lame )
1447 use amr && myconf+=( --enable-libvo-amrwbenc )
1448 use aac && myconf+=( --enable-libvo-aacenc )
1449 uses="faac theora vorbis x264 xvid"
1450 for i in ${uses}; do
1451 use ${i} && myconf+=( --enable-lib${i} )
1452 done
1453 else
1454 myconf+=( --disable-encoders )
1455 fi
1456
1457 # libavdevice options
1458 use cdio && myconf+=( --enable-libcdio )
1459 use ieee1394 && myconf+=( --enable-libdc1394 )
1460 use pulseaudio && myconf+=( --enable-libpulse )
1461
1462 # Indevs
1463 # v4l1 is gone since linux-headers-2.6.38
1464 myconf+=( --disable-indev=v4l )
1465 use v4l || myconf+=( --disable-indev=v4l2 )
1466 for i in alsa oss jack; do
1467 use ${i} || myconf+=( --disable-indev=${i} )
1468 done
1469 use X && myconf+=( --enable-x11grab )
1470 # Outdevs
1471 for i in alsa oss ; do
1472 use ${i} || myconf+=( --disable-outdev=${i} )
1473 done
1474 # libavfilter options
1475 multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
1476 use truetype && myconf+=( --enable-libfreetype )
1477
1478 # Threads; we only support pthread for now
1479 use threads && myconf+=( --enable-pthreads )
1480
1481 # Decoders
1482 use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
1483 uses="gsm opus rtmp schroedinger speex vpx"
1484 for i in ${uses}; do
1485 use ${i} && myconf+=( --enable-lib${i} )
1486 done
1487 use jpeg2k && myconf+=( --enable-libopenjpeg )
1488
1489 # CPU features
1490 for i in ${CPU_FEATURES}; do
1491 use ${i%:*} || myconf+=( --disable-${i#*:} )
1492 done
1493
1494 # pass the right -mfpu as extra
1495 use neon && myconf+=( --extra-cflags=-mfpu=neon )
1496
1497 # disable mmx accelerated code if PIC is required
1498 # as the provided asm decidedly is not PIC for x86.
1499 if use pic && [[ ${ABI} == x86 ]] ; then
1500 myconf+=( --disable-mmx --disable-mmxext )
1501 fi
1502
1503 # Option to force building pic
1504 use pic && myconf+=( --enable-pic )
1505
1506 # cross compile support
1507 if tc-is-cross-compiler ; then
1508 myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
1509 case ${CHOST} in
1510 *freebsd*)
1511 myconf+=( --target-os=freebsd )
1512 ;;
1513 mingw32*)
1514 myconf+=( --target-os=mingw32 )
1515 ;;
1516 *linux*)
1517 myconf+=( --target-os=linux )
1518 ;;
1519 esac
1520 fi
1521
1522 # Misc stuff
1523 use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
1524
1525 # Specific workarounds for too-few-registers arch...
1526 if [[ ${ABI} == x86 ]]; then
1527 local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
1528 filter-flags -fforce-addr -momit-leaf-frame-pointer
1529 append-flags -fomit-frame-pointer
1530 is-flag -O? || append-flags -O2
1531 if use debug; then
1532 # no need to warn about debug if not using debug flag
1533 ewarn ""
1534 ewarn "Debug information will be almost useless as the frame pointer is omitted."
1535 ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
1536 ewarn "difficult to fix. Please have that in mind."
1537 ewarn ""
1538 fi
1539 fi
1540
1541 "${S}"/configure \
1542 --prefix="${EPREFIX}"/usr \
1543 --libdir="${EPREFIX}"/usr/$(get_libdir) \
1544 --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
1545 --mandir="${EPREFIX}"/usr/share/man \
1546 --enable-shared \
1547 --cc="$(tc-getCC)" \
1548 --ar="$(tc-getAR)" \
1549 --optflags="${CFLAGS}" \
1550 --extra-cflags="${CFLAGS}" \
1551 $(use_enable static-libs static) \
1552 "${myconf[@]}" || die
1553 }
1554
1555 multilib_src_compile() {
1556 emake
1557
1558 if multilib_is_native_abi && use tools; then
1559 tc-export CC
1560
1561 emake ${TOOLS[@]/#/tools/}
1562 fi
1563 }
1564
1565 multilib_src_install() {
1566 emake DESTDIR="${D}" install install-man
1567
1568 use doc && dodoc doc/*.html
1569
1570 if multilib_is_native_abi && use tools; then
1571 dobin ${TOOLS[@]/#/tools/}
1572 fi
1573 }
1574
1575 multilib_src_install_all() {
1576 dodoc Changelog README INSTALL
1577 dodoc doc/*.txt
1578 }
1579
1580 multilib_src_test() {
1581 echo ${WORKDIR}/fate
1582 LD_LIBRARY_PATH="${BUILD_DIR}/libswscale:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavresample:${BUILD_DIR}/libavutil" \
1583 emake -j1 fate SAMPLES="${WORKDIR}/fate"
1584 }
1585
1586
1587
1588 1.1 media-video/libav/libav-10.1-r1.ebuild
1589
1590 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-10.1-r1.ebuild?rev=1.1&view=markup
1591 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-10.1-r1.ebuild?rev=1.1&content-type=text/plain
1592
1593 Index: libav-10.1-r1.ebuild
1594 ===================================================================
1595 # Copyright 1999-2014 Gentoo Foundation
1596 # Distributed under the terms of the GNU General Public License v2
1597 # $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-10.1-r1.ebuild,v 1.1 2014/06/07 21:32:06 mgorny Exp $
1598
1599 EAPI=5
1600
1601 if [[ ${PV} == *9999 ]] ; then
1602 SCM="git-2"
1603 EGIT_REPO_URI="git://git.libav.org/libav.git"
1604 [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
1605 fi
1606
1607 inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
1608
1609 DESCRIPTION="Complete solution to record, convert and stream audio and video."
1610 HOMEPAGE="http://libav.org/"
1611 if [[ ${PV} == *9999 ]] ; then
1612 SRC_URI=""
1613 elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
1614 SRC_URI="http://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
1615 else # Official release
1616 SRC_URI="http://${PN}.org/releases/${P}.tar.xz"
1617 fi
1618
1619 SRC_URI+=" test? ( http://dev.gentoo.org/~lu_zero/libav/fate-10.tar.xz )"
1620
1621 LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
1622 SLOT="0/10"
1623 [[ ${PV} == *9999 ]] || KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64
1624 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos
1625 ~x64-solaris ~x86-solaris"
1626 IUSE="aac alsa amr bindist +bzip2 cdio cpudetection custom-cflags debug doc
1627 +encode faac fdk frei0r +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k mp3
1628 +network openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
1629 static-libs test theora threads tools truetype v4l vaapi vdpau vorbis vpx X
1630 wavpack webp x264 xvid +zlib"
1631
1632 # String for CPU features in the useflag[:configure_option] form
1633 # if :configure_option isn't set, it will use 'useflag' as configure option
1634 CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext altivec avx mmx mmxext neon ssse3 vis avx2"
1635 for i in ${CPU_FEATURES} ; do
1636 IUSE+=" ${i%:*}"
1637 done
1638
1639 RDEPEND="
1640 !media-video/ffmpeg:0
1641 alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
1642 amr? ( media-libs/opencore-amr[${MULTILIB_USEDEP}] )
1643 bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
1644 cdio? (
1645 || (
1646 dev-libs/libcdio-paranoia[${MULTILIB_USEDEP}]
1647 <dev-libs/libcdio-0.90[-minimal,${MULTILIB_USEDEP}]
1648 )
1649 )
1650 encode? (
1651 aac? ( media-libs/vo-aacenc[${MULTILIB_USEDEP}] )
1652 amr? ( media-libs/vo-amrwbenc[${MULTILIB_USEDEP}] )
1653 faac? ( media-libs/faac[${MULTILIB_USEDEP}] )
1654 fdk? ( media-libs/fdk-aac[${MULTILIB_USEDEP}] )
1655 mp3? ( >=media-sound/lame-3.98.3[${MULTILIB_USEDEP}] )
1656 theora? (
1657 >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
1658 media-libs/libogg[${MULTILIB_USEDEP}]
1659 )
1660 vorbis? (
1661 media-libs/libvorbis[${MULTILIB_USEDEP}]
1662 media-libs/libogg[${MULTILIB_USEDEP}]
1663 )
1664 webp? ( media-libs/libwebp[${MULTILIB_USEDEP}] )
1665 wavpack? ( media-sound/wavpack[${MULTILIB_USEDEP}] )
1666 x264? ( >=media-libs/x264-0.0.20111017:=[${MULTILIB_USEDEP}] )
1667 xvid? ( >=media-libs/xvid-1.1.0[${MULTILIB_USEDEP}] )
1668 )
1669 frei0r? ( media-plugins/frei0r-plugins )
1670 gsm? ( >=media-sound/gsm-1.0.12-r1[${MULTILIB_USEDEP}] )
1671 ieee1394? (
1672 media-libs/libdc1394[${MULTILIB_USEDEP}]
1673 sys-libs/libraw1394[${MULTILIB_USEDEP}]
1674 )
1675 jack? ( media-sound/jack-audio-connection-kit[${MULTILIB_USEDEP}] )
1676 jpeg2k? ( >=media-libs/openjpeg-1.3-r2:0[${MULTILIB_USEDEP}] )
1677 opus? ( media-libs/opus[${MULTILIB_USEDEP}] )
1678 pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
1679 rtmp? ( >=media-video/rtmpdump-2.2f[${MULTILIB_USEDEP}] )
1680 ssl? (
1681 openssl? ( dev-libs/openssl[${MULTILIB_USEDEP}] )
1682 !openssl? ( net-libs/gnutls[${MULTILIB_USEDEP}] )
1683 )
1684 sdl? ( >=media-libs/libsdl-1.2.13-r1[sound,video,${MULTILIB_USEDEP}] )
1685 schroedinger? ( media-libs/schroedinger[${MULTILIB_USEDEP}] )
1686 speex? ( >=media-libs/speex-1.2_beta3[${MULTILIB_USEDEP}] )
1687 truetype? ( media-libs/freetype:2[${MULTILIB_USEDEP}] )
1688 vaapi? ( x11-libs/libva[${MULTILIB_USEDEP}] )
1689 vdpau? ( x11-libs/libvdpau[${MULTILIB_USEDEP}] )
1690 vpx? ( >=media-libs/libvpx-0.9.6[${MULTILIB_USEDEP}] )
1691 X? (
1692 x11-libs/libX11[${MULTILIB_USEDEP}]
1693 x11-libs/libXext[${MULTILIB_USEDEP}]
1694 x11-libs/libXfixes[${MULTILIB_USEDEP}]
1695 )
1696 zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
1697 "
1698
1699 DEPEND="${RDEPEND}
1700 >=sys-devel/make-3.81
1701 doc? ( app-text/texi2html )
1702 ieee1394? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
1703 mmx? ( dev-lang/yasm )
1704 rtmp? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
1705 schroedinger? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
1706 ssl? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
1707 test? ( sys-devel/bc )
1708 truetype? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
1709 v4l? ( sys-kernel/linux-headers )
1710 "
1711
1712 RDEPEND="${RDEPEND}
1713 abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
1714 !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
1715
1716 # faac can't be binary distributed
1717 # openssl support marked as nonfree
1718 # faac and aac are concurent implementations
1719 # amr and aac require at least lgpl3
1720 # x264 requires gpl2
1721 REQUIRED_USE="bindist? ( !faac !openssl !fdk )
1722 rtmp? ( network )
1723 amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl ) cdio? ( gpl )
1724 test? ( encode zlib )
1725 "
1726
1727 src_prepare() {
1728 # if we have snapshot then we need to hardcode the version
1729 if [[ ${PV%_p*} != ${PV} ]]; then
1730 sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
1731 fi
1732
1733 TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
1734 use zlib && TOOLS+=( cws2fws )
1735
1736 MAKEOPTS+=" V=1"
1737 }
1738
1739 multilib_src_configure() {
1740 local myconf=( ${EXTRA_LIBAV_CONF} )
1741 local uses i
1742
1743 myconf+=(
1744 $(use_enable gpl)
1745 $(use_enable gpl version3)
1746 --enable-avfilter
1747 )
1748
1749 # enabled by default
1750 uses="debug doc network zlib"
1751 for i in ${uses}; do
1752 use ${i} || myconf+=( --disable-${i} )
1753 done
1754 use bzip2 || myconf+=( --disable-bzlib )
1755 use sdl || myconf+=( --disable-avplay )
1756
1757 if use ssl; then
1758 use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
1759 || myconf+=( --enable-gnutls )
1760 fi
1761
1762 use custom-cflags && myconf+=( --disable-optimizations )
1763 use cpudetection && myconf+=( --enable-runtime-cpudetect )
1764
1765 use vdpau || myconf+=( --disable-vdpau )
1766
1767 use vaapi && myconf+=( --enable-vaapi )
1768
1769 # Encoders
1770 if use encode; then
1771 use faac && myconf+=( --enable-nonfree )
1772 use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
1773 use mp3 && myconf+=( --enable-libmp3lame )
1774 use amr && myconf+=( --enable-libvo-amrwbenc )
1775 use aac && myconf+=( --enable-libvo-aacenc )
1776 uses="faac theora vorbis wavpack webp x264 xvid"
1777 for i in ${uses}; do
1778 use ${i} && myconf+=( --enable-lib${i} )
1779 done
1780 else
1781 myconf+=( --disable-encoders )
1782 fi
1783
1784 # libavdevice options
1785 use cdio && myconf+=( --enable-libcdio )
1786 use ieee1394 && myconf+=( --enable-libdc1394 )
1787 use pulseaudio && myconf+=( --enable-libpulse )
1788
1789 # Indevs
1790 # v4l1 is gone since linux-headers-2.6.38
1791 myconf+=( --disable-indev=v4l )
1792 use v4l || myconf+=( --disable-indev=v4l2 )
1793 for i in alsa oss jack; do
1794 use ${i} || myconf+=( --disable-indev=${i} )
1795 done
1796 use X && myconf+=( --enable-x11grab )
1797 # Outdevs
1798 for i in alsa oss ; do
1799 use ${i} || myconf+=( --disable-outdev=${i} )
1800 done
1801 # libavfilter options
1802 multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
1803 use truetype && myconf+=( --enable-libfreetype )
1804
1805 # Threads; we only support pthread for now
1806 use threads && myconf+=( --enable-pthreads )
1807
1808 # Decoders
1809 use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
1810 uses="gsm opus rtmp schroedinger speex vpx"
1811 for i in ${uses}; do
1812 use ${i} && myconf+=( --enable-lib${i} )
1813 done
1814 use jpeg2k && myconf+=( --enable-libopenjpeg )
1815
1816 # CPU features
1817 for i in ${CPU_FEATURES}; do
1818 use ${i%:*} || myconf+=( --disable-${i#*:} )
1819 done
1820
1821 # pass the right -mfpu as extra
1822 use neon && myconf+=( --extra-cflags=-mfpu=neon )
1823
1824 # disable mmx accelerated code if PIC is required
1825 # as the provided asm decidedly is not PIC for x86.
1826 if use pic && [[ ${ABI} == x86 ]]; then
1827 myconf+=( --disable-mmx --disable-mmxext )
1828 fi
1829
1830 # Option to force building pic
1831 use pic && myconf+=( --enable-pic )
1832
1833 # cross compile support
1834 if tc-is-cross-compiler ; then
1835 myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
1836 case ${CHOST} in
1837 *freebsd*)
1838 myconf+=( --target-os=freebsd )
1839 ;;
1840 mingw32*)
1841 myconf+=( --target-os=mingw32 )
1842 ;;
1843 *linux*)
1844 myconf+=( --target-os=linux )
1845 ;;
1846 esac
1847 fi
1848
1849 # Misc stuff
1850 use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
1851
1852 # Specific workarounds for too-few-registers arch...
1853 if [[ ${ABI} == x86 ]]; then
1854 local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
1855 filter-flags -fforce-addr -momit-leaf-frame-pointer
1856 append-flags -fomit-frame-pointer
1857 is-flag -O? || append-flags -O2
1858 if use debug; then
1859 # no need to warn about debug if not using debug flag
1860 ewarn ""
1861 ewarn "Debug information will be almost useless as the frame pointer is omitted."
1862 ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
1863 ewarn "difficult to fix. Please have that in mind."
1864 ewarn ""
1865 fi
1866 fi
1867
1868 "${S}"/configure \
1869 --prefix="${EPREFIX}"/usr \
1870 --libdir="${EPREFIX}"/usr/$(get_libdir) \
1871 --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
1872 --mandir="${EPREFIX}"/usr/share/man \
1873 --enable-shared \
1874 --cc="$(tc-getCC)" \
1875 --ar="$(tc-getAR)" \
1876 --optflags="${CFLAGS}" \
1877 --extra-cflags="${CFLAGS}" \
1878 $(use_enable static-libs static) \
1879 "${myconf[@]}" || die
1880 }
1881
1882 multilib_src_compile() {
1883 emake
1884
1885 if use tools; then
1886 tc-export CC
1887
1888 emake ${TOOLS[@]/#/tools/}
1889 fi
1890 }
1891
1892 multilib_src_install() {
1893 emake DESTDIR="${D}" install install-man
1894
1895 if use tools; then
1896 dobin ${TOOLS[@]/#/tools/}
1897 fi
1898 }
1899
1900 multilib_src_install_all() {
1901 dodoc Changelog README INSTALL
1902 dodoc doc/*.txt
1903 use doc && dodoc doc/*.html
1904 }
1905
1906 multilib_src_test() {
1907 LD_LIBRARY_PATH="${BUILD_DIR}/libavcore:${BUILD_DIR}/libswscale:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil" \
1908 emake -j1 fate
1909 }