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