* [bug#62314] [PATCH] gnu: emacs-buttercup: Fix build with native compilation.
@ 2023-03-21 2:26 John Kehayias via Guix-patches via
2023-03-21 9:34 ` Nicolas Goaziou
2023-03-24 9:17 ` bug#62314: " Nicolas Goaziou
0 siblings, 2 replies; 4+ messages in thread
From: John Kehayias via Guix-patches via @ 2023-03-21 2:26 UTC (permalink / raw)
To: 62314
[-- Attachment #1: Type: text/plain, Size: 640 bytes --]
Hi Guix,
Here's a patch to fix emacs-buttercup failing with native-comp, i.e. guix build emacs-buttercup --with-input=emacs-minimal=emacs.
Here is the link to the upstream issue: <https://github.com/jorgenschaefer/emacs-buttercup/issues/236>
In short, it should be fixed but the fix used a variable name in current git Emacs which is different in the current release. So this patch adds the older variable name with the same fix.
I checked that it lints and native-comp and regular both build. I'll wait for QA to check for any other breakages. And I welcome any input on the commit message/code comment here.
Thanks!
John
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-emacs-buttercup-Fix-build-with-native-compilatio.patch --]
[-- Type: text/x-patch; name=0001-gnu-emacs-buttercup-Fix-build-with-native-compilatio.patch, Size: 1643 bytes --]
From e6a0fda045ef016845c1b247c1b57074702a9b59 Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Mon, 20 Mar 2023 22:13:40 -0400
Subject: [PATCH] gnu: emacs-buttercup: Fix build with native compilation.
The spy-on test fails with native compilation, which was fixed in v1.30 but
with a variable name for newer versions than stable Emacs. Here we add the
same fix but using the current variable name.
* gnu/packages/emacs-xyz.scm (emacs-buttercup)[phases]{fix-spy-on-test}: New
phase.
---
gnu/packages/emacs-xyz.scm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 0a1846ea4c..74968d421b 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -27141,6 +27141,15 @@ (define-public emacs-buttercup
#:test-command #~(list "make" "test")
#:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-spy-on-test
+ (lambda _
+ (substitute* "buttercup.el"
+ ;; The spy-on test fails with native compilation, which was
+ ;; fixed in v1.30 but with a variable name for Emacs newer
+ ;; than 28.2. Add in the same fix with the current variable
+ ;; name. Upstream bug and fix:
+ ;; <https://github.com/jorgenschaefer/emacs-buttercup/issues/236>
+ (("61880") "61880\n(comp-enable-subr-trampolines nil)\n"))))
(add-after 'install 'install-bin
(lambda _
(install-file "bin/buttercup"
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#62314] [PATCH] gnu: emacs-buttercup: Fix build with native compilation.
2023-03-21 2:26 [bug#62314] [PATCH] gnu: emacs-buttercup: Fix build with native compilation John Kehayias via Guix-patches via
@ 2023-03-21 9:34 ` Nicolas Goaziou
2023-03-24 19:38 ` John Kehayias via Guix-patches via
2023-03-24 9:17 ` bug#62314: " Nicolas Goaziou
1 sibling, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2023-03-21 9:34 UTC (permalink / raw)
To: 62314; +Cc: john.kehayias
Hello,
John Kehayias via Guix-patches via <guix-patches@gnu.org> writes:
> Subject: [PATCH] gnu: emacs-buttercup: Fix build with native
> compilation.
Thank you.
> + (add-after 'unpack 'fix-spy-on-test
> + (lambda _
> + (substitute* "buttercup.el"
> + ;; The spy-on test fails with native compilation, which was
> + ;; fixed in v1.30 but with a variable name for Emacs newer
> + ;; than 28.2. Add in the same fix with the current variable
> + ;; name. Upstream bug and fix:
> + ;; <https://github.com/jorgenschaefer/emacs-buttercup/issues/236>
> + (("61880") "61880\n(comp-enable-subr-trampolines nil)\n"))))
Nitpick: I'm surprised by the choice of your anchor: 61880 is at the end
of a comment. Wouldn't
(("\\(native-comp-enable-subr-trampolines nil\\)" all)
(string-append all "\n(comp-enable-subr-trampolines nil)"))
be more explicit?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#62314: [PATCH] gnu: emacs-buttercup: Fix build with native compilation.
2023-03-21 2:26 [bug#62314] [PATCH] gnu: emacs-buttercup: Fix build with native compilation John Kehayias via Guix-patches via
2023-03-21 9:34 ` Nicolas Goaziou
@ 2023-03-24 9:17 ` Nicolas Goaziou
1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2023-03-24 9:17 UTC (permalink / raw)
To: 62314-done
Hello,
John Kehayias via Guix-patches via <guix-patches@gnu.org> writes:
> Here's a patch to fix emacs-buttercup failing with native-comp, i.e. guix build emacs-buttercup --with-input=emacs-minimal=emacs.
Applied, with my suggested change. Thanks.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#62314] [PATCH] gnu: emacs-buttercup: Fix build with native compilation.
2023-03-21 9:34 ` Nicolas Goaziou
@ 2023-03-24 19:38 ` John Kehayias via Guix-patches via
0 siblings, 0 replies; 4+ messages in thread
From: John Kehayias via Guix-patches via @ 2023-03-24 19:38 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: 62314
Hi,
On Tue, Mar 21, 2023 at 10:34 AM, Nicolas Goaziou wrote:
> Hello,
>
> John Kehayias via Guix-patches via <guix-patches@gnu.org> writes:
>
>> Subject: [PATCH] gnu: emacs-buttercup: Fix build with native
>> compilation.
>
> Thank you.
>
>> + (add-after 'unpack 'fix-spy-on-test
>> + (lambda _
>> + (substitute* "buttercup.el"
>> + ;; The spy-on test fails with native compilation, which was
>> + ;; fixed in v1.30 but with a variable name for Emacs newer
>> + ;; than 28.2. Add in the same fix with the current variable
>> + ;; name. Upstream bug and fix:
>> + ;; <https://github.com/jorgenschaefer/emacs-buttercup/issues/236>
>> + (("61880") "61880\n(comp-enable-subr-trampolines nil)\n"))))
>
> Nitpick: I'm surprised by the choice of your anchor: 61880 is at the end
> of a comment. Wouldn't
>
> (("\\(native-comp-enable-subr-trampolines nil\\)" all)
> (string-append all "\n(comp-enable-subr-trampolines nil)"))
>
> be more explicit?
TIL what the second part of the first form for substitute is...thanks for that! Yes, that is better and something I will use in the future. Thanks also for pushing!
John
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-24 22:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-21 2:26 [bug#62314] [PATCH] gnu: emacs-buttercup: Fix build with native compilation John Kehayias via Guix-patches via
2023-03-21 9:34 ` Nicolas Goaziou
2023-03-24 19:38 ` John Kehayias via Guix-patches via
2023-03-24 9:17 ` bug#62314: " Nicolas Goaziou
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).