Browse Source

gnu: Add audacity.

* gnu/packages/audacity.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/patches/audacity-fix-ffmpeg-binding.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
gn-latest-20200428
Taylan Ulrich Bayırlı/Kammer 6 years ago
parent
commit
147479c918
3 changed files with 136 additions and 0 deletions
  1. +2
    -0
      gnu-system.am
  2. +102
    -0
      gnu/packages/audacity.scm
  3. +32
    -0
      gnu/packages/patches/audacity-fix-ffmpeg-binding.patch

+ 2
- 0
gnu-system.am View File

@ -38,6 +38,7 @@ GNU_SYSTEM_MODULES = \
gnu/packages/asciidoc.scm \
gnu/packages/aspell.scm \
gnu/packages/attr.scm \
gnu/packages/audacity.scm \
gnu/packages/audio.scm \
gnu/packages/autogen.scm \
gnu/packages/autotools.scm \
@ -369,6 +370,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 \


+ 102
- 0
gnu/packages/audacity.scm View File

@ -0,0 +1,102 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;;
;;; 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 audacity)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages audio)
#:use-module (gnu packages base)
#:use-module (gnu packages gtk)
#:use-module (gnu packages linux)
#:use-module (gnu packages mp3)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages xiph)
#:use-module (gnu packages xml)
#:use-module (gnu packages video)
#:use-module (gnu packages wxwidgets))
(define-public audacity
(package
(name "audacity")
(version "2.1.0")
(source
(origin
(method url-fetch)
(uri
(string-append
"mirror://sourceforge/audacity/audacity-minsrc-" version ".tar.xz"))
(sha256
(base32 "1cs2w3fwqylpqmfwkvlgdx5lhclpckfil7pqibl37qlbnf4qvndh"))
(patches (list (search-patch "audacity-fix-ffmpeg-binding.patch")))))
(build-system gnu-build-system)
(inputs
;; TODO: Add portSMF and libwidgetextra once they're packaged. In-tree
;; versions shipping with Audacity are used for now.
`(("wxwidgets" ,wxwidgets-2)
("gtk" ,gtk+-2)
("alsa-lib" ,alsa-lib)
("jack" ,jack-2)
("expat" ,expat)
("ffmpeg" ,ffmpeg)
("lame" ,lame)
("flac" ,flac)
("libid3tag" ,libid3tag)
("libmad" ,libmad)
("libsbsms" ,libsbsms)
("libsndfile" ,libsndfile)
("soundtouch" ,soundtouch)
("soxr" ,soxr) ;replaces libsamplerate
("twolame" ,twolame)
("vamp" ,vamp)
("libvorbis" ,libvorbis)
("lv2" ,lv2)
("lilv" ,lilv)
("portaudio" ,portaudio)))
(native-inputs
`(("pkg-config" ,pkg-config)
("python" ,python-2)
("which" ,which)))
(arguments
'(#:configure-flags
(let ((libid3tag (assoc-ref %build-inputs "libid3tag"))
(libmad (assoc-ref %build-inputs "libmad")))
(list
;; Loading FFmpeg dynamically is problematic.
"--disable-dynamic-loading"
;; libid3tag and libmad provide no .pc files, so pkg-config fails to
;; find them. Force their inclusion.
(string-append "ID3TAG_CFLAGS=-I" libid3tag "/include")
(string-append "ID3TAG_LIBS=-L" libid3tag "/lib -lid3tag -lz")
(string-append "LIBMAD_CFLAGS=-I" libmad "/include")
(string-append "LIBMAD_LIBS=-L" libmad "/lib -lmad")))
;; The test suite is not "well exercised" according to the developers,
;; and fails with various errors. See
;; <http://sourceforge.net/p/audacity/mailman/message/33524292/>.
#: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+)))

+ 32
- 0
gnu/packages/patches/audacity-fix-ffmpeg-binding.patch View File

@ -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(

Loading…
Cancel
Save