Archived
1
0
Fork 0

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.
This commit is contained in:
Tobias Geerinckx-Rice 2023-07-16 02:00:10 +02:00
parent 96727475fb
commit 806907ff83
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -2112,22 +2112,14 @@ streaming protocols.")
(arguments (arguments
(list (list
#:tests? #f ; no test target #:tests? #f ; no test target
#:phases #:configure-flags
#~(modify-phases %standard-phases #~(list (string-append "--prefix=" #$output)
(replace 'configure "--disable-ffmpeg_a" ; disables bundled ffmpeg
;; configure does not work followed by "SHELL=..." and "--disable-iwmmxt"
;; "CONFIG_SHELL=..."; set environment variables instead
(lambda* (#:key inputs outputs #: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" (string-append "--extra-cflags=-I"
#$(this-package-input "libx11") #$(this-package-input "libx11")
"/include") ; to detect libx11 "/include") ; to detect libx11
"--disable-ffmpeg_a" ; disables bundled ffmpeg
(string-append "--prefix=" #$output)
;; Enable runtime cpu detection where supported, ;; Enable runtime cpu detection where supported,
;; and choose a suitable target. ;; and choose a suitable target.
#$@(match (or (%current-target-system) #$@(match (or (%current-target-system)
@ -2144,8 +2136,18 @@ streaming protocols.")
"--target=" "--target="
(or (%current-target-system) (or (%current-target-system)
(nix-system->gnu-triplet (nix-system->gnu-triplet
(%current-system))))))) (%current-system))))))))
"--disable-iwmmxt")))))) #:phases
#~(modify-phases %standard-phases
(replace 'configure
;; configure does not work followed by "SHELL=..." and
;; "CONFIG_SHELL=..."; set environment variables instead
(lambda* (#:key (configure-flags '()) #:allow-other-keys)
(substitute* "configure"
(("#! /bin/sh") (string-append "#!" (which "sh"))))
(setenv "SHELL" (which "bash"))
(setenv "CONFIG_SHELL" (which "bash"))
(apply invoke "./configure" configure-flags))))))
;; FIXME: Add additional inputs once available. ;; FIXME: Add additional inputs once available.
(native-inputs (native-inputs
(list pkg-config yasm)) (list pkg-config yasm))