Package: guix-patches;
Reported by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Date: Sun, 2 Jan 2022 09:52:01 UTC
Severity: normal
Tags: patch
Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52946 in the body.
You can then email your comments to 52946 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#52946
; Package guix-patches
.
(Sun, 02 Jan 2022 09:52:01 GMT) Full text and rfc822 format available.Liliana Marie Prikler <liliana.prikler <at> gmail.com>
:guix-patches <at> gnu.org
.
(Sun, 02 Jan 2022 09:52:01 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com> To: guix-patches <at> gnu.org Subject: [PATCH 0/2] Update Audacity to 3.1.3. Date: Sun, 2 Jan 2022 10:42:52 +0100
This series updates wxwidgets-3.1 and thereafter audacity. Both packages come with a series of adjustments to things changed in the build system in newer versions. Particularly concerning is that audacity relies on linux-internal headers in order to do file magic. Would it be feasible to patch their code so that it works in terms of the file package? Cheers Liliana Marie Prikler (2): gnu: wxwidgets-3.1: Update to 3.1.5. gnu: audacity: Update to 3.1.3 gnu/local.mk | 2 - gnu/packages/audio.scm | 66 ++++++++++++------- .../patches/audacity-add-include.patch | 15 ----- ...audacity-build-with-system-portaudio.patch | 62 ----------------- gnu/packages/wxwidgets.scm | 29 ++++++-- 5 files changed, 66 insertions(+), 108 deletions(-) delete mode 100644 gnu/packages/patches/audacity-add-include.patch delete mode 100644 gnu/packages/patches/audacity-build-with-system-portaudio.patch -- 2.34.0
guix-patches <at> gnu.org
:bug#52946
; Package guix-patches
.
(Sun, 02 Jan 2022 10:27:02 GMT) Full text and rfc822 format available.Message #8 received at 52946 <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com> To: 52946 <at> debbugs.gnu.org Subject: [PATCH 1/2] gnu: wxwidgets-3.1: Update to 3.1.5. Date: Thu, 30 Dec 2021 15:23:51 +0100
* gnu/packages/wxwidgets.scm (wxwidgets-3.1): Update to 3.1.5. [inputs]: Add catch-framework. [#:configure-flags]: List out all flags. [#:phases]: Add ‘add-catch’ phase. Replace ‘configure’ with manual configuration. --- gnu/packages/wxwidgets.scm | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm index 1776532..41ea99f 100644 --- a/gnu/packages/wxwidgets.scm +++ b/gnu/packages/wxwidgets.scm @@ -26,6 +26,7 @@ (define-module (gnu packages wxwidgets) #:use-module (guix packages) + #:use-module (guix gexp) #:use-module (guix download) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix l:) @@ -33,6 +34,7 @@ (define-module (gnu packages wxwidgets) #:use-module (guix build-system python) #:use-module (guix utils) #:use-module (gnu packages) + #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages databases) #:use-module (gnu packages freedesktop) @@ -162,7 +164,7 @@ (define-public wxwidgets-gtk2 ;; This can be removed when wxWidgets is updated to the next stable version. (define-public wxwidgets-3.1 (package (inherit wxwidgets) - (version "3.1.0") + (version "3.1.5") (source (origin (method git-fetch) @@ -172,13 +174,32 @@ (define-public wxwidgets-3.1 (file-name (git-file-name "wxwidgets" version)) (sha256 (base32 - "14kl1rsngm70v3mbyv1mal15iz2b18k97avjx8jn7s81znha1c7f")))) + "0j998nzqmycafignclxmahgqm5kgs1fiqbsiyvzm7bnpnafi333y")))) (inputs (modify-inputs (package-inputs wxwidgets) - (prepend gstreamer gst-plugins-base))) + (prepend catch-framework gstreamer gst-plugins-base))) (arguments (substitute-keyword-arguments (package-arguments wxwidgets) ((#:configure-flags flags) - `(cons "--enable-mediactrl" ,flags)))))) + '(list "--with-regex" "--with-libmspack" "--with-sdl" + "--enable-mediactrl" "--enable-webviewwebkit")) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'add-catch + (lambda* (#:key inputs #:allow-other-keys) + (install-file + (search-input-file inputs "include/catch.hpp") + "3rdparty/catch/include/"))) + (replace 'configure + (lambda* (#:key configure-flags inputs native-inputs outputs + #:allow-other-keys) + (let ((sh (search-input-file (or native-inputs inputs) + "bin/sh"))) + (apply invoke "./configure" + (string-append "SHELL=" sh) + (string-append "CONFIG_SHELL=" sh) + (string-append "--prefix=" + (assoc-ref outputs "out")) + configure-flags)))))))))) (define-public wxwidgets-gtk2-3.1 (package/inherit wxwidgets-3.1 -- 2.34.0
guix-patches <at> gnu.org
:bug#52946
; Package guix-patches
.
(Sun, 02 Jan 2022 10:27:02 GMT) Full text and rfc822 format available.Message #11 received at 52946 <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com> To: 52946 <at> debbugs.gnu.org Subject: [PATCH 2/2] gnu: audacity: Update to 3.1.3 Date: Sun, 2 Jan 2022 10:37:35 +0100
* 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\"") "<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 - ;; <http://sourceforge.net/p/audacity/mailman/message/33524292/>. - #:tests? #f)) + ;; 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)) + (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 <sys/time.h>, 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 <sys/time.h> -+ - #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 <ao2 <at> ao2.it> -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 <string.h> - // #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 -- 2.34.0
guix-patches <at> gnu.org
:bug#52946
; Package guix-patches
.
(Mon, 03 Jan 2022 04:12:01 GMT) Full text and rfc822 format available.Message #14 received at 52946 <at> debbugs.gnu.org (full text, mbox):
From: Leo Famulari <leo <at> famulari.name> To: Liliana Marie Prikler <liliana.prikler <at> gmail.com> Cc: 52946 <at> debbugs.gnu.org Subject: Re: [bug#52946] [PATCH 0/2] Update Audacity to 3.1.3. Date: Sun, 2 Jan 2022 23:11:21 -0500
On Sun, Jan 02, 2022 at 10:42:52AM +0100, Liliana Marie Prikler wrote: > This series updates wxwidgets-3.1 and thereafter audacity. Both packages > come with a series of adjustments to things changed in the build system > in newer versions. Thanks, it works for me using Guix on Debian. > Particularly concerning is that audacity relies on linux-internal headers > in order to do file magic. Would it be feasible to patch their code so > that it works in terms of the file package? I don't know about this subject, but I noticed the same thing while attempting this update. Do you think it's a problem?
guix-patches <at> gnu.org
:bug#52946
; Package guix-patches
.
(Tue, 04 Jan 2022 20:44:01 GMT) Full text and rfc822 format available.Message #17 received at 52946 <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com> To: Leo Famulari <leo <at> famulari.name> Cc: 52946 <at> debbugs.gnu.org Subject: Re: [bug#52946] [PATCH 0/2] Update Audacity to 3.1.3. Date: Tue, 04 Jan 2022 21:43:37 +0100
Am Sonntag, dem 02.01.2022 um 23:11 -0500 schrieb Leo Famulari: > On Sun, Jan 02, 2022 at 10:42:52AM +0100, Liliana Marie Prikler > wrote: > > This series updates wxwidgets-3.1 and thereafter audacity. Both > > packages come with a series of adjustments to things changed in the > > build system in newer versions. > > Thanks, it works for me using Guix on Debian. Good to know. > > Particularly concerning is that audacity relies on linux-internal > > headers in order to do file magic. Would it be feasible to patch > > their code so that it works in terms of the file package? > > I don't know about this subject, but I noticed the same thing while > attempting this update. Do you think it's a problem? I'd like to avoid it if possible. Audacity uses it to determine whether a particular file system is FAT so as to determine its limitations -- I'm sure there are better ways of doing that. Cheers
guix-patches <at> gnu.org
:bug#52946
; Package guix-patches
.
(Tue, 04 Jan 2022 21:05:02 GMT) Full text and rfc822 format available.Message #20 received at 52946 <at> debbugs.gnu.org (full text, mbox):
From: Leo Famulari <leo <at> famulari.name> To: Liliana Marie Prikler <liliana.prikler <at> gmail.com> Cc: 52946 <at> debbugs.gnu.org Subject: Re: [bug#52946] [PATCH 0/2] Update Audacity to 3.1.3. Date: Tue, 4 Jan 2022 16:04:17 -0500
On Tue, Jan 04, 2022 at 09:43:37PM +0100, Liliana Marie Prikler wrote: > I'd like to avoid it if possible. Audacity uses it to determine > whether a particular file system is FAT so as to determine its > limitations -- I'm sure there are better ways of doing that. I agree that it would be nice to avoid it. On the other hand, if that's how Audacity made their program work, we should accept it unless it causes serious problems. I don't think that feature development of packaged programs should happen in the distro. I don't know what problems it could cause, just that it's unusual. A few packages do refer directly to "kernel-headers" from the build environment.
Liliana Marie Prikler <liliana.prikler <at> gmail.com>
:Liliana Marie Prikler <liliana.prikler <at> gmail.com>
:Message #25 received at 52946-done <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com> To: Leo Famulari <leo <at> famulari.name> Cc: 52946-done <at> debbugs.gnu.org Subject: Re: [bug#52946] [PATCH 0/2] Update Audacity to 3.1.3. Date: Wed, 19 Jan 2022 21:16:16 +0100
Am Dienstag, dem 04.01.2022 um 16:04 -0500 schrieb Leo Famulari: > On Tue, Jan 04, 2022 at 09:43:37PM +0100, Liliana Marie Prikler > wrote: > > I'd like to avoid it if possible. Audacity uses it to determine > > whether a particular file system is FAT so as to determine its > > limitations -- I'm sure there are better ways of doing that. > > I agree that it would be nice to avoid it. On the other hand, if > that's how Audacity made their program work, we should accept it > unless it causes serious problems. I don't think that feature > development of packaged programs should happen in the distro. > > I don't know what problems it could cause, just that it's unusual. A > few packages do refer directly to "kernel-headers" from the build > environment. Since it is just one header which is unlikely to change between kernel versions, I now pushed this as-is. Thanks
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Thu, 17 Feb 2022 12:24:05 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.