From patchwork Sun Jan 2 09:37:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 35883 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 3682C27BBEB; Sun, 2 Jan 2022 10:27:15 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6713127BBE9 for ; Sun, 2 Jan 2022 10:27:14 +0000 (GMT) Received: from localhost ([::1]:49824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n3y53-00078B-Jo for patchwork@mira.cbaines.net; Sun, 02 Jan 2022 05:27:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3y4s-00076q-UV for guix-patches@gnu.org; Sun, 02 Jan 2022 05:27:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48409) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n3y4s-0000PW-Jv for guix-patches@gnu.org; Sun, 02 Jan 2022 05:27:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n3y4s-0003sq-JZ for guix-patches@gnu.org; Sun, 02 Jan 2022 05:27:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52946] [PATCH 2/2] gnu: audacity: Update to 3.1.3 References: In-Reply-To: Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 02 Jan 2022 10:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52946 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52946@debbugs.gnu.org Received: via spool by 52946-submit@debbugs.gnu.org id=B52946.164111916814845 (code B ref 52946); Sun, 02 Jan 2022 10:27:02 +0000 Received: (at 52946) by debbugs.gnu.org; 2 Jan 2022 10:26:08 +0000 Received: from localhost ([127.0.0.1]:59954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3y3z-0003rH-36 for submit@debbugs.gnu.org; Sun, 02 Jan 2022 05:26:07 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3y3w-0003qe-5v for 52946@debbugs.gnu.org; Sun, 02 Jan 2022 05:26:04 -0500 Received: by mail-wr1-f66.google.com with SMTP id o3so6209122wrh.10 for <52946@debbugs.gnu.org>; Sun, 02 Jan 2022 02:26:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:subject:to:content-transfer-encoding:message-id :mime-version; bh=jKNtqpCeKZaI8U/clVZzjli+97vA2I3P4aTY4QLKwzc=; b=PhMMUCNwyhrWXaOsPr/aMIyiCza4FsagfAdM5iPIiTuUfCyjW7hCYLWd8Qxy6rEJoH LQ7gkSuXLmP+KVpD38Cf9rJ5yc7QhdcXodsYJ/VLJ1O4WCUp0mmZ4bZOw//ijgBxM3qb 0jRVgnf/AJGOQ+u93lgtT+Js7pV3QXyjPOLb4ps+Town8WVNcwAvAghc13AKx5miC/7i jPl4VXukqyf5HSAu8hMv6Rzo92GUH663C+prSZ9RD8j5WxN7A2ke4XdaMpuXEItWMF/n wvk37sOyRxqlcpMDXD+NkB6kdf9iKAm17+uRdb2MZQdBRTTzOUjmuakS+87W9tSfR2cE Jl0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:to:content-transfer-encoding :message-id:mime-version; bh=jKNtqpCeKZaI8U/clVZzjli+97vA2I3P4aTY4QLKwzc=; b=vf9H6DcDpPwveyJ4T3V1n+gNEOKdgto9x2fdSQe1dlDyMqMwZOdHOgNHM5z84JB9Yd Hhn3IuAKeduwuDRqYgx6QFkM2562bBZ0jV+UisNv2PqyS1ddh2QWj8rM4ihQ7ZcyF02d OCdoreUNwFP4MGr8ZYVionmtTkZH/8dNYQqmMwO84VS89KImvXV5e+UcxHN+mq09aHwo vOghXk0G+oG0ewBCHcTZ444oytXgHLYxxhpXaIupM6AZ/LI5cUKGLkz5PCcVY7HAhAFB C+noekjNylAADqO2FPV4Uv+kFsN525h5egrlJIdGehaJYdIsngu2G5GRYSMCCg3R+9eN Ut8Q== X-Gm-Message-State: AOAM530jTcBkVONV+/gOUjw8Fgqj+TTqdhUHmzzGuyNyB1V0I6at7/7L 6afhxx+Vzba2JbzANFrIJdUq+F4N+EHksA== X-Google-Smtp-Source: ABdhPJza5hHn4+XIBiQ5DD18LufGA71h31PyPFemlSKr4Gx1CvKtp4D5sszf6XzQK2EpZL/dgW+VFA== X-Received: by 2002:a5d:5887:: with SMTP id n7mr34802891wrf.510.1641119158478; Sun, 02 Jan 2022 02:25:58 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id a2sm35414123wri.17.2022.01.02.02.25.57 for <52946@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jan 2022 02:25:58 -0800 (PST) From: Liliana Marie Prikler Date: Sun, 2 Jan 2022 10:37:35 +0100 Message-ID: <10fa664b44b8eefedb45bd444fc16fabea5595a8.camel@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/audacity-add-include.patch: Delete file. * gnu/packages/patches/audacity-build-with-system-portaudio.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/audio (audacity): Update to 3.1.3 [inputs]: Use wxwidgets-3.1. Add linux-libre-headers, libjpeg-turbo, sqlite, portaudio. [#:configure-flags]: Update to disable conan during build, prefer system libraries, and disable features that phone home. [#:phases]: Add fix-cmake-rpath to ensure correct DT_RUNPATHs. Adjust comment-out-revision-indent and use-upstream-headers. [native-search-paths]: Add AUDACITY_MODULES_PATH and AUDACITY_PATH. --- gnu/local.mk | 2 - gnu/packages/audio.scm | 66 ++++++++++++------- .../patches/audacity-add-include.patch | 15 ----- ...audacity-build-with-system-portaudio.patch | 62 ----------------- 4 files changed, 41 insertions(+), 104 deletions(-) delete mode 100644 gnu/packages/patches/audacity-add-include.patch delete mode 100644 gnu/packages/patches/audacity-build-with-system-portaudio.patch diff --git a/gnu/local.mk b/gnu/local.mk index 21e536a..fd5c696 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -854,8 +854,6 @@ dist_patch_DATA = \ %D%/packages/patches/ath9k-htc-firmware-gcc-compat.patch \ %D%/packages/patches/ath9k-htc-firmware-objcopy.patch \ %D%/packages/patches/atlas-gfortran-compat.patch \ - %D%/packages/patches/audacity-build-with-system-portaudio.patch \ - %D%/packages/patches/audacity-add-include.patch \ %D%/packages/patches/audiofile-fix-datatypes-in-tests.patch \ %D%/packages/patches/audiofile-fix-sign-conversion.patch \ %D%/packages/patches/audiofile-CVE-2015-7747.patch \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 665631a..6b0c722 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -723,7 +723,7 @@ (define-public ardour (define-public audacity (package (name "audacity") - (version "2.4.2") + (version "3.1.3") (source (origin (method git-fetch) @@ -733,9 +733,7 @@ (define-public audacity (file-name (git-file-name name version)) (sha256 (base32 - "0lklcvqkxrr2gkb9gh3422iadzl2rv9v0a8s76rwq43lj2im7546")) - (patches (search-patches "audacity-build-with-system-portaudio.patch" - "audacity-add-include.patch")) + "1689q9apbjf9nnda62shb8j7hm4hxd47mhk4l5h3c728mjjkilmi")) (modules '((guix build utils))) (snippet ;; Remove bundled libraries. @@ -743,13 +741,10 @@ (define-public audacity (for-each (lambda (dir) (delete-file-recursively (string-append "lib-src/" dir))) - '("expat" "ffmpeg" "lame" "libflac" "libid3tag" "libmad" "libogg" - "libsndfile" "libsoxr" "libvamp" "libvorbis" "lv2" - "portmidi" "soundtouch" "twolame" + '("libsoxr" "libvamp" "lv2" "soundtouch" "sqlite" "twolame" ;; FIXME: these libraries have not been packaged yet: ;; "libnyquist" ;; "libscorealign" - ;; "libwidgetextra" ;; "portburn" ;; "portsmf" ;; "portmixer" @@ -761,26 +756,30 @@ (define-public audacity #t)))) (build-system cmake-build-system) (inputs - (list wxwidgets + (list wxwidgets-3.1 gtk+ alsa-lib jack-1 expat ffmpeg lame + linux-libre-headers flac libid3tag + libjpeg-turbo libmad ;;("libsbsms" ,libsbsms) ;bundled version is modified libsndfile soundtouch soxr ;replaces libsamplerate + sqlite twolame vamp libvorbis lv2 lilv ;for lv2 suil ;for lv2 + portaudio portmidi)) (native-inputs `(("autoconf" ,autoconf) @@ -793,10 +792,12 @@ (define-public audacity (arguments `(#:configure-flags (list - ;; Loading FFmpeg dynamically is problematic. - "-Daudacity_use_ffmpeg=linked" - "-Daudacity_use_lame=system" - "-Daudacity_use_portsmf=system") + "-Daudacity_conan_enabled=off" + "-Daudacity_lib_preference=system" + ;; TODO: enable this flag once we've packaged all dependencies + ;; "-Daudacity_obey_system_dependencies=on" + ;; disable crash reports, updates, ..., anything that phones home + "-Daudacity_has_networking=off") #:imported-modules ((guix build glib-or-gtk-build-system) ,@%cmake-build-system-modules) #:modules @@ -805,27 +806,42 @@ (define-public audacity ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)) #:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-cmake-rpath + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "CMakeLists.txt" + (("\\$ORIGIN/\\.\\./\\$\\{_PKGLIB\\}") + (string-append (assoc-ref outputs "out") "/lib/audacity")) + (("CMAKE_BUILD_WITH_INSTALL_RPATH [A-Z]*") + "CMAKE_BUILD_WITH_INSTALL_RPATH TRUE") + (("CMAKE_INSTALL_RPATH_USE_LINK_PATH [A-Z]*") + "CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE")) + (substitute* "src/CMakeLists.txt" + (("-Wl,--disable-new-dtags") "-Wl,--enable-new-dtags")))) (add-after 'unpack 'comment-out-revision-ident (lambda _ + (substitute* "src/CMakeLists.txt" + (("file\\( TOUCH \".*RevisionIdent\\.h\" \\)" directive) + (string-append "# " directive))) (substitute* "src/AboutDialog.cpp" (("(.*RevisionIdent\\.h.*)" include-line) (string-append "// " include-line))))) (add-after 'unpack 'use-upstream-headers (lambda* (#:key inputs #:allow-other-keys) - (substitute* '("src/NoteTrack.cpp" - "src/AudioIO.cpp" - "src/AudioIO.h" - "src/AudioIOBase.cpp") - (("../lib-src/portmidi/pm_common/portmidi.h") "portmidi.h") - (("../lib-src/portmidi/porttime/porttime.h") "porttime.h")) - (substitute* "src/prefs/MidiIOPrefs.cpp" - (("../../lib-src/portmidi/pm_common/portmidi.h") "portmidi.h")))) + (substitute* '("libraries/lib-files/FileNames.cpp") + (("\"/usr/include/linux/magic.h\"") "")))) (add-after 'wrap-program 'glib-or-gtk-wrap (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))) - ;; The test suite is not "well exercised" according to the developers, - ;; and fails with various errors. See - ;; . - #:tests? #f)) + ;; The test suite is not "well exercised" according to the developers, + ;; and fails with various errors. See + ;; . + #:tests? #f)) + (native-search-paths + (list (search-path-specification + (variable "AUDACITY_MODULES_PATH") + (files '("lib/audacity/modules"))) + (search-path-specification + (variable "AUDACITY_PATH") + (files '("share/audacity"))))) (home-page "https://www.audacityteam.org/") (synopsis "Software for recording and editing sounds") (description diff --git a/gnu/packages/patches/audacity-add-include.patch b/gnu/packages/patches/audacity-add-include.patch deleted file mode 100644 index a7f2791..0000000 --- a/gnu/packages/patches/audacity-add-include.patch +++ /dev/null @@ -1,15 +0,0 @@ -Without , gettimeofday is undefined. - -diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp -index 0187e3962..e15d55f4c 100644 ---- a/src/AudioIO.cpp -+++ b/src/AudioIO.cpp -@@ -479,6 +479,8 @@ time warp info and AudioIOListener and whether the playback is looped. - #include "../lib-src/portmidi/porttime/porttime.h" - #include "../lib-src/header-substitutes/allegro.h" - -+#include -+ - #define MIDI_SLEEP 10 /* milliseconds */ - // how long do we think the thread that fills MIDI buffers, - // if it is separate from the portaudio thread, diff --git a/gnu/packages/patches/audacity-build-with-system-portaudio.patch b/gnu/packages/patches/audacity-build-with-system-portaudio.patch deleted file mode 100644 index 05325a1..0000000 --- a/gnu/packages/patches/audacity-build-with-system-portaudio.patch +++ /dev/null @@ -1,62 +0,0 @@ -Downloaded from here: -https://sourceforge.net/p/audacity/mailman/message/36106562/ - -Modified for use on later versions of audacity. - ->From 5f9482a191359f2c477763a36d2c865c5f186602 Mon Sep 17 00:00:00 2001 -From: Antonio Ospite -Date: Tue, 7 Nov 2017 13:06:33 +0100 -Subject: [PATCH] Fix building against the system portaudio library - -Building against the system portaudio results in this error: - -./src/AudioIO.cpp:983: undefined reference to `PaUtil_GetTime' -audacity-AudioIO.o: In function `audacityAudioCallback(void const*, void*, -unsigned long, PaStreamCallbackTimeInfo const*, unsigned long, void*)': -./src/AudioIO.cpp:4630: undefined reference to `PaUtil_GetTime' -collect2: error: ld returned 1 exit status -Makefile:2349: recipe for target 'audacity' failed -make[3]: *** [audacity] Error 1 - -This is because PaUtil_GetTime is declared as a C symbol in pa_util.h -but is resolved as a C++ symbol at link time. - -Audacity fixes this in the local tree with this change: -https://github.com/audacity/audacity/commit/38fd97b8e26060332ab3e9e000a8882326a70ba7 - -However this is not general enough for the portaudio debian package. - -Since PaUtil_GetTime() is the only function causing problems, just copy -over the code where it's used. ---- - src/AudioIO.cpp | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp -index 48715869c..bb4bf472c 100644 ---- a/src/AudioIO.cpp -+++ b/src/AudioIO.cpp -@@ -480,9 +480,22 @@ time warp info and AudioIOListener and whether the playback is looped. - #define ROUND(x) (int) ((x)+0.5) - //#include - // #include "../lib-src/portmidi/pm_common/portmidi.h" -- #include "../lib-src/portaudio-v19/src/common/pa_util.h" - #include "NoteTrack.h" - #endif -+PaTime PaUtil_GetTime( void ) -+{ -+#ifdef HAVE_MACH_ABSOLUTE_TIME -+ return mach_absolute_time() * machSecondsConversionScaler_; -+#elif defined(HAVE_CLOCK_GETTIME) -+ struct timespec tp; -+ clock_gettime(CLOCK_REALTIME, &tp); -+ return (PaTime)(tp.tv_sec + tp.tv_nsec * 1e-9); -+#else -+ struct timeval tv; -+ gettimeofday( &tv, NULL ); -+ return (PaTime) tv.tv_usec * 1e-6 + tv.tv_sec; -+#endif -+} - - #ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT - #define LOWER_BOUND 0.0