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