gnu: ffmpeg-jami: Really honor custom configuration flags.
Because the substitute-keyword-arguments pattern was (#:configure-flags '()) rather than (#:configure-flags _ '()), the replacement was not triggered. * gnu/packages/jami.scm (%ffmpeg-default-configure-flags): Comment that the fnnvcodec-related options are left out. (%ffmpeg-linux-x86-configure-flags): Delete variable. (ffmpeg-compose-configure-flags): Streamline and use gexps. (ffmpeg-jami) [arguments]: Fix configure-flags pattern, and adjust to use gexps. Add the "--disable-static" and "--enable-shared" flags to produce shared objects with the correct RUNPATH.
This commit is contained in:
parent
57c8ba22cf
commit
d09b1805aa
1 changed files with 12 additions and 30 deletions
|
@ -147,7 +147,9 @@
|
||||||
;; from the jami/daemon/contrib/src/ffmpeg/rules.mak file. We try to keep it
|
;; from the jami/daemon/contrib/src/ffmpeg/rules.mak file. We try to keep it
|
||||||
;; as close to the official Jami package as possible, to provide all the
|
;; as close to the official Jami package as possible, to provide all the
|
||||||
;; codecs and extra features that are expected (see:
|
;; codecs and extra features that are expected (see:
|
||||||
;; https://review.jami.net/plugins/gitiles/jami-daemon/+/refs/heads/master/contrib/src/ffmpeg/rules.mak)
|
;; https://review.jami.net/plugins/gitiles/jami-daemon/+/refs/heads/master/contrib/src/ffmpeg/rules.mak).
|
||||||
|
;; An exception are the ffnvcodec-related switches, which is not packaged in
|
||||||
|
;; Guix and would not work with Mesa.
|
||||||
(define %ffmpeg-default-configure-flags
|
(define %ffmpeg-default-configure-flags
|
||||||
'("--disable-everything"
|
'("--disable-everything"
|
||||||
"--enable-zlib"
|
"--enable-zlib"
|
||||||
|
@ -339,34 +341,12 @@
|
||||||
"--enable-encoder=mjpeg_vaapi"
|
"--enable-encoder=mjpeg_vaapi"
|
||||||
"--enable-encoder=hevc_vaapi"))
|
"--enable-encoder=hevc_vaapi"))
|
||||||
|
|
||||||
;; ffnvcodec is not supported on ARM; enable it only for the i386 and x86_64
|
|
||||||
;; architectures.
|
|
||||||
(define %ffmpeg-linux-x86-configure-flags
|
|
||||||
'("--arch=x86"
|
|
||||||
"--enable-cuvid"
|
|
||||||
"--enable-ffnvcodec"
|
|
||||||
"--enable-nvdec"
|
|
||||||
"--enable-nvenc"
|
|
||||||
"--enable-hwaccel=h264_nvdec"
|
|
||||||
"--enable-hwaccel=hevc_nvdec"
|
|
||||||
"--enable-hwaccel=vp8_nvdec"
|
|
||||||
"--enable-hwaccel=mjpeg_nvdec"
|
|
||||||
"--enable-encoder=h264_nvenc"
|
|
||||||
"--enable-encoder=hevc_nvenc"))
|
|
||||||
|
|
||||||
;; This procedure composes the configure flags list for ffmpeg-jami.
|
|
||||||
(define (ffmpeg-compose-configure-flags)
|
(define (ffmpeg-compose-configure-flags)
|
||||||
(define (system=? s)
|
"Compose the configure flag lists of ffmpeg-jami."
|
||||||
(string-prefix? s (%current-system)))
|
#~(append '#$%ffmpeg-default-configure-flags
|
||||||
|
(if (string-contains #$(%current-system) "linux")
|
||||||
`(,@%ffmpeg-default-configure-flags
|
'#$%ffmpeg-linux-configure-flags
|
||||||
,@(if (string-contains (%current-system) "linux")
|
'())))
|
||||||
(if (or (system=? "i686")
|
|
||||||
(system=? "x86_64"))
|
|
||||||
(append %ffmpeg-linux-configure-flags
|
|
||||||
%ffmpeg-linux-x86-configure-flags)
|
|
||||||
%ffmpeg-linux-configure-flags)
|
|
||||||
'())))
|
|
||||||
|
|
||||||
(define-public ffmpeg-jami
|
(define-public ffmpeg-jami
|
||||||
(package
|
(package
|
||||||
|
@ -384,8 +364,10 @@
|
||||||
"0yq0jcdc4qm5znrzylj3dsicrkk2n3n8bv28vr0a506fb7iglbpg"))))
|
"0yq0jcdc4qm5znrzylj3dsicrkk2n3n8bv28vr0a506fb7iglbpg"))))
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments ffmpeg-5)
|
(substitute-keyword-arguments (package-arguments ffmpeg-5)
|
||||||
((#:configure-flags '())
|
((#:configure-flags _ '())
|
||||||
(ffmpeg-compose-configure-flags))
|
#~(cons* "--disable-static"
|
||||||
|
"--enable-shared"
|
||||||
|
#$(ffmpeg-compose-configure-flags)))
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
#~(modify-phases #$phases
|
#~(modify-phases #$phases
|
||||||
(add-after 'unpack 'apply-patches
|
(add-after 'unpack 'apply-patches
|
||||||
|
|
Reference in a new issue