diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-02-07 16:46:49 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-02-08 09:36:26 -0500 |
commit | d09b1805aa2ea6350c9bc96c5393fc5bd043ae37 (patch) | |
tree | c001adda65e9014e1f8c4cbb07bb992597453c16 /gnu/packages/jami.scm | |
parent | 57c8ba22cf2fbab742730b3df7531f161af08fcb (diff) | |
download | guix-d09b1805aa2ea6350c9bc96c5393fc5bd043ae37.tar guix-d09b1805aa2ea6350c9bc96c5393fc5bd043ae37.tar.gz |
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.
Diffstat (limited to 'gnu/packages/jami.scm')
-rw-r--r-- | gnu/packages/jami.scm | 42 |
1 files changed, 12 insertions, 30 deletions
diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm index e425a6547a..a98e64bb86 100644 --- a/gnu/packages/jami.scm +++ b/gnu/packages/jami.scm @@ -147,7 +147,9 @@ ;; 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 ;; 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 '("--disable-everything" "--enable-zlib" @@ -339,34 +341,12 @@ "--enable-encoder=mjpeg_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 (system=? s) - (string-prefix? s (%current-system))) - - `(,@%ffmpeg-default-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) - '()))) + "Compose the configure flag lists of ffmpeg-jami." + #~(append '#$%ffmpeg-default-configure-flags + (if (string-contains #$(%current-system) "linux") + '#$%ffmpeg-linux-configure-flags + '()))) (define-public ffmpeg-jami (package @@ -384,8 +364,10 @@ "0yq0jcdc4qm5znrzylj3dsicrkk2n3n8bv28vr0a506fb7iglbpg")))) (arguments (substitute-keyword-arguments (package-arguments ffmpeg-5) - ((#:configure-flags '()) - (ffmpeg-compose-configure-flags)) + ((#:configure-flags _ '()) + #~(cons* "--disable-static" + "--enable-shared" + #$(ffmpeg-compose-configure-flags))) ((#:phases phases) #~(modify-phases #$phases (add-after 'unpack 'apply-patches |