gnu: bedops: Update to 2.4.14.
[jackhill/guix/guix.git] / gnu / packages / video.scm
index 661ef91..b923e47 100644 (file)
@@ -97,7 +97,7 @@
     (arguments
      '(#:phases
        (modify-phases %standard-phases
-         (replace configure
+         (replace 'configure
                   (lambda* (#:key inputs outputs #:allow-other-keys)
                     ;; This old `configure' script doesn't support
                     ;; variables passed as arguments.
@@ -264,6 +264,27 @@ SMPTE 314M.")
        ("libxext" ,libxext)
        ("libxfixes" ,libxfixes)
        ("mesa" ,mesa)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before
+          'build 'fix-dlopen-paths
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out")))
+              (substitute* "va/drm/va_drm_auth_x11.c"
+                (("\"libva-x11\\.so\\.%d\"")
+                 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
+       ;; Most drivers are in mesa's $prefix/lib/dri, so use that.  (Can be
+       ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
+       #:configure-flags
+       (list (string-append "--with-drivers-path="
+                            (assoc-ref %build-inputs "mesa") "/lib/dri"))
+       ;; However, we can't write to mesa's store directory, so override the
+       ;; following make variable to install the dummy driver to libva's
+       ;; $prefix/lib/dri directory.
+       #:make-flags
+       (list (string-append "dummy_drv_video_ladir="
+                            (assoc-ref %outputs "out") "/lib/dri"))))
     (home-page "http://www.freedesktop.org/wiki/Software/vaapi/")
     (synopsis "Video acceleration library")
     (description "The main motivation for VA-API (Video Acceleration API) is
@@ -275,14 +296,14 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
 (define-public ffmpeg
   (package
     (name "ffmpeg")
-    (version "2.6")
+    (version "2.7")
     (source (origin
              (method url-fetch)
              (uri (string-append "http://www.ffmpeg.org/releases/ffmpeg-"
                                  version ".tar.bz2"))
              (sha256
               (base32
-               "14a7zp8pa1rvw6nr9l2rf57xr004n5kwkhn5lglybjnn1p68xhr3"))))
+               "0jl43b63b20db3yia5xxp0hh8zwdbirk5k9p1d7416nq1b5ckfx8"))))
     (build-system gnu-build-system)
     (inputs
      `(("fontconfig" ,fontconfig)
@@ -299,7 +320,6 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
        ("libvorbis" ,libvorbis)
        ("libvpx" ,libvpx)
        ("openal" ,openal)
-       ("patchelf" ,patchelf)
        ("pulseaudio" ,pulseaudio)
        ("soxr" ,soxr)
        ("speex" ,speex)
@@ -311,19 +331,15 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
        ("bzip2" ,bzip2)
        ("perl" ,perl)
        ("pkg-config" ,pkg-config)
+       ("texinfo" ,texinfo)
        ("python" ,python-2) ; scripts use interpreter python2
        ("speex" ,speex)
        ("yasm" ,yasm)))
     (arguments
      `(#:test-target "fate"
-       #:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (guix build rpath)
-                  (srfi srfi-26))
-       #:imported-modules (,@%gnu-build-system-modules
-                           (guix build rpath))
        #:phases
-         (alist-replace
+       (modify-phases %standard-phases
+         (replace
           'configure
           ;; configure does not work followed by "SHELL=..." and
           ;; "CONFIG_SHELL=..."; set environment variables instead
@@ -333,51 +349,51 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
                 (("#! /bin/sh") (string-append "#!" (which "bash"))))
               (setenv "SHELL" (which "bash"))
               (setenv "CONFIG_SHELL" (which "bash"))
-               ;; FIXME: only needed for ffmpeg-2.2.13, but easier to add
-               ;; globally; drop as soon as ffmpeg-2.2.13 is dropped
-              (setenv "LDFLAGS" "-ldl")
-;; possible additional inputs:
-;;   --enable-avisynth        enable reading of AviSynth script files [no]
-;;   --enable-frei0r          enable frei0r video filtering
-;;   --enable-libaacplus      enable AAC+ encoding via libaacplus [no]
-;;   --enable-libcelt         enable CELT decoding via libcelt [no]
-;;   --enable-libdc1394       enable IIDC-1394 grabbing using libdc1394
-;;                            and libraw1394 [no]
-;;   --enable-libfaac         enable AAC encoding via libfaac [no]
-;;   --enable-libfdk-aac      enable AAC de/encoding via libfdk-aac [no]
-;;   --enable-libflite        enable flite (voice synthesis) support via libflite [no]
-;;   --enable-libgme          enable Game Music Emu via libgme [no]
-;;   --enable-libgsm          enable GSM de/encoding via libgsm [no]
-;;   --enable-libiec61883     enable iec61883 via libiec61883 [no]
-;;   --enable-libilbc         enable iLBC de/encoding via libilbc [no]
-;;   --enable-libmodplug      enable ModPlug via libmodplug [no]
-;;   --enable-libnut          enable NUT (de)muxing via libnut,
-;;                            native (de)muxer exists [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-libopencv       enable video filtering via libopencv [no]
-;;   --enable-libopenjpeg     enable JPEG 2000 de/encoding via OpenJPEG [no]
-;;   --enable-librtmp         enable RTMP[E] support via librtmp [no]
-;;   --enable-libschroedinger enable Dirac de/encoding via libschroedinger [no]
-;;   --enable-libshine        enable fixed-point MP3 encoding via libshine [no]
-;;   --enable-libssh          enable SFTP protocol via libssh [no]
-;;                            (libssh2 does not work)
-;;   --enable-libstagefright-h264  enable H.264 decoding via libstagefright [no]
-;;   --enable-libutvideo      enable Ut Video encoding and decoding via libutvideo [no]
-;;   --enable-libv4l2         enable libv4l2/v4l-utils [no]
-;;   --enable-libvidstab      enable video stabilization using vid.stab [no]
-;;   --enable-libvo-aacenc    enable AAC encoding via libvo-aacenc [no]
-;;   --enable-libvo-amrwbenc  enable AMR-WB encoding via libvo-amrwbenc [no]
-;;   --enable-libwavpack      enable wavpack encoding via libwavpack [no]
-;;   --enable-libx264         enable H.264 encoding via x264 [no]
-;;   --enable-libxavs         enable AVS encoding via xavs [no]
-;;   --enable-libzmq          enable message passing via libzmq [no]
-;;   --enable-libzvbi         enable teletext support via libzvbi [no]
-;;   --enable-opencl          enable OpenCL code
-;;   --enable-x11grab         enable X11 grabbing [no]
+              ;; possible additional inputs:
+              ;;   --enable-avisynth        enable reading of AviSynth script files [no]
+              ;;   --enable-frei0r          enable frei0r video filtering
+              ;;   --enable-libaacplus      enable AAC+ encoding via libaacplus [no]
+              ;;   --enable-libcelt         enable CELT decoding via libcelt [no]
+              ;;   --enable-libdc1394       enable IIDC-1394 grabbing using libdc1394
+              ;;                            and libraw1394 [no]
+              ;;   --enable-libfaac         enable AAC encoding via libfaac [no]
+              ;;   --enable-libfdk-aac      enable AAC de/encoding via libfdk-aac [no]
+              ;;   --enable-libflite        enable flite (voice synthesis) support via libflite [no]
+              ;;   --enable-libgme          enable Game Music Emu via libgme [no]
+              ;;   --enable-libgsm          enable GSM de/encoding via libgsm [no]
+              ;;   --enable-libiec61883     enable iec61883 via libiec61883 [no]
+              ;;   --enable-libilbc         enable iLBC de/encoding via libilbc [no]
+              ;;   --enable-libmodplug      enable ModPlug via libmodplug [no]
+              ;;   --enable-libnut          enable NUT (de)muxing via libnut,
+              ;;                            native (de)muxer exists [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-libopencv       enable video filtering via libopencv [no]
+              ;;   --enable-libopenjpeg     enable JPEG 2000 de/encoding via OpenJPEG [no]
+              ;;   --enable-librtmp         enable RTMP[E] support via librtmp [no]
+              ;;   --enable-libschroedinger enable Dirac de/encoding via libschroedinger [no]
+              ;;   --enable-libshine        enable fixed-point MP3 encoding via libshine [no]
+              ;;   --enable-libssh          enable SFTP protocol via libssh [no]
+              ;;                            (libssh2 does not work)
+              ;;   --enable-libstagefright-h264  enable H.264 decoding via libstagefright [no]
+              ;;   --enable-libutvideo      enable Ut Video encoding and decoding via libutvideo [no]
+              ;;   --enable-libv4l2         enable libv4l2/v4l-utils [no]
+              ;;   --enable-libvidstab      enable video stabilization using vid.stab [no]
+              ;;   --enable-libvo-aacenc    enable AAC encoding via libvo-aacenc [no]
+              ;;   --enable-libvo-amrwbenc  enable AMR-WB encoding via libvo-amrwbenc [no]
+              ;;   --enable-libwavpack      enable wavpack encoding via libwavpack [no]
+              ;;   --enable-libx264         enable H.264 encoding via x264 [no]
+              ;;   --enable-libxavs         enable AVS encoding via xavs [no]
+              ;;   --enable-libzmq          enable message passing via libzmq [no]
+              ;;   --enable-libzvbi         enable teletext support via libzvbi [no]
+              ;;   --enable-opencl          enable OpenCL code
+              ;;   --enable-x11grab         enable X11 grabbing [no]
               (zero? (system*
                       "./configure"
                       (string-append "--prefix=" out)
+                      ;; Add $libdir to the RUNPATH of all the binaries.
+                      (string-append "--extra-ldflags=-Wl,-rpath="
+                                     %output "/lib")
                       "--enable-avresample"
                       "--enable-gpl" ; enable optional gpl licensed parts
                       "--enable-shared"
@@ -409,18 +425,17 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
                       "--disable-mips32r2"
                       "--disable-mipsdspr1"
                       "--disable-mipsdspr2"
-                      "--disable-mipsfpu"))))
-       (alist-cons-after
-        'strip 'add-lib-to-runpath
-        (lambda* (#:key outputs #:allow-other-keys)
-          (let* ((out (assoc-ref outputs "out"))
-                 (lib (string-append out "/lib")))
-            ;; Add LIB to the RUNPATH of all the executables and libraries.
-            (with-directory-excursion out
-              (for-each (cut augment-rpath <> lib)
-                        (append (find-files "bin" ".*")
-                                (find-files "lib" "\\.so\\..*\\."))))))
-          %standard-phases))))
+                      "--disable-mipsfpu")))))
+         (add-before
+          'check 'set-ld-library-path
+          (lambda _
+            ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
+            ;; running tests.
+            (let* ((dso  (find-files "." "\\.so$"))
+                   (path (string-join (map dirname dso) ":")))
+              (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
+              (setenv "LD_LIBRARY_PATH" path)
+              #t))))))
     (home-page "http://www.ffmpeg.org/")
     (synopsis "Audio and video framework")
     (description "FFmpeg is a complete, cross-platform solution to record,
@@ -428,22 +443,10 @@ convert and stream audio and video.  It includes the libavcodec
 audio/video codec library.")
     (license license:gpl2+)))
 
-;; We need this older ffmpeg because vlc-2.1.5 doesn't work with ffmpeg-2.4.
-(define-public ffmpeg-2.2
-  (package (inherit ffmpeg)
-    (version "2.2.13")
-    (source (origin
-             (method url-fetch)
-             (uri (string-append "http://www.ffmpeg.org/releases/ffmpeg-"
-                                 version ".tar.bz2"))
-             (sha256
-              (base32
-               "1vva8ffwxi3rg44byy09qlbiqrrd1h4rmsl5b1mbmvzvwl1lq1l0"))))))
-
 (define-public vlc
   (package
     (name "vlc")
-    (version "2.1.5")
+    (version "2.2.0")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -451,7 +454,7 @@ audio/video codec library.")
                    version "/vlc-" version ".tar.xz"))
              (sha256
               (base32
-               "0whzbn7ahn5maarcwl1yhk9lq10b0q0y9w5pjl9kh3frdjmncrbg"))))
+               "05smn9hqdp7iscc1dj4cxp1mrlad7b50lhlnlqisfzf493i2f2jy"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("git" ,git) ; needed for a test
@@ -462,7 +465,7 @@ audio/video codec library.")
        ("avahi" ,avahi)
        ("dbus" ,dbus)
        ("flac" ,flac)
-       ("ffmpeg" ,ffmpeg-2.2)     ; FIXME: vlc-2.1.5 won't work with ffmpeg-2.4
+       ("ffmpeg" ,ffmpeg)
        ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)
        ("gnutls" ,gnutls)
@@ -575,13 +578,13 @@ treaming protocols.")
                            '("--enable-runtime-cpudetection"
                              "--target=i686-linux"))
                           ("mips64el-linux"
-                           '("--target=mips3-linux")))
-                      "--disable-armv5te"
-                      "--disable-armv6"
-                      "--disable-armv6t2"
-                      "--disable-armvfp"
+                           '("--target=mips3-linux"))
+                          (_ (list (string-append
+                                    "--target="
+                                    (or (%current-target-system)
+                                        (nix-system->gnu-triplet
+                                         (%current-system)))))))
                       "--disable-neon"
-                      "--disable-thumb"
                       "--disable-iwmmxt"))))
           %standard-phases)))
     (home-page "http://www.mplayerhq.hu/design7/news.html")
@@ -715,7 +718,7 @@ several areas.")
 (define-public mpv
   (package
     (name "mpv")
-    (version "0.8.3")
+    (version "0.9.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -723,14 +726,14 @@ several areas.")
                     ".tar.gz"))
               (sha256
                (base32
-                "1kw9hr957cxqgm2i94bgqc6sskm6bwhm0akzckilhs460b43h409"))
+                "08nx0g6ji2d90f5w62g327szhkb7id7jzwgf3x069rc5id1x3bx7"))
               (file-name (string-append name "-" version ".tar.gz"))))
     (build-system waf-build-system)
     (native-inputs
      `(("perl" ,perl)
        ("pkg-config" ,pkg-config)
        ("python-docutils" ,python-docutils)))
-    ;; Missing features: libguess, LIRC, Wayland, VDPAU, V4L2
+    ;; Missing features: libguess, Wayland, VDPAU, V4L2
     (inputs
      `(("alsa-lib" ,alsa-lib)
        ("enca" ,enca)
@@ -819,6 +822,8 @@ projects while introducing many more.")
                  (lambda* (#:key outputs #:allow-other-keys)
                    (setenv "CONFIG_SHELL" (which "bash"))
                    (let ((out (assoc-ref outputs "out")))
+                     (setenv "LDFLAGS"
+                             (string-append "-Wl,-rpath=" out "/lib"))
                      (zero? (system* "./configure"
                                      "--enable-shared"
                                      "--as=yasm"
@@ -853,7 +858,7 @@ projects while introducing many more.")
 (define-public youtube-dl
   (package
     (name "youtube-dl")
-    (version "2015.01.23.4")
+    (version "2015.06.04.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://youtube-dl.org/downloads/"
@@ -861,7 +866,7 @@ projects while introducing many more.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0pvvab9dk1righ3fa79000iz8fzdlcxakscx5sd31730c37j3kj2"))))
+                "0rk5c2m19x119bly38yjbizkr99ayn265lm15rm2x5ipjvdixyyg"))))
     (build-system python-build-system)
     (inputs `(("setuptools" ,python-setuptools)))
     (home-page "http://youtube-dl.org")
@@ -1098,6 +1103,8 @@ for use with HTML5 video.")
                                  "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
                                  (string-append "-DCMAKE_INSTALL_PREFIX=" out)
                                  (string-append "-DCMAKE_INSTALL_RPATH=" lib)
+                                 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
+                                                "\"-Wl,-rpath=" lib "\"")
                                  (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
                                  (string-append "-DSDL_INCLUDE_DIR="
                                                 sdl "/include/SDL")