gnu: ffmpeg: Use 'modify-phases'.

* gnu/packages/video.scm (ffmpeg)[arguments]: Use 'modify-phases'
  instead of 'alist-cons-after' et al.
This commit is contained in:
Ludovic Courtès 2015-04-16 10:35:33 +02:00
parent e1600f6996
commit f2feb0ce7c
1 changed files with 54 additions and 54 deletions

View File

@ -323,7 +323,8 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
#:imported-modules (,@%gnu-build-system-modules #:imported-modules (,@%gnu-build-system-modules
(guix build rpath)) (guix build rpath))
#:phases #:phases
(alist-replace (modify-phases %standard-phases
(replace
'configure 'configure
;; configure does not work followed by "SHELL=..." and ;; configure does not work followed by "SHELL=..." and
;; "CONFIG_SHELL=..."; set environment variables instead ;; "CONFIG_SHELL=..."; set environment variables instead
@ -333,48 +334,48 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
(("#! /bin/sh") (string-append "#!" (which "bash")))) (("#! /bin/sh") (string-append "#!" (which "bash"))))
(setenv "SHELL" (which "bash")) (setenv "SHELL" (which "bash"))
(setenv "CONFIG_SHELL" (which "bash")) (setenv "CONFIG_SHELL" (which "bash"))
;; FIXME: only needed for ffmpeg-2.2.13, but easier to add ;; FIXME: only needed for ffmpeg-2.2.13, but easier to add
;; globally; drop as soon as ffmpeg-2.2.13 is dropped ;; globally; drop as soon as ffmpeg-2.2.13 is dropped
(setenv "LDFLAGS" "-ldl") (setenv "LDFLAGS" "-ldl")
;; possible additional inputs: ;; possible additional inputs:
;; --enable-avisynth enable reading of AviSynth script files [no] ;; --enable-avisynth enable reading of AviSynth script files [no]
;; --enable-frei0r enable frei0r video filtering ;; --enable-frei0r enable frei0r video filtering
;; --enable-libaacplus enable AAC+ encoding via libaacplus [no] ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
;; --enable-libcelt enable CELT decoding via libcelt [no] ;; --enable-libcelt enable CELT decoding via libcelt [no]
;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
;; and libraw1394 [no] ;; and libraw1394 [no]
;; --enable-libfaac enable AAC encoding via libfaac [no] ;; --enable-libfaac enable AAC encoding via libfaac [no]
;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no] ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
;; --enable-libflite enable flite (voice synthesis) support via libflite [no] ;; --enable-libflite enable flite (voice synthesis) support via libflite [no]
;; --enable-libgme enable Game Music Emu via libgme [no] ;; --enable-libgme enable Game Music Emu via libgme [no]
;; --enable-libgsm enable GSM de/encoding via libgsm [no] ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
;; --enable-libiec61883 enable iec61883 via libiec61883 [no] ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
;; --enable-libilbc enable iLBC de/encoding via libilbc [no] ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
;; --enable-libmodplug enable ModPlug via libmodplug [no] ;; --enable-libmodplug enable ModPlug via libmodplug [no]
;; --enable-libnut enable NUT (de)muxing via libnut, ;; --enable-libnut enable NUT (de)muxing via libnut,
;; native (de)muxer exists [no] ;; native (de)muxer exists [no]
;; --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no] ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
;; --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no] ;; --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
;; --enable-libopencv enable video filtering via libopencv [no] ;; --enable-libopencv enable video filtering via libopencv [no]
;; --enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no] ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no]
;; --enable-librtmp enable RTMP[E] support via librtmp [no] ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
;; --enable-libschroedinger enable Dirac de/encoding via libschroedinger [no] ;; --enable-libschroedinger enable Dirac de/encoding via libschroedinger [no]
;; --enable-libshine enable fixed-point MP3 encoding via libshine [no] ;; --enable-libshine enable fixed-point MP3 encoding via libshine [no]
;; --enable-libssh enable SFTP protocol via libssh [no] ;; --enable-libssh enable SFTP protocol via libssh [no]
;; (libssh2 does not work) ;; (libssh2 does not work)
;; --enable-libstagefright-h264 enable H.264 decoding via libstagefright [no] ;; --enable-libstagefright-h264 enable H.264 decoding via libstagefright [no]
;; --enable-libutvideo enable Ut Video encoding and decoding via libutvideo [no] ;; --enable-libutvideo enable Ut Video encoding and decoding via libutvideo [no]
;; --enable-libv4l2 enable libv4l2/v4l-utils [no] ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
;; --enable-libvidstab enable video stabilization using vid.stab [no] ;; --enable-libvidstab enable video stabilization using vid.stab [no]
;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no] ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
;; --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no] ;; --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no]
;; --enable-libwavpack enable wavpack encoding via libwavpack [no] ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
;; --enable-libx264 enable H.264 encoding via x264 [no] ;; --enable-libx264 enable H.264 encoding via x264 [no]
;; --enable-libxavs enable AVS encoding via xavs [no] ;; --enable-libxavs enable AVS encoding via xavs [no]
;; --enable-libzmq enable message passing via libzmq [no] ;; --enable-libzmq enable message passing via libzmq [no]
;; --enable-libzvbi enable teletext support via libzvbi [no] ;; --enable-libzvbi enable teletext support via libzvbi [no]
;; --enable-opencl enable OpenCL code ;; --enable-opencl enable OpenCL code
;; --enable-x11grab enable X11 grabbing [no] ;; --enable-x11grab enable X11 grabbing [no]
(zero? (system* (zero? (system*
"./configure" "./configure"
(string-append "--prefix=" out) (string-append "--prefix=" out)
@ -409,18 +410,17 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
"--disable-mips32r2" "--disable-mips32r2"
"--disable-mipsdspr1" "--disable-mipsdspr1"
"--disable-mipsdspr2" "--disable-mipsdspr2"
"--disable-mipsfpu")))) "--disable-mipsfpu")))))
(alist-cons-after (add-after
'strip 'add-lib-to-runpath 'strip 'add-lib-to-runpath
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(lib (string-append out "/lib"))) (lib (string-append out "/lib")))
;; Add LIB to the RUNPATH of all the executables and libraries. ;; Add LIB to the RUNPATH of all the executables and libraries.
(with-directory-excursion out (with-directory-excursion out
(for-each (cut augment-rpath <> lib) (for-each (cut augment-rpath <> lib)
(append (find-files "bin" ".*") (append (find-files "bin" ".*")
(find-files "lib" "\\.so\\..*\\.")))))) (find-files "lib" "\\.so\\..*\\."))))))))))
%standard-phases))))
(home-page "http://www.ffmpeg.org/") (home-page "http://www.ffmpeg.org/")
(synopsis "Audio and video framework") (synopsis "Audio and video framework")
(description "FFmpeg is a complete, cross-platform solution to record, (description "FFmpeg is a complete, cross-platform solution to record,