summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2011-07-06 21:49:06 +0000
committerAlexis Ballier <aballier@gentoo.org>2011-07-06 21:49:06 +0000
commit65e0e7b011da97eaa9592b98b24fbd9eee960563 (patch)
tree41d354da214d4fe378df2178ff535eec7f4ff833 /media-video
parentInitial commit (diff)
downloadgentoo-2-65e0e7b011da97eaa9592b98b24fbd9eee960563.tar.gz
gentoo-2-65e0e7b011da97eaa9592b98b24fbd9eee960563.tar.bz2
gentoo-2-65e0e7b011da97eaa9592b98b24fbd9eee960563.zip
Factorise a bit the cpu features handling code and keep the declarations in one place, a string that will be used to fill IUSE and convert them to ./configure arguments. Do not default-enable them anymore.
(Portage version: 2.2.0_alpha43/cvs/Linux x86_64)
Diffstat (limited to 'media-video')
-rw-r--r--media-video/ffmpeg/ChangeLog7
-rw-r--r--media-video/ffmpeg/ffmpeg-9999.ebuild26
2 files changed, 21 insertions, 12 deletions
diff --git a/media-video/ffmpeg/ChangeLog b/media-video/ffmpeg/ChangeLog
index 009d7e3834c6..74b05c71cc71 100644
--- a/media-video/ffmpeg/ChangeLog
+++ b/media-video/ffmpeg/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-video/ffmpeg
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.429 2011/07/06 21:08:56 halcy0n Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.430 2011/07/06 21:49:06 aballier Exp $
+
+ 06 Jul 2011; Alexis Ballier <aballier@gentoo.org> ffmpeg-9999.ebuild:
+ Factorise a bit the cpu features handling code and keep the declarations in
+ one place, a string that will be used to fill IUSE and convert them to
+ ./configure arguments. Do not default-enable them anymore.
06 Jul 2011; Mark Loeser <halcy0n@gentoo.org> ffmpeg-0.7_rc1.ebuild:
Mark stable for ppc64; bug 365273
diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild b/media-video/ffmpeg/ffmpeg-9999.ebuild
index 0fa71a65556b..8af6a3402698 100644
--- a/media-video/ffmpeg/ffmpeg-9999.ebuild
+++ b/media-video/ffmpeg/ffmpeg-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-9999.ebuild,v 1.49 2011/06/29 15:07:07 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-9999.ebuild,v 1.50 2011/07/06 21:49:06 aballier Exp $
EAPI="4"
@@ -29,13 +29,20 @@ if [ "${PV#9999}" = "${PV}" ] ; then
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
fi
IUSE="
- +3dnow +3dnowext aac alsa altivec amr avx bindist +bzip2 celt cpudetection
- debug dirac doc +encode faac frei0r gsm +hardcoded-tables ieee1394 jack
- jpeg2k +mmx +mmxext mp3 network openal oss pic qt-faststart rtmp
- schroedinger sdl speex +ssse3 static-libs test theora threads truetype
- v4l v4l2 vaapi vdpau vorbis vpx X x264 xvid +zlib
+ aac alsa amr bindist +bzip2 celt cpudetection debug dirac doc +encode faac
+ frei0r gsm +hardcoded-tables ieee1394 jack jpeg2k mp3 network openal oss pic
+ qt-faststart rtmp schroedinger sdl speex static-libs test theora threads
+ truetype v4l v4l2 vaapi vdpau vorbis vpx X x264 xvid +zlib
"
+# String for CPU features in the useflag[:configure_option] form
+# if :configure_option isn't set, it will use 'useflag' as configure option
+CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext altivec avx mmx mmxext:mmx2 ssse3"
+
+for i in ${CPU_FEATURES}; do
+ IUSE="${IUSE} ${i%:*}"
+done
+
RDEPEND="
alsa? ( media-libs/alsa-lib )
amr? ( media-libs/opencore-amr )
@@ -148,12 +155,9 @@ src_configure() {
use jpeg2k && myconf="${myconf} --enable-libopenjpeg"
# CPU features
- for i in mmx ssse3 altivec avx ; do
- use ${i} || myconf="${myconf} --disable-${i}"
+ for i in ${CPU_FEATURES}; do
+ use ${i%:*} || myconf="${myconf} --disable-${i#*:}"
done
- use mmxext || myconf="${myconf} --disable-mmx2"
- use 3dnow || myconf="${myconf} --disable-amd3dnow"
- use 3dnowext || myconf="${myconf} --disable-amd3dnowext"
# disable mmx accelerated code if PIC is required
# as the provided asm decidedly is not PIC for x86.
if use pic && use x86 ; then