1 |
scarabeus 11/12/22 09:57:56 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: libav-0.8_pre20111222.ebuild |
5 |
Log: |
6 |
Add new snapshot to build mplayer1 and provide something for ffmpeg-0.9 virtual. |
7 |
|
8 |
(Portage version: 2.2.0_alpha81/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.40 media-video/libav/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/ChangeLog?rev=1.40&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/ChangeLog?rev=1.40&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/ChangeLog?r1=1.39&r2=1.40 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v |
20 |
retrieving revision 1.39 |
21 |
retrieving revision 1.40 |
22 |
diff -u -r1.39 -r1.40 |
23 |
--- ChangeLog 2 Dec 2011 18:19:50 -0000 1.39 |
24 |
+++ ChangeLog 22 Dec 2011 09:57:56 -0000 1.40 |
25 |
@@ -1,6 +1,13 @@ |
26 |
# ChangeLog for media-video/libav |
27 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v 1.39 2011/12/02 18:19:50 beandog Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v 1.40 2011/12/22 09:57:56 scarabeus Exp $ |
30 |
+ |
31 |
+*libav-0.8_pre20111222 (22 Dec 2011) |
32 |
+ |
33 |
+ 22 Dec 2011; Tomáš Chvátal <scarabeus@g.o> |
34 |
+ +libav-0.8_pre20111222.ebuild: |
35 |
+ Add new snapshot to build mplayer1 and provide something for ffmpeg-0.9 |
36 |
+ virtual. |
37 |
|
38 |
02 Dec 2011; Steve Dibb <beandog@g.o> libav-0.6.2.ebuild, |
39 |
libav-0.6.9999.ebuild, libav-0.7.2.ebuild, libav-0.7.9999.ebuild, |
40 |
|
41 |
|
42 |
|
43 |
1.1 media-video/libav/libav-0.8_pre20111222.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-0.8_pre20111222.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/libav/libav-0.8_pre20111222.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: libav-0.8_pre20111222.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2011 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-0.8_pre20111222.ebuild,v 1.1 2011/12/22 09:57:56 scarabeus Exp $ |
53 |
|
54 |
EAPI=4 |
55 |
|
56 |
if [[ ${PV} == *9999 ]] ; then |
57 |
SCM="git-2" |
58 |
EGIT_REPO_URI="git://git.libav.org/libav.git" |
59 |
[[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}" |
60 |
fi |
61 |
|
62 |
inherit eutils flag-o-matic multilib toolchain-funcs ${SCM} |
63 |
|
64 |
DESCRIPTION="Complete solution to record, convert and stream audio and video." |
65 |
HOMEPAGE="http://libav.org/" |
66 |
if [[ ${PV} == *9999 ]] ; then |
67 |
SRC_URI="" |
68 |
elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot |
69 |
SRC_URI="http://dev.gentoo.org/~scarabeus/libav/${P}.tar.xz" |
70 |
else # Official release |
71 |
SRC_URI="http://${PN}.org/releases/${P}.tar.xz" |
72 |
fi |
73 |
|
74 |
LICENSE="LGPL-2 gpl? ( GPL-3 )" |
75 |
SLOT="0" |
76 |
[[ ${PV} == *9999 ]] || KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 |
77 |
~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos |
78 |
~x64-solaris ~x86-solaris" |
79 |
IUSE="+3dnow +3dnowext aac alsa altivec amr bindist +bzip2 cdio cpudetection |
80 |
custom-cflags debug dirac doc +encode faac truetype frei0r +gpl gsm |
81 |
+hardcoded-tables ieee1394 jack jpeg2k +mmx +mmxext mp3 network openssl |
82 |
oss pic pulseaudio +qt-faststart rtmp schroedinger sdl speex ssl +ssse3 |
83 |
static-libs test theora threads v4l vaapi vdpau vorbis vpx X x264 xvid |
84 |
+zlib" |
85 |
|
86 |
VIDEO_CARDS="nvidia" |
87 |
for x in ${VIDEO_CARDS}; do |
88 |
IUSE="${IUSE} video_cards_${x}" |
89 |
done |
90 |
|
91 |
CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext altivec avx mmx mmxext:mmx2 ssse3 vis neon iwmmxt" |
92 |
|
93 |
for i in ${CPU_FEATURES}; do |
94 |
IUSE="${IUSE} ${i%:*}" |
95 |
done |
96 |
|
97 |
RDEPEND=" |
98 |
!media-video/ffmpeg |
99 |
alsa? ( media-libs/alsa-lib ) |
100 |
amr? ( media-libs/opencore-amr ) |
101 |
bzip2? ( app-arch/bzip2 ) |
102 |
cdio? ( dev-libs/libcdio ) |
103 |
dirac? ( media-video/dirac ) |
104 |
encode? ( |
105 |
aac? ( media-libs/vo-aacenc ) |
106 |
amr? ( media-libs/vo-amrwbenc ) |
107 |
faac? ( media-libs/faac ) |
108 |
mp3? ( >=media-sound/lame-3.98.3 ) |
109 |
theora? ( >=media-libs/libtheora-1.1.1[encode] media-libs/libogg ) |
110 |
vorbis? ( media-libs/libvorbis media-libs/libogg ) |
111 |
x264? ( >=media-libs/x264-0.0.20111017 ) |
112 |
xvid? ( >=media-libs/xvid-1.1.0 ) |
113 |
) |
114 |
truetype? ( media-libs/freetype ) |
115 |
frei0r? ( media-plugins/frei0r-plugins ) |
116 |
gsm? ( >=media-sound/gsm-1.0.12-r1 ) |
117 |
ieee1394? ( media-libs/libdc1394 sys-libs/libraw1394 ) |
118 |
jack? ( media-sound/jack-audio-connection-kit ) |
119 |
jpeg2k? ( >=media-libs/openjpeg-1.3-r2 ) |
120 |
rtmp? ( >=media-video/rtmpdump-2.2f ) |
121 |
ssl? ( openssl? ( dev-libs/openssl ) |
122 |
!openssl? ( net-libs/gnutls ) ) |
123 |
sdl? ( >=media-libs/libsdl-1.2.13-r1[audio,video] ) |
124 |
schroedinger? ( media-libs/schroedinger ) |
125 |
speex? ( >=media-libs/speex-1.2_beta3 ) |
126 |
vaapi? ( x11-libs/libva ) |
127 |
video_cards_nvidia? ( vdpau? ( x11-libs/libvdpau ) ) |
128 |
vpx? ( >=media-libs/libvpx-0.9.6 ) |
129 |
X? ( x11-libs/libX11 x11-libs/libXext ) |
130 |
zlib? ( sys-libs/zlib ) |
131 |
" |
132 |
|
133 |
DEPEND="${RDEPEND} |
134 |
>=sys-devel/make-3.81 |
135 |
dirac? ( dev-util/pkgconfig ) |
136 |
doc? ( app-text/texi2html ) |
137 |
mmx? ( dev-lang/yasm ) |
138 |
rtmp? ( dev-util/pkgconfig ) |
139 |
schroedinger? ( dev-util/pkgconfig ) |
140 |
test? ( net-misc/wget ) |
141 |
v4l? ( sys-kernel/linux-headers ) |
142 |
" |
143 |
|
144 |
# faac can't be binary distributed |
145 |
# openssl support marked as nonfree |
146 |
# faac and aac are concurent implementations |
147 |
# amr and aac require at least lgpl3 |
148 |
REQUIRED_USE="bindist? ( !faac !openssl ) |
149 |
amr? ( gpl ) aac? ( gpl )" |
150 |
|
151 |
RESTRICT="test" |
152 |
|
153 |
src_prepare() { |
154 |
# if we have snapshot then we need to hardcode the version |
155 |
if [[ ${PV%_p*} != ${PV} ]]; then |
156 |
sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die |
157 |
fi |
158 |
} |
159 |
|
160 |
src_configure() { |
161 |
local myconf="${EXTRA_FFMPEG_CONF}" |
162 |
local uses i |
163 |
|
164 |
myconf=" |
165 |
$(use_enable gpl) |
166 |
$(use_enable gpl version3) |
167 |
--enable-postproc |
168 |
--enable-avfilter |
169 |
" |
170 |
|
171 |
# enabled by default |
172 |
uses="debug doc network zlib" |
173 |
for i in ${uses}; do |
174 |
use ${i} || myconf+=" --disable-${i}" |
175 |
done |
176 |
use bzip2 || myconf+=" --disable-bzlib" |
177 |
use sdl || myconf+=" --disable-avplay" |
178 |
|
179 |
if use ssl; then |
180 |
use openssl && myconf+=" --enable-openssl --enable-nonfree" \ |
181 |
|| myconf+=" --enable-gnutls" |
182 |
fi |
183 |
|
184 |
use custom-cflags && myconf+=" --disable-optimizations" |
185 |
use cpudetection && myconf+=" --enable-runtime-cpudetect" |
186 |
|
187 |
#for i in h264_vdpau mpeg1_vdpau mpeg_vdpau vc1_vdpau wmv3_vdpau; do |
188 |
# use video_cards_nvidia || myconf="${myconf} --disable-decoder=${i}" |
189 |
# use vdpau || myconf="${myconf} --disable-decoder=${i}" |
190 |
#done |
191 |
use video_cards_nvidia && use vdpau || myconf+=" --disable-vdpau" |
192 |
|
193 |
use vaapi && myconf+=" --enable-vaapi" |
194 |
|
195 |
# Encoders |
196 |
if use encode; then |
197 |
use mp3 && myconf+=" --enable-libmp3lame" |
198 |
use amr && myconf+=" --enable-libvo-amrwbenc" |
199 |
use faac && myconf+=" --enable-libfaac --enable-nonfree" |
200 |
use aac && myconf+=" --enable-libvo-aacenc" |
201 |
uses="theora vorbis x264 xvid" |
202 |
for i in ${uses}; do |
203 |
use ${i} && myconf+=" --enable-lib${i}" |
204 |
done |
205 |
else |
206 |
myconf+=" --disable-encoders" |
207 |
fi |
208 |
|
209 |
# libavdevice options |
210 |
use cdio && myconf+=" --enable-libcdio" |
211 |
use ieee1394 && myconf+=" --enable-libdc1394" |
212 |
use pulseaudio && myconf+=" --enable-libpulse" |
213 |
# Indevs |
214 |
# v4l1 is gone since linux-headers-2.6.38 |
215 |
myconf+=" --disable-indev=v4l" |
216 |
use v4l || myconf+=" --disable-indev=v4l2" |
217 |
for i in alsa oss jack; do |
218 |
use ${i} || myconf+=" --disable-indev=${i}" |
219 |
done |
220 |
use X && myconf+=" --enable-x11grab" |
221 |
# Outdevs |
222 |
for i in alsa oss ; do |
223 |
use ${i} || myconf+=" --disable-outdev=${i}" |
224 |
done |
225 |
# libavfilter options |
226 |
use frei0r && myconf+=" --enable-frei0r" |
227 |
use truetype && myconf+=" --enable-libfreetype" |
228 |
|
229 |
# Threads; we only support pthread for now but ffmpeg supports more |
230 |
use threads && myconf+=" --enable-pthreads" |
231 |
|
232 |
# Decoders |
233 |
use amr && myconf+=" --enable-libopencore-amrwb --enable-libopencore-amrnb" |
234 |
uses="gsm dirac rtmp schroedinger speex vpx" |
235 |
for i in ${uses}; do |
236 |
use ${i} && myconf+=" --enable-lib${i}" |
237 |
done |
238 |
use jpeg2k && myconf+=" --enable-libopenjpeg" |
239 |
|
240 |
# CPU features |
241 |
for i in ${CPU_FEATURES}; do |
242 |
use ${i%:*} || myconf+=" --disable-${i#*:}" |
243 |
done |
244 |
|
245 |
# pass the right -mfpu as extra |
246 |
use neon && myconf+=" --extra-cflags=-mfpu=neon" |
247 |
|
248 |
# disable mmx accelerated code if PIC is required |
249 |
# as the provided asm decidedly is not PIC for x86. |
250 |
if use pic && use x86 ; then |
251 |
myconf+=" --disable-mmx --disable-mmx2" |
252 |
fi |
253 |
|
254 |
# Option to force building pic |
255 |
use pic && myconf+=" --enable-pic" |
256 |
|
257 |
# Try to get cpu type based on CFLAGS. |
258 |
# Bug #172723 |
259 |
# We need to do this so that features of that CPU will be better used |
260 |
# If they contain an unknown CPU it will not hurt since ffmpeg's configure |
261 |
# will just ignore it. |
262 |
for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do |
263 |
[ "${i}" = "native" ] && i="host" # bug #273421 |
264 |
[[ ${i} = *-sse3 ]] && i="${i%-sse3}" # bug 283968 |
265 |
myconf+=" --cpu=${i}" |
266 |
break |
267 |
done |
268 |
|
269 |
# cross compile support |
270 |
if tc-is-cross-compiler ; then |
271 |
myconf+=" --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-" |
272 |
case ${CHOST} in |
273 |
*freebsd*) |
274 |
myconf+=" --target-os=freebsd" |
275 |
;; |
276 |
mingw32*) |
277 |
myconf+=" --target-os=mingw32" |
278 |
;; |
279 |
*linux*) |
280 |
myconf+=" --target-os=linux" |
281 |
;; |
282 |
esac |
283 |
fi |
284 |
|
285 |
# Misc stuff |
286 |
use hardcoded-tables && myconf+=" --enable-hardcoded-tables" |
287 |
|
288 |
# Specific workarounds for too-few-registers arch... |
289 |
if [[ $(tc-arch) == "x86" ]]; then |
290 |
filter-flags -fforce-addr -momit-leaf-frame-pointer |
291 |
append-flags -fomit-frame-pointer |
292 |
is-flag -O? || append-flags -O2 |
293 |
if use debug; then |
294 |
# no need to warn about debug if not using debug flag |
295 |
ewarn "" |
296 |
ewarn "Debug information will be almost useless as the frame pointer is omitted." |
297 |
ewarn "This makes debugging harder, so crashes that has no fixed behavior are" |
298 |
ewarn "difficult to fix. Please have that in mind." |
299 |
ewarn "" |
300 |
fi |
301 |
fi |
302 |
|
303 |
cd "${S}" |
304 |
./configure \ |
305 |
--prefix="$EPREFIX"/usr \ |
306 |
--libdir="$EPREFIX"/usr/$(get_libdir) \ |
307 |
--shlibdir="$EPREFIX"/usr/$(get_libdir) \ |
308 |
--mandir="$EPREFIX"/usr/share/man \ |
309 |
--enable-shared \ |
310 |
--cc="$(tc-getCC)" \ |
311 |
$(use_enable static-libs static) \ |
312 |
${myconf} || die |
313 |
} |
314 |
|
315 |
src_compile() { |
316 |
emake |
317 |
|
318 |
if use qt-faststart; then |
319 |
tc-export CC |
320 |
emake tools/qt-faststart |
321 |
fi |
322 |
} |
323 |
|
324 |
src_install() { |
325 |
emake DESTDIR="${D}" install install-man |
326 |
|
327 |
dodoc Changelog README INSTALL |
328 |
dodoc doc/* |
329 |
|
330 |
if use qt-faststart; then |
331 |
dobin tools/qt-faststart |
332 |
fi |
333 |
|
334 |
for i in avplay avserver avprobe; do |
335 |
dosym ${i} /usr/bin/${i/av/ff} |
336 |
done |
337 |
} |
338 |
|
339 |
pkg_postinst() { |
340 |
elog "Please note that the programs formerly known as ffplay, ffserver" |
341 |
elog "and ffprobe are now called avplay, avserver and avprobe." |
342 |
elog |
343 |
elog "ffmpeg had been replaced by the feature incompatible avconv thus" |
344 |
elog "the legacy ffmpeg is provided for compatibility with older scripts" |
345 |
} |
346 |
|
347 |
src_test() { |
348 |
local i tests |
349 |
if use encode; then |
350 |
tests="codectest lavftest seektest" |
351 |
for i in ${tests}; do |
352 |
LD_LIBRARY_PATH="${S}/libavcore:${S}/libpostproc:${S}/libswscale:${S}/libavcodec:${S}/libavdevice:${S}/libavfilter:${S}/libavformat:${S}/libavutil" \ |
353 |
emake ${i} |
354 |
done |
355 |
else |
356 |
ewarn "Tests fail without USE=encode, skipping" |
357 |
fi |
358 |
} |