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-2.2.2.ebuild
Date: Mon, 05 May 2014 06:12:34
Message-Id: 20140505061231.351C52004C@flycatcher.gentoo.org
1 aballier 14/05/05 06:12:31
2
3 Modified: ChangeLog
4 Added: ffmpeg-2.2.2.ebuild
5 Log:
6 version bump
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
9
10 Revision Changes Path
11 1.730 media-video/ffmpeg/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/ffmpeg/ChangeLog?rev=1.730&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/ffmpeg/ChangeLog?rev=1.730&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/ffmpeg/ChangeLog?r1=1.729&r2=1.730
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v
20 retrieving revision 1.729
21 retrieving revision 1.730
22 diff -u -r1.729 -r1.730
23 --- ChangeLog 26 Apr 2014 17:26:03 -0000 1.729
24 +++ ChangeLog 5 May 2014 06:12:31 -0000 1.730
25 @@ -1,6 +1,11 @@
26 # ChangeLog for media-video/ffmpeg
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.729 2014/04/26 17:26:03 jer Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.730 2014/05/05 06:12:31 aballier Exp $
30 +
31 +*ffmpeg-2.2.2 (05 May 2014)
32 +
33 + 05 May 2014; Alexis Ballier <aballier@g.o> +ffmpeg-2.2.2.ebuild:
34 + version bump
35
36 26 Apr 2014; Jeroen Roovers <jer@g.o> ffmpeg-1.2.6.ebuild:
37 Stable for HPPA (bug #508372).
38
39
40
41 1.1 media-video/ffmpeg/ffmpeg-2.2.2.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/ffmpeg/ffmpeg-2.2.2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/ffmpeg/ffmpeg-2.2.2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: ffmpeg-2.2.2.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-2.2.2.ebuild,v 1.1 2014/05/05 06:12:31 aballier Exp $
51
52 EAPI="5"
53
54 # Subslot: libavutil major.libavcodec major.libavformat major
55 # Since FFmpeg ships several libraries, subslot is kind of limited here.
56 # Most consumers will use those three libraries, if a "less used" library
57 # changes its soname, consumers will have to be rebuilt the old way
58 # (preserve-libs).
59 # If, for example, a package does not link to libavformat and only libavformat
60 # changes its ABI then this package will be rebuilt needlessly. Hence, such a
61 # package is free _not_ to := depend on FFmpeg but I would strongly encourage
62 # doing so since such a case is unlikely.
63 FFMPEG_SUBSLOT=52.55.55
64
65 SCM=""
66 if [ "${PV#9999}" != "${PV}" ] ; then
67 SCM="git-2"
68 EGIT_REPO_URI="git://source.ffmpeg.org/ffmpeg.git"
69 fi
70
71 inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
72
73 DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec."
74 HOMEPAGE="http://ffmpeg.org/"
75 if [ "${PV#9999}" != "${PV}" ] ; then
76 SRC_URI=""
77 elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
78 SRC_URI="mirror://gentoo/${P}.tar.bz2"
79 else # Release
80 SRC_URI="http://ffmpeg.org/releases/${P/_/-}.tar.bz2"
81 fi
82 FFMPEG_REVISION="${PV#*_p}"
83
84 LICENSE="GPL-2 amr? ( GPL-3 ) encode? ( aac? ( GPL-3 ) )"
85 SLOT="0/${FFMPEG_SUBSLOT}"
86 if [ "${PV#9999}" = "${PV}" ] ; then
87 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
88 fi
89 IUSE="
90 aac aacplus alsa amr amrenc bindist bluray +bzip2 cdio celt
91 cpudetection debug doc +encode examples faac fdk flite fontconfig frei0r
92 gme gnutls gsm +hardcoded-tables +iconv iec61883 ieee1394 jack jpeg2k
93 ladspa libass libcaca libsoxr libv4l modplug mp3 +network openal opengl
94 openssl opus oss pic pulseaudio quvi rtmp schroedinger sdl speex ssh
95 static-libs test theora threads truetype twolame v4l vaapi vdpau vorbis vpx
96 wavpack webp X x264 x265 xvid +zlib zvbi
97 "
98
99 ARM_CPU_FEATURES="armv5te armv6 armv6t2 neon armvfp:vfp"
100 MIPS_CPU_FEATURES="mips32r2 mipsdspr1 mipsdspr2 mipsfpu"
101 PPC_CPU_FEATURES="altivec"
102 X86_CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext avx avx2 fma3 fma4 mmx mmxext sse sse2 sse3 ssse3 sse4 sse4_2:sse42"
103
104 # String for CPU features in the useflag[:configure_option] form
105 # if :configure_option isn't set, it will use 'useflag' as configure option
106 CPU_FEATURES="
107 ${ARM_CPU_FEATURES}
108 ${MIPS_CPU_FEATURES}
109 ${PPC_CPU_FEATURES}
110 ${X86_CPU_FEATURES}
111 "
112
113 for i in ${CPU_FEATURES}; do
114 IUSE="${IUSE} ${i%:*}"
115 done
116
117 FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart trasher"
118
119 for i in ${FFTOOLS}; do
120 IUSE="${IUSE} +fftools_$i"
121 done
122
123 RDEPEND="
124 alsa? ( media-libs/alsa-lib )
125 amr? ( media-libs/opencore-amr )
126 bluray? ( media-libs/libbluray )
127 bzip2? ( app-arch/bzip2 )
128 cdio? ( || ( dev-libs/libcdio-paranoia <dev-libs/libcdio-0.90[-minimal] ) )
129 celt? ( >=media-libs/celt-0.11.1 )
130 encode? (
131 aac? ( media-libs/vo-aacenc )
132 aacplus? ( media-libs/libaacplus )
133 amrenc? ( media-libs/vo-amrwbenc )
134 faac? ( media-libs/faac )
135 mp3? ( >=media-sound/lame-3.98.3 )
136 theora? ( >=media-libs/libtheora-1.1.1[encode] media-libs/libogg )
137 twolame? ( media-sound/twolame )
138 wavpack? ( media-sound/wavpack )
139 webp? ( media-libs/libwebp )
140 x264? ( >=media-libs/x264-0.0.20111017:= )
141 x265? ( <media-libs/x265-0.9:= )
142 xvid? ( >=media-libs/xvid-1.1.0 )
143 )
144 fdk? ( >=media-libs/fdk-aac-0.1.3 )
145 flite? ( app-accessibility/flite )
146 fontconfig? ( media-libs/fontconfig )
147 frei0r? ( media-plugins/frei0r-plugins )
148 gme? ( media-libs/game-music-emu )
149 gnutls? ( >=net-libs/gnutls-2.12.16 )
150 gsm? ( >=media-sound/gsm-1.0.12-r1 )
151 iconv? ( virtual/libiconv )
152 iec61883? ( media-libs/libiec61883 sys-libs/libraw1394 sys-libs/libavc1394 )
153 ieee1394? ( media-libs/libdc1394 sys-libs/libraw1394 )
154 jack? ( media-sound/jack-audio-connection-kit )
155 jpeg2k? ( >=media-libs/openjpeg-1.3-r2:0 )
156 libass? ( media-libs/libass )
157 libcaca? ( media-libs/libcaca )
158 libsoxr? ( media-libs/soxr )
159 libv4l? ( media-libs/libv4l )
160 modplug? ( media-libs/libmodplug )
161 openal? ( >=media-libs/openal-1.1 )
162 opengl? ( virtual/opengl )
163 openssl? ( dev-libs/openssl )
164 opus? ( media-libs/opus )
165 pulseaudio? ( media-sound/pulseaudio )
166 quvi? ( media-libs/libquvi:0.4 )
167 rtmp? ( >=media-video/rtmpdump-2.2f )
168 sdl? ( >=media-libs/libsdl-1.2.13-r1[audio,video] )
169 schroedinger? ( media-libs/schroedinger )
170 speex? ( >=media-libs/speex-1.2_beta3 )
171 ssh? ( net-libs/libssh )
172 truetype? ( media-libs/freetype:2 )
173 vaapi? ( >=x11-libs/libva-0.32 )
174 vdpau? ( x11-libs/libvdpau )
175 vorbis? ( media-libs/libvorbis media-libs/libogg )
176 vpx? ( >=media-libs/libvpx-0.9.6 )
177 X? ( x11-libs/libX11 x11-libs/libXext x11-libs/libXfixes )
178 zlib? ( sys-libs/zlib )
179 zvbi? ( media-libs/zvbi )
180 !media-video/qt-faststart
181 !media-libs/libpostproc
182 "
183
184 DEPEND="${RDEPEND}
185 >=sys-devel/make-3.81
186 doc? ( app-text/texi2html )
187 fontconfig? ( virtual/pkgconfig )
188 gnutls? ( virtual/pkgconfig )
189 ieee1394? ( virtual/pkgconfig )
190 ladspa? ( media-libs/ladspa-sdk )
191 libv4l? ( virtual/pkgconfig )
192 mmx? ( >=dev-lang/yasm-1.2 )
193 rtmp? ( virtual/pkgconfig )
194 schroedinger? ( virtual/pkgconfig )
195 test? ( net-misc/wget )
196 truetype? ( virtual/pkgconfig )
197 v4l? ( sys-kernel/linux-headers )
198 "
199 # faac is license-incompatible with ffmpeg
200 REQUIRED_USE="bindist? ( encode? ( !faac !aacplus ) !openssl )
201 libv4l? ( v4l )
202 fftools_cws2fws? ( zlib )
203 test? ( encode )"
204
205 S=${WORKDIR}/${P/_/-}
206 BUILD_DIR=${S}_build
207
208 src_prepare() {
209 if [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
210 export revision=git-N-${FFMPEG_REVISION}
211 fi
212 epatch_user
213 }
214
215 src_configure() {
216 mkdir -p "${BUILD_DIR}"
217 cd "${BUILD_DIR}"
218
219 local myconf="${EXTRA_FFMPEG_CONF}"
220
221 # options to use as use_enable in the foo[:bar] form.
222 # This will feed configure with $(use_enable foo bar)
223 # or $(use_enable foo foo) if no :bar is set.
224 local ffuse="bzip2:bzlib cpudetection:runtime-cpudetect debug doc
225 gnutls hardcoded-tables iconv network openssl sdl:ffplay vaapi
226 vdpau zlib"
227 use openssl && myconf="${myconf} --enable-nonfree"
228
229 # Encoders
230 if use encode
231 then
232 ffuse="${ffuse} aac:libvo-aacenc amrenc:libvo-amrwbenc mp3:libmp3lame"
233 for i in aacplus faac theora twolame wavpack webp x264 x265 xvid; do
234 ffuse="${ffuse} ${i}:lib${i}"
235 done
236
237 # Licensing.
238 if use aac || use amrenc ; then
239 myconf="${myconf} --enable-version3"
240 fi
241 if use aacplus || use faac ; then
242 myconf="${myconf} --enable-nonfree"
243 fi
244 else
245 myconf="${myconf} --disable-encoders"
246 fi
247
248 # libavdevice options
249 ffuse="${ffuse} cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal opengl"
250
251 # Indevs
252 use v4l || myconf="${myconf} --disable-indev=v4l2 --disable-outdev=v4l2"
253 for i in alsa oss jack ; do
254 use ${i} || myconf="${myconf} --disable-indev=${i}"
255 done
256 ffuse="${ffuse} libv4l:libv4l2 pulseaudio:libpulse X:x11grab"
257
258 # Outdevs
259 for i in alsa oss sdl ; do
260 use ${i} || myconf="${myconf} --disable-outdev=${i}"
261 done
262
263 # libavfilter options
264 ffuse="${ffuse} flite:libflite frei0r fontconfig ladspa libass truetype:libfreetype"
265
266 # libswresample options
267 ffuse="${ffuse} libsoxr"
268
269 # Threads; we only support pthread for now but ffmpeg supports more
270 ffuse="${ffuse} threads:pthreads"
271
272 # Decoders
273 ffuse="${ffuse} amr:libopencore-amrwb amr:libopencore-amrnb fdk:libfdk-aac jpeg2k:libopenjpeg"
274 use amr && myconf="${myconf} --enable-version3"
275 for i in bluray celt gme gsm modplug opus quvi rtmp ssh schroedinger speex vorbis vpx zvbi; do
276 ffuse="${ffuse} ${i}:lib${i}"
277 done
278 use fdk && myconf="${myconf} --enable-nonfree"
279
280 for i in ${ffuse} ; do
281 myconf="${myconf} $(use_enable ${i%:*} ${i#*:})"
282 done
283
284 # CPU features
285 for i in ${CPU_FEATURES}; do
286 use ${i%:*} || myconf="${myconf} --disable-${i#*:}"
287 done
288 if use pic ; then
289 myconf="${myconf} --enable-pic"
290 # disable asm code if PIC is required
291 # as the provided asm decidedly is not PIC for x86.
292 use x86 && myconf="${myconf} --disable-asm"
293 fi
294 [[ ${ABI} == "x32" ]] && myconf+=" --disable-asm" #427004
295
296 # Try to get cpu type based on CFLAGS.
297 # Bug #172723
298 # We need to do this so that features of that CPU will be better used
299 # If they contain an unknown CPU it will not hurt since ffmpeg's configure
300 # will just ignore it.
301 for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
302 [ "${i}" = "native" ] && i="host" # bug #273421
303 myconf="${myconf} --cpu=${i}"
304 break
305 done
306
307 # Mandatory configuration
308 myconf="
309 --enable-gpl
310 --enable-postproc
311 --enable-avfilter
312 --enable-avresample
313 --disable-stripping
314 ${myconf}"
315
316 # cross compile support
317 if tc-is-cross-compiler ; then
318 myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
319 case ${CHOST} in
320 *freebsd*)
321 myconf="${myconf} --target-os=freebsd"
322 ;;
323 mingw32*)
324 myconf="${myconf} --target-os=mingw32"
325 ;;
326 *linux*)
327 myconf="${myconf} --target-os=linux"
328 ;;
329 esac
330 fi
331
332 "${S}/configure" \
333 --prefix="${EPREFIX}/usr" \
334 --libdir="${EPREFIX}/usr/$(get_libdir)" \
335 --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
336 --mandir="${EPREFIX}/usr/share/man" \
337 --enable-shared \
338 --cc="$(tc-getCC)" \
339 --cxx="$(tc-getCXX)" \
340 --ar="$(tc-getAR)" \
341 --optflags="${CFLAGS}" \
342 --extra-cflags="${CFLAGS}" \
343 --extra-cxxflags="${CXXFLAGS}" \
344 $(use_enable static-libs static) \
345 ${myconf} || die
346 }
347
348 src_compile() {
349 cd "${BUILD_DIR}"
350 emake V=1
351
352 for i in ${FFTOOLS} ; do
353 if use fftools_$i ; then
354 emake V=1 tools/$i
355 fi
356 done
357 }
358
359 src_install() {
360 cd "${BUILD_DIR}"
361 emake V=1 DESTDIR="${D}" install install-man
362
363 for i in ${FFTOOLS} ; do
364 if use fftools_$i ; then
365 dobin tools/$i
366 fi
367 done
368
369 cd "${S}"
370 dodoc Changelog README CREDITS doc/*.txt doc/APIchanges doc/RELEASE_NOTES
371 use doc && dohtml -r doc/*
372 if use examples ; then
373 dodoc -r doc/examples
374 docompress -x /usr/share/doc/${PF}/examples
375 fi
376 }
377
378 src_test() {
379 cd "${BUILD_DIR}"
380 LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil:${BUILD_DIR}/libavresample" \
381 emake V=1 fate
382 }