Gentoo Archives: gentoo-commits

From: "Steve Dibb (beandog)" <beandog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-video/ffmpeg: metadata.xml ChangeLog ffmpeg-9999-r1.ebuild ffmpeg-9999.ebuild
Date: Sat, 02 May 2009 01:29:18
Message-Id: E1M042W-0007UL-1o@stork.gentoo.org
1 beandog 09/05/02 01:29:16
2
3 Modified: metadata.xml ChangeLog
4 Added: ffmpeg-9999-r1.ebuild
5 Removed: ffmpeg-9999.ebuild
6 Log:
7 Add cpudetection use flag; require nonfree option for faac support
8 (Portage version: 2.2_rc28/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.10 media-video/ffmpeg/metadata.xml
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/metadata.xml?rev=1.10&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/metadata.xml?rev=1.10&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/metadata.xml?r1=1.9&r2=1.10
16
17 Index: metadata.xml
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-video/ffmpeg/metadata.xml,v
20 retrieving revision 1.9
21 retrieving revision 1.10
22 diff -u -r1.9 -r1.10
23 --- metadata.xml 11 Mar 2009 23:11:39 -0000 1.9
24 +++ metadata.xml 2 May 2009 01:29:15 -0000 1.10
25 @@ -12,6 +12,7 @@
26 3dnowext in /proc/cpuinfo to know whehter you support it).
27 </flag>
28 <flag name="amr">Enables Adaptive Multi-Rate Audio support</flag>
29 + <flag name="cpudetection">Enables runtime cpudetection (useful for bindist, compatability on other CPUs)</flag>
30 <flag name="dirac">Enable Dirac video support (an advanced royalty-free video compression format) via the reference library: dirac.</flag>
31 <flag name="faac">Use external faac library for AAC encoding</flag>
32 <flag name="faad">Use external faad library for AAC decoding (instead of internal libavcodec support)</flag>
33
34
35
36 1.283 media-video/ffmpeg/ChangeLog
37
38 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/ChangeLog?rev=1.283&view=markup
39 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/ChangeLog?rev=1.283&content-type=text/plain
40 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/ChangeLog?r1=1.282&r2=1.283
41
42 Index: ChangeLog
43 ===================================================================
44 RCS file: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v
45 retrieving revision 1.282
46 retrieving revision 1.283
47 diff -u -r1.282 -r1.283
48 --- ChangeLog 4 Apr 2009 15:54:15 -0000 1.282
49 +++ ChangeLog 2 May 2009 01:29:15 -0000 1.283
50 @@ -1,6 +1,12 @@
51 # ChangeLog for media-video/ffmpeg
52 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
53 -# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.282 2009/04/04 15:54:15 aballier Exp $
54 +# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.283 2009/05/02 01:29:15 beandog Exp $
55 +
56 +*ffmpeg-9999-r1 (02 May 2009)
57 +
58 + 02 May 2009; Steve Dibb <beandog@g.o> metadata.xml,
59 + -ffmpeg-9999.ebuild, +ffmpeg-9999-r1.ebuild:
60 + Add cpudetection use flag; require nonfree option for faac support
61
62 04 Apr 2009; Alexis Ballier <aballier@g.o>
63 -files/ffmpeg-0.4.9_p20081014-sparc-gcc43.patch,
64
65
66
67 1.1 media-video/ffmpeg/ffmpeg-9999-r1.ebuild
68
69 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/ffmpeg-9999-r1.ebuild?rev=1.1&view=markup
70 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/ffmpeg-9999-r1.ebuild?rev=1.1&content-type=text/plain
71
72 Index: ffmpeg-9999-r1.ebuild
73 ===================================================================
74 # Copyright 1999-2009 Gentoo Foundation
75 # Distributed under the terms of the GNU General Public License v2
76 # $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-9999-r1.ebuild,v 1.1 2009/05/02 01:29:15 beandog Exp $
77
78 EAPI=1
79
80 ESVN_REPO_URI="svn://svn.mplayerhq.hu/ffmpeg/trunk"
81
82 inherit eutils flag-o-matic multilib toolchain-funcs subversion
83
84 DESCRIPTION="Complete solution to record, convert and stream audio and video.
85 Includes libavcodec. live svn"
86 HOMEPAGE="http://ffmpeg.org/"
87
88 LICENSE="GPL-2"
89 SLOT="0"
90 KEYWORDS=""
91 IUSE="+3dnow +3dnowext alsa altivec amr cpudetection custom-cflags debug dirac
92 doc ieee1394 +encode faac faad gsm ipv6 jack +mmx +mmxext vorbis test
93 theora threads x264 xvid network zlib sdl X mp3 oss schroedinger
94 +hardcoded-tables bindist v4l v4l2 speex +ssse3 jpeg2k"
95
96 RDEPEND="sdl? ( >=media-libs/libsdl-1.2.10 )
97 alsa? ( media-libs/alsa-lib )
98 encode? (
99 faac? ( media-libs/faac )
100 mp3? ( media-sound/lame )
101 vorbis? ( media-libs/libvorbis media-libs/libogg )
102 theora? ( media-libs/libtheora media-libs/libogg )
103 x264? ( >=media-libs/x264-0.0.20081006 )
104 xvid? ( >=media-libs/xvid-1.1.0 ) )
105 faad? ( >=media-libs/faad2-2.6.1 )
106 zlib? ( sys-libs/zlib )
107 ieee1394? ( media-libs/libdc1394
108 sys-libs/libraw1394 )
109 dirac? ( media-video/dirac )
110 gsm? ( >=media-sound/gsm-1.0.12-r1 )
111 jpeg2k? ( >=media-libs/openjpeg-1.3-r2 )
112 schroedinger? ( media-libs/schroedinger )
113 speex? ( >=media-libs/speex-1.2_beta3 )
114 jack? ( media-sound/jack-audio-connection-kit )
115 X? ( x11-libs/libX11 x11-libs/libXext )
116 amr? ( media-libs/amrnb media-libs/amrwb )"
117
118 DEPEND="${RDEPEND}
119 >=sys-devel/make-3.81
120 mmx? ( dev-lang/yasm )
121 doc? ( app-text/texi2html )
122 test? ( net-misc/wget )
123 v4l? ( sys-kernel/linux-headers )
124 v4l2? ( sys-kernel/linux-headers )"
125
126 src_compile() {
127 local myconf="${EXTRA_ECONF}"
128
129 # enabled by default
130 use debug || myconf="${myconf} --disable-debug"
131 use zlib || myconf="${myconf} --disable-zlib"
132 use sdl || myconf="${myconf} --disable-ffplay"
133
134 if use network; then
135 use ipv6 || myconf="${myconf} --disable-ipv6"
136 else
137 myconf="${myconf} --disable-network"
138 fi
139
140 use custom-cflags && myconf="${myconf} --disable-optimizations"
141 use cpudetection && myconf="${myconf} --enable-runtime-cpudetect"
142
143 # enabled by default
144 if use encode
145 then
146 use mp3 && myconf="${myconf} --enable-libmp3lame"
147 use vorbis && myconf="${myconf} --enable-libvorbis"
148 use theora && myconf="${myconf} --enable-libtheora"
149 use x264 && myconf="${myconf} --enable-libx264"
150 use xvid && myconf="${myconf} --enable-libxvid"
151 else
152 myconf="${myconf} --disable-encoders"
153 fi
154
155 # libavdevice options
156 use ieee1394 && myconf="${myconf} --enable-libdc1394"
157 # Demuxers
158 for i in v4l v4l2 alsa oss jack ; do
159 use $i || myconf="${myconf} --disable-demuxer=$i"
160 done
161 # Muxers
162 for i in alsa oss ; do
163 use $i || myconf="${myconf} --disable-muxer=$i"
164 done
165 use X && myconf="${myconf} --enable-x11grab"
166
167 # Threads; we only support pthread for now but ffmpeg supports more
168 use threads && myconf="${myconf} --enable-pthreads"
169
170 # Decoders
171 use faad && myconf="${myconf} --enable-libfaad"
172 use dirac && myconf="${myconf} --enable-libdirac"
173 use schroedinger && myconf="${myconf} --enable-libschroedinger"
174 use speex && myconf="${myconf} --enable-libspeex"
175 use jpeg2k && myconf="${myconf} --enable-libopenjpeg"
176 if use gsm; then
177 myconf="${myconf} --enable-libgsm"
178 # Crappy detection or our installation is weird, pick one (FIXME)
179 append-flags -I/usr/include/gsm
180 fi
181 if use bindist
182 then
183 use amr && ewarn "libamr is nonfree and cannot be distributed; disabling amr support."
184 use faac && ewarn "faac is nonfree and cannot be distributed; disabling
185 faac support."
186 else
187 use amr && myconf="${myconf} --enable-libamr-nb \
188 --enable-libamr-wb"
189 use faac && myconf="${myconf} --enable-libfaac"
190 myconf="${myconf} --enable-nonfree"
191 fi
192
193 # CPU features
194 for i in mmx ssse3 altivec ; do
195 use $i || myconf="${myconf} --disable-$i"
196 done
197 use mmxext || myconf="${myconf} --disable-mmx2"
198 use 3dnow || myconf="${myconf} --disable-amd3dnow"
199 use 3dnowext || myconf="${myconf} --disable-amd3dnowext"
200 # disable mmx accelerated code if PIC is required
201 # as the provided asm decidedly is not PIC.
202 if gcc-specs-pie ; then
203 myconf="${myconf} --disable-mmx --disable-mmx2"
204 fi
205
206 # Try to get cpu type based on CFLAGS.
207 # Bug #172723
208 # We need to do this so that features of that CPU will be better used
209 # If they contain an unknown CPU it will not hurt since ffmpeg's configure
210 # will just ignore it.
211 for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
212 myconf="${myconf} --cpu=$i"
213 break
214 done
215
216 # Mandatory configuration
217 myconf="${myconf} --enable-gpl --enable-postproc \
218 --enable-avfilter --enable-avfilter-lavf \
219 --disable-stripping"
220
221 # cross compile support
222 tc-is-cross-compiler && myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)"
223
224 # Misc stuff
225 use hardcoded-tables && myconf="${myconf} --enable-hardcoded-tables"
226
227 # Specific workarounds for too-few-registers arch...
228 if [[ $(tc-arch) == "x86" ]]; then
229 filter-flags -fforce-addr -momit-leaf-frame-pointer
230 append-flags -fomit-frame-pointer
231 is-flag -O? || append-flags -O2
232 if (use debug); then
233 # no need to warn about debug if not using debug flag
234 ewarn ""
235 ewarn "Debug information will be almost useless as the frame pointer is omitted."
236 ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
237 ewarn "difficult to fix. Please have that in mind."
238 ewarn ""
239 fi
240 fi
241
242 cd "${S}"
243 ./configure \
244 --prefix=/usr \
245 --libdir=/usr/$(get_libdir) \
246 --shlibdir=/usr/$(get_libdir) \
247 --mandir=/usr/share/man \
248 --enable-static --enable-shared \
249 --cc="$(tc-getCC)" \
250 ${myconf} || die "configure failed"
251
252 emake version.h || die #252269
253 emake || die "make failed"
254 }
255
256 src_install() {
257 emake DESTDIR="${D}" install || die "Install Failed"
258
259 dodoc Changelog README INSTALL
260 dodoc doc/*
261 }
262
263 # Never die for now...
264 src_test() {
265 for t in codectest libavtest seektest ; do
266 emake ${t} || ewarn "Some tests in ${t} failed"
267 done
268 }
269
270 pkg_postinst() {
271 ewarn "ffmpeg may have had ABI changes, if ffmpeg based programs"
272 ewarn "like xine-lib or vlc stop working as expected please"
273 ewarn "rebuild them."
274 }