[PATCH] gnu: Audacity: Use glib-or-gtk-build-system instead of a wrapper.

  • Done
  • quality assurance status badge
Details
2 participants
  • Leo Famulari
  • Ludovic Courtès
Owner
unassigned
Submitted by
Leo Famulari
Severity
normal

Debbugs page

Leo Famulari wrote 6 years ago
(address . guix-patches@gnu.org)
3482c0f2e1bd188df59bf7d6d3a7522914e5e19b.1538327381.git.leo@famulari.name
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(-)

Toggle diff (35 lines)
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
Leo Famulari wrote 6 years ago
[v2] gnu: Audacity: Use glib-or-gtk-build-system instead of a wrapper.
(address . 32887@debbugs.gnu.org)
60f388a7c808d2751e7cd80956558182807a5b0b.1538428084.git.leo@famulari.name
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(-)

Toggle diff (35 lines)
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
Ludovic Courtès wrote 6 years ago
(name . Leo Famulari)(address . leo@famulari.name)(address . 32887@debbugs.gnu.org)
87ftxor7vw.fsf@gnu.org
Hello,

Leo Famulari <leo@famulari.name> skribis:

Toggle quote (7 lines)
> 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!

Toggle quote (7 lines)
> 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’.
Leo Famulari wrote 6 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 32887-done@debbugs.gnu.org)
20181002183516.GA15069@jasmine.lan
On Tue, Oct 02, 2018 at 11:54:27AM +0200, Ludovic Courtès wrote:
Toggle quote (4 lines)
> 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'.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAluzumMACgkQJkb6MLrK
fwixrA/8DXyNL4tVn5kTarYOPes7THrneOlfc750LG3KMTCbsqaFHVxb45OfRxzI
Afs7lx8p7lfWDV8ZyhkkCOIjng4Tgn0kaiVS9z1Vvnyk+7Fd41ckg2VqO8Hqmuxe
bpWUOi7LG3DVSR9YmI5YDE6PdoBTg9QvXDkItskBUN91zCzNNBqMHdqEwoJJleCc
CvVK3qUSFKiMeFvXGiNxHg8oR2ZtjGDXT7muQuEaJXitEguEF2ZSdQkVp8ipeJK3
zvjsocjekWZkFU8UFp9qr03XVdyAW7oI5Yz3IhI7x+5TnYo0JD3sJGKeM5zYmwZM
4wbhew4Ch4rteaIiH2iEtIanrZp1z1vI8/lTUxW/up4t0KTnXjPGOhOw8aPZXq+u
aKdw5kAplNHOakP+ELgQltjvCGc1ClUbgj5/14QfdF4R5Yfy/RlP1U7uPwVKY1dR
2zp5xjkqA0sP/8zd5Lh/T3Fmdf/xnvCppjuY1AsZw94d9oOElGlFdfpJjVPTo6Ly
VrltkdBtGMulpUGk7OROMD6Fy0qTdMaz9ILiLbeg5IME24uGyNghNVyIgtb31tSm
zL+o3IhnFEMmGRUc3dgWdvQ5Mt/YQVI/VrQH8OMiSOTvAtAgGkDdxeyhrSVI8Vbb
+QcDzFsi69KnFsWxPQLV8gUrKwjOUcgw39uEUb+U8VhXQhuZxk0=
=nhbR
-----END PGP SIGNATURE-----


Closed
Ludovic Courtès wrote 6 years ago
(name . Leo Famulari)(address . leo@famulari.name)(address . 32887-done@debbugs.gnu.org)
87woqyxe5f.fsf@gnu.org
Leo Famulari <leo@famulari.name> skribis:

Toggle quote (11 lines)
> 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'.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 32887@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 32887
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help