all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#32887] [PATCH] gnu: Audacity: Use glib-or-gtk-build-system instead of a wrapper.
@ 2018-09-30 17:11 Leo Famulari
  2018-10-01 21:08 ` [bug#32887] [v2] " Leo Famulari
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Famulari @ 2018-09-30 17:11 UTC (permalink / raw)
  To: 32887

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#32887] [v2] gnu: Audacity: Use glib-or-gtk-build-system instead of a wrapper.
  2018-09-30 17:11 [bug#32887] [PATCH] gnu: Audacity: Use glib-or-gtk-build-system instead of a wrapper Leo Famulari
@ 2018-10-01 21:08 ` Leo Famulari
  2018-10-02  9:54   ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Famulari @ 2018-10-01 21:08 UTC (permalink / raw)
  To: 32887

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#32887] [v2] gnu: Audacity: Use glib-or-gtk-build-system instead of a wrapper.
  2018-10-01 21:08 ` [bug#32887] [v2] " Leo Famulari
@ 2018-10-02  9:54   ` Ludovic Courtès
  2018-10-02 18:35     ` bug#32887: " Leo Famulari
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2018-10-02  9:54 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 32887

Hello,

Leo Famulari <leo@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’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#32887: [v2] gnu: Audacity: Use glib-or-gtk-build-system instead of a wrapper.
  2018-10-02  9:54   ` Ludovic Courtès
@ 2018-10-02 18:35     ` Leo Famulari
  2018-10-04  9:19       ` [bug#32887] " Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Famulari @ 2018-10-02 18:35 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 32887-done

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

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'.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#32887] [v2] gnu: Audacity: Use glib-or-gtk-build-system instead of a wrapper.
  2018-10-02 18:35     ` bug#32887: " Leo Famulari
@ 2018-10-04  9:19       ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2018-10-04  9:19 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 32887-done

Leo Famulari <leo@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'.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-10-04  9:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-30 17:11 [bug#32887] [PATCH] gnu: Audacity: Use glib-or-gtk-build-system instead of a wrapper Leo Famulari
2018-10-01 21:08 ` [bug#32887] [v2] " Leo Famulari
2018-10-02  9:54   ` Ludovic Courtès
2018-10-02 18:35     ` bug#32887: " Leo Famulari
2018-10-04  9:19       ` [bug#32887] " Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.