[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/10: gnu: emms: Use 'modify-phases'.
From: |
Efraim Flashner |
Subject: |
08/10: gnu: emms: Use 'modify-phases'. |
Date: |
Tue, 31 May 2016 19:11:57 +0000 (UTC) |
efraim pushed a commit to branch master
in repository guix.
commit 2fe176be0fc612370a22105a736fc7f70b7da7cf
Author: Efraim Flashner <address@hidden>
Date: Tue May 31 22:05:26 2016 +0300
gnu: emms: Use 'modify-phases'.
* gnu/packages/emacs.scm (emms)[arguments]: Use 'modify-phases'.
---
gnu/packages/emacs.scm | 123 +++++++++++++++++++++++-------------------------
1 file changed, 60 insertions(+), 63 deletions(-)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 1b0fecb..16ef72e 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -859,69 +859,66 @@ provides an optional IDE-like error list.")
#:imported-modules (,@%gnu-build-system-modules
(guix build emacs-utils))
- #:phases (alist-replace
- 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (vorbis (assoc-ref inputs "vorbis-tools"))
- (alsa (assoc-ref inputs "alsa-utils"))
- (mpg321 (assoc-ref inputs "mpg321"))
- (mp3info (assoc-ref inputs "mp3info")))
- ;; Specify the installation directory.
- (substitute* "Makefile"
- (("PREFIX=.*$")
- (string-append "PREFIX := " out "\n")))
-
- (setenv "SHELL" (which "sh"))
- (setenv "CC" "gcc")
-
- ;; Specify the absolute file names of the various
- ;; programs so that everything works out-of-the-box.
- (with-directory-excursion "lisp"
- (emacs-substitute-variables
- "emms-player-mpg321-remote.el"
- ("emms-player-mpg321-remote-command"
- (string-append mpg321 "/bin/mpg321")))
- (substitute* "emms-player-simple.el"
- (("\"ogg123\"")
- (string-append "\"" vorbis "/bin/ogg123\"")))
- (emacs-substitute-variables "emms-info-ogginfo.el"
- ("emms-info-ogginfo-program-name"
- (string-append vorbis "/bin/ogginfo")))
- (emacs-substitute-variables "emms-info-libtag.el"
- ("emms-info-libtag-program-name"
- (string-append out "/bin/emms-print-metadata")))
- (emacs-substitute-variables "emms-info-mp3info.el"
- ("emms-info-mp3info-program-name"
- (string-append mp3info "/bin/mp3info")))
- (substitute* "emms-volume-amixer.el"
- (("\"amixer\"")
- (string-append "\"" alsa "/bin/amixer\"")))
- (substitute* "emms-tag-editor.el"
- (("\"mp3info\"")
- (string-append "\"" mp3info "/bin/mp3info\""))))))
- (alist-cons-before
- 'install 'pre-install
- (lambda* (#:key outputs #:allow-other-keys)
- ;; The 'install' rule expects the target directory to
- ;; exist.
- (let* ((out (assoc-ref outputs "out"))
- (man1 (string-append out "/share/man/man1")))
- (mkdir-p man1)
- #t))
- (alist-cons-after
- 'install 'post-install
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (target (string-append
- out "/bin/emms-print-metadata")))
- (symlink "emms-auto.el"
- (string-append out "/share/emacs/site-lisp/"
- "emms-autoloads.el"))
- (mkdir-p (dirname target))
- (copy-file "src/emms-print-metadata" target)
- (chmod target #o555)))
- %standard-phases)))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (vorbis (assoc-ref inputs "vorbis-tools"))
+ (alsa (assoc-ref inputs "alsa-utils"))
+ (mpg321 (assoc-ref inputs "mpg321"))
+ (mp3info (assoc-ref inputs "mp3info")))
+ ;; Specify the installation directory.
+ (substitute* "Makefile"
+ (("PREFIX=.*$")
+ (string-append "PREFIX := " out "\n")))
+
+ (setenv "SHELL" (which "sh"))
+ (setenv "CC" "gcc")
+
+ ;; Specify the absolute file names of the various
+ ;; programs so that everything works out-of-the-box.
+ (with-directory-excursion "lisp"
+ (emacs-substitute-variables
+ "emms-player-mpg321-remote.el"
+ ("emms-player-mpg321-remote-command"
+ (string-append mpg321 "/bin/mpg321")))
+ (substitute* "emms-player-simple.el"
+ (("\"ogg123\"")
+ (string-append "\"" vorbis "/bin/ogg123\"")))
+ (emacs-substitute-variables "emms-info-ogginfo.el"
+ ("emms-info-ogginfo-program-name"
+ (string-append vorbis "/bin/ogginfo")))
+ (emacs-substitute-variables "emms-info-libtag.el"
+ ("emms-info-libtag-program-name"
+ (string-append out "/bin/emms-print-metadata")))
+ (emacs-substitute-variables "emms-info-mp3info.el"
+ ("emms-info-mp3info-program-name"
+ (string-append mp3info "/bin/mp3info")))
+ (substitute* "emms-volume-amixer.el"
+ (("\"amixer\"")
+ (string-append "\"" alsa "/bin/amixer\"")))
+ (substitute* "emms-tag-editor.el"
+ (("\"mp3info\"")
+ (string-append "\"" mp3info "/bin/mp3info\"")))))))
+ (add-before 'install 'pre-install
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; The 'install' rule expects the target directory to exist.
+ (let* ((out (assoc-ref outputs "out"))
+ (man1 (string-append out "/share/man/man1")))
+ (mkdir-p man1)
+ #t)))
+ (add-after 'install 'post-install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (target (string-append
+ out "/bin/emms-print-metadata")))
+ (symlink "emms-auto.el"
+ (string-append out "/share/emacs/site-lisp/"
+ "emms-autoloads.el"))
+ (mkdir-p (dirname target))
+ (copy-file "src/emms-print-metadata" target)
+ (chmod target #o555)))))
#:tests? #f))
(native-inputs `(("emacs" ,emacs-minimal) ;for (guix build emacs-utils)
("texinfo" ,texinfo)))
- branch master updated (1338484 -> d504726), Efraim Flashner, 2016/05/31
- 03/10: gnu: munge: Update to 0.5.12., Efraim Flashner, 2016/05/31
- 05/10: gnu: dosfstools: Update to 4.0., Efraim Flashner, 2016/05/31
- 09/10: gnu: scrot: Fix typo in source uri., Efraim Flashner, 2016/05/31
- 10/10: gnu: scrot: Use 'modify-phases'., Efraim Flashner, 2016/05/31
- 06/10: gnu: librecad: Update to 2.0.11., Efraim Flashner, 2016/05/31
- 07/10: gnu: emms: Update to 4.1., Efraim Flashner, 2016/05/31
- 01/10: gnu: obs: Update to 0.14.2., Efraim Flashner, 2016/05/31
- 08/10: gnu: emms: Use 'modify-phases'.,
Efraim Flashner <=
- 02/10: import github: Add to extension list., Efraim Flashner, 2016/05/31
- 04/10: gnu: microscheme: Update to 0.9.3., Efraim Flashner, 2016/05/31