gnu: libdrm: Switch to meson-build-system.
[jackhill/guix/guix.git] / gnu / packages / mpd.scm
index b69be29..bb386f5 100644 (file)
@@ -4,7 +4,7 @@
 ;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com>
 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
-;;; Copyright © 2016, 2018 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2016, 2018, 2019 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -50,8 +50,9 @@
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages pulseaudio)
-  #:use-module (gnu packages databases)
+  #:use-module (gnu packages sqlite)
   #:use-module (gnu packages video)
   #:use-module (gnu packages xiph))
 
@@ -90,7 +91,7 @@ interfacing MPD in the C, C++ & Objective C languages.")
 (define-public mpd
   (package
     (name "mpd")
-    (version "0.20.21")
+    (version "0.21.5")
     (source (origin
               (method url-fetch)
               (uri
@@ -99,18 +100,19 @@ interfacing MPD in the C, C++ & Objective C languages.")
                               "/mpd-" version ".tar.xz"))
               (sha256
                (base32
-                "1p2qrhdb1gzfv3y5dvvbc9s2wwmhg3azvzf8r02hzhk5q96pc8l3"))))
-    (build-system gnu-build-system)
+                "1y8fbch4xp96i4mz6czivnwvaf7g8pnfix5d0pbybnkv7bmz1a9f"))))
+    (build-system meson-build-system)
     (arguments
-     `(#:phases
+     `(#:configure-flags '("-Ddocumentation=true") ; The default is 'false'...
+       #:phases
        (modify-phases %standard-phases
-         (add-after 'install 'install-service-files
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (systemd (string-append out "/etc/systemd/system"))
-                    (systemd-user (string-append out "/etc/systemd/user")))
-               (install-file "systemd/system/mpd.service" systemd)
-               (install-file "systemd/user/mpd.service" systemd-user)
+         (add-before 'configure 'expand-C++-include-path
+           ;; Make <gcc>/include/c++/ext/string_conversions.h find <stdlib.h>.
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((path "CPLUS_INCLUDE_PATH")
+                    (gcc  (assoc-ref inputs "gcc"))
+                    (c++  (string-append gcc "/include/c++")))
+               (setenv path (string-append c++ ":" (getenv path)))
                #t))))))
     (inputs `(("ao" ,ao)
               ("alsa-lib" ,alsa-lib)
@@ -133,7 +135,11 @@ interfacing MPD in the C, C++ & Objective C languages.")
               ("pulseaudio" ,pulseaudio)
               ("sqlite" ,sqlite)
               ("zlib" ,zlib)))
-    (native-inputs `(("pkg-config" ,pkg-config)))
+    ;; MPD > 0.21 requires > GCC 6
+    (native-inputs `(("gcc" ,gcc-8)
+                     ("gcc-lib" ,gcc-8 "lib")
+                     ("pkg-config" ,pkg-config)
+                     ("python-sphinx" ,python-sphinx)))
     ;; Missing optional inputs:
     ;;   libyajl
     ;;   libcdio_paranoia
@@ -165,7 +171,7 @@ protocol.")
 (define-public mpd-mpc
   (package
     (name "mpd-mpc")
-    (version "0.30")
+    (version "0.31")
     (source (origin
               (method url-fetch)
               (uri
@@ -174,10 +180,12 @@ protocol.")
                               "/mpc-" version ".tar.xz"))
               (sha256
                (base32
-                "1kkzhrypkp0v6xv4d6db415pd0h6jqki29kfpsnfkvrhhh55pz35"))))
+                "0b9bsn4sl26xc6wdcms51x9yxznkxkppaycn8gnv4rd1m21kwdv2"))))
     (build-system meson-build-system)
     (inputs `(("libmpdclient" ,libmpdclient)))
-    (native-inputs `(("pkg-config" ,pkg-config)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("python-sphinx" ,python-sphinx)))
     (synopsis "Music Player Daemon client")
     (description "MPC is a minimalist command line interface to MPD, the music
 player daemon.")
@@ -187,16 +195,16 @@ player daemon.")
 (define-public ncmpc
   (package
     (name "ncmpc")
-    (version "0.32")
+    (version "0.33")
     (source (origin
               (method url-fetch)
               (uri
                (string-append "http://musicpd.org/download/ncmpc/"
-                              (car (string-split version #\.))
+                              (version-major version)
                               "/ncmpc-" version ".tar.xz"))
               (sha256
                (base32
-                "1b01q1pcaw5yyhvmlffc3h0r3w8qy7rhn55a7xj4qkcfqvs8ap08"))))
+                "19fp7xkpai4lq3vmpbppgh3ism7lg2sibv237c0sl5a0hls4mq4l"))))
     (build-system meson-build-system)
     (arguments
      `(#:configure-flags
@@ -214,7 +222,7 @@ player daemon.")
                     (c++  (string-append gcc "/include/c++")))
                (setenv path (string-append c++ ":" (getenv path)))
                #t))))))
-    (inputs `(("gcc"gcc-8)            ; for its C++14 support
+    (inputs `(("gcc" ,gcc-8)            ; for its C++14 support
               ("boost" ,boost)
               ("pcre" ,pcre)
               ("libmpdclient" ,libmpdclient)