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