unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer)
To: guix-devel@gnu.org
Subject: [PATCH] gnu: Add audacity.
Date: Sun, 22 Feb 2015 01:13:57 +0100	[thread overview]
Message-ID: <87mw46kdkq.fsf@taylan.uni.cx> (raw)

[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 5670 bytes --]

From 82e8a7f2a708201ea7fd538580485546849347a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
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


             reply	other threads:[~2015-02-22  0:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-22  0:13 Taylan Ulrich Bayırlı/Kammer [this message]
2015-02-27 16:01 ` [PATCH] gnu: Add audacity Ludovic Courtès
2015-03-03 13:10   ` Taylan Ulrich Bayırlı/Kammer
2015-03-03 20:37     ` Ludovic Courtès
2015-03-03 22:33       ` Taylan Ulrich Bayırlı/Kammer
2015-03-04  9:48         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mw46kdkq.fsf@taylan.uni.cx \
    --to=taylanbayirli@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).