Merge branch 'staging' into core-updates
[jackhill/guix/guix.git] / gnu / packages / pulseaudio.scm
index bac92ea..4e4d32d 100644 (file)
@@ -7,6 +7,9 @@
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 (define-module (gnu packages pulseaudio)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module (guix utils)
   #:use-module ((guix licenses) #:prefix l:)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
+  #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages avahi)
   #:use-module (gnu packages check)
-  #:use-module (gnu packages databases)
+  #:use-module (gnu packages dbm)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages libcanberra)
   #:use-module (gnu packages web)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages m4)
+  #:use-module (gnu packages protobuf)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages python-web)
   #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages xiph))
+  #:use-module (gnu packages xiph)
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages xorg))
 
 (define-public libsndfile
   (package
@@ -94,10 +106,28 @@ for reading and writing new sound file formats.")
                "1ha46i0nbibq0pl0pjwcqiyny4hj8lp1bnl4dpxm64zjw9lb2zha"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("pkg-config" ,pkg-config)
+       ("automake" ,automake))) ;For up to date 'config.guess' and 'config.sub'.
     (propagated-inputs
      `(("libsndfile" ,libsndfile)
        ("fftw" ,fftw)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-configure
+           (lambda* (#:key inputs native-inputs #:allow-other-keys)
+             ;; Replace outdated config.sub and config.guess:
+             (with-directory-excursion "Cfg"
+               (for-each (lambda (file)
+                           (install-file (string-append
+                                          (assoc-ref
+                                           (or native-inputs inputs) "automake")
+                                          "/share/automake-"
+                                          ,(version-major+minor
+                                            (package-version automake))
+                                          "/" file) "."))
+                         '("config.sub" "config.guess")))
+             #t)))))
     (home-page "http://www.mega-nerd.com/SRC/index.html")
     (synopsis "Audio sample rate conversion library")
     (description
@@ -122,7 +152,7 @@ rates.")
 (define-public pulseaudio
   (package
     (name "pulseaudio")
-    (version "11.1")
+    (version "13.0")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -130,7 +160,7 @@ rates.")
                    name "-" version ".tar.xz"))
              (sha256
               (base32
-               "17ndr6kc7hpv4ih4gygwlcpviqifbkvnk4fbwf4n25kpb991qlpj"))
+               "0mw0ybrqj7hvf8lqs5gjzip464hfnixw453lr0mqzlng3b5266wn"))
              (modules '((guix build utils)))
              (snippet
               ;; Disable console-kit support by default since it's deprecated
@@ -141,7 +171,6 @@ rates.")
                     (string-append "#" all "\n")))
                  #t))
              (patches (search-patches
-                       "pulseaudio-glibc-2.27.patch"
                        "pulseaudio-fix-mult-test.patch"
                        "pulseaudio-longer-test-timeout.patch"))))
     (build-system gnu-build-system)
@@ -153,13 +182,6 @@ rates.")
                                               (assoc-ref %outputs "out")
                                               "/lib/udev/rules.d"))
        #:phases (modify-phases %standard-phases
-                 (replace 'bootstrap
-                   ;; TODO: Remove this custom bootstrap phase when
-                   ;; pulseaudio-glibc-2.27.patch is removed.
-                   (lambda _
-                     (patch-shebang "git-version-gen")
-                     (setenv "NOCONFIGURE" "1")
-                     (invoke "bash" "bootstrap.sh")))
                  (add-before 'check 'pre-check
                    (lambda _
                      ;; 'tests/lock-autospawn-test.c' wants to create a file
@@ -174,25 +196,28 @@ rates.")
      `(("alsa-lib" ,alsa-lib)
        ("bluez" ,bluez)
        ("sbc" ,sbc)
-       ("speex" ,speex)
+       ("speexdsp" ,speexdsp)
        ("libsndfile" ,libsndfile)
-       ("libsamplerate" ,libsamplerate)
+       ("jack" ,jack-1) ; For routing the output to jack.
        ("dbus" ,dbus)
        ("glib" ,glib)
-       ("intltool" ,intltool)
-       ("m4" ,m4)
        ("libltdl" ,libltdl)
        ("fftwf" ,fftwf)
        ("avahi" ,avahi)
-       ("eudev" ,eudev)           ;for the detection of hardware audio devices
-       ("check" ,check)))
+
+       ;; For the optional X11 modules.
+       ("libice" ,libice)
+       ("libsm" ,libsm)
+       ("libxcb" ,libxcb)
+       ("libxtst" ,libxtst)
+
+       ("eudev" ,eudev)))         ;for the detection of hardware audio devices
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ;; TODO: Remove "autoconf", "automake", and "libtool" from
-       ;; native-inputs when pulseaudio-glibc-2.27.patch is removed.
-       ("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("libtool" ,libtool)))
+     `(("check" ,check)
+       ("glib:bin" ,glib "bin")
+       ("intltool" ,intltool)
+       ("m4" ,m4)
+       ("pkg-config" ,pkg-config)))
     (propagated-inputs
      ;; 'libpulse*.la' contain `-lgdbm' and `-lcap', so propagate them.
      `(("libcap" ,libcap)
@@ -226,8 +251,6 @@ sound server.")
               (base32
                "14486c6lmmirkhscbfygz114f6yzf97h35n3h3pdr27w4mdfmlmk"))))
     (build-system gnu-build-system)
-    (arguments
-     '(#:configure-flags '("CXXFLAGS=-std=c++11"))) ; required by gtkmm
     (inputs
      `(("libcanberra" ,libcanberra)
        ("gtkmm" ,gtkmm)
@@ -308,3 +331,55 @@ sinks.")
     (description "Pulsemixer is a PulseAudio mixer with command-line and
 curses-style interfaces.")
     (license l:expat)))
+
+(define-public pulseaudio-dlna
+  ;; The last release was in 2016; use a more recent commit.
+  (let ((commit "4472928dd23f274193f14289f59daec411023ab0")
+        (revision "1"))
+    (package
+      (name "pulseaudio-dlna")
+      (version (git-version "0.5.2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/masmu/pulseaudio-dlna.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1dfn7036vrq49kxv4an7rayypnm5dlawsf02pfsldw877hzdamqk"))))
+      (build-system python-build-system)
+      (arguments `(#:python ,python-2))
+      (inputs
+       `(("python2-chardet" ,python2-chardet)
+         ("python2-dbus" ,python2-dbus)
+         ("python2-docopt" ,python2-docopt)
+         ("python2-futures" ,python2-futures)
+         ("python2-pygobject" ,python2-pygobject)
+         ("python2-lxml" ,python2-lxml)
+         ("python2-netifaces" ,python2-netifaces)
+         ("python2-notify2" ,python2-notify2)
+         ("python2-protobuf" ,python2-protobuf)
+         ("python2-psutil" ,python2-psutil)
+         ("python2-requests" ,python2-requests)
+         ("python2-pyroute2" ,python2-pyroute2)
+         ("python2-setproctitle" ,python2-setproctitle)
+         ("python2-zeroconf" ,python2-zeroconf)))
+      (home-page "https://github.com/masmu/pulseaudio-dlna")
+      (synopsis "Stream audio to DLNA/UPnP and Chromecast devices")
+      (description "This lightweight streaming server brings DLNA/UPnP and
+Chromecast support to PulseAudio.  It can stream your current PulseAudio
+playback to different UPnP devices (UPnP Media Renderers, including Sonos
+devices and some Smart TVs) or Chromecasts in your network.  You should also
+install one or more of the following packages alongside pulseaudio-dlna:
+
+@itemize
+@item ffmpeg - transcoding support for multiple codecs
+@item flac - FLAC transcoding support
+@item lame - MP3 transcoding support
+@item opus-tools - Opus transcoding support
+@item sox - WAV transcoding support
+@item vorbis-tools - Vorbis transcoding support
+@end itemize")
+      (license l:gpl3+))))