Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / pulseaudio.scm
index 2c283f0..92ebe6f 100644 (file)
@@ -1,6 +1,11 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
+;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,7 +32,7 @@
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages avahi)
   #:use-module (gnu packages check)
-  #:use-module (gnu packages gdbm)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages libcanberra)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages xiph)
-  #:export (libsndfile
-            libsamplerate
-            pulseaudio))
+  #:use-module (gnu packages xiph))
 
-(define libsndfile
+(define-public libsndfile
   (package
     (name "libsndfile")
-    (version "1.0.25")
+    (replacement libsndfile/fixed)
+    (version "1.0.28")
     (source (origin
              (method url-fetch)
              (uri (string-append "http://www.mega-nerd.com/libsndfile/files/libsndfile-"
                                  version ".tar.gz"))
+             (patches (search-patches "libsndfile-armhf-type-checks.patch"))
              (sha256
               (base32
-               "10j8mbb65xkyl0kfy0hpzpmrp0jkr12c7mfycqipxgka6ayns0ar"))))
+               "1afzm7jx34jhqn32clc5xghyjglccam2728yxlx37yj2y0lkkwqz"))))
     (build-system gnu-build-system)
     (inputs
      `(("libvorbis" ,libvorbis)
        ("libogg" ,libogg)
-       ("flac" ,flac)
-       ("pkg-config" ,pkg-config)))
+       ("flac" ,flac)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
     (home-page "http://www.mega-nerd.com/libsndfile/")
     (synopsis "Reading and writing files containing sampled sound")
     (description
@@ -72,19 +77,32 @@ SPARC.  Hopefully the design of the library will also make it easy to extend
 for reading and writing new sound file formats.")
     (license l:gpl2+)))
 
-(define libsamplerate
+(define libsndfile/fixed
+  (package
+    (inherit libsndfile)
+    (source
+      (origin
+        (inherit (package-source libsndfile))
+        (patches
+          (append
+            (origin-patches (package-source libsndfile))
+            (search-patches "libsndfile-CVE-2017-8361-8363-8365.patch"
+                            "libsndfile-CVE-2017-8362.patch")))))))
+
+(define-public libsamplerate
   (package
     (name "libsamplerate")                     ; aka. Secret Rabbit Code (SRC)
-    (version "0.1.8")
+    (version "0.1.9")
     (source (origin
              (method url-fetch)
              (uri (string-append "http://www.mega-nerd.com/SRC/libsamplerate-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "01hw5xjbjavh412y63brcslj5hi9wdgkjd3h9csx5rnm8vglpdck"))))
+               "1ha46i0nbibq0pl0pjwcqiyny4hj8lp1bnl4dpxm64zjw9lb2zha"))))
     (build-system gnu-build-system)
-    (inputs `(("pkg-config" ,pkg-config)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
     (propagated-inputs
      `(("libsndfile" ,libsndfile)
        ("fftw" ,fftw)))
@@ -107,20 +125,20 @@ against computation cost.  The current best converter provides a
 signal-to-noise ratio of 145dB with -3dB passband extending from DC to 96% of
 the theoretical best bandwidth for a given pair of input and output sample
 rates.")
-    (license l:gpl2+)))
+    (license l:bsd-2)))
 
-(define pulseaudio
+(define-public pulseaudio
   (package
     (name "pulseaudio")
-    (version "6.0")
+    (version "10.0")
     (source (origin
              (method url-fetch)
              (uri (string-append
-                   "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-"
-                   version ".tar.xz"))
+                   "https://freedesktop.org/software/pulseaudio/releases/"
+                   name "-" version ".tar.xz"))
              (sha256
               (base32
-               "1xpnfxa0d8pgf6b4qdgnkcvrvdxbbbjd5ync19h0f5hbp3h401mm"))
+               "0mrg8qvpwm4ifarzphl3749p7p050kdx1l6mvsaj03czvqj6h653"))
              (modules '((guix build utils)))
              (snippet
               ;; Disable console-kit support by default since it's deprecated
@@ -128,13 +146,14 @@ rates.")
               '(substitute* "src/daemon/default.pa.in"
                  (("load-module module-console-kit" all)
                   (string-append "#" all "\n"))))
-             (patches
-              (list (search-patch "pulseaudio-fix-mult-test.patch")
-                    (search-patch "pulseaudio-longer-test-timeout.patch")))))
+             (patches (search-patches
+                       "pulseaudio-fix-mult-test.patch"
+                       "pulseaudio-longer-test-timeout.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags (list "--localstatedir=/var" ;"--sysconfdir=/etc"
                                "--disable-oss-output"
+                               "--enable-bluez5"
                                (string-append "--with-udev-rules-dir="
                                               (assoc-ref %outputs "out")
                                               "/lib/udev/rules.d"))
@@ -150,22 +169,23 @@ rates.")
                  %standard-phases)))
     (inputs
      ;; TODO: Add optional inputs (GTK+?).
-     `(;; ("sbc" ,sbc)
-       ("alsa-lib" ,alsa-lib)
-       ("json-c" ,json-c)
+     `(("alsa-lib" ,alsa-lib)
+       ("bluez" ,bluez)
+       ("sbc" ,sbc)
        ("speex" ,speex)
        ("libsndfile" ,libsndfile)
        ("libsamplerate" ,libsamplerate)
        ("dbus" ,dbus)
        ("glib" ,glib)
        ("intltool" ,intltool)
-       ("pkg-config" ,pkg-config)
        ("m4" ,m4)
        ("libltdl" ,libltdl)
        ("fftwf" ,fftwf)
        ("avahi" ,avahi)
        ("eudev" ,eudev)           ;for the detection of hardware audio devices
        ("check" ,check)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
     (propagated-inputs
      ;; 'libpulse*.la' contain `-lgdbm' and `-lcap', so propagate them.
      `(("libcap" ,libcap)
@@ -192,7 +212,7 @@ sound server.")
     (source (origin
              (method url-fetch)
              (uri (string-append
-                   "http://freedesktop.org/software/pulseaudio/pavucontrol/pavucontrol-"
+                   "https://freedesktop.org/software/pulseaudio/pavucontrol/pavucontrol-"
                    version
                    ".tar.xz"))
              (sha256
@@ -215,3 +235,38 @@ sound server.")
 graphical user interface to connect to a PulseAudio server and
 easily control the volume of all clients, sinks, etc.")
     (license l:gpl2+)))
+
+(define-public ponymix
+  (package
+    (name "ponymix")
+    (version "5")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://github.com/falconindy/ponymix/"
+                                 "archive/" version ".tar.gz"))
+             (sha256
+              (base32
+               "1c0ch98zry3c4ixywwynjid1n1nh4xl4l1p548giq2w3zwflaghn"))
+             (file-name (string-append name "-" version ".tar.gz"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; There is no test suite.
+       #:make-flags (let ((out (assoc-ref %outputs "out")))
+                      (list (string-append "DESTDIR=" out)))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-paths
+           (lambda _
+             (substitute* "Makefile"
+               (("/usr") ""))))
+         (delete 'configure)))) ; There's no configure phase.
+    (inputs
+     `(("pulseaudio" ,pulseaudio)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "https://github.com/falconindy/ponymix")
+    (synopsis "Console-based PulseAudio mixer")
+    (description "Ponymix is a PulseAudio mixer and volume controller with a
+command-line interface.  In addition, it is possible to use named sources and
+sinks.")
+    (license l:expat)))