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: ffmpeg-0.5_p20373.ebuild ChangeLog
Date: Mon, 26 Oct 2009 12:04:32
Message-Id: E1N2OJK-0004W0-Ga@stork.gentoo.org
1 aballier 09/10/26 12:04:30
2
3 Modified: ChangeLog
4 Added: ffmpeg-0.5_p20373.ebuild
5 Log:
6 Bump a new snapshot
7 (Portage version: 2.2_rc46/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.322 media-video/ffmpeg/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/ChangeLog?rev=1.322&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/ChangeLog?rev=1.322&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/ChangeLog?r1=1.321&r2=1.322
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v
19 retrieving revision 1.321
20 retrieving revision 1.322
21 diff -u -r1.321 -r1.322
22 --- ChangeLog 22 Oct 2009 15:04:20 -0000 1.321
23 +++ ChangeLog 26 Oct 2009 12:04:29 -0000 1.322
24 @@ -1,6 +1,12 @@
25 # ChangeLog for media-video/ffmpeg
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.321 2009/10/22 15:04:20 aballier Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.322 2009/10/26 12:04:29 aballier Exp $
29 +
30 +*ffmpeg-0.5_p20373 (26 Oct 2009)
31 +
32 + 26 Oct 2009; Alexis Ballier <aballier@g.o>
33 + +ffmpeg-0.5_p20373.ebuild:
34 + Bump a new snapshot
35
36 22 Oct 2009; Alexis Ballier <aballier@g.o> ffmpeg-9999-r1.ebuild:
37 bump deps on x264
38
39
40
41 1.1 media-video/ffmpeg/ffmpeg-0.5_p20373.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/ffmpeg-0.5_p20373.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ffmpeg/ffmpeg-0.5_p20373.ebuild?rev=1.1&content-type=text/plain
45
46 Index: ffmpeg-0.5_p20373.ebuild
47 ===================================================================
48 # Copyright 1999-2009 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_p20373.ebuild,v 1.1 2009/10/26 12:04:29 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 ~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[encode] media-libs/libogg )
94 x264? ( >=media-libs/x264-0.0.20091021 )
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-drivers/nvidia-drivers-180.29 )
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 else
156 myconf="${myconf} --disable-encoders"
157 fi
158
159 # libavdevice options
160 use ieee1394 && myconf="${myconf} --enable-libdc1394"
161 # Indevs
162 for i in v4l v4l2 alsa oss jack ; do
163 use $i || myconf="${myconf} --disable-indev=$i"
164 done
165 # Outdevs
166 for i in alsa oss ; do
167 use $i || myconf="${myconf} --disable-outdev=$i"
168 done
169 use X && myconf="${myconf} --enable-x11grab"
170
171 # Threads; we only support pthread for now but ffmpeg supports more
172 use threads && myconf="${myconf} --enable-pthreads"
173
174 # Decoders
175 use opencore-amr && myconf="${myconf} --enable-libopencore-amrwb
176 --enable-libopencore-amrnb"
177 for i in faad dirac schroedinger speex; do
178 use $i && myconf="${myconf} --enable-lib$i"
179 done
180 use jpeg2k && myconf="${myconf} --enable-libopenjpeg"
181 if use gsm; then
182 myconf="${myconf} --enable-libgsm"
183 # Crappy detection or our installation is weird, pick one (FIXME)
184 append-flags -I/usr/include/gsm
185 fi
186 if use bindist
187 then
188 use faac && ewarn "faac is nonfree and cannot be distributed; disabling
189 faac support."
190 else
191 use faac && myconf="${myconf} --enable-libfaac"
192 { use faac ; } && myconf="${myconf} --enable-nonfree"
193 fi
194
195 #for i in h264_vdpau mpeg1_vdpau mpeg_vdpau vc1_vdpau wmv3_vdpau; do
196 # use video_cards_nvidia || myconf="${myconf} --disable-decoder=$i"
197 # use vdpau || myconf="${myconf} --disable-decoder=$i"
198 #done
199 use video_cards_nvidia || myconf="${myconf} --disable-vdpau"
200 use vdpau || myconf="${myconf} --disable-vdpau"
201
202 # CPU features
203 for i in mmx ssse3 altivec ; do
204 use $i || myconf="${myconf} --disable-$i"
205 done
206 use mmxext || myconf="${myconf} --disable-mmx2"
207 use 3dnow || myconf="${myconf} --disable-amd3dnow"
208 use 3dnowext || myconf="${myconf} --disable-amd3dnowext"
209 # disable mmx accelerated code if PIC is required
210 # as the provided asm decidedly is not PIC.
211 if gcc-specs-pie ; then
212 myconf="${myconf} --disable-mmx --disable-mmx2"
213 fi
214
215 # Option to force building pic
216 use pic && myconf="${myconf} --enable-pic"
217
218 # Try to get cpu type based on CFLAGS.
219 # Bug #172723
220 # We need to do this so that features of that CPU will be better used
221 # If they contain an unknown CPU it will not hurt since ffmpeg's configure
222 # will just ignore it.
223 for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
224 [ "${i}" = "native" ] && i="host" # bug #273421
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
253 # Specific workarounds for too-few-registers arch...
254 if [[ $(tc-arch) == "x86" ]]; then
255 filter-flags -fforce-addr -momit-leaf-frame-pointer
256 append-flags -fomit-frame-pointer
257 is-flag -O? || append-flags -O2
258 if (use debug); then
259 # no need to warn about debug if not using debug flag
260 ewarn ""
261 ewarn "Debug information will be almost useless as the frame pointer is omitted."
262 ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
263 ewarn "difficult to fix. Please have that in mind."
264 ewarn ""
265 fi
266 fi
267
268 cd "${S}"
269 ./configure \
270 --prefix=/usr \
271 --libdir=/usr/$(get_libdir) \
272 --shlibdir=/usr/$(get_libdir) \
273 --mandir=/usr/share/man \
274 --enable-static --enable-shared \
275 --cc="$(tc-getCC)" \
276 ${myconf} || die "configure failed"
277 }
278
279 src_compile() {
280 emake version.h || die #252269
281 emake || die "make failed"
282 }
283
284 src_install() {
285 emake DESTDIR="${D}" install || die "Install Failed"
286
287 dodoc Changelog README INSTALL
288 dodoc doc/*
289 }
290
291 src_test() {
292 if use encode ; then
293 for t in codectest lavftest seektest ; do
294 LD_LIBRARY_PATH="${S}/libpostproc:${S}/libswscale:${S}/libavcodec:${S}/libavdevice:${S}/libavfilter:${S}/libavformat:${S}/libavutil" \
295 emake ${t} || die "Some tests in ${t} failed"
296 done
297 else
298 ewarn "Tests fail without USE=encode, skipping"
299 fi
300 }