1 |
lu_zero 13/03/02 14:31:36 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: libav-9.3.ebuild |
5 |
Log: |
6 |
New version |
7 |
|
8 |
(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 1191738E) |
9 |
|
10 |
Revision Changes Path |
11 |
1.144 media-video/libav/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/ChangeLog?rev=1.144&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/ChangeLog?rev=1.144&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/ChangeLog?r1=1.143&r2=1.144 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v |
20 |
retrieving revision 1.143 |
21 |
retrieving revision 1.144 |
22 |
diff -u -r1.143 -r1.144 |
23 |
--- ChangeLog 2 Mar 2013 14:09:26 -0000 1.143 |
24 |
+++ ChangeLog 2 Mar 2013 14:31:36 -0000 1.144 |
25 |
@@ -1,6 +1,11 @@ |
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.143 2013/03/02 14:09:26 lu_zero Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v 1.144 2013/03/02 14:31:36 lu_zero Exp $ |
30 |
+ |
31 |
+*libav-9.3 (02 Mar 2013) |
32 |
+ |
33 |
+ 02 Mar 2013; Luca Barbato <lu_zero@g.o> +libav-9.3.ebuild: |
34 |
+ New version |
35 |
|
36 |
02 Mar 2013; Luca Barbato <lu_zero@g.o> |
37 |
-files/0001-build-The-libopencore-amrnb-encoder-depends-on-audio.patch, |
38 |
|
39 |
|
40 |
|
41 |
1.1 media-video/libav/libav-9.3.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-9.3.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-9.3.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: libav-9.3.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2013 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-9.3.ebuild,v 1.1 2013/03/02 14:31:36 lu_zero Exp $ |
51 |
|
52 |
EAPI=5 |
53 |
|
54 |
if [[ ${PV} == *9999 ]] ; then |
55 |
SCM="git-2" |
56 |
EGIT_REPO_URI="git://git.libav.org/libav.git" |
57 |
[[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}" |
58 |
fi |
59 |
|
60 |
inherit eutils flag-o-matic multilib toolchain-funcs ${SCM} |
61 |
|
62 |
DESCRIPTION="Complete solution to record, convert and stream audio and video." |
63 |
HOMEPAGE="http://libav.org/" |
64 |
if [[ ${PV} == *9999 ]] ; then |
65 |
SRC_URI="" |
66 |
elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot |
67 |
SRC_URI="http://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz" |
68 |
else # Official release |
69 |
SRC_URI="http://${PN}.org/releases/${P}.tar.xz" |
70 |
fi |
71 |
|
72 |
SRC_URI+=" test? ( http://dev.gentoo.org/~lu_zero/libav/fate-9.tar.xz )" |
73 |
|
74 |
LICENSE="LGPL-2.1 gpl? ( GPL-3 )" |
75 |
SLOT="0/9" |
76 |
|
77 |
# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061 |
78 |
[[ ${PV} == *9999 ]] || \ |
79 |
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" |
80 |
|
81 |
IUSE="aac alsa amr bindist +bzip2 cdio cpudetection custom-cflags debug doc |
82 |
+encode faac fdk frei0r +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k mp3 |
83 |
network openssl oss pic pulseaudio rtmp schroedinger sdl speex ssl |
84 |
static-libs test theora threads tools truetype v4l vaapi vdpau vorbis vpx X |
85 |
x264 xvid +zlib" |
86 |
|
87 |
# String for CPU features in the useflag[:configure_option] form |
88 |
# if :configure_option isn't set, it will use 'useflag' as configure option |
89 |
CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext altivec avx mmx mmxext neon ssse3 vis" |
90 |
for i in ${CPU_FEATURES} ; do |
91 |
IUSE+=" ${i%:*}" |
92 |
done |
93 |
|
94 |
TOOLS="aviocat graph2dot ismindex pktdumper qt-faststart trasher" |
95 |
|
96 |
RDEPEND=" |
97 |
!media-video/ffmpeg |
98 |
alsa? ( media-libs/alsa-lib ) |
99 |
amr? ( media-libs/opencore-amr ) |
100 |
bzip2? ( app-arch/bzip2 ) |
101 |
cdio? ( || ( dev-libs/libcdio-paranoia |
102 |
<dev-libs/libcdio-0.90[-minimal] ) ) |
103 |
encode? ( |
104 |
aac? ( media-libs/vo-aacenc ) |
105 |
amr? ( media-libs/vo-amrwbenc ) |
106 |
faac? ( media-libs/faac ) |
107 |
fdk? ( media-libs/fdk-aac ) |
108 |
mp3? ( >=media-sound/lame-3.98.3 ) |
109 |
theora? ( |
110 |
>=media-libs/libtheora-1.1.1[encode] |
111 |
media-libs/libogg |
112 |
) |
113 |
vorbis? ( media-libs/libvorbis media-libs/libogg ) |
114 |
x264? ( >=media-libs/x264-0.0.20111017 ) |
115 |
xvid? ( >=media-libs/xvid-1.1.0 ) |
116 |
) |
117 |
frei0r? ( media-plugins/frei0r-plugins ) |
118 |
gsm? ( >=media-sound/gsm-1.0.12-r1 ) |
119 |
ieee1394? ( |
120 |
media-libs/libdc1394 |
121 |
sys-libs/libraw1394 |
122 |
) |
123 |
jack? ( media-sound/jack-audio-connection-kit ) |
124 |
jpeg2k? ( >=media-libs/openjpeg-1.3-r2 ) |
125 |
pulseaudio? ( media-sound/pulseaudio ) |
126 |
rtmp? ( >=media-video/rtmpdump-2.2f ) |
127 |
ssl? ( |
128 |
openssl? ( dev-libs/openssl ) |
129 |
!openssl? ( net-libs/gnutls ) |
130 |
) |
131 |
sdl? ( >=media-libs/libsdl-1.2.13-r1[audio,video] ) |
132 |
schroedinger? ( media-libs/schroedinger ) |
133 |
speex? ( >=media-libs/speex-1.2_beta3 ) |
134 |
truetype? ( media-libs/freetype:2 ) |
135 |
vaapi? ( x11-libs/libva ) |
136 |
vdpau? ( x11-libs/libvdpau ) |
137 |
vpx? ( >=media-libs/libvpx-0.9.6 ) |
138 |
X? ( |
139 |
x11-libs/libX11 |
140 |
x11-libs/libXext |
141 |
x11-libs/libXfixes |
142 |
) |
143 |
zlib? ( sys-libs/zlib ) |
144 |
" |
145 |
|
146 |
DEPEND="${RDEPEND} |
147 |
>=sys-devel/make-3.81 |
148 |
doc? ( app-text/texi2html ) |
149 |
ieee1394? ( virtual/pkgconfig ) |
150 |
mmx? ( dev-lang/yasm ) |
151 |
rtmp? ( virtual/pkgconfig ) |
152 |
schroedinger? ( virtual/pkgconfig ) |
153 |
ssl? ( virtual/pkgconfig ) |
154 |
test? ( sys-devel/bc ) |
155 |
truetype? ( virtual/pkgconfig ) |
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 !fdk ) |
165 |
rtmp? ( network ) |
166 |
amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl ) cdio? ( gpl ) |
167 |
test? ( encode zlib ) |
168 |
" |
169 |
|
170 |
src_prepare() { |
171 |
# if we have snapshot then we need to hardcode the version |
172 |
if [[ ${PV%_p*} != ${PV} ]]; then |
173 |
sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die |
174 |
fi |
175 |
} |
176 |
|
177 |
src_configure() { |
178 |
local myconf="${EXTRA_LIBAV_CONF}" |
179 |
local uses i |
180 |
|
181 |
use zlib && TOOLS+=" cws2fws" |
182 |
|
183 |
myconf+=" |
184 |
$(use_enable gpl) |
185 |
$(use_enable gpl version3) |
186 |
--enable-avfilter |
187 |
" |
188 |
|
189 |
# enabled by default |
190 |
uses="debug doc network zlib" |
191 |
for i in ${uses}; do |
192 |
use ${i} || myconf+=" --disable-${i}" |
193 |
done |
194 |
use bzip2 || myconf+=" --disable-bzlib" |
195 |
use sdl || myconf+=" --disable-avplay" |
196 |
|
197 |
if use ssl; then |
198 |
use openssl && myconf+=" --enable-openssl --enable-nonfree" \ |
199 |
|| myconf+=" --enable-gnutls" |
200 |
fi |
201 |
|
202 |
use custom-cflags && myconf+=" --disable-optimizations" |
203 |
use cpudetection && myconf+=" --enable-runtime-cpudetect" |
204 |
|
205 |
use vdpau || myconf+=" --disable-vdpau" |
206 |
|
207 |
use vaapi && myconf+=" --enable-vaapi" |
208 |
|
209 |
# Encoders |
210 |
if use encode; then |
211 |
use faac && myconf+=" --enable-nonfree" |
212 |
use fdk && myconf+=" --enable-nonfree --enable-libfdk-aac" |
213 |
use mp3 && myconf+=" --enable-libmp3lame" |
214 |
use amr && myconf+=" --enable-libvo-amrwbenc" |
215 |
use aac && myconf+=" --enable-libvo-aacenc" |
216 |
uses="faac theora vorbis x264 xvid" |
217 |
for i in ${uses}; do |
218 |
use ${i} && myconf+=" --enable-lib${i}" |
219 |
done |
220 |
else |
221 |
myconf+=" --disable-encoders" |
222 |
fi |
223 |
|
224 |
# libavdevice options |
225 |
use cdio && myconf+=" --enable-libcdio" |
226 |
use ieee1394 && myconf+=" --enable-libdc1394" |
227 |
use pulseaudio && myconf+=" --enable-libpulse" |
228 |
|
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 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 |
if use pic && use x86 ; then |
267 |
myconf+=" --disable-mmx --disable-mmxext" |
268 |
fi |
269 |
|
270 |
# Option to force building pic |
271 |
use pic && myconf+=" --enable-pic" |
272 |
|
273 |
# Try to get cpu type based on CFLAGS. |
274 |
# Bug #172723 |
275 |
# We need to do this so that features of that CPU will be better used |
276 |
# If they contain an unknown CPU it will not hurt since ffmpeg's configure |
277 |
# will just ignore it. |
278 |
for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do |
279 |
[[ "${i}" == "native" ]] && i="host" # bug #273421 |
280 |
myconf+=" --cpu=${i}" |
281 |
break |
282 |
done |
283 |
|
284 |
# cross compile support |
285 |
if tc-is-cross-compiler ; then |
286 |
myconf+=" --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-" |
287 |
case ${CHOST} in |
288 |
*freebsd*) |
289 |
myconf+=" --target-os=freebsd" |
290 |
;; |
291 |
mingw32*) |
292 |
myconf+=" --target-os=mingw32" |
293 |
;; |
294 |
*linux*) |
295 |
myconf+=" --target-os=linux" |
296 |
;; |
297 |
esac |
298 |
fi |
299 |
|
300 |
# Misc stuff |
301 |
use hardcoded-tables && myconf+=" --enable-hardcoded-tables" |
302 |
|
303 |
# Specific workarounds for too-few-registers arch... |
304 |
if [[ $(tc-arch) == "x86" ]]; then |
305 |
filter-flags -fforce-addr -momit-leaf-frame-pointer |
306 |
append-flags -fomit-frame-pointer |
307 |
is-flag -O? || append-flags -O2 |
308 |
if use debug; then |
309 |
# no need to warn about debug if not using debug flag |
310 |
ewarn "" |
311 |
ewarn "Debug information will be almost useless as the frame pointer is omitted." |
312 |
ewarn "This makes debugging harder, so crashes that has no fixed behavior are" |
313 |
ewarn "difficult to fix. Please have that in mind." |
314 |
ewarn "" |
315 |
fi |
316 |
fi |
317 |
|
318 |
cd "${S}" |
319 |
./configure \ |
320 |
--prefix="${EPREFIX}"/usr \ |
321 |
--libdir="${EPREFIX}"/usr/$(get_libdir) \ |
322 |
--shlibdir="${EPREFIX}"/usr/$(get_libdir) \ |
323 |
--mandir="${EPREFIX}"/usr/share/man \ |
324 |
--enable-shared \ |
325 |
--cc="$(tc-getCC)" \ |
326 |
--ar="$(tc-getAR)" \ |
327 |
--optflags="${CFLAGS}" \ |
328 |
--extra-cflags="${CFLAGS}" \ |
329 |
$(use_enable static-libs static) \ |
330 |
${myconf} || die |
331 |
|
332 |
MAKEOPTS+=" V=1" |
333 |
} |
334 |
|
335 |
src_compile() { |
336 |
local i |
337 |
|
338 |
emake |
339 |
|
340 |
if use tools; then |
341 |
tc-export CC |
342 |
|
343 |
for i in ${TOOLS}; do |
344 |
emake tools/${i} |
345 |
done |
346 |
fi |
347 |
} |
348 |
|
349 |
src_install() { |
350 |
local i |
351 |
|
352 |
emake DESTDIR="${D}" install install-man |
353 |
|
354 |
dodoc Changelog README INSTALL |
355 |
dodoc doc/*.txt |
356 |
use doc && dodoc doc/*.html |
357 |
|
358 |
if use tools; then |
359 |
for i in ${TOOLS}; do |
360 |
dobin tools/${i} |
361 |
done |
362 |
fi |
363 |
|
364 |
for i in $(usex sdl avplay "") $(usex network avserver "") avprobe; do |
365 |
dosym ${i} /usr/bin/${i/av/ff} |
366 |
done |
367 |
} |
368 |
|
369 |
pkg_postinst() { |
370 |
elog "Please note that the programs formerly known as ffplay, ffserver" |
371 |
elog "and ffprobe are now called avplay, avserver and avprobe." |
372 |
elog |
373 |
elog "ffmpeg had been replaced by the feature incompatible avconv" |
374 |
} |
375 |
|
376 |
src_test() { |
377 |
echo ${WORKDIR}/fate |
378 |
LD_LIBRARY_PATH="${S}/libswscale:${S}/libavcodec:${S}/libavdevice:${S}/libavfilter:${S}/libavformat:${S}/libavresample:${S}/libavutil" \ |
379 |
emake -j1 fate SAMPLES="${WORKDIR}/fate" |
380 |
} |