Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-video/ffmpeg: ChangeLog ffmpeg-0.6_p25423.ebuild
Date: Sat, 09 Oct 2010 14:04:05
Message-Id: 20101009134448.E51AB2004C@flycatcher.gentoo.org
1 aballier 10/10/09 13:44:48
2
3 Modified: ChangeLog
4 Added: ffmpeg-0.6_p25423.ebuild
5 Log:
6 push a new snapshot, fixes 329921, 339036 and should help with 179872
7
8 (Portage version: 2.2_rc91/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.376 media-video/ffmpeg/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/ffmpeg/ChangeLog?rev=1.376&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/ffmpeg/ChangeLog?rev=1.376&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/ffmpeg/ChangeLog?r1=1.375&r2=1.376
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v
20 retrieving revision 1.375
21 retrieving revision 1.376
22 diff -u -r1.375 -r1.376
23 --- ChangeLog 8 Oct 2010 14:50:47 -0000 1.375
24 +++ ChangeLog 9 Oct 2010 13:44:10 -0000 1.376
25 @@ -1,6 +1,12 @@
26 # ChangeLog for media-video/ffmpeg
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.375 2010/10/08 14:50:47 ranger Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.376 2010/10/09 13:44:10 aballier Exp $
30 +
31 +*ffmpeg-0.6_p25423 (09 Oct 2010)
32 +
33 + 09 Oct 2010; Alexis Ballier <aballier@g.o>
34 + +ffmpeg-0.6_p25423.ebuild:
35 + push a new snapshot, fixes 329921, 339036 and should help with 179872
36
37 08 Oct 2010; Brent Baude <ranger@g.o> ffmpeg-0.6.ebuild:
38 Marking ffmpeg-0.6 ppc for bug 332361
39
40
41
42 1.1 media-video/ffmpeg/ffmpeg-0.6_p25423.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/ffmpeg/ffmpeg-0.6_p25423.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/ffmpeg/ffmpeg-0.6_p25423.ebuild?rev=1.1&content-type=text/plain
46
47 Index: ffmpeg-0.6_p25423.ebuild
48 ===================================================================
49 # Copyright 1999-2010 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-0.6_p25423.ebuild,v 1.1 2010/10/09 13:44:21 aballier Exp $
52
53 EAPI="2"
54
55 SCM=""
56 if [ "${PV#9999}" != "${PV}" ] ; then
57 SCM="subversion"
58 ESVN_REPO_URI="svn://svn.ffmpeg.org/ffmpeg/trunk"
59 fi
60
61 inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
62
63 DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec."
64 HOMEPAGE="http://ffmpeg.org/"
65 if [ "${PV#9999}" != "${PV}" ] ; then
66 SRC_URI=""
67 elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
68 SRC_URI="mirror://gentoo/${P}.tar.bz2"
69 else # Release
70 SRC_URI="http://ffmpeg.org/releases/${P}.tar.bz2"
71 fi
72 FFMPEG_REVISION="${PV#*_p}"
73
74 LICENSE="GPL-3"
75 SLOT="0"
76 if [ "${PV#9999}" = "${PV}" ] ; then
77 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
78 fi
79 IUSE="+3dnow +3dnowext alsa altivec amr bindist +bzip2 cpudetection custom-cflags debug dirac doc +encode faac frei0r gsm +hardcoded-tables ieee1394 jack jpeg2k +mmx +mmxext mp3 network oss pic qt-faststart rtmp schroedinger sdl speex +ssse3 static-libs test theora threads v4l v4l2 vaapi vdpau vorbis vpx X x264 xvid +zlib"
80
81 VIDEO_CARDS="nvidia"
82
83 for x in ${VIDEO_CARDS}; do
84 IUSE="${IUSE} video_cards_${x}"
85 done
86
87 RDEPEND="
88 alsa? ( media-libs/alsa-lib )
89 amr? ( media-libs/opencore-amr )
90 bzip2? ( app-arch/bzip2 )
91 dirac? ( media-video/dirac )
92 encode? (
93 faac? ( media-libs/faac )
94 mp3? ( media-sound/lame )
95 theora? ( >=media-libs/libtheora-1.1.1[encode] media-libs/libogg )
96 vorbis? ( media-libs/libvorbis media-libs/libogg )
97 x264? ( >=media-libs/x264-0.0.20100605 )
98 xvid? ( >=media-libs/xvid-1.1.0 )
99 )
100 frei0r? ( media-plugins/frei0r-plugins )
101 gsm? ( >=media-sound/gsm-1.0.12-r1 )
102 ieee1394? ( media-libs/libdc1394 sys-libs/libraw1394 )
103 jack? ( media-sound/jack-audio-connection-kit )
104 jpeg2k? ( >=media-libs/openjpeg-1.3-r2 )
105 rtmp? ( media-video/rtmpdump )
106 sdl? ( >=media-libs/libsdl-1.2.13-r1[audio,video] )
107 schroedinger? ( media-libs/schroedinger )
108 speex? ( >=media-libs/speex-1.2_beta3 )
109 vaapi? ( x11-libs/libva )
110 video_cards_nvidia? ( vdpau? ( x11-libs/libvdpau ) )
111 vpx? ( media-libs/libvpx )
112 X? ( x11-libs/libX11 x11-libs/libXext )
113 zlib? ( sys-libs/zlib )
114 !media-video/qt-faststart
115 "
116
117 DEPEND="${RDEPEND}
118 >=sys-devel/make-3.81
119 dirac? ( dev-util/pkgconfig )
120 doc? ( app-text/texi2html )
121 mmx? ( dev-lang/yasm )
122 rtmp? ( dev-util/pkgconfig )
123 schroedinger? ( dev-util/pkgconfig )
124 test? ( net-misc/wget )
125 v4l? ( sys-kernel/linux-headers )
126 v4l2? ( sys-kernel/linux-headers )
127 "
128
129 src_prepare() {
130 if [ "${PV#9999}" != "${PV}" ] ; then
131 # Set SVN version manually
132 subversion_wc_info
133 sed -i -e "s/UNKNOWN/SVN-r${ESVN_WC_REVISION}/" "${S}/version.sh" || die
134 elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
135 sed -i -e "s/UNKNOWN/SVN-r${FFMPEG_REVISION}/" "${S}/version.sh" || die
136 fi
137 }
138
139 src_configure() {
140 local myconf="${EXTRA_FFMPEG_CONF}"
141
142 # enabled by default
143 for i in debug doc network vaapi zlib; do
144 use ${i} || myconf="${myconf} --disable-${i}"
145 done
146 use bzip2 || myconf="${myconf} --disable-bzlib"
147 use sdl || myconf="${myconf} --disable-ffplay"
148 use static-libs || myconf="${myconf} --disable-static"
149
150 use custom-cflags && myconf="${myconf} --disable-optimizations"
151 use cpudetection && myconf="${myconf} --enable-runtime-cpudetect"
152
153 #for i in h264_vdpau mpeg1_vdpau mpeg_vdpau vc1_vdpau wmv3_vdpau; do
154 # use video_cards_nvidia || myconf="${myconf} --disable-decoder=${i}"
155 # use vdpau || myconf="${myconf} --disable-decoder=${i}"
156 #done
157 use video_cards_nvidia && use vdpau || myconf="${myconf} --disable-vdpau"
158
159 # Encoders
160 if use encode
161 then
162 use mp3 && myconf="${myconf} --enable-libmp3lame"
163 for i in theora vorbis x264 xvid; do
164 use ${i} && myconf="${myconf} --enable-lib${i}"
165 done
166 if use bindist
167 then
168 use faac && ewarn "faac is nonfree and cannot be distributed;
169 disabling faac support."
170 else
171 use faac && myconf="${myconf} --enable-libfaac --enable-nonfree"
172 fi
173 else
174 myconf="${myconf} --disable-encoders"
175 fi
176
177 # libavdevice options
178 use ieee1394 && myconf="${myconf} --enable-libdc1394"
179 # Indevs
180 for i in v4l v4l2 alsa oss jack ; do
181 use ${i} || myconf="${myconf} --disable-indev=${i}"
182 done
183 use X && myconf="${myconf} --enable-x11grab"
184 # Outdevs
185 for i in alsa oss ; do
186 use ${i} || myconf="${myconf} --disable-outdev=${i}"
187 done
188 # libavfilter options
189 use frei0r && myconf="${myconf} --enable-frei0r"
190
191 # Threads; we only support pthread for now but ffmpeg supports more
192 use threads && myconf="${myconf} --enable-pthreads"
193
194 # Decoders
195 use amr && myconf="${myconf} --enable-libopencore-amrwb --enable-libopencore-amrnb"
196 for i in gsm dirac rtmp schroedinger speex vpx; do
197 use ${i} && myconf="${myconf} --enable-lib${i}"
198 done
199 use jpeg2k && myconf="${myconf} --enable-libopenjpeg"
200
201 # CPU features
202 for i in mmx ssse3 altivec ; do
203 use ${i} || myconf="${myconf} --disable-${i}"
204 done
205 use mmxext || myconf="${myconf} --disable-mmx2"
206 use 3dnow || myconf="${myconf} --disable-amd3dnow"
207 use 3dnowext || myconf="${myconf} --disable-amd3dnowext"
208 # disable mmx accelerated code if PIC is required
209 # as the provided asm decidedly is not PIC for x86.
210 if use pic && use x86 ; then
211 myconf="${myconf} --disable-mmx --disable-mmx2"
212 fi
213
214 # Option to force building pic
215 use pic && myconf="${myconf} --enable-pic"
216
217 # Try to get cpu type based on CFLAGS.
218 # Bug #172723
219 # We need to do this so that features of that CPU will be better used
220 # If they contain an unknown CPU it will not hurt since ffmpeg's configure
221 # will just ignore it.
222 for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
223 [ "${i}" = "native" ] && i="host" # bug #273421
224 [[ ${i} = *-sse3 ]] && i="${i%-sse3}" # bug 283968
225 myconf="${myconf} --cpu=${i}"
226 break
227 done
228
229 # Mandatory configuration
230 myconf="
231 --enable-gpl
232 --enable-version3
233 --enable-postproc
234 --enable-avfilter
235 --disable-stripping
236 ${myconf}"
237
238 # cross compile support
239 if tc-is-cross-compiler ; then
240 myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
241 case ${CHOST} in
242 *freebsd*)
243 myconf="${myconf} --target-os=freebsd"
244 ;;
245 mingw32*)
246 myconf="${myconf} --target-os=mingw32"
247 ;;
248 *linux*)
249 myconf="${myconf} --target-os=linux"
250 ;;
251 esac
252 fi
253
254 # Misc stuff
255 use hardcoded-tables && myconf="${myconf} --enable-hardcoded-tables"
256
257 # Specific workarounds for too-few-registers arch...
258 if [[ $(tc-arch) == "x86" ]]; then
259 filter-flags -fforce-addr -momit-leaf-frame-pointer
260 append-flags -fomit-frame-pointer
261 is-flag -O? || append-flags -O2
262 if (use debug); then
263 # no need to warn about debug if not using debug flag
264 ewarn ""
265 ewarn "Debug information will be almost useless as the frame pointer is omitted."
266 ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
267 ewarn "difficult to fix. Please have that in mind."
268 ewarn ""
269 fi
270 fi
271
272 cd "${S}"
273 ./configure \
274 --prefix=/usr \
275 --libdir=/usr/$(get_libdir) \
276 --shlibdir=/usr/$(get_libdir) \
277 --mandir=/usr/share/man \
278 --enable-static --enable-shared \
279 --cc="$(tc-getCC)" \
280 ${myconf} || die
281 }
282
283 src_compile() {
284 emake version.h || die #252269
285 emake || die
286
287 if use qt-faststart; then
288 tc-export CC
289 emake -C tools qt-faststart || die
290 fi
291 }
292
293 src_install() {
294 emake DESTDIR="${D}" install install-man || die
295
296 dodoc Changelog README INSTALL
297 dodoc doc/*
298
299 if use qt-faststart; then
300 dobin tools/qt-faststart || die
301 fi
302 }
303
304 src_test() {
305 if use encode ; then
306 for t in codectest lavftest seektest ; do
307 LD_LIBRARY_PATH="${S}/libpostproc:${S}/libswscale:${S}/libavcodec:${S}/libavdevice:${S}/libavfilter:${S}/libavformat:${S}/libavutil" \
308 emake ${t} || die "Some tests in ${t} failed"
309 done
310 else
311 ewarn "Tests fail without USE=encode, skipping"
312 fi
313 }