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