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