gnu: mplayer: Enable runtime cpu detection.

* gnu/packages/video.scm (mplayer): Pass --enable-runtime-cpudetection
  to configure on supported platforms, as well as a suitable --target.
This commit is contained in:
Mark H Weaver 2014-08-03 23:27:24 -04:00
parent 684a2f5974
commit fe138965af

View file

@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014 David Thompson <davet@gnu.org> ;;; Copyright © 2014 David Thompson <davet@gnu.org>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -18,6 +19,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages video) (define-module (gnu packages video)
#:use-module (ice-9 match)
#:use-module ((guix licenses) #:use-module ((guix licenses)
#:select (gpl2 gpl2+ bsd-3 public-domain)) #:select (gpl2 gpl2+ bsd-3 public-domain))
#:use-module (guix packages) #:use-module (guix packages)
@ -342,20 +344,18 @@ (define-public mplayer
libx11 "/include") ; to detect libx11 libx11 "/include") ; to detect libx11
"--disable-tremor-internal" ; forces external libvorbis "--disable-tremor-internal" ; forces external libvorbis
(string-append "--prefix=" out) (string-append "--prefix=" out)
;; drop special machine instructions not supported ;; Enable runtime cpu detection where supported,
;; on all instances of the target ;; and choose a suitable target.
,@(if (string-prefix? "x86_64" ,@(match (or (%current-target-system)
(or (%current-target-system) (%current-system))
(%current-system))) ("x86_64-linux"
'() '("--enable-runtime-cpudetection"
'("--disable-3dnow" "--target=x86_64-linux"))
"--disable-3dnowext" ("i686-linux"
"--disable-mmx" '("--enable-runtime-cpudetection"
"--disable-mmxext" "--target=i686-linux"))
"--disable-sse" ("mips64el-linux"
"--disable-sse2")) '("--target=mips3-linux")))
"--disable-ssse3"
"--disable-altivec"
"--disable-armv5te" "--disable-armv5te"
"--disable-armv6" "--disable-armv6"
"--disable-armv6t2" "--disable-armv6t2"