aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2014, 2018 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages orpheus)
  #:use-module (guix licenses)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages)
  #:use-module (gnu packages ncurses)
  #:use-module (gnu packages mp3)
  #:use-module (gnu packages base)
  #:use-module (gnu packages xiph)
  #:use-module (gnu packages xml)
  #:use-module (ice-9 match))

(define-public orpheus
  (package
    (name "orpheus")
    (version "1.6")
    (source
     (origin
      (method url-fetch)
      (uri (string-append "http://thekonst.net/download/orpheus-"
                          version ".tar.gz"))
      (sha256
       (base32
        "1xbgxq8fybwhm51nw9hvvrgi873qzkc2qvmy15d2m2hw2yqa99hq"))
      (patches (search-patches "orpheus-cast-errors-and-includes.patch"))))
    (build-system gnu-build-system)
    (inputs
     (list ncurses
           libvorbis
           vorbis-tools
           mpg321
           ;; TODO: add ghttp
           libxml2
           which))
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (replace 'configure
           (lambda* (#:key outputs #:allow-other-keys)
             ;; This old `configure' script does not support variables passed as
             ;; arguments.
             (let ((out (assoc-ref outputs "out")))
               (setenv "CONFIG_SHELL" (which "bash"))
               (setenv "SHELL" (which "bash"))
               (setenv "LIBS" "-logg")     ;doesn't declare its use of libogg
               (invoke "./configure"
                       (string-append "--prefix=" out)
                       ,@(match (%current-system)
                                ("mips64el-linux"
                                 '("--host=mips64el-unknown-linux-gnu"))
                                ("aarch64-linux"
                                 '("--build=aarch64-unknown-linux-gnu"))
                                (_ `()))))))
         (add-after 'configure 'configure-players
           (lambda* (#:key inputs #:allow-other-keys)
             ;; To avoid propagating the mpg321 and vorbis-tools inputs, we can
             ;; make the orpheus application execute the needed players from the
             ;; store.
             (let ((ogg123 (search-input-file inputs "/bin/ogg123"))
                   (mpg321 (search-input-file inputs "/bin/mpg321"))
                   (which  (search-input-file inputs "/bin/which")))
               (substitute* "src/orpheusconf.cc"
                 (("ogg123") ogg123)
                 (("which")  which)
                 (("mpg321") mpg321))
               #t)))
         (add-before 'build 'patch-shells
           (lambda _
             (substitute* '("src/mp3track.cc"
                            "src/streamtrack.cc"
                            "src/oggtrack.cc")
               (("/bin/sh") (which "sh")))
             #t)))))
    (home-page "http://thekonst.net/en/orpheus")
    (synopsis "Text-mode audio player")
    (description
     "Orpheus is a light-weight text mode menu- and window-driven audio player
application for CDs, internet stream broadcasts, and files in MP3 and Vorbis
OGG format.")
    (license gpl2+)))
ble-services): Adjust accordingly. * gnu/local.mk (GNU_SYSTEM_MODULES): Register new module. * gnu/packages/glib.scm (dbus-for-jami): New variable. * gnu/services/telephony.scm: (jami-configuration)[dbus]: Default to dbus-for-jami. (jami-dbus-session-activation): Write a D-Bus daemon configuration file at '/var/run/jami/session-local.conf'. (jami-shepherd-services): Add the closure of guile-ac-d-bus and guile-fibers as extensions. Adjust imported modules. Remove no longer used parameters. <jami-dbus-session>: Use a PID file, avoiding the need for the manual synchronization. <jami>: Set DBUS_SESSION_BUS_ADDRESS environment variable. Poll using 'jami-service-available?' instead of 'dbus-service-available?'. * gnu/tests/telephony.scm (run-jami-test): Add needed Guile extensions. Set DBUS_SESSION_BUS_ADDRESS environment variable. Adjust all tests to use 'jami-service-available?' to determine if the service is started rather than the now problematic Shepherd's 'start-service'. 2021-08-30build/jami-service: Fix range ends in account-fingerprint-rx.Maxime Devos This broke compilation of Guix with guile@3.0.2 with: In procedure make-regexp: Invalid range end The fix is to replace [0-9A-f] with [0-9A-Fa-f]. * gnu/build/jami-service.scm (account-fingerprint-rx): Correct regexp. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> 2021-08-02Reinstate "services: Add a service for Jami."Maxim Cournoyer This reverts commit 4673f817938d9d2b1b40a072ab2e0c44a32ccc97, which reverted commit 69dcc24c9f0cdfea674eb690e7755d26a25ced2b with the fix detailed below. Thanks to Christopher Baines for reporting the failure and proposing a fix. * guix/self.scm (compiled-guix) [*system-test-modules*]: Add the test data files via the 'extra-files' argument. * gnu/local.mk (dist_patch_DATA): Move the tests/data/jami-dummy-account.dat file to... * gnu/local.mk (MODULES_NOT_COMPILED): ... here. 2021-08-02Revert "services: Add a service for Jami."Maxim Cournoyer This reverts commit 69dcc24c9f0cdfea674eb690e7755d26a25ced2b. It broke 'guix pull'. 2021-08-02services: Add a service for Jami.Maxim Cournoyer * gnu/services/telephony.scm (string-or-computed-file?) (string-list?, account-fingerprint-list?): New procedures. (maybe-string-list, maybe-account-fingerprint-list) (maybe-boolean, maybe-string, jami-account-list): New configuration field types. (serialize-string-list, serialize-boolean, serialize-string) (jami-account, jami-account->alist, jami-configuration) (jami-account-list?, jami-account-list-maybe): New procedures. (%jami-accounts): New variable. (jami-configuration->command-line-arguments): New procedure. (jami-dbus-session-activation, jami-shepherd-services): New procedures. (jami-service-type): New variable. * gnu/build/jami-service.scm: New file. * gnu/tests/data/jami-dummy-account.dat: Likewise. * gnu/tests/telephony.scm: Likewise. * gnu/local.mk (GNU_SYSTEM_MODULES): Register them. * Makefile.am (SCM_TESTS): Register the test file. (dist_patch_DATA): Register the new data file. * doc/guix.texi (Telephony Services): Document it.