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