gnu: pulseaudio: Increase timeout on cpu-mix-test.
[jackhill/guix/guix.git] / gnu / packages / pulseaudio.scm
index 1c579bf..edf01e5 100644 (file)
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 (define-module (gnu packages pulseaudio)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module ((guix licenses)
-                #:renamer (symbol-prefix-proc 'l:))
+  #:use-module ((guix licenses) #:prefix l:)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
-  #:use-module (gnu packages linux)
-  #:use-module (gnu packages oggvorbis)
-  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages algebra)
+  #:use-module ((gnu packages autotools) #:select (libltdl))
   #:use-module (gnu packages avahi)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages gdbm)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages libcanberra)
-  #:use-module (gnu packages algebra)
-  #:use-module ((gnu packages autotools) #:select (libtool))
-  #:use-module (gnu packages gdbm)
+  #:use-module (gnu packages web)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages m4)
-  #:use-module (gnu packages check)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages xiph)
   #:export (libsndfile
             libsamplerate
-            json-c
             pulseaudio))
 
 (define libsndfile
@@ -109,32 +109,10 @@ the theoretical best bandwidth for a given pair of input and output sample
 rates. ")
     (license l:gpl2+)))
 
-(define json-c
-  (package
-    (name "json-c")
-    (version "0.11")
-    (source (origin
-             (method url-fetch)
-             (uri (string-append "https://s3.amazonaws.com/json-c_releases/releases/json-c-"
-                                 version ".tar.gz"))
-             (sha256
-              (base32
-               "1324jja19jgsvcz9ij3nf4sgkrf4fg0ilw77vzqls3fw8m8wdpr8"))))
-    (build-system gnu-build-system)
-    (arguments '(#:parallel-build? #f
-                 #:parallel-tests? #f))
-    (home-page "https://github.com/json-c/json-c/wiki")
-    (synopsis "JSON implementation in C")
-    (description
-     "JSON-C implements a reference counting object model that allows you to
-easily construct JSON objects in C, output them as JSON formatted strings and
-parse JSON formatted strings back into the C representation of JSON objects.")
-    (license l:x11)))
-
 (define pulseaudio
   (package
     (name "pulseaudio")
-    (version "4.0")
+    (version "6.0")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -142,18 +120,33 @@ parse JSON formatted strings back into the C representation of JSON objects.")
                    version ".tar.xz"))
              (sha256
               (base32
-               "1bndz4l8jxyq3zq128gzp3gryxl6yjs66j2y1d7yabw2n5mv7kim"))
-             (patches (list (search-patch "pulseaudio-test-timeouts.patch")))))
+               "1xpnfxa0d8pgf6b4qdgnkcvrvdxbbbjd5ync19h0f5hbp3h401mm"))
+             (modules '((guix build utils)))
+             (snippet
+              ;; Disable console-kit support by default since it's deprecated
+              ;; anyway.
+              '(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")))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("--localstatedir=/var" ;"--sysconfdir=/etc"
-                           "--disable-oss-output")
+     `(#:configure-flags (list "--localstatedir=/var" ;"--sysconfdir=/etc"
+                               "--disable-oss-output"
+                               (string-append "--with-udev-rules-dir="
+                                              (assoc-ref %outputs "out")
+                                              "/lib/udev/rules.d"))
        #:phases (alist-cons-before
                  'check 'pre-check
                  (lambda _
                    ;; 'tests/lock-autospawn-test.c' wants to create a file
                    ;; under ~/.config/pulse.
-                   (setenv "HOME" (getcwd)))
+                   (setenv "HOME" (getcwd))
+                   ;; 'thread-test' needs more time on hydra and on slower
+                   ;; machines, so we set the default timeout to 120 seconds.
+                   (setenv "CK_DEFAULT_TIMEOUT" "120"))
                  %standard-phases)))
     (inputs
      ;; TODO: Add optional inputs (GTK+?).
@@ -168,9 +161,10 @@ parse JSON formatted strings back into the C representation of JSON objects.")
        ("intltool" ,intltool)
        ("pkg-config" ,pkg-config)
        ("m4" ,m4)
-       ("libtool" ,libtool)
-       ("fftw" ,fftw)
+       ("libltdl" ,libltdl)
+       ("fftwf" ,fftwf)
        ("avahi" ,avahi)
+       ("eudev" ,eudev)           ;for the detection of hardware audio devices
        ("check" ,check)))
     (propagated-inputs
      ;; 'libpulse*.la' contain `-lgdbm' and `-lcap', so propagate them.
@@ -202,13 +196,15 @@ mixing several sounds into one are easily achieved using a sound server. ")
                    ".tar.xz"))
              (sha256
               (base32
-               "02s775m1531sshwlbvfddk3pz8zjmwkv1sgzggn386ja3gc9vwi2"))))
+               "02s775m1531sshwlbvfddk3pz8zjmwkv1sgzggn386ja3gc9vwi2"))
+             (patches (list (search-patch "pavucontrol-sigsegv.patch")))))
     (build-system gnu-build-system)
     (inputs
-     `(("intltool" ,intltool)
-       ("libcanberra" ,libcanberra)
+     `(("libcanberra" ,libcanberra)
        ("gtkmm" ,gtkmm)
-       ("pulseaudio" ,pulseaudio)
+       ("pulseaudio" ,pulseaudio)))
+    (native-inputs
+     `(("intltool" ,intltool)
        ("pkg-config" ,pkg-config)))
     (home-page "http://freedesktop.org/software/pulseaudio/pavucontrol/")
     (synopsis "PulseAudio volume control")