GNU bug report logs - #32887
[PATCH] gnu: Audacity: Use glib-or-gtk-build-system instead of a wrapper.

Previous Next

Package: guix-patches;

Reported by: Leo Famulari <leo <at> famulari.name>

Date: Sun, 30 Sep 2018 17:12:01 UTC

Severity: normal

Tags: patch

Done: Leo Famulari <leo <at> famulari.name>

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 32887 in the body.
You can then email your comments to 32887 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


Report forwarded to guix-patches <at> gnu.org:
bug#32887; Package guix-patches. (Sun, 30 Sep 2018 17:12:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Famulari <leo <at> famulari.name>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 30 Sep 2018 17:12:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Audacity: Use glib-or-gtk-build-system instead of a
 wrapper.
Date: Sun, 30 Sep 2018 13:11:04 -0400
The wrapper was added to prevent a crash when using the "open file"
dialog on foreign distros. Using the glib-or-gtk-build-system works,
too, and should be simpler to maintain in the long run. However, with
this change, the build fails unless we patch the translation Makefile.
I'm not sure why that is.

Thoughts?

* gnu/packages/audio.scm (audacity)[build-system]: Use glib-or-gtk-build-system.
[arguments]: Remove the 'wrap-program' phase and add a
'patch-translation-makefile' phase.
---
 gnu/packages/audio.scm | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 446587273..ee57f172e 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -321,7 +321,7 @@ engineers, musicians, soundtrack editors and composers.")
               ;; "sbsms"
               ))
            #t))))
-    (build-system gnu-build-system)
+    (build-system glib-or-gtk-build-system)
     (inputs
      `(("wxwidgets" ,wxwidgets)
        ("gtk+" ,gtk+)
@@ -411,14 +411,11 @@ engineers, musicians, soundtrack editors and composers.")
              (substitute* "src/prefs/MidiIOPrefs.cpp"
                (("../../lib-src/portmidi/pm_common/portmidi.h") "portmidi.h"))
              #t))
-         (add-after 'install 'wrap-program
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (wrap-program (string-append (assoc-ref outputs "out")
-                                          "/bin/audacity")
-               ;; For GtkFileChooserDialog.
-               `("GSETTINGS_SCHEMA_DIR" =
-                 (,(string-append (assoc-ref inputs "gtk+")
-                                  "/share/glib-2.0/schemas"))))
+         (add-after 'unpack 'patch-translation-makefile
+           (lambda _
+             (substitute* "po/Makefile.in.in"
+               (("SHELL = /bin/sh")
+                (string-append "SHELL = " (which "sh"))))
              #t)))
        ;; The test suite is not "well exercised" according to the developers,
        ;; and fails with various errors.  See
-- 
2.19.0





Information forwarded to guix-patches <at> gnu.org:
bug#32887; Package guix-patches. (Mon, 01 Oct 2018 21:09:02 GMT) Full text and rfc822 format available.

Message #8 received at 32887 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: 32887 <at> debbugs.gnu.org
Subject: [v2] gnu: Audacity: Use glib-or-gtk-build-system instead of a wrapper.
Date: Mon,  1 Oct 2018 17:08:41 -0400
The reason the build failed unexpectedly with glib-or-gtk-build-system
is that that build system sets #:out-of-source #t by default, unlike the 
gnu-build-system.

The Audacity build process doesn't handle this properly when generating
Makefiles for the translations.

Audacity works for me with this patch. I haven't pushed yet because I
don't know why glib-or-gtk-build-system builds out of source by default,
so I don't know if it's really a good idea to do it this way.

* gnu/packages/audio.scm (audacity)[build-system]: Use glib-or-gtk-build-system.
[arguments]: Remove the 'wrap-program' phase. Set #:out-of-source #f.
---
 gnu/packages/audio.scm | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 446587273..933138e11 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -321,7 +321,7 @@ engineers, musicians, soundtrack editors and composers.")
               ;; "sbsms"
               ))
            #t))))
-    (build-system gnu-build-system)
+    (build-system glib-or-gtk-build-system)
     (inputs
      `(("wxwidgets" ,wxwidgets)
        ("gtk+" ,gtk+)
@@ -410,16 +410,10 @@ engineers, musicians, soundtrack editors and composers.")
                (("../lib-src/portmidi/porttime/porttime.h") "porttime.h"))
              (substitute* "src/prefs/MidiIOPrefs.cpp"
                (("../../lib-src/portmidi/pm_common/portmidi.h") "portmidi.h"))
-             #t))
-         (add-after 'install 'wrap-program
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (wrap-program (string-append (assoc-ref outputs "out")
-                                          "/bin/audacity")
-               ;; For GtkFileChooserDialog.
-               `("GSETTINGS_SCHEMA_DIR" =
-                 (,(string-append (assoc-ref inputs "gtk+")
-                                  "/share/glib-2.0/schemas"))))
              #t)))
+       ;; The translation Makefile generation is performed improperly for
+       ;; out-of-tree builds.
+       #:out-of-source? #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/>.
-- 
2.19.0





Information forwarded to guix-patches <at> gnu.org:
bug#32887; Package guix-patches. (Tue, 02 Oct 2018 09:55:01 GMT) Full text and rfc822 format available.

Message #11 received at 32887 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Leo Famulari <leo <at> famulari.name>
Cc: 32887 <at> debbugs.gnu.org
Subject: Re: [bug#32887] [v2] gnu: Audacity: Use glib-or-gtk-build-system
 instead of a wrapper.
Date: Tue, 02 Oct 2018 11:54:27 +0200
Hello,

Leo Famulari <leo <at> famulari.name> skribis:

> The reason the build failed unexpectedly with glib-or-gtk-build-system
> is that that build system sets #:out-of-source #t by default, unlike the 
> gnu-build-system.
>
> The Audacity build process doesn't handle this properly when generating
> Makefiles for the translations.

Good catch!

> Audacity works for me with this patch. I haven't pushed yet because I
> don't know why glib-or-gtk-build-system builds out of source by default,
> so I don't know if it's really a good idea to do it this way.
>
> * gnu/packages/audio.scm (audacity)[build-system]: Use glib-or-gtk-build-system.
> [arguments]: Remove the 'wrap-program' phase. Set #:out-of-source #f.

I think this patch is definitely OK, and I suppose we could even switch
‘glib-or-gtk-build-system’ to default to #:out-of-source #f.  I don’t
think there was any justification, it could have been cut-n-paste.

Thanks,
Ludo’.




Reply sent to Leo Famulari <leo <at> famulari.name>:
You have taken responsibility. (Tue, 02 Oct 2018 18:36:03 GMT) Full text and rfc822 format available.

Notification sent to Leo Famulari <leo <at> famulari.name>:
bug acknowledged by developer. (Tue, 02 Oct 2018 18:36:03 GMT) Full text and rfc822 format available.

Message #16 received at 32887-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 32887-done <at> debbugs.gnu.org
Subject: Re: [bug#32887] [v2] gnu: Audacity: Use glib-or-gtk-build-system
 instead of a wrapper.
Date: Tue, 2 Oct 2018 14:35:16 -0400
[Message part 1 (text/plain, inline)]
On Tue, Oct 02, 2018 at 11:54:27AM +0200, Ludovic Courtès wrote:
> I think this patch is definitely OK, and I suppose we could even switch
> ‘glib-or-gtk-build-system’ to default to #:out-of-source #f.  I don’t
> think there was any justification, it could have been cut-n-paste.

Okay, I pushed the patch as b0f43001195c69f730b49b0bf9de516edd53baed.
I'll follow up with a similar fix for LibreOffice shortly.

As for the change to glib-or-gtk-build-system, I'll put it on its own
Savannah branch, 'wip-glib-or-gtk'.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#32887; Package guix-patches. (Thu, 04 Oct 2018 09:20:03 GMT) Full text and rfc822 format available.

Message #19 received at 32887-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Leo Famulari <leo <at> famulari.name>
Cc: 32887-done <at> debbugs.gnu.org
Subject: Re: [bug#32887] [v2] gnu: Audacity: Use glib-or-gtk-build-system
 instead of a wrapper.
Date: Thu, 04 Oct 2018 11:19:24 +0200
Leo Famulari <leo <at> famulari.name> skribis:

> On Tue, Oct 02, 2018 at 11:54:27AM +0200, Ludovic Courtès wrote:
>> I think this patch is definitely OK, and I suppose we could even switch
>> ‘glib-or-gtk-build-system’ to default to #:out-of-source #f.  I don’t
>> think there was any justification, it could have been cut-n-paste.
>
> Okay, I pushed the patch as b0f43001195c69f730b49b0bf9de516edd53baed.
> I'll follow up with a similar fix for LibreOffice shortly.
>
> As for the change to glib-or-gtk-build-system, I'll put it on its own
> Savannah branch, 'wip-glib-or-gtk'.

Excellent, thanks!

Ludo'.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 01 Nov 2018 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 186 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.