me
/
guix
Archived
1
0
Fork 0

gnu: emacs-emms: Update to 5.42.

* gnu/packages/emacs-xyz.scm (emacs-emms): Update to 5.42.
[source]: Use GNU ELPA repository.
[arguments]: Remove unnecessary phases.
master
Nicolas Goaziou 2020-06-16 21:17:40 +02:00
parent 7fc273fe3f
commit 503737624c
No known key found for this signature in database
GPG Key ID: DA00B4F048E92F2D
1 changed files with 53 additions and 114 deletions

View File

@ -1404,44 +1404,21 @@ incrementally confined in Isearch manner.")
(define-public emacs-emms (define-public emacs-emms
(package (package
(name "emacs-emms") (name "emacs-emms")
(version "5.4") (version "5.42")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://gnu/emms/emms-" version ".tar.gz")) (uri (string-append "https://elpa.gnu.org/packages/"
"emms-" version ".tar"))
(sha256 (sha256
(base32 "1nd7sb6pva7qb1ki6w0zhd6zvqzd7742kaqi0f3v4as5jh09l6nr")) (base32 "1khx1fvllrs6w9kxk12mp1hj309c90mc7lkq1vvlqlr7vd6zmnpj"))))
(modules '((guix build utils))) (build-system emacs-build-system)
(snippet
'(begin
(substitute* "Makefile"
(("/usr/bin/install-info")
;; No need to use 'install-info' since it would create a
;; useless 'dir' file.
"true")
(("^INFODIR=.*")
;; Install Info files to $out/share/info, not $out/info.
"INFODIR := $(PREFIX)/share/info\n")
(("/site-lisp/emms")
;; Install directly in share/emacs/site-lisp, not in a
;; sub-directory.
"/site-lisp")
(("^all: (.*)\n" _ rest)
;; Build 'emms-print-metadata'.
(string-append "all: " rest " emms-print-metadata\n")))
#t))))
(build-system gnu-build-system)
(arguments (arguments
`(#:modules ((guix build gnu-build-system) `(#:phases
(guix build utils)
(guix build emacs-utils)
(ice-9 ftw))
#:imported-modules (,@%gnu-build-system-modules
(guix build emacs-utils))
#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(replace 'configure (add-after 'unpack 'set-external-programs
;; Specify the absolute file names of the various programs
;; so that everything works out-of-the-box.
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")) (let ((out (assoc-ref outputs "out"))
(flac (assoc-ref inputs "flac")) (flac (assoc-ref inputs "flac"))
@ -1451,94 +1428,56 @@ incrementally confined in Isearch manner.")
(mp3info (assoc-ref inputs "mp3info")) (mp3info (assoc-ref inputs "mp3info"))
(mutagen (assoc-ref inputs "mutagen")) (mutagen (assoc-ref inputs "mutagen"))
(opus (assoc-ref inputs "opus-tools"))) (opus (assoc-ref inputs "opus-tools")))
;; Specify the installation directory. (emacs-substitute-variables "emms-player-mpg321-remote.el"
(substitute* "Makefile" ("emms-player-mpg321-remote-command"
(("PREFIX=.*$") (string-append mpg321 "/bin/mpg321")))
(string-append "PREFIX := " out "\n"))) (substitute* "emms-player-simple.el"
(("\"ogg123\"")
(setenv "SHELL" (which "sh")) (string-append "\"" vorbis "/bin/ogg123\"")))
(setenv "CC" "gcc") (substitute* "emms-player-simple.el"
(("\"mpg321\"")
;; Specify the absolute file names of the various (string-append "\"" mpg321 "/bin/mpg321\"")))
;; programs so that everything works out-of-the-box. (emacs-substitute-variables "emms-info-ogginfo.el"
(with-directory-excursion "lisp" ("emms-info-ogginfo-program-name"
(emacs-substitute-variables (string-append vorbis "/bin/ogginfo")))
"emms-player-mpg321-remote.el" (emacs-substitute-variables "emms-info-opusinfo.el"
("emms-player-mpg321-remote-command" ("emms-info-opusinfo-program-name"
(string-append mpg321 "/bin/mpg321"))) (string-append opus "/bin/opusinfo")))
(substitute* "emms-player-simple.el" (emacs-substitute-variables "emms-info-libtag.el"
(("\"ogg123\"") ("emms-info-libtag-program-name"
(string-append "\"" vorbis "/bin/ogg123\""))) (string-append out "/bin/emms-print-metadata")))
(substitute* "emms-player-simple.el" (emacs-substitute-variables "emms-info-mp3info.el"
(("\"mpg321\"") ("emms-info-mp3info-program-name"
(string-append "\"" mpg321 "/bin/mpg321\""))) (string-append mp3info "/bin/mp3info")))
(emacs-substitute-variables "emms-info-ogginfo.el" (emacs-substitute-variables "emms-info-metaflac.el"
("emms-info-ogginfo-program-name" ("emms-info-metaflac-program-name"
(string-append vorbis "/bin/ogginfo"))) (string-append flac "/bin/metaflac")))
(emacs-substitute-variables "emms-info-opusinfo.el" (emacs-substitute-variables "emms-source-file.el"
("emms-info-opusinfo-program-name" ("emms-source-file-gnu-find" (which "find")))
(string-append opus "/bin/opusinfo"))) (substitute* "emms-volume-amixer.el"
(emacs-substitute-variables "emms-info-libtag.el" (("\"amixer\"")
("emms-info-libtag-program-name" (string-append "\"" alsa "/bin/amixer\"")))
(string-append out "/bin/emms-print-metadata"))) (substitute* "emms-tag-editor.el"
(emacs-substitute-variables "emms-info-mp3info.el" (("\"mid3v2\"")
("emms-info-mp3info-program-name" (string-append "\"" mutagen "/bin/mid3v2\"")))
(string-append mp3info "/bin/mp3info"))) #t))))))
(emacs-substitute-variables "emms-info-metaflac.el" (inputs
("emms-info-metaflac-program-name" `(("alsa-utils" ,alsa-utils)
(string-append flac "/bin/metaflac"))) ("flac" ,flac) ;for metaflac
(emacs-substitute-variables "emms-source-file.el" ("vorbis-tools" ,vorbis-tools)
("emms-source-file-gnu-find" (which "find"))) ("mpg321" ,mpg321)
(substitute* "emms-volume-amixer.el" ("taglib" ,taglib)
(("\"amixer\"") ("mp3info" ,mp3info)
(string-append "\"" alsa "/bin/amixer\""))) ("mutagen" ,python-mutagen)
(substitute* "emms-tag-editor.el" ("opus-tools" ,opus-tools)))
(("\"mid3v2\"") (home-page "https://www.gnu.org/software/emms/")
(string-append "\"" mutagen "/bin/mid3v2\""))) (synopsis "The Emacs Multimedia System")
#t))))
(add-before 'install 'pre-install
(lambda* (#:key outputs #:allow-other-keys)
;; The 'install' rule expects the target directories to exist.
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(man1 (string-append out "/share/man/man1")))
(mkdir-p bin)
(mkdir-p man1)
;; Ensure that files are not rejected by gzip
(let ((early-1980 315619200)) ; 1980-01-02 UTC
(ftw "." (lambda (file stat flag)
(unless (<= early-1980 (stat:mtime stat))
(utime file early-1980 early-1980))
#t)))
#t)))
(add-after 'install 'post-install
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(symlink "emms-auto.el"
(string-append out "/share/emacs/site-lisp/"
"emms-autoloads.el")))
#t)))
#:tests? #f))
(native-inputs `(("emacs" ,emacs-minimal) ;for (guix build emacs-utils)
("texinfo" ,texinfo)))
(inputs `(("alsa-utils" ,alsa-utils)
("flac" ,flac) ;for metaflac
("vorbis-tools" ,vorbis-tools)
("mpg321" ,mpg321)
("taglib" ,taglib)
("mp3info" ,mp3info)
("mutagen" ,python-mutagen)
("opus-tools" ,opus-tools)))
(properties '((upstream-name . "emms")))
(synopsis "Emacs Multimedia System")
(description (description
"EMMS is the Emacs Multimedia System. It is a small front-end which "EMMS is the Emacs Multimedia System. It is a small front-end which
can control one of the supported external players. Thus, it supports can control one of the supported external players. Thus, it supports
whatever formats are supported by your music player. It also whatever formats are supported by your music player. It also
supports tagging and playlist management, all behind a clean and supports tagging and playlist management, all behind a clean and
light user interface.") light user interface.")
(home-page "https://www.gnu.org/software/emms/")
(license license:gpl3+))) (license license:gpl3+)))
(define-public emacs-emms-mode-line-cycle (define-public emacs-emms-mode-line-cycle