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.5_p21602.ebuild
Date: Tue, 02 Feb 2010 08:37:03
Message-Id: E1NcEFp-0007vM-4Q@stork.gentoo.org
1 aballier 10/02/02 08:37:01
2
3 Modified: ChangeLog
4 Added: ffmpeg-0.5_p21602.ebuild
5 Log:
6 bump a new snapshot
7 (Portage version: 2.2_rc62/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.342 media-video/ffmpeg/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/ChangeLog?rev=1.342&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/ChangeLog?rev=1.342&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/ChangeLog?r1=1.341&r2=1.342
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v
19 retrieving revision 1.341
20 retrieving revision 1.342
21 diff -u -r1.341 -r1.342
22 --- ChangeLog 31 Jan 2010 17:34:06 -0000 1.341
23 +++ ChangeLog 2 Feb 2010 08:37:00 -0000 1.342
24 @@ -1,6 +1,12 @@
25 # ChangeLog for media-video/ffmpeg
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.341 2010/01/31 17:34:06 armin76 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.342 2010/02/02 08:37:00 aballier Exp $
29 +
30 +*ffmpeg-0.5_p21602 (02 Feb 2010)
31 +
32 + 02 Feb 2010; Alexis Ballier <aballier@g.o>
33 + +ffmpeg-0.5_p21602.ebuild:
34 + bump a new snapshot
35
36 31 Jan 2010; Raúl Porcel <armin76@g.o> ffmpeg-0.5_p20373.ebuild:
37 ia64/sparc stable
38
39
40
41 1.1 media-video/ffmpeg/ffmpeg-0.5_p21602.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/ffmpeg-0.5_p21602.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/ffmpeg-0.5_p21602.ebuild?rev=1.1&content-type=text/plain
45
46 Index: ffmpeg-0.5_p21602.ebuild
47 ===================================================================
48 # Copyright 1999-2010 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.5_p21602.ebuild,v 1.1 2010/02/02 08:37:00 aballier Exp $
51
52 EAPI=2
53 SCM=""
54 if [ "${PV#9999}" != "${PV}" ] ; then
55 SCM=subversion
56 ESVN_REPO_URI="svn://svn.ffmpeg.org/ffmpeg/trunk"
57 fi
58
59 inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
60
61 DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec."
62 HOMEPAGE="http://ffmpeg.org/"
63 if [ "${PV#9999}" != "${PV}" ] ; then
64 SRC_URI=""
65 elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
66 SRC_URI="mirror://gentoo/${P}.tar.bz2"
67 else # Release
68 SRC_URI="http://ffmpeg.org/releases/${P}.tar.bz2"
69 fi
70 FFMPEG_REVISION="${PV#*_p}"
71
72 LICENSE="GPL-3"
73 SLOT="0"
74 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
75 IUSE="+3dnow +3dnowext alsa altivec cpudetection custom-cflags debug dirac
76 doc ieee1394 +encode faac faad gsm ipv6 jack +mmx +mmxext vorbis test
77 theora threads x264 xvid network zlib sdl X mp3 opencore-amr
78 oss pic schroedinger +hardcoded-tables bindist v4l v4l2
79 speex +ssse3 jpeg2k vdpau"
80
81 VIDEO_CARDS="nvidia"
82
83 for x in ${VIDEO_CARDS}; do
84 IUSE="${IUSE} video_cards_${x}"
85 done
86
87 RDEPEND="sdl? ( >=media-libs/libsdl-1.2.10 )
88 alsa? ( media-libs/alsa-lib )
89 encode? (
90 faac? ( media-libs/faac )
91 mp3? ( media-sound/lame )
92 vorbis? ( media-libs/libvorbis media-libs/libogg )
93 theora? ( >=media-libs/libtheora-1.1.1[encode] media-libs/libogg )
94 x264? ( >=media-libs/x264-0.0.20100118 )
95 xvid? ( >=media-libs/xvid-1.1.0 ) )
96 faad? ( >=media-libs/faad2-2.6.1 )
97 zlib? ( sys-libs/zlib )
98 ieee1394? ( media-libs/libdc1394
99 sys-libs/libraw1394 )
100 dirac? ( media-video/dirac )
101 gsm? ( >=media-sound/gsm-1.0.12-r1 )
102 jpeg2k? ( >=media-libs/openjpeg-1.3-r2 )
103 opencore-amr? ( media-libs/opencore-amr )
104 schroedinger? ( media-libs/schroedinger )
105 speex? ( >=media-libs/speex-1.2_beta3 )
106 jack? ( media-sound/jack-audio-connection-kit )
107 X? ( x11-libs/libX11 x11-libs/libXext )
108 video_cards_nvidia? (
109 vdpau? ( x11-libs/libvdpau )
110 )"
111
112 DEPEND="${RDEPEND}
113 >=sys-devel/make-3.81
114 mmx? ( dev-lang/yasm )
115 doc? ( app-text/texi2html )
116 test? ( net-misc/wget )
117 v4l? ( sys-kernel/linux-headers )
118 v4l2? ( sys-kernel/linux-headers )"
119
120 src_prepare() {
121 if [[ ${PV} = *9999* ]]; then
122 # Set SVN version manually
123 subversion_wc_info
124 sed -i s/UNKNOWN/SVN-r${ESVN_WC_REVISION}/ "${S}/version.sh"
125 elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
126 sed -i s/UNKNOWN/SVN-r${FFMPEG_REVISION}/ "${S}/version.sh"
127 fi
128 }
129
130 src_configure() {
131 local myconf="${EXTRA_FFMPEG_CONF}"
132
133 # enabled by default
134 use debug || myconf="${myconf} --disable-debug"
135 use zlib || myconf="${myconf} --disable-zlib"
136 use sdl || myconf="${myconf} --disable-ffplay"
137
138 if use network; then
139 use ipv6 || myconf="${myconf} --disable-ipv6"
140 else
141 myconf="${myconf} --disable-network"
142 fi
143
144 use custom-cflags && myconf="${myconf} --disable-optimizations"
145 use cpudetection && myconf="${myconf} --enable-runtime-cpudetect"
146
147 # enabled by default
148 if use encode
149 then
150 use mp3 && myconf="${myconf} --enable-libmp3lame"
151 use vorbis && myconf="${myconf} --enable-libvorbis"
152 use theora && myconf="${myconf} --enable-libtheora"
153 use x264 && myconf="${myconf} --enable-libx264"
154 use xvid && myconf="${myconf} --enable-libxvid"
155 if use bindist
156 then
157 use faac && ewarn "faac is nonfree and cannot be distributed;
158 disabling faac support."
159 else
160 use faac && myconf="${myconf} --enable-libfaac --enable-nonfree"
161 fi
162 else
163 myconf="${myconf} --disable-encoders"
164 fi
165
166 # libavdevice options
167 use ieee1394 && myconf="${myconf} --enable-libdc1394"
168 # Indevs
169 for i in v4l v4l2 alsa oss jack ; do
170 use $i || myconf="${myconf} --disable-indev=$i"
171 done
172 # Outdevs
173 for i in alsa oss ; do
174 use $i || myconf="${myconf} --disable-outdev=$i"
175 done
176 use X && myconf="${myconf} --enable-x11grab"
177
178 # Threads; we only support pthread for now but ffmpeg supports more
179 use threads && myconf="${myconf} --enable-pthreads"
180
181 # Decoders
182 use opencore-amr && myconf="${myconf} --enable-libopencore-amrwb
183 --enable-libopencore-amrnb"
184 for i in faad dirac schroedinger speex; do
185 use $i && myconf="${myconf} --enable-lib$i"
186 done
187 use jpeg2k && myconf="${myconf} --enable-libopenjpeg"
188 if use gsm; then
189 myconf="${myconf} --enable-libgsm"
190 # Crappy detection or our installation is weird, pick one (FIXME)
191 append-flags -I/usr/include/gsm
192 fi
193
194 #for i in h264_vdpau mpeg1_vdpau mpeg_vdpau vc1_vdpau wmv3_vdpau; do
195 # use video_cards_nvidia || myconf="${myconf} --disable-decoder=$i"
196 # use vdpau || myconf="${myconf} --disable-decoder=$i"
197 #done
198 use video_cards_nvidia || myconf="${myconf} --disable-vdpau"
199 use vdpau || myconf="${myconf} --disable-vdpau"
200
201 # CPU features
202 for i in mmx ssse3 altivec ; do
203 use $i || myconf="${myconf} --disable-$i"
204 done
205 use mmxext || myconf="${myconf} --disable-mmx2"
206 use 3dnow || myconf="${myconf} --disable-amd3dnow"
207 use 3dnowext || myconf="${myconf} --disable-amd3dnowext"
208 # disable mmx accelerated code if PIC is required
209 # as the provided asm decidedly is not PIC.
210 if gcc-specs-pie ; then
211 myconf="${myconf} --disable-mmx --disable-mmx2"
212 fi
213
214 # Option to force building pic
215 use pic && myconf="${myconf} --enable-pic"
216
217 # Try to get cpu type based on CFLAGS.
218 # Bug #172723
219 # We need to do this so that features of that CPU will be better used
220 # If they contain an unknown CPU it will not hurt since ffmpeg's configure
221 # will just ignore it.
222 for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
223 [ "${i}" = "native" ] && i="host" # bug #273421
224 [[ ${i} = *-sse3 ]] && i="${i%-sse3}" # bug 283968
225 myconf="${myconf} --cpu=$i"
226 break
227 done
228
229 # Mandatory configuration
230 myconf="${myconf} --enable-gpl --enable-version3 --enable-postproc \
231 --enable-avfilter --enable-avfilter-lavf \
232 --disable-stripping"
233
234 # cross compile support
235 if tc-is-cross-compiler ; then
236 myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
237 case ${CHOST} in
238 *freebsd*)
239 myconf="${myconf} --target-os=freebsd"
240 ;;
241 mingw32*)
242 myconf="${myconf} --target-os=mingw32"
243 ;;
244 *linux*)
245 myconf="${myconf} --target-os=linux"
246 ;;
247 esac
248 fi
249
250 # Misc stuff
251 use hardcoded-tables && myconf="${myconf} --enable-hardcoded-tables"
252 use doc || myconf="${myconf} --disable-doc"
253
254 # Specific workarounds for too-few-registers arch...
255 if [[ $(tc-arch) == "x86" ]]; then
256 filter-flags -fforce-addr -momit-leaf-frame-pointer
257 append-flags -fomit-frame-pointer
258 is-flag -O? || append-flags -O2
259 if (use debug); then
260 # no need to warn about debug if not using debug flag
261 ewarn ""
262 ewarn "Debug information will be almost useless as the frame pointer is omitted."
263 ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
264 ewarn "difficult to fix. Please have that in mind."
265 ewarn ""
266 fi
267 fi
268
269 cd "${S}"
270 ./configure \
271 --prefix=/usr \
272 --libdir=/usr/$(get_libdir) \
273 --shlibdir=/usr/$(get_libdir) \
274 --mandir=/usr/share/man \
275 --enable-static --enable-shared \
276 --cc="$(tc-getCC)" \
277 ${myconf} || die "configure failed"
278 }
279
280 src_compile() {
281 emake version.h || die #252269
282 emake || die "make failed"
283 }
284
285 src_install() {
286 emake DESTDIR="${D}" install install-man || die "Install Failed"
287
288 dodoc Changelog README INSTALL
289 dodoc doc/*
290 }
291
292 src_test() {
293 if use encode ; then
294 for t in codectest lavftest seektest ; do
295 LD_LIBRARY_PATH="${S}/libpostproc:${S}/libswscale:${S}/libavcodec:${S}/libavdevice:${S}/libavfilter:${S}/libavformat:${S}/libavutil" \
296 emake ${t} || die "Some tests in ${t} failed"
297 done
298 else
299 ewarn "Tests fail without USE=encode, skipping"
300 fi
301 }