gnu: libical: Correct zoneinfo search path.
[jackhill/guix/guix.git] / gnu / packages / orpheus.scm
CommitLineData
51152cd1
EB
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages orpheus)
20 #:use-module (guix licenses)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages ncurses)
26 #:use-module (gnu packages mp3)
ce0614dd 27 #:use-module (gnu packages base)
51152cd1
EB
28 #:use-module (gnu packages xiph)
29 #:use-module (gnu packages xml))
30
31(define-public orpheus
32 (package
33 (name "orpheus")
34 (version "1.6")
35 (source
36 (origin
37 (method url-fetch)
38 (uri (string-append "http://thekonst.net/download/orpheus-"
39 version ".tar.gz"))
40 (sha256
41 (base32
42 "1xbgxq8fybwhm51nw9hvvrgi873qzkc2qvmy15d2m2hw2yqa99hq"))
fc1adab1 43 (patches (search-patches "orpheus-cast-errors-and-includes.patch"))))
51152cd1
EB
44 (build-system gnu-build-system)
45 (inputs
46 `(("ncurses" ,ncurses)
47 ("libvorbis" ,libvorbis)
48 ("vorbis-tools" ,vorbis-tools)
49 ("mpg321" ,mpg321)
50 ;; TODO: add ghttp
51 ("libxml2" ,libxml2)
52 ("which" ,which)))
53 (arguments
54 `(#:phases
55 (alist-replace
56 'configure
57 (lambda* (#:key outputs #:allow-other-keys)
58 ;; This old `configure' script does not support variables passed as
59 ;; arguments.
60 (let ((out (assoc-ref outputs "out")))
61 (setenv "CONFIG_SHELL" (which "bash"))
62 (setenv "SHELL" (which "bash"))
63 (setenv "LIBS" "-logg") ;doesn't declare its use of libogg
64 (zero?
65 (system* "./configure" (string-append "--prefix=" out)))))
66 (alist-cons-after
67 'configure 'configure-players
68 (lambda* (#:key inputs #:allow-other-keys)
69 ;; To avoid propagating the mpg321 and vorbis-tools inputs, we can
70 ;; make the orpheus application execute the needed players from the
71 ;; store.
72 (let ((ogg123 (string-append (assoc-ref inputs "vorbis-tools")
73 "/bin/ogg123"))
74 (mpg321 (string-append (assoc-ref inputs "mpg321")
75 "/bin/mpg321"))
76 (which (string-append (assoc-ref inputs "which")
77 "/bin/which")))
78 (substitute* "src/orpheusconf.cc"
79 (("ogg123") ogg123)
80 (("which") which)
81 (("mpg321") mpg321))))
82 (alist-cons-before
83 'build 'patch-shells
84 (lambda _
85 (substitute* '("src/mp3track.cc"
86 "src/streamtrack.cc"
87 "src/oggtrack.cc")
88 (("/bin/sh") (which "bash"))))
89 %standard-phases)))))
90 (home-page "http://thekonst.net/en/orpheus")
91 (synopsis "Text-mode audio player")
92 (description
93 "Orpheus is a light-weight text mode menu- and window-driven audio player
94application for CDs, internet stream broadcasts, and files in MP3 and Vorbis
95OGG format.")
96 (license gpl2+)))