From patchwork Sun Sep 8 00:18:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kei Kebreau X-Patchwork-Id: 15318 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0C7C917392; Sun, 8 Sep 2019 01:19:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 83C4F17390 for ; Sun, 8 Sep 2019 01:19:12 +0100 (BST) Received: from localhost ([::1]:37692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6kv9-0003Xd-UB for patchwork@mira.cbaines.net; Sat, 07 Sep 2019 20:19:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43456) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6kv3-0003XQ-5J for guix-patches@gnu.org; Sat, 07 Sep 2019 20:19:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6kv1-0004At-B9 for guix-patches@gnu.org; Sat, 07 Sep 2019 20:19:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57656) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i6kv0-00049e-Py for guix-patches@gnu.org; Sat, 07 Sep 2019 20:19:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i6kv0-0006hQ-FD for guix-patches@gnu.org; Sat, 07 Sep 2019 20:19:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#37329] [PATCH] gnu: Add audacious. Resent-From: Kei Kebreau Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 08 Sep 2019 00:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37329 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ricardo Wurmus Received: via spool by 37329-submit@debbugs.gnu.org id=B37329.156790192125724 (code B ref 37329); Sun, 08 Sep 2019 00:19:02 +0000 Received: (at 37329) by debbugs.gnu.org; 8 Sep 2019 00:18:41 +0000 Received: from localhost ([127.0.0.1]:38244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6kuf-0006gq-60 for submit@debbugs.gnu.org; Sat, 07 Sep 2019 20:18:41 -0400 Received: from mout02.posteo.de ([185.67.36.66]:35487) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6kuc-0006gb-JC for 37329@debbugs.gnu.org; Sat, 07 Sep 2019 20:18:39 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 5693A2400FB for <37329@debbugs.gnu.org>; Sun, 8 Sep 2019 02:18:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1567901912; bh=D6CxAC7c47KyTVX4gGJKBESZy4CNg+6jtPEJbvwlmXo=; h=From:To:Cc:Subject:Date:From; b=YDf49RhOLJEjQMIg2U6hwZw9NXKRprIuYH9d2P4l8OVNnPjjlfg0YuXndzVoA3qHW c/f56UZTMuaWm56RdwNjYOAsxRnJeHLpVhs460dl0G2PZ8JH7wxkqhCnPoaU6gvQ2O Z1i9LNzH+N8nmfJYr9nwbZ8jsvhY9LZCD+GvISY5FeNnss/aDuqpvWgDTMgYY2JxhL utSshONjdSUo+e/IRG3xSItVf3i771R+pKE78oRCdXW34cYInPnJLEbrWLrS8un0gG +y9Om5YwFqYnZO2X+k/n6U9khonpkqz/7pKWK1uQWzE14NKK4AcsRjpswNIkZPH9Hh AydbMoaTkGgmQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46QsMp3lNjz9rxG; Sun, 8 Sep 2019 02:18:30 +0200 (CEST) From: Kei Kebreau References: <20190907045755.6578-1-kkebreau@posteo.net> <87ef0swcrf.fsf@nckx> <87imq4xiil.fsf@posteo.net> <87y2yzu9as.fsf@elephly.net> Date: Sat, 07 Sep 2019 20:18:28 -0400 In-Reply-To: <87y2yzu9as.fsf@elephly.net> (Ricardo Wurmus's message of "Sat, 07 Sep 2019 22:43:23 +0200") Message-ID: <87muffiqsr.fsf@posteo.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 37329@debbugs.gnu.org Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Ricardo Wurmus writes: > Kei Kebreau writes: > >>>> + (arguments >>>> + `(#:configure-flags >>>> + (list "--disable-gtk" "--enable-qt" >> >> In reply to your later email: I used Qt instead of the default GTK+ 2 >> because of a personal preference, but apparently it's possible to enable >> both to let users choose what they prefer. > > Would this retain references to *both* toolkits? Wouldn’t this make the > package much bigger than it otherwise would be? > > What’s the smaller variant…? > Enabling both toolkits would retain references to both, but it isn't much larger than enabling only Qt. That said, a GTK+ 2 exclusive build is smaller than a Qt exclusive one by a large margin: Excluding plugins: * Both toolkits: 1495.1 MiB * Qt only: 1344.2 MiB * GTK+ 2 only: 538.0 MiB Including plugins: * Both toolkits: 1736.2 MiB * Qt only: 1734.9 MiB * GTK+ 2 only: 1126.6 MiB >>>> + #:phases >>>> + (modify-phases %standard-phases >>>> + (add-after 'install 'unpack-plugins >>>> + (lambda* (#:key inputs #:allow-other-keys) >>>> + (let ((plugins (assoc-ref inputs >>>> "audacious-plugins"))) >>>> + (invoke "tar" "xvf" plugins) >>>> + (chdir (string-append "audacious-plugins-" >>>> ,version)) >>> >>> It's not wrong, and I know this saves (with-directory-excursion)s down >>> the road, but brr. :-) >>> >> >> Is it the lack of clarity in later phases that's undesirable? > > It’s a littly icky to have phases modify global state (other than the > files they operate on), because it is no longer enough to look at just > the phase of interest. If it can be avoided without making things too > ugly I’d prefer to avoid “chdir” here. Understood. Adding a few "with-directory-excursion" calls isn't a bad addition here. I've attached a new patch with all three toolkit options (Qt only, GTK+ 2 only, both) included for testing purposes. From 7b2b638fc518d9362f1715144d4f50fa5761dcb0 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Sat, 7 Sep 2019 00:48:16 -0400 Subject: [PATCH] gnu: Add audacious. * gnu/packages/music.scm (audacious): New variable. --- gnu/packages/music.scm | 147 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 146 insertions(+), 1 deletion(-) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index a43bccf4f8..0037566519 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -141,7 +141,7 @@ #:use-module (gnu packages xiph) #:use-module (gnu packages golang) #:use-module (gnu packages lua) - #:use-module ((srfi srfi-1) #:select (last))) + #:use-module ((srfi srfi-1) #:select (alist-delete last))) (define-public aria-maestosa (package @@ -203,6 +203,151 @@ and play MIDI files with a few clicks in a user-friendly interface offering score, keyboard, guitar, drum and controller views.") (license license:gpl3+))) +(define-public audacious + (package + (name "audacious") + (version "3.10.1") + (source (origin + (method url-fetch) + (uri (string-append "https://distfiles.audacious-media-player.org/" + "audacious-" version ".tar.bz2")) + (sha256 + (base32 + "14vbkhld5hwh96j8p8hjq9ybvc2m060a1y8crz14i51wpd0fhrl3")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) + #:tests? #f ; no check target + #:phases + (modify-phases %standard-phases + (add-after 'install 'unpack-plugins + (lambda* (#:key inputs #:allow-other-keys) + (let ((plugins (assoc-ref inputs "audacious-plugins"))) + (invoke "tar" "xvf" plugins) + #t))) + (add-after 'unpack-plugins 'configure-plugins + (lambda* (#:key configure-flags outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (with-directory-excursion + (string-append "audacious-plugins-" ,version) + (substitute* "configure" + (("/bin/sh") (which "sh"))) + (apply invoke "./configure" + (append configure-flags + ;; audacious-plugins requires audacious to build. + (list (string-append "PKG_CONFIG_PATH=" + out "/lib/pkgconfig:" + (getenv "PKG_CONFIG_PATH")) + (string-append "--prefix=" out)))))))) + (add-after 'configure-plugins 'build-plugins + (lambda _ + (with-directory-excursion + (string-append "audacious-plugins-" ,version) + (invoke "make" "-j" (number->string (parallel-job-count)))))) + (add-after 'build-plugins 'install-plugins + (lambda _ + (with-directory-excursion + (string-append "audacious-plugins-" ,version) + (invoke "make" "install"))))))) + (native-inputs + `(("audacious-plugins" + ,(origin + (method url-fetch) + (uri (string-append "https://distfiles.audacious-media-player.org/" + "audacious-plugins-" version ".tar.bz2")) + (sha256 + (base32 + "0hi61825ayrwc4snwr76f2669k06fii3n8ll1szjk5zr65v1ghzf")))) + ("gettext" ,gettext-minimal) + ("glib:bin" ,glib "bin") ; for gdbus-codegen + ("pkg-config" ,pkg-config))) + (inputs + `(("dbus" ,dbus) + ("glib" ,glib) + ("gtk+" ,gtk+-2) + ;; Plugin dependencies + ("alsa-lib" ,alsa-lib) + ("curl" ,curl) + ("faad2" ,faad2) + ("ffmpeg" ,ffmpeg) + ("flac" ,flac) + ("fluidsynth" ,fluidsynth) + ("gdk-pixbuf" ,gdk-pixbuf) + ("lame" ,lame) + ("libbs2b" ,libbs2b) + ("libcddb" ,libcddb) + ("libcdio-paranoia" ,libcdio-paranoia) + ("libcue" ,libcue) + ("libmodplug" ,libmodplug) + ("libnotify" ,libnotify) + ("libogg" ,libogg) + ("libsamplerate" ,libsamplerate) + ("libsndfile" ,libsndfile) + ("libvorbis" ,libvorbis) + ("libxcomposite" ,libxcomposite) + ("libxml2" ,libxml2) + ("libxrender" ,libxrender) + ("lirc" ,lirc) + ("jack" ,jack-1) + ("mesa" ,mesa) + ("mpg123" ,mpg123) + ("neon" ,neon) + ("pulseaudio" ,pulseaudio) + ("sdl2" ,sdl2) + ("soxr" ,soxr) + ("wavpack" ,wavpack))) + (home-page "https://audacious-media-player.org") + (synopsis "Modular and skinnable audio player") + (description + "Audacious is an audio player descended from XMMS. Drag and drop folders +and individual song files, search for artists and albums in your entire music +library, or create and edit your own custom playlists. Listen to CD’s or stream +music from the Internet. Tweak the sound with the graphical equalizer or +experiment with LADSPA effects. Enjoy the modern GTK-themed interface or change +things up with Winamp Classic skins. Use the plugins included with Audacious to +fetch lyrics for your music, to set an alarm in the morning, and more.") + ;; According to COPYING, Audacious and its plugins are licensed under the + ;; BSD 2-clause license and libguess is licensed under the BSD 3-clause + ;; license. + (license (list license:bsd-2 + license:bsd-3 + ;; Plugin licenses that aren't BSD 2- or 3-clause. + license:lgpl2.1+ + license:gpl2 + license:gpl2+ + license:gpl3 + license:gpl3+ + license:expat + license:isc + license:lgpl2.0)))) + +(define-public audacious-qt + (package + (inherit audacious) + (name "audacious-qt") + (arguments + (substitute-keyword-arguments (package-arguments audacious) + ((#:configure-flags flags) + `(cons* "--disable-gtk" "--enable-qt" ,flags)))) + (inputs + `(("qtbase" ,qtbase) + ("qtmultimedia" ,qtmultimedia) + ,@(alist-delete "gtk+" (package-inputs audacious)))))) + +(define-public audacious-both + (package + (inherit audacious) + (name "audacious-both") + (arguments + (substitute-keyword-arguments (package-arguments audacious) + ((#:configure-flags flags) + `(cons* "--enable-qt" ,flags)))) + (inputs + `(("qtbase" ,qtbase) + ("qtmultimedia" ,qtmultimedia) + ,@(package-inputs audacious))))) + ;; We don't use the latest release because it depends on Qt4. Instead we ;; download the sources from the tip of the "qt5" branch. (define-public clementine