summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2023-07-16 02:00:10 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2023-07-16 02:00:08 +0200
commit806907ff83a19cd96ae8eeb47c07fbc8c9e2f905 (patch)
tree8381d6708a1166ee79d36266b1e2f2bbacccad9c /gnu/packages
parent96727475fb295c0b2b0c68bf6a05f9ff5829f86c (diff)
downloadguix-806907ff83a19cd96ae8eeb47c07fbc8c9e2f905.tar.gz
gnu: mplayer: Use #:configure-flags.
* gnu/packages/video.scm (mplayer)[arguments]: Move configure flags
to their proper keyword, and honour them in the 'configure phase.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/video.scm52
1 files changed, 27 insertions, 25 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index eb60e71d7b..71d16dad74 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2112,40 +2112,42 @@ streaming protocols.")
     (arguments
      (list
       #:tests? #f                       ; no test target
+      #:configure-flags
+      #~(list (string-append "--prefix=" #$output)
+              "--disable-ffmpeg_a"      ; disables bundled ffmpeg
+              "--disable-iwmmxt"
+              (string-append "--extra-cflags=-I"
+                             #$(this-package-input "libx11")
+                             "/include") ; to detect libx11
+
+              ;; Enable runtime cpu detection where supported,
+              ;; and choose a suitable target.
+              #$@(match (or (%current-target-system)
+                            (%current-system))
+                   ("x86_64-linux"
+                    '("--enable-runtime-cpudetection"
+                      "--target=x86_64-linux"))
+                   ("i686-linux"
+                    '("--enable-runtime-cpudetection"
+                      "--target=i686-linux"))
+                   ("mips64el-linux"
+                    '("--target=mips3-linux"))
+                   (_ (list (string-append
+                             "--target="
+                             (or (%current-target-system)
+                                 (nix-system->gnu-triplet
+                                  (%current-system))))))))
       #:phases
       #~(modify-phases %standard-phases
           (replace 'configure
             ;; configure does not work followed by "SHELL=..." and
             ;; "CONFIG_SHELL=..."; set environment variables instead
-            (lambda* (#:key inputs outputs #:allow-other-keys)
+            (lambda* (#:key (configure-flags '()) #:allow-other-keys)
               (substitute* "configure"
                 (("#! /bin/sh") (string-append "#!" (which "sh"))))
               (setenv "SHELL" (which "bash"))
               (setenv "CONFIG_SHELL" (which "bash"))
-              (invoke "./configure"
-                      (string-append "--extra-cflags=-I"
-                                     #$(this-package-input "libx11")
-                                     "/include") ; to detect libx11
-                      "--disable-ffmpeg_a"       ; disables bundled ffmpeg
-                      (string-append "--prefix=" #$output)
-                      ;; Enable runtime cpu detection where supported,
-                      ;; and choose a suitable target.
-                      #$@(match (or (%current-target-system)
-                                    (%current-system))
-                           ("x86_64-linux"
-                            '("--enable-runtime-cpudetection"
-                              "--target=x86_64-linux"))
-                           ("i686-linux"
-                            '("--enable-runtime-cpudetection"
-                              "--target=i686-linux"))
-                           ("mips64el-linux"
-                            '("--target=mips3-linux"))
-                           (_ (list (string-append
-                                     "--target="
-                                     (or (%current-target-system)
-                                         (nix-system->gnu-triplet
-                                          (%current-system)))))))
-                      "--disable-iwmmxt"))))))
+              (apply invoke "./configure" configure-flags))))))
     ;; FIXME: Add additional inputs once available.
     (native-inputs
      (list pkg-config yasm))