gnu: MPD: Update to 0.21.4.

We no longer install any systemd unit files for MPD because this is no longer
supported upstream as a matter of policy or via MPD's build system. [0]

Specifically, they don't support using MPD with systemd unless MPD was linked
with libsystemd. The unit files are only built when this is the case.

[0]
<https://github.com/MusicPlayerDaemon/MPD/issues/124#issuecomment-334930456>

* gnu/packages/mpd.scm (mpd): Update to 0.21.4.
[build-system]: Use meson-build-system.
[native-inputs]: Add gcc-8, gcc-8:lib, and python-sphinx.
[arguments]: Add a 'expand-C++-include-path' phase. Remove the
'install-service-files' phase. Make sure to build the documentation.
This commit is contained in:
Leo Famulari 2019-02-10 19:22:35 -05:00
parent 30d77f45eb
commit f52bd828ed
No known key found for this signature in database
GPG Key ID: 2646FA30BACA7F08
1 changed files with 18 additions and 13 deletions

View File

@ -4,7 +4,7 @@
;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com> ;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com>
;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net> ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org> ;;; 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> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
@ -91,7 +91,7 @@ interfacing MPD in the C, C++ & Objective C languages.")
(define-public mpd (define-public mpd
(package (package
(name "mpd") (name "mpd")
(version "0.20.23") (version "0.21.4")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (uri
@ -100,18 +100,19 @@ interfacing MPD in the C, C++ & Objective C languages.")
"/mpd-" version ".tar.xz")) "/mpd-" version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"1smg6hab4kwrzsw1k7vlpya3ampdk8psnmkrzxlgb43j4fgmygjh")))) "1ix52vfa8k8my4xyr8b0phg8605b2xchyzyva908m08vpzm14w94"))))
(build-system gnu-build-system) (build-system meson-build-system)
(arguments (arguments
`(#:phases `(#:configure-flags '("-Ddocumentation=true") ; The default is 'false'...
#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'install 'install-service-files (add-before 'configure 'expand-C++-include-path
(lambda* (#:key outputs #:allow-other-keys) ;; Make <gcc>/include/c++/ext/string_conversions.h find <stdlib.h>.
(let* ((out (assoc-ref outputs "out")) (lambda* (#:key inputs #:allow-other-keys)
(systemd (string-append out "/etc/systemd/system")) (let* ((path "CPLUS_INCLUDE_PATH")
(systemd-user (string-append out "/etc/systemd/user"))) (gcc (assoc-ref inputs "gcc"))
(install-file "systemd/system/mpd.service" systemd) (c++ (string-append gcc "/include/c++")))
(install-file "systemd/user/mpd.service" systemd-user) (setenv path (string-append c++ ":" (getenv path)))
#t)))))) #t))))))
(inputs `(("ao" ,ao) (inputs `(("ao" ,ao)
("alsa-lib" ,alsa-lib) ("alsa-lib" ,alsa-lib)
@ -134,7 +135,11 @@ interfacing MPD in the C, C++ & Objective C languages.")
("pulseaudio" ,pulseaudio) ("pulseaudio" ,pulseaudio)
("sqlite" ,sqlite) ("sqlite" ,sqlite)
("zlib" ,zlib))) ("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: ;; Missing optional inputs:
;; libyajl ;; libyajl
;; libcdio_paranoia ;; libcdio_paranoia