Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 324453 | Differences between
and this patch

Collapse All | Expand All

(-)a/media-video/ffmpeg/Manifest (-3 / +3 lines)
Lines 1-4 Link Here
1
DIST ffmpeg-0.6.tar.bz2 3720372 RMD160 1ff6a8f419239a03d84f67cc954f60f73632432a SHA1 c130e3bc368251b9130ce6eafb44fe8c3993ff5c SHA256 6730baa6750f0cbffaf5f4c04f8ddcf1ebe6c651a6eeb12ae947a228de4c8120
1
DIST ffmpeg-0.6.tar.bz2 3720372 RMD160 1ff6a8f419239a03d84f67cc954f60f73632432a SHA1 c130e3bc368251b9130ce6eafb44fe8c3993ff5c SHA256 6730baa6750f0cbffaf5f4c04f8ddcf1ebe6c651a6eeb12ae947a228de4c8120
2
EBUILD ffmpeg-0.6.ebuild 7808 RMD160 0b39b664e9bb620b87865541b4e3c698c86da286 SHA1 7723509cc581138f302be0ca4409327bf35c3aa2 SHA256 c9ae2bc6a3b87cf761e7a7503674f642bebd8394e0e4effd3ffc895bd04e563f
2
EBUILD ffmpeg-0.6.ebuild 7797 RMD160 b7b91a0ac98554270cc198cf0516254da3b8dae9 SHA1 00ebf3816239ad86e0be00928636b69a0e53efda SHA256 21e333c5a8b94008448d360c5213924297e1d725970b67761b64aa6112f3c70d
3
EBUILD ffmpeg-9999-r1.ebuild 7810 RMD160 ab00c524f85c490f138a30d109f1af0ed64e09fa SHA1 248a47274f3e446fff7ac00292fb329c43a1259d SHA256 d115fd620530efd98eae4d7cd717e60a9e31d5e3033e79e947b1b0e08be9ab85
3
EBUILD ffmpeg-9999-r1.ebuild 7797 RMD160 b7b91a0ac98554270cc198cf0516254da3b8dae9 SHA1 00ebf3816239ad86e0be00928636b69a0e53efda SHA256 21e333c5a8b94008448d360c5213924297e1d725970b67761b64aa6112f3c70d
4
MISC metadata.xml 1973 RMD160 b94286038640659efda908f1141ebd49dd5fb19a SHA1 80ecb91c771d75606ba135b5f9447649461ca8c9 SHA256 831b6526385ea8e4877d47748f0a27e6983bb42ac879ed7a177104aec0189e95
4
MISC metadata.xml 2012 RMD160 3d25544e563b33eb0b13315b9d3d44c5630dd6d1 SHA1 bbc047b1e4d759c9d026d53ac8c5e52360bc2bf0 SHA256 3da74054275b6e6302f6b337d48679e59a9649f660bca9c1770ff602e225aab3
(-)a/media-video/ffmpeg/ffmpeg-0.6.ebuild (-87 / +118 lines)
Lines 1-11 Link Here
1
# Copyright 1999-2010 Gentoo Foundation
1
# Copyright 1999-2010 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-0.6.ebuild,v 1.1 2010/06/16 10:10:54 aballier Exp $
3
# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-9999-r1.ebuild,v 1.37 2010/06/12 21:54:13 spatz Exp $
4
5
EAPI="2"
4
6
5
EAPI=2
6
SCM=""
7
SCM=""
7
if [ "${PV#9999}" != "${PV}" ] ; then
8
if [[ ${PV} == *9999* ]]; then
8
	SCM=subversion
9
	SCM="subversion"
9
	ESVN_REPO_URI="svn://svn.ffmpeg.org/ffmpeg/trunk"
10
	ESVN_REPO_URI="svn://svn.ffmpeg.org/ffmpeg/trunk"
10
fi
11
fi
11
12
Lines 13-19 inherit eutils flag-o-matic multilib toolchain-funcs ${SCM} Link Here
13
14
14
DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec."
15
DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec."
15
HOMEPAGE="http://ffmpeg.org/"
16
HOMEPAGE="http://ffmpeg.org/"
16
if [ "${PV#9999}" != "${PV}" ] ; then
17
if [[ ${PV} == *9999* ]]; then
17
	SRC_URI=""
18
	SRC_URI=""
18
elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
19
elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
19
	SRC_URI="mirror://gentoo/${P}.tar.bz2"
20
	SRC_URI="mirror://gentoo/${P}.tar.bz2"
Lines 29-92 if [[ ${PV} == *9999* ]]; then Link Here
29
else
30
else
30
	KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
31
	KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
31
fi
32
fi
32
IUSE="+3dnow +3dnowext alsa altivec cpudetection custom-cflags debug dirac
33
IUSE="+3dnow +3dnowext alsa altivec amr bindist +bzip2 cpudetection custom-cflags
33
	  doc ieee1394 +encode faac faad gsm jack +mmx +mmxext vorbis test
34
debug dirac doc +encode faac faad gsm +hardcoded-tables ieee1394 jack jpeg2k
34
	  theora threads x264 xvid network zlib sdl X mp3 amr
35
+mmx +mmxext mp3 network oss pic rtmp schroedinger sdl speex +ssse3 static-libs test theora
35
	  oss pic rtmp schroedinger +hardcoded-tables bindist v4l v4l2
36
threads +tools v4l v4l2 vaapi vdpau vorbis vpx X x264 xvid +zlib"
36
	  speex +ssse3 jpeg2k vaapi vdpau vpx"
37
37
38
VIDEO_CARDS="nvidia"
38
VIDEO_CARDS="nvidia"
39
39
40
for x in ${VIDEO_CARDS}; do
40
for x in ${VIDEO_CARDS}; do
41
	IUSE="${IUSE} video_cards_${x}"
41
	IUSE+=" video_cards_${x}"
42
done
42
done
43
43
44
RDEPEND="sdl? ( >=media-libs/libsdl-1.2.10 )
44
RDEPEND="
45
	alsa? ( media-libs/alsa-lib )
45
	alsa? ( media-libs/alsa-lib )
46
	amr? ( media-libs/opencore-amr )
47
	bzip2? ( app-arch/bzip2 )
48
	dirac? ( media-video/dirac )
46
	encode? (
49
	encode? (
47
		faac? ( media-libs/faac )
50
		faac? ( media-libs/faac )
48
		mp3? ( media-sound/lame )
51
		mp3? ( media-sound/lame )
49
		vorbis? ( media-libs/libvorbis media-libs/libogg )
52
		theora? (
50
		theora? ( >=media-libs/libtheora-1.1.1[encode] media-libs/libogg )
53
			>=media-libs/libtheora-1.1.1[encode]
54
			media-libs/libogg
55
		)
56
		vorbis? (
57
			media-libs/libvorbis
58
			media-libs/libogg
59
		)
51
		x264? ( >=media-libs/x264-0.0.20100605 )
60
		x264? ( >=media-libs/x264-0.0.20100605 )
52
		xvid? ( >=media-libs/xvid-1.1.0 ) )
61
		xvid? ( >=media-libs/xvid-1.1.0 )
62
	)
53
	faad? ( >=media-libs/faad2-2.6.1 )
63
	faad? ( >=media-libs/faad2-2.6.1 )
54
	zlib? ( sys-libs/zlib )
55
	ieee1394? ( media-libs/libdc1394
56
				sys-libs/libraw1394 )
57
	dirac? ( media-video/dirac )
58
	gsm? ( >=media-sound/gsm-1.0.12-r1 )
64
	gsm? ( >=media-sound/gsm-1.0.12-r1 )
65
	ieee1394? (
66
		media-libs/libdc1394
67
		sys-libs/libraw1394
68
	)
69
	jack? ( media-sound/jack-audio-connection-kit )
59
	jpeg2k? ( >=media-libs/openjpeg-1.3-r2 )
70
	jpeg2k? ( >=media-libs/openjpeg-1.3-r2 )
60
	amr? ( media-libs/opencore-amr )
61
	rtmp? ( media-video/rtmpdump )
71
	rtmp? ( media-video/rtmpdump )
62
	schroedinger? ( media-libs/schroedinger )
72
	schroedinger? ( media-libs/schroedinger )
63
	speex? ( >=media-libs/speex-1.2_beta3 )
73
	speex? ( >=media-libs/speex-1.2_beta3 )
64
	jack? ( media-sound/jack-audio-connection-kit )
65
	X? ( x11-libs/libX11 x11-libs/libXext )
66
	vaapi? ( x11-libs/libva )
67
	vpx? ( media-libs/libvpx )
74
	vpx? ( media-libs/libvpx )
68
	video_cards_nvidia? (
75
	X? (
69
		vdpau? ( x11-libs/libvdpau )
76
		x11-libs/libX11
70
	)"
77
		x11-libs/libXext
78
		tools? ( sdl? ( >=media-libs/libsdl-1.2.10[audio,alsa?,oss?,video,X] ) )
79
		vaapi? ( x11-libs/libva[video_cards_nvidia?] )
80
		video_cards_nvidia? (
81
			vdpau? ( x11-libs/libvdpau )
82
		)
83
	)
84
	zlib? ( sys-libs/zlib )
85
"
71
86
72
DEPEND="${RDEPEND}
87
DEPEND="${RDEPEND}
73
	>=sys-devel/make-3.81
88
	>=sys-devel/make-3.81
74
	dirac? ( dev-util/pkgconfig )
89
	dirac? ( dev-util/pkgconfig )
90
	doc? ( app-text/texi2html )
91
	mmx? ( dev-lang/yasm )
75
	rtmp? ( dev-util/pkgconfig )
92
	rtmp? ( dev-util/pkgconfig )
76
	schroedinger? ( dev-util/pkgconfig )
93
	schroedinger? ( dev-util/pkgconfig )
77
	mmx? ( dev-lang/yasm )
78
	doc? ( app-text/texi2html )
79
	test? ( net-misc/wget )
94
	test? ( net-misc/wget )
80
	v4l? ( sys-kernel/linux-headers )
95
	v4l? ( sys-kernel/linux-headers )
81
	v4l2? ( sys-kernel/linux-headers )"
96
	v4l2? ( sys-kernel/linux-headers )
97
"
82
98
83
src_prepare() {
99
src_prepare() {
84
	if [[ ${PV} = *9999* ]]; then
100
	if [[ ${PV} = *9999* ]]; then
85
		# Set SVN version manually
101
		# Set SVN version manually
86
		subversion_wc_info
102
		subversion_wc_info
87
		sed -i s/UNKNOWN/SVN-r${ESVN_WC_REVISION}/ "${S}/version.sh"
103
		sed -i -e "s/UNKNOWN/SVN-r${ESVN_WC_REVISION}/" "${S}/version.sh" || die
88
	elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
104
	elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
89
		sed -i s/UNKNOWN/SVN-r${FFMPEG_REVISION}/ "${S}/version.sh"
105
		sed -i -e "s/UNKNOWN/SVN-r${FFMPEG_REVISION}/" "${S}/version.sh" || die
90
	fi
106
	fi
91
}
107
}
92
108
Lines 94-172 src_configure() { Link Here
94
	local myconf="${EXTRA_FFMPEG_CONF}"
110
	local myconf="${EXTRA_FFMPEG_CONF}"
95
111
96
	# enabled by default
112
	# enabled by default
97
	use debug || myconf="${myconf} --disable-debug"
113
	for i in debug doc zlib network vaapi vdpau; do
98
	use zlib || myconf="${myconf} --disable-zlib"
114
		use ${i} || myconf+=" --disable-${i}"
99
	use sdl || myconf="${myconf} --disable-ffplay"
115
	done
100
	use network || myconf="${myconf} --disable-network"
116
	use bzip2 || myconf+=" --disable-bzlib"
117
	use sdl || myconf+=" --disable-ffplay"
118
	use static-libs || myconf+=" --disable-static"
119
	use tools || myconf+="
120
		--disable-ffmpeg
121
		--disable-ffplay
122
		--disable-ffprobe
123
		--disable-ffserver
124
		"
125
126
	#for i in h264_vdpau mpeg1_vdpau mpeg_vdpau vc1_vdpau wmv3_vdpau; do
127
	#	use video_cards_nvidia || myconf+=" --disable-decoder=${i}"
128
	#	use vdpau || myconf+=" --disable-decoder=${i}"
129
	#done
130
	use video_cards_nvidia || myconf+=" --disable-vdpau"
101
131
102
	use custom-cflags && myconf="${myconf} --disable-optimizations"
132
	use custom-cflags && myconf+=" --disable-optimizations"
103
	use cpudetection && myconf="${myconf} --enable-runtime-cpudetect"
133
	use cpudetection && myconf+=" --enable-runtime-cpudetect"
104
134
105
	# enabled by default
135
	# enabled by default
106
	if use encode
136
	if use encode
107
	then
137
	then
108
		use mp3 && myconf="${myconf} --enable-libmp3lame"
138
		use mp3 && myconf+=" --enable-libmp3lame"
109
		use vorbis && myconf="${myconf} --enable-libvorbis"
139
		for i in vorbis theora x264 xvid; do
110
		use theora && myconf="${myconf} --enable-libtheora"
140
			use ${i} && myconf+=" --enable-lib${i}"
111
		use x264 && myconf="${myconf} --enable-libx264"
141
		done
112
		use xvid && myconf="${myconf} --enable-libxvid"
113
		if use bindist
142
		if use bindist
114
		then
143
		then
115
			use faac && ewarn "faac is nonfree and cannot be distributed;
144
			use faac && ewarn "faac is nonfree and cannot be distributed;
116
			disabling faac support."
145
			disabling faac support."
117
		else
146
		else
118
			use faac && myconf="${myconf} --enable-libfaac --enable-nonfree"
147
			use faac && myconf+=" --enable-libfaac --enable-nonfree"
119
		fi
148
		fi
120
	else
149
	else
121
		myconf="${myconf} --disable-encoders"
150
		myconf+=" --disable-encoders"
122
	fi
151
	fi
123
152
124
	# libavdevice options
153
	# libavdevice options
125
	use ieee1394 && myconf="${myconf} --enable-libdc1394"
154
	use ieee1394 && myconf+=" --enable-libdc1394"
126
	# Indevs
155
	# Indevs
127
	for i in v4l v4l2 alsa oss jack ; do
156
	for i in v4l v4l2 alsa oss jack ; do
128
		use $i || myconf="${myconf} --disable-indev=$i"
157
		use ${i} || myconf+=" --disable-indev=${i}"
129
	done
158
	done
130
	# Outdevs
159
	# Outdevs
131
	for i in alsa oss ; do
160
	for i in alsa oss ; do
132
		use $i || myconf="${myconf} --disable-outdev=$i"
161
		use ${i} || myconf+=" --disable-outdev=${i}"
133
	done
162
	done
134
	use X && myconf="${myconf} --enable-x11grab"
163
	use X && myconf+=" --enable-x11grab"
135
164
136
	# Threads; we only support pthread for now but ffmpeg supports more
165
	# Threads; we only support pthread for now but ffmpeg supports more
137
	use threads && myconf="${myconf} --enable-pthreads"
166
	use threads && myconf+=" --enable-pthreads"
138
167
139
	# Decoders
168
	# Decoders
140
	use amr && myconf="${myconf} --enable-libopencore-amrwb
169
	use amr && myconf+=" --enable-libopencore-amrwb --enable-libopencore-amrnb"
141
		--enable-libopencore-amrnb"
142
	for i in gsm faad dirac rtmp schroedinger speex vpx; do
170
	for i in gsm faad dirac rtmp schroedinger speex vpx; do
143
		use $i && myconf="${myconf} --enable-lib$i"
171
		use ${i} && myconf+=" --enable-lib${i}"
144
	done
172
	done
145
	use jpeg2k && myconf="${myconf} --enable-libopenjpeg"
173
	use jpeg2k && myconf+=" --enable-libopenjpeg"
146
147
	#for i in h264_vdpau mpeg1_vdpau mpeg_vdpau vc1_vdpau wmv3_vdpau; do
148
	#	use video_cards_nvidia || myconf="${myconf} --disable-decoder=$i"
149
	#	use vdpau || myconf="${myconf} --disable-decoder=$i"
150
	#done
151
	use video_cards_nvidia || myconf="${myconf} --disable-vdpau"
152
	use vdpau || myconf="${myconf} --disable-vdpau"
153
	use vaapi || myconf="${myconf} --disable-vaapi"
154
174
155
	# CPU features
175
	# CPU features
156
	for i in mmx ssse3 altivec ; do
176
	for i in mmx ssse3 altivec ; do
157
		use $i ||  myconf="${myconf} --disable-$i"
177
		use ${i} || myconf+=" --disable-${i}"
158
	done
178
	done
159
	use mmxext || myconf="${myconf} --disable-mmx2"
179
	use mmxext || myconf+=" --disable-mmx2"
160
	use 3dnow || myconf="${myconf} --disable-amd3dnow"
180
	use 3dnow || myconf+=" --disable-amd3dnow"
161
	use 3dnowext || myconf="${myconf} --disable-amd3dnowext"
181
	use 3dnowext || myconf+=" --disable-amd3dnowext"
162
	# disable mmx accelerated code if PIC is required
182
	# disable mmx accelerated code if PIC is required
163
	# as the provided asm decidedly is not PIC.
183
	# as the provided asm decidedly is not PIC.
164
	if gcc-specs-pie ; then
184
	if gcc-specs-pie ; then
165
		myconf="${myconf} --disable-mmx --disable-mmx2"
185
		myconf+=" --disable-mmx --disable-mmx2"
166
	fi
186
	fi
167
187
168
	# Option to force building pic
188
	# Option to force building pic
169
	use pic && myconf="${myconf} --enable-pic"
189
	use pic && myconf+=" --enable-pic"
170
190
171
	# Try to get cpu type based on CFLAGS.
191
	# Try to get cpu type based on CFLAGS.
172
	# Bug #172723
192
	# Bug #172723
Lines 176-209 src_configure() { Link Here
176
	for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
196
	for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
177
		[ "${i}" = "native" ] && i="host" # bug #273421
197
		[ "${i}" = "native" ] && i="host" # bug #273421
178
		[[ ${i} = *-sse3 ]] && i="${i%-sse3}" # bug 283968
198
		[[ ${i} = *-sse3 ]] && i="${i%-sse3}" # bug 283968
179
		myconf="${myconf} --cpu=$i"
199
		myconf+=" --cpu=${i}"
180
		break
200
		break
181
	done
201
	done
182
202
183
	# Mandatory configuration
203
	# Mandatory configuration
184
	myconf="${myconf} --enable-gpl --enable-version3 --enable-postproc \
204
	myconf+="
185
			--enable-avfilter --enable-avfilter-lavf \
205
		--enable-gpl
186
			--disable-stripping"
206
		--enable-version3
207
		--enable-postproc
208
		--enable-avfilter
209
		--enable-avfilter-lavf
210
		--disable-stripping
211
		"
187
212
188
	# cross compile support
213
	# cross compile support
189
	if tc-is-cross-compiler ; then
214
	if tc-is-cross-compiler ; then
190
		myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
215
		myconf+=" --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
191
		case ${CHOST} in
216
		case ${CHOST} in
192
			*freebsd*)
217
			*freebsd*)
193
				myconf="${myconf} --target-os=freebsd"
218
				myconf+=" --target-os=freebsd"
194
				;;
219
				;;
195
			mingw32*)
220
			mingw32*)
196
				myconf="${myconf} --target-os=mingw32"
221
				myconf+=" --target-os=mingw32"
197
				;;
222
				;;
198
			*linux*)
223
			*linux*)
199
				myconf="${myconf} --target-os=linux"
224
				myconf+=" --target-os=linux"
200
				;;
225
				;;
201
		esac
226
		esac
202
	fi
227
	fi
203
228
204
	# Misc stuff
229
	# Misc stuff
205
	use hardcoded-tables && myconf="${myconf} --enable-hardcoded-tables"
230
	use hardcoded-tables && myconf+=" --enable-hardcoded-tables"
206
	use doc || myconf="${myconf} --disable-doc"
207
231
208
	# Specific workarounds for too-few-registers arch...
232
	# Specific workarounds for too-few-registers arch...
209
	if [[ $(tc-arch) == "x86" ]]; then
233
	if [[ $(tc-arch) == "x86" ]]; then
Lines 220-234 src_configure() { Link Here
220
		fi
244
		fi
221
	fi
245
	fi
222
246
223
	cd "${S}"
247
	myconf+="
224
	./configure \
248
		--prefix=/usr
225
		--prefix=/usr \
249
		--libdir=/usr/$(get_libdir)
226
		--libdir=/usr/$(get_libdir) \
250
		--shlibdir=/usr/$(get_libdir)
227
		--shlibdir=/usr/$(get_libdir) \
251
		--mandir=/usr/share/man
228
		--mandir=/usr/share/man \
252
		--enable-shared
229
		--enable-static --enable-shared \
253
		--cc=$(tc-getCC)
230
		--cc="$(tc-getCC)" \
254
		"
231
		${myconf} || die "configure failed"
255
	./configure ${myconf} || die "configure failed"
232
}
256
}
233
257
234
src_compile() {
258
src_compile() {
Lines 237-243 src_compile() { Link Here
237
}
261
}
238
262
239
src_install() {
263
src_install() {
240
	emake DESTDIR="${D}" install install-man || die "Install Failed"
264
	use tools && Tman+="install-man" || Tman=""
265
	emake DESTDIR="${D}" install ${Tman} || die "emake install failed"
266
267
	# until fixed upstream
268
	if use tools && { use !encode || use !x264; } ; then
269
		rm -f "${D}"/usr/share/ffmpeg/libx264*.ffpreset
270
		rmdir "${D}"/usr/share/ffmpeg
271
	fi
241
272
242
	dodoc Changelog README INSTALL
273
	dodoc Changelog README INSTALL
243
	dodoc doc/*
274
	dodoc doc/*
(-)a/media-video/ffmpeg/ffmpeg-9999-r1.ebuild (-86 / +117 lines)
Lines 2-11 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-9999-r1.ebuild,v 1.37 2010/06/12 21:54:13 spatz Exp $
3
# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-9999-r1.ebuild,v 1.37 2010/06/12 21:54:13 spatz Exp $
4
4
5
EAPI=2
5
EAPI="2"
6
6
SCM=""
7
SCM=""
7
if [ "${PV#9999}" != "${PV}" ] ; then
8
if [[ ${PV} == *9999* ]]; then
8
	SCM=subversion
9
	SCM="subversion"
9
	ESVN_REPO_URI="svn://svn.ffmpeg.org/ffmpeg/trunk"
10
	ESVN_REPO_URI="svn://svn.ffmpeg.org/ffmpeg/trunk"
10
fi
11
fi
11
12
Lines 13-19 inherit eutils flag-o-matic multilib toolchain-funcs ${SCM} Link Here
13
14
14
DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec."
15
DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec."
15
HOMEPAGE="http://ffmpeg.org/"
16
HOMEPAGE="http://ffmpeg.org/"
16
if [ "${PV#9999}" != "${PV}" ] ; then
17
if [[ ${PV} == *9999* ]]; then
17
	SRC_URI=""
18
	SRC_URI=""
18
elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
19
elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
19
	SRC_URI="mirror://gentoo/${P}.tar.bz2"
20
	SRC_URI="mirror://gentoo/${P}.tar.bz2"
Lines 29-92 if [[ ${PV} == *9999* ]]; then Link Here
29
else
30
else
30
	KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
31
	KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
31
fi
32
fi
32
IUSE="+3dnow +3dnowext alsa altivec cpudetection custom-cflags debug dirac
33
IUSE="+3dnow +3dnowext alsa altivec amr bindist +bzip2 cpudetection custom-cflags
33
	  doc ieee1394 +encode faac faad gsm jack +mmx +mmxext vorbis test
34
debug dirac doc +encode faac faad gsm +hardcoded-tables ieee1394 jack jpeg2k
34
	  theora threads x264 xvid network zlib sdl X mp3 amr
35
+mmx +mmxext mp3 network oss pic rtmp schroedinger sdl speex +ssse3 static-libs test theora
35
	  oss pic rtmp schroedinger +hardcoded-tables bindist v4l v4l2
36
threads +tools v4l v4l2 vaapi vdpau vorbis vpx X x264 xvid +zlib"
36
	  speex +ssse3 jpeg2k vaapi vdpau vpx"
37
37
38
VIDEO_CARDS="nvidia"
38
VIDEO_CARDS="nvidia"
39
39
40
for x in ${VIDEO_CARDS}; do
40
for x in ${VIDEO_CARDS}; do
41
	IUSE="${IUSE} video_cards_${x}"
41
	IUSE+=" video_cards_${x}"
42
done
42
done
43
43
44
RDEPEND="sdl? ( >=media-libs/libsdl-1.2.10 )
44
RDEPEND="
45
	alsa? ( media-libs/alsa-lib )
45
	alsa? ( media-libs/alsa-lib )
46
	amr? ( media-libs/opencore-amr )
47
	bzip2? ( app-arch/bzip2 )
48
	dirac? ( media-video/dirac )
46
	encode? (
49
	encode? (
47
		faac? ( media-libs/faac )
50
		faac? ( media-libs/faac )
48
		mp3? ( media-sound/lame )
51
		mp3? ( media-sound/lame )
49
		vorbis? ( media-libs/libvorbis media-libs/libogg )
52
		theora? (
50
		theora? ( >=media-libs/libtheora-1.1.1[encode] media-libs/libogg )
53
			>=media-libs/libtheora-1.1.1[encode]
54
			media-libs/libogg
55
		)
56
		vorbis? (
57
			media-libs/libvorbis
58
			media-libs/libogg
59
		)
51
		x264? ( >=media-libs/x264-0.0.20100605 )
60
		x264? ( >=media-libs/x264-0.0.20100605 )
52
		xvid? ( >=media-libs/xvid-1.1.0 ) )
61
		xvid? ( >=media-libs/xvid-1.1.0 )
62
	)
53
	faad? ( >=media-libs/faad2-2.6.1 )
63
	faad? ( >=media-libs/faad2-2.6.1 )
54
	zlib? ( sys-libs/zlib )
55
	ieee1394? ( media-libs/libdc1394
56
				sys-libs/libraw1394 )
57
	dirac? ( media-video/dirac )
58
	gsm? ( >=media-sound/gsm-1.0.12-r1 )
64
	gsm? ( >=media-sound/gsm-1.0.12-r1 )
65
	ieee1394? (
66
		media-libs/libdc1394
67
		sys-libs/libraw1394
68
	)
69
	jack? ( media-sound/jack-audio-connection-kit )
59
	jpeg2k? ( >=media-libs/openjpeg-1.3-r2 )
70
	jpeg2k? ( >=media-libs/openjpeg-1.3-r2 )
60
	amr? ( media-libs/opencore-amr )
61
	rtmp? ( media-video/rtmpdump )
71
	rtmp? ( media-video/rtmpdump )
62
	schroedinger? ( media-libs/schroedinger )
72
	schroedinger? ( media-libs/schroedinger )
63
	speex? ( >=media-libs/speex-1.2_beta3 )
73
	speex? ( >=media-libs/speex-1.2_beta3 )
64
	jack? ( media-sound/jack-audio-connection-kit )
65
	X? ( x11-libs/libX11 x11-libs/libXext )
66
	vaapi? ( x11-libs/libva )
67
	vpx? ( media-libs/libvpx )
74
	vpx? ( media-libs/libvpx )
68
	video_cards_nvidia? (
75
	X? (
69
		vdpau? ( x11-libs/libvdpau )
76
		x11-libs/libX11
70
	)"
77
		x11-libs/libXext
78
		tools? ( sdl? ( >=media-libs/libsdl-1.2.10[audio,alsa?,oss?,video,X] ) )
79
		vaapi? ( x11-libs/libva[video_cards_nvidia?] )
80
		video_cards_nvidia? (
81
			vdpau? ( x11-libs/libvdpau )
82
		)
83
	)
84
	zlib? ( sys-libs/zlib )
85
"
71
86
72
DEPEND="${RDEPEND}
87
DEPEND="${RDEPEND}
73
	>=sys-devel/make-3.81
88
	>=sys-devel/make-3.81
74
	dirac? ( dev-util/pkgconfig )
89
	dirac? ( dev-util/pkgconfig )
90
	doc? ( app-text/texi2html )
91
	mmx? ( dev-lang/yasm )
75
	rtmp? ( dev-util/pkgconfig )
92
	rtmp? ( dev-util/pkgconfig )
76
	schroedinger? ( dev-util/pkgconfig )
93
	schroedinger? ( dev-util/pkgconfig )
77
	mmx? ( dev-lang/yasm )
78
	doc? ( app-text/texi2html )
79
	test? ( net-misc/wget )
94
	test? ( net-misc/wget )
80
	v4l? ( sys-kernel/linux-headers )
95
	v4l? ( sys-kernel/linux-headers )
81
	v4l2? ( sys-kernel/linux-headers )"
96
	v4l2? ( sys-kernel/linux-headers )
97
"
82
98
83
src_prepare() {
99
src_prepare() {
84
	if [[ ${PV} = *9999* ]]; then
100
	if [[ ${PV} = *9999* ]]; then
85
		# Set SVN version manually
101
		# Set SVN version manually
86
		subversion_wc_info
102
		subversion_wc_info
87
		sed -i s/UNKNOWN/SVN-r${ESVN_WC_REVISION}/ "${S}/version.sh"
103
		sed -i -e "s/UNKNOWN/SVN-r${ESVN_WC_REVISION}/" "${S}/version.sh" || die
88
	elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
104
	elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
89
		sed -i s/UNKNOWN/SVN-r${FFMPEG_REVISION}/ "${S}/version.sh"
105
		sed -i -e "s/UNKNOWN/SVN-r${FFMPEG_REVISION}/" "${S}/version.sh" || die
90
	fi
106
	fi
91
}
107
}
92
108
Lines 94-172 src_configure() { Link Here
94
	local myconf="${EXTRA_FFMPEG_CONF}"
110
	local myconf="${EXTRA_FFMPEG_CONF}"
95
111
96
	# enabled by default
112
	# enabled by default
97
	use debug || myconf="${myconf} --disable-debug"
113
	for i in debug doc zlib network vaapi vdpau; do
98
	use zlib || myconf="${myconf} --disable-zlib"
114
		use ${i} || myconf+=" --disable-${i}"
99
	use sdl || myconf="${myconf} --disable-ffplay"
115
	done
100
	use network || myconf="${myconf} --disable-network"
116
	use bzip2 || myconf+=" --disable-bzlib"
117
	use sdl || myconf+=" --disable-ffplay"
118
	use static-libs || myconf+=" --disable-static"
119
	use tools || myconf+="
120
		--disable-ffmpeg
121
		--disable-ffplay
122
		--disable-ffprobe
123
		--disable-ffserver
124
		"
125
126
	#for i in h264_vdpau mpeg1_vdpau mpeg_vdpau vc1_vdpau wmv3_vdpau; do
127
	#	use video_cards_nvidia || myconf+=" --disable-decoder=${i}"
128
	#	use vdpau || myconf+=" --disable-decoder=${i}"
129
	#done
130
	use video_cards_nvidia || myconf+=" --disable-vdpau"
101
131
102
	use custom-cflags && myconf="${myconf} --disable-optimizations"
132
	use custom-cflags && myconf+=" --disable-optimizations"
103
	use cpudetection && myconf="${myconf} --enable-runtime-cpudetect"
133
	use cpudetection && myconf+=" --enable-runtime-cpudetect"
104
134
105
	# enabled by default
135
	# enabled by default
106
	if use encode
136
	if use encode
107
	then
137
	then
108
		use mp3 && myconf="${myconf} --enable-libmp3lame"
138
		use mp3 && myconf+=" --enable-libmp3lame"
109
		use vorbis && myconf="${myconf} --enable-libvorbis"
139
		for i in vorbis theora x264 xvid; do
110
		use theora && myconf="${myconf} --enable-libtheora"
140
			use ${i} && myconf+=" --enable-lib${i}"
111
		use x264 && myconf="${myconf} --enable-libx264"
141
		done
112
		use xvid && myconf="${myconf} --enable-libxvid"
113
		if use bindist
142
		if use bindist
114
		then
143
		then
115
			use faac && ewarn "faac is nonfree and cannot be distributed;
144
			use faac && ewarn "faac is nonfree and cannot be distributed;
116
			disabling faac support."
145
			disabling faac support."
117
		else
146
		else
118
			use faac && myconf="${myconf} --enable-libfaac --enable-nonfree"
147
			use faac && myconf+=" --enable-libfaac --enable-nonfree"
119
		fi
148
		fi
120
	else
149
	else
121
		myconf="${myconf} --disable-encoders"
150
		myconf+=" --disable-encoders"
122
	fi
151
	fi
123
152
124
	# libavdevice options
153
	# libavdevice options
125
	use ieee1394 && myconf="${myconf} --enable-libdc1394"
154
	use ieee1394 && myconf+=" --enable-libdc1394"
126
	# Indevs
155
	# Indevs
127
	for i in v4l v4l2 alsa oss jack ; do
156
	for i in v4l v4l2 alsa oss jack ; do
128
		use $i || myconf="${myconf} --disable-indev=$i"
157
		use ${i} || myconf+=" --disable-indev=${i}"
129
	done
158
	done
130
	# Outdevs
159
	# Outdevs
131
	for i in alsa oss ; do
160
	for i in alsa oss ; do
132
		use $i || myconf="${myconf} --disable-outdev=$i"
161
		use ${i} || myconf+=" --disable-outdev=${i}"
133
	done
162
	done
134
	use X && myconf="${myconf} --enable-x11grab"
163
	use X && myconf+=" --enable-x11grab"
135
164
136
	# Threads; we only support pthread for now but ffmpeg supports more
165
	# Threads; we only support pthread for now but ffmpeg supports more
137
	use threads && myconf="${myconf} --enable-pthreads"
166
	use threads && myconf+=" --enable-pthreads"
138
167
139
	# Decoders
168
	# Decoders
140
	use amr && myconf="${myconf} --enable-libopencore-amrwb
169
	use amr && myconf+=" --enable-libopencore-amrwb --enable-libopencore-amrnb"
141
		--enable-libopencore-amrnb"
142
	for i in gsm faad dirac rtmp schroedinger speex vpx; do
170
	for i in gsm faad dirac rtmp schroedinger speex vpx; do
143
		use $i && myconf="${myconf} --enable-lib$i"
171
		use ${i} && myconf+=" --enable-lib${i}"
144
	done
172
	done
145
	use jpeg2k && myconf="${myconf} --enable-libopenjpeg"
173
	use jpeg2k && myconf+=" --enable-libopenjpeg"
146
147
	#for i in h264_vdpau mpeg1_vdpau mpeg_vdpau vc1_vdpau wmv3_vdpau; do
148
	#	use video_cards_nvidia || myconf="${myconf} --disable-decoder=$i"
149
	#	use vdpau || myconf="${myconf} --disable-decoder=$i"
150
	#done
151
	use video_cards_nvidia || myconf="${myconf} --disable-vdpau"
152
	use vdpau || myconf="${myconf} --disable-vdpau"
153
	use vaapi || myconf="${myconf} --disable-vaapi"
154
174
155
	# CPU features
175
	# CPU features
156
	for i in mmx ssse3 altivec ; do
176
	for i in mmx ssse3 altivec ; do
157
		use $i ||  myconf="${myconf} --disable-$i"
177
		use ${i} || myconf+=" --disable-${i}"
158
	done
178
	done
159
	use mmxext || myconf="${myconf} --disable-mmx2"
179
	use mmxext || myconf+=" --disable-mmx2"
160
	use 3dnow || myconf="${myconf} --disable-amd3dnow"
180
	use 3dnow || myconf+=" --disable-amd3dnow"
161
	use 3dnowext || myconf="${myconf} --disable-amd3dnowext"
181
	use 3dnowext || myconf+=" --disable-amd3dnowext"
162
	# disable mmx accelerated code if PIC is required
182
	# disable mmx accelerated code if PIC is required
163
	# as the provided asm decidedly is not PIC.
183
	# as the provided asm decidedly is not PIC.
164
	if gcc-specs-pie ; then
184
	if gcc-specs-pie ; then
165
		myconf="${myconf} --disable-mmx --disable-mmx2"
185
		myconf+=" --disable-mmx --disable-mmx2"
166
	fi
186
	fi
167
187
168
	# Option to force building pic
188
	# Option to force building pic
169
	use pic && myconf="${myconf} --enable-pic"
189
	use pic && myconf+=" --enable-pic"
170
190
171
	# Try to get cpu type based on CFLAGS.
191
	# Try to get cpu type based on CFLAGS.
172
	# Bug #172723
192
	# Bug #172723
Lines 176-209 src_configure() { Link Here
176
	for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
196
	for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
177
		[ "${i}" = "native" ] && i="host" # bug #273421
197
		[ "${i}" = "native" ] && i="host" # bug #273421
178
		[[ ${i} = *-sse3 ]] && i="${i%-sse3}" # bug 283968
198
		[[ ${i} = *-sse3 ]] && i="${i%-sse3}" # bug 283968
179
		myconf="${myconf} --cpu=$i"
199
		myconf+=" --cpu=${i}"
180
		break
200
		break
181
	done
201
	done
182
202
183
	# Mandatory configuration
203
	# Mandatory configuration
184
	myconf="${myconf} --enable-gpl --enable-version3 --enable-postproc \
204
	myconf+="
185
			--enable-avfilter --enable-avfilter-lavf \
205
		--enable-gpl
186
			--disable-stripping"
206
		--enable-version3
207
		--enable-postproc
208
		--enable-avfilter
209
		--enable-avfilter-lavf
210
		--disable-stripping
211
		"
187
212
188
	# cross compile support
213
	# cross compile support
189
	if tc-is-cross-compiler ; then
214
	if tc-is-cross-compiler ; then
190
		myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
215
		myconf+=" --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
191
		case ${CHOST} in
216
		case ${CHOST} in
192
			*freebsd*)
217
			*freebsd*)
193
				myconf="${myconf} --target-os=freebsd"
218
				myconf+=" --target-os=freebsd"
194
				;;
219
				;;
195
			mingw32*)
220
			mingw32*)
196
				myconf="${myconf} --target-os=mingw32"
221
				myconf+=" --target-os=mingw32"
197
				;;
222
				;;
198
			*linux*)
223
			*linux*)
199
				myconf="${myconf} --target-os=linux"
224
				myconf+=" --target-os=linux"
200
				;;
225
				;;
201
		esac
226
		esac
202
	fi
227
	fi
203
228
204
	# Misc stuff
229
	# Misc stuff
205
	use hardcoded-tables && myconf="${myconf} --enable-hardcoded-tables"
230
	use hardcoded-tables && myconf+=" --enable-hardcoded-tables"
206
	use doc || myconf="${myconf} --disable-doc"
207
231
208
	# Specific workarounds for too-few-registers arch...
232
	# Specific workarounds for too-few-registers arch...
209
	if [[ $(tc-arch) == "x86" ]]; then
233
	if [[ $(tc-arch) == "x86" ]]; then
Lines 220-234 src_configure() { Link Here
220
		fi
244
		fi
221
	fi
245
	fi
222
246
223
	cd "${S}"
247
	myconf+="
224
	./configure \
248
		--prefix=/usr
225
		--prefix=/usr \
249
		--libdir=/usr/$(get_libdir)
226
		--libdir=/usr/$(get_libdir) \
250
		--shlibdir=/usr/$(get_libdir)
227
		--shlibdir=/usr/$(get_libdir) \
251
		--mandir=/usr/share/man
228
		--mandir=/usr/share/man \
252
		--enable-shared
229
		--enable-static --enable-shared \
253
		--cc=$(tc-getCC)
230
		--cc="$(tc-getCC)" \
254
		"
231
		${myconf} || die "configure failed"
255
	./configure ${myconf} || die "configure failed"
232
}
256
}
233
257
234
src_compile() {
258
src_compile() {
Lines 237-243 src_compile() { Link Here
237
}
261
}
238
262
239
src_install() {
263
src_install() {
240
	emake DESTDIR="${D}" install install-man || die "Install Failed"
264
	use tools && Tman+="install-man" || Tman=""
265
	emake DESTDIR="${D}" install ${Tman} || die "emake install failed"
266
267
	# until fixed upstream
268
	if use tools && { use !encode || use !x264; } ; then
269
		rm -f "${D}"/usr/share/ffmpeg/libx264*.ffpreset
270
		rmdir "${D}"/usr/share/ffmpeg
271
	fi
241
272
242
	dodoc Changelog README INSTALL
273
	dodoc Changelog README INSTALL
243
	dodoc doc/*
274
	dodoc doc/*
(-)a/media-video/ffmpeg/metadata.xml (-27 / +27 lines)
Lines 1-30 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
2
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3
<pkgmetadata>
3
<pkgmetadata>
4
  <herd>video</herd>
4
	<herd>video</herd>
5
  <maintainer>
5
	<maintainer>
6
    <email>media-video@gentoo.org</email>
6
		<email>media-video@gentoo.org</email>
7
  </maintainer>
7
	</maintainer>
8
  <use>
8
	<use>
9
    <flag name="3dnowext">
9
		<flag name="3dnowext">
10
      Enable manually-optimised routines using the AMD 3DNow!Ex SIMD
10
		Enable manually-optimised routines using the AMD 3DNow!Ex SIMD
11
      instruction set, present in modern AMD CPUs.  (Check for
11
		instruction set, present in modern AMD CPUs.  (Check for
12
      3dnowext in /proc/cpuinfo to know whether your CPU supports it).
12
		3dnowext in /proc/cpuinfo to know whether your CPU supports it).
13
    </flag>
13
		</flag>
14
    <flag name="amr">Enables Adaptive Multi-Rate Audio support</flag>
14
		<flag name="amr">Enables Adaptive Multi-Rate Audio support</flag>
15
    <flag name="cpudetection">Enables runtime CPU detection (useful for bindist, compatibility on other CPUs)</flag>
15
		<flag name="cpudetection">Enables runtime CPU detection (useful for bindist, compatibility on other CPUs)</flag>
16
    <flag name="dirac">Enable Dirac video support (an advanced royalty-free video compression format) via the reference library: dirac.</flag>
16
		<flag name="dirac">Enable Dirac video support (an advanced royalty-free video compression format) via the reference library: dirac.</flag>
17
	<flag name="faac">Use external faac library for AAC encoding</flag>
17
		<flag name="faac">Use external faac library for AAC encoding</flag>
18
	<flag name="faad">Use external faad library for AAC decoding (instead of internal libavcodec support)</flag>
18
		<flag name="faad">Use external faad library for AAC decoding (instead of internal libavcodec support)</flag>
19
    <flag name="hardcoded-tables">Use pre-calculated tables rather than calculating them on the fly.</flag>
19
		<flag name="hardcoded-tables">Use pre-calculated tables rather than calculating them on the fly.</flag>
20
    <flag name="mmxext">Enables mmx2 support</flag>
20
		<flag name="mmxext">Enables mmx2 support</flag>
21
    <flag name="network">Enables network streaming support</flag>
21
		<flag name="network">Enables network streaming support</flag>
22
    <flag name="pic">Force shared libraries to be built as PIC (this is slower)</flag>
22
		<flag name="pic">Force shared libraries to be built as PIC (this is slower)</flag>
23
    <flag name="rtmp">Enable Real Time Messaging Protocol using librtmp</flag>
23
		<flag name="rtmp">Enable Real Time Messaging Protocol using librtmp</flag>
24
    <flag name="schroedinger">Enable Dirac video support (an advanced royalty-free video compression format) via libschroedinger (high-speed implementation in C of the Dirac codec).</flag>
24
		<flag name="schroedinger">Enable Dirac video support (an advanced royalty-free video compression format) via libschroedinger (high-speed implementation in C of the Dirac codec).</flag>
25
    <flag name="ssse3">faster floating point optimization for SSSE3 capable chips (Intel Core 2 and later chips)</flag>
25
		<flag name="ssse3">faster floating point optimization for SSSE3 capable chips (Intel Core 2 and later chips)</flag>
26
	<flag name="vaapi">Enables VAAPI (Video Acceleration API) for hardware decoding</flag>
26
		<flag name="tools">Enable tools (ffmpeg, ffplay, ffprobe, ffserver)</flag>
27
	<flag name="vdpau">Enables VDPAU decoders (requires nVidia video cards to offload CPU processing to video card</flag>
27
		<flag name="vaapi">Enables VAAPI (Video Acceleration API) for hardware decoding</flag>
28
	<flag name="vpx">Enables vp8 codec support using libvpx</flag>
28
		<flag name="vdpau">Enables VDPAU decoders (requires nVidia video cards to offload CPU processing to video card</flag>
29
  </use>
29
		<flag name="vpx">Enables vp8 codec support using libvpx</flag>
30
	</use>
30
</pkgmetadata>
31
</pkgmetadata>
31
- 

Return to bug 324453