From mboxrd@z Thu Jan 1 00:00:00 1970 From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) Subject: [PATCH] gnu: Add audacity. Date: Sun, 22 Feb 2015 01:13:57 +0100 Message-ID: <87mw46kdkq.fsf@taylan.uni.cx> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPKBO-0002br-0U for guix-devel@gnu.org; Sat, 21 Feb 2015 19:14:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YPKBM-0006xz-Cn for guix-devel@gnu.org; Sat, 21 Feb 2015 19:14:01 -0500 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:33933) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPKBM-0006xr-1k for guix-devel@gnu.org; Sat, 21 Feb 2015 19:14:00 -0500 Received: by mail-wi0-f171.google.com with SMTP id hi2so9938854wib.4 for ; Sat, 21 Feb 2015 16:13:59 -0800 (PST) Received: from taylan.uni.cx (p200300514A1A690C0213E8FFFEED36FB.dip0.t-ipconnect.de. [2003:51:4a1a:690c:213:e8ff:feed:36fb]) by mx.google.com with ESMTPSA id hv5sm48669737wjb.16.2015.02.21.16.13.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Feb 2015 16:13:58 -0800 (PST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/plain Several weird issues with this one: - It tries to find libid3tag and libmad via pkg-config even though they don't install .pc files. Perhaps we can generate them manually in the install phase of those packages, or maybe they just don't get installed due to a bug. Perhaps they just need 'pkg-config' as an input? I might try that next. - Audacity apparently uses PortAudio version 19, but the in-tree one has a function which the upstream one doesn't. It would be strange if they had an API change without changing the version, so no idea what's going on there. - Dynamic loading of FFmpeg fails and I couldn't figure out why (it didn't print any errors when I ran Audacity and normally it's pretty verbose) so I just passed --disable-dynamic-loading and it was fine. - The test suite fails due to some missing portaudio.h file. I didn't come far trying to figure out why this happens so I just disabled the test suite. I might try looking into all these further, but they aren't critical to Audacity's working. Decoding MP3 works fine without libmad/libid3tag. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0009-gnu-Add-audacity.patch Content-Description: patch >From 82e8a7f2a708201ea7fd538580485546849347a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Fri, 20 Feb 2015 21:52:21 +0100 Subject: [PATCH 9/9] gnu: Add audacity. * gnu/packages/audio.scm (audacity): New variable. * gnu/packages/patches/audacity-fix-ffmpeg-binding.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. --- gnu-system.am | 1 + gnu/packages/audio.scm | 71 ++++++++++++++++++++++ .../patches/audacity-fix-ffmpeg-binding.patch | 32 ++++++++++ 3 files changed, 104 insertions(+) create mode 100644 gnu/packages/patches/audacity-fix-ffmpeg-binding.patch diff --git a/gnu-system.am b/gnu-system.am index 3eb7893..78e235f 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -355,6 +355,7 @@ dist_patch_DATA = \ gnu/packages/patches/ath9k-htc-firmware-binutils.patch \ gnu/packages/patches/ath9k-htc-firmware-gcc.patch \ gnu/packages/patches/ath9k-htc-firmware-objcopy.patch \ + gnu/packages/patches/audacity-fix-ffmpeg-binding.patch \ gnu/packages/patches/automake-skip-amhello-tests.patch \ gnu/packages/patches/avahi-localstatedir.patch \ gnu/packages/patches/avrdude-fix-libusb.patch \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 9e24dc8..917ffa9 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -47,6 +47,8 @@ #:use-module (gnu packages file) #:use-module (gnu packages cmake) #:use-module (gnu packages which) + #:use-module (gnu packages wxwidgets) + #:use-module (gnu packages video) #:use-module (srfi srfi-1)) (define-public aubio @@ -817,3 +819,72 @@ portions of LAME.") to record and/or play sound using a callback function or a blocking read/write interface.") (license license:expat))) + +(define-public audacity + (package + (name "audacity") + (version "2.0.6") + (source + (origin + (method url-fetch) + (uri + (string-append + "mirror://sourceforge/audacity/audacity-minsrc-" version ".tar.xz")) + (sha256 + (base32 "0yvxlfgjwdn7rvjrkr2wdg6xlwn5j3lwcdhsjs1ddq3qws8c301h")) + (patches (list (search-patch "audacity-fix-ffmpeg-binding.patch"))))) + (build-system gnu-build-system) + (inputs + ;; TODO: Add portSMF and libwidgetextra. (In-tree versions of these are + ;; used when an external version isn't found.) + `(("wxwidgets" ,wxwidgets-2) + ("gtk" ,gtk+-2) + ("alsa-lib" ,alsa-lib) + ("jack" ,jack-2) + ("expat" ,expat) + ("ffmpeg" ,ffmpeg) + ("lame" ,lame) + ("flac" ,flac) + ;; XXX These two aren't detected by ./configure because they don't + ;; install .pc files. + ;; ("libid3tag" ,libid3tag) + ;; ("libmad" ,libmad) + ("libsbsms" ,libsbsms) + ("libsndfile" ,libsndfile) + ("soundtouch" ,soundtouch) + ("soxr" ,soxr) ;replaces libsamplerate + ("twolame" ,twolame) + ("vamp" ,vamp) + ("libvorbis" ,libvorbis) + ("lv2" ,lv2) + ("lilv" ,lilv) + ;; XXX ./configure rejects this because it can't find + ;; `Pa_GetStreamHostApiType' in it. An in-tree version is used though. + ;; ("portaudio" ,portaudio) + )) + (native-inputs + `(("pkg-config" ,pkg-config) + ("python" ,python-2) + ("which" ,which))) + (arguments + '(#:phases + (alist-cons-before + 'check 'fix-missing-check-target + (lambda _ + (substitute* '("lib-src/portaudio-v19/Makefile") + ;; Just put the line somewhere suitable. + (("^install: " all) + (string-append "check:\n\n" all)))) + %standard-phases) + ;; Loading FFmpeg dynamically fails for some reason. + #:configure-flags '("--disable-dynamic-loading") + ;; XXX Tests fail with "portaudio.h: No such file or directory" even + ;; though the in-tree portaudio version is used. + #:tests? #f)) + (home-page "http://audacity.sourceforge.net/") + (synopsis "Software for recording and editing sounds") + (description + "Audacity is a multi-track audio editor designed for recording, playing +and editing digital audio. It features digital effects and spectrum analysis +tools.") + (license license:gpl2+))) diff --git a/gnu/packages/patches/audacity-fix-ffmpeg-binding.patch b/gnu/packages/patches/audacity-fix-ffmpeg-binding.patch new file mode 100644 index 0000000..d6d6533 --- /dev/null +++ b/gnu/packages/patches/audacity-fix-ffmpeg-binding.patch @@ -0,0 +1,32 @@ +This resolves some "declaration of C function conflicts with previous +declaration" errors during compilation. + +--- a/src/FFmpeg.h 2015-02-21 00:33:33.853857529 +0100 ++++ b/src/FFmpeg.h 2015-02-21 00:35:09.626497205 +0100 +@@ -688,7 +688,7 @@ + FFMPEG_FUNCTION_WITH_RETURN( + AVOutputFormat*, + av_oformat_next, +- (AVOutputFormat *f), ++ (const AVOutputFormat *f), + (f) + ); + FFMPEG_FUNCTION_WITH_RETURN( +@@ -755,7 +755,7 @@ + FFMPEG_FUNCTION_WITH_RETURN( + int, + av_fifo_size, +- (AVFifoBuffer *f), ++ (const AVFifoBuffer *f), + (f) + ); + FFMPEG_FUNCTION_WITH_RETURN( +@@ -801,7 +801,7 @@ + FFMPEG_FUNCTION_WITH_RETURN( + AVDictionaryEntry *, + av_dict_get, +- (AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags), ++ (const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags), + (m, key, prev, flags) + ); + FFMPEG_FUNCTION_WITH_RETURN( -- 2.2.1 --=-=-=--