GNU bug report logs - #48272
[PATCH] gnu: emacs-ledger-mode: Simplify build

Previous Next

Package: guix-patches;

Reported by: Morgan.J.Smith <at> outlook.com

Date: Fri, 7 May 2021 00:46:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

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 48272 in the body.
You can then email your comments to 48272 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#48272; Package guix-patches. (Fri, 07 May 2021 00:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Morgan.J.Smith <at> outlook.com:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 07 May 2021 00:46:02 GMT) Full text and rfc822 format available.

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

From: Morgan.J.Smith <at> outlook.com
To: guix-patches <at> gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Subject: [PATCH] gnu: emacs-ledger-mode: Simplify build
Date: Thu,  6 May 2021 20:30:11 -0400
From: Morgan Smith <Morgan.J.Smith <at> outlook.com>

* gnu/packages/finance.scm (emacs-ledger-mode)
[build-system]: Use emacs-build-system instead of cmake
[arguments]:
- Remove modules and imported-modules.
- Move patch-path phase to after unpack so that the substitution actually
causes a change.
- Remove generate-autoload phase as that's built into the build system.
- Remove patch-site-dir as that only affected cmake things
[native-inputs]: Remove emacs-minimal
---
 gnu/packages/finance.scm | 26 ++++----------------------
 1 file changed, 4 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index b8ec4a9dc0..077fba9e27 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -400,22 +400,11 @@ (define-public emacs-ledger-mode
        (file-name (git-file-name name version))
        (sha256
         (base32 "1r5rcyxd6d1rqwamzpvqdbkbdf1zbj75aaciqijrklnm59ps244y"))))
-    (build-system cmake-build-system)
+    (build-system emacs-build-system)
     (arguments
-     `(#:modules ((guix build cmake-build-system)
-                  (guix build utils)
-                  (guix build emacs-utils))
-       #:imported-modules (,@%cmake-build-system-modules
-                           (guix build emacs-utils))
-       #:phases
+     `(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-site-dir
-           (lambda _
-             (substitute* "CMakeLists.txt"
-               (("DESTINATION share/emacs/site-lisp/ledger-mode")
-                "DESTINATION share/emacs/site-lisp"))
-             #t))
-         (add-before 'build 'patch-path
+         (add-after 'unpack 'patch-path
            (lambda* (#:key inputs #:allow-other-keys)
              (let ((ledger (assoc-ref inputs "ledger")))
                (make-file-writable "ledger-exec.el")
@@ -430,12 +419,6 @@ (define-public emacs-ledger-mode
                (invoke "makeinfo" "-o" target
                        "../source/doc/ledger-mode.texi"))
              #t))
-         (add-after 'install 'generate-autoload
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((site-dir (string-append (assoc-ref outputs "out")
-                                             "/share/emacs/site-lisp")))
-               (emacs-generate-autoloads ,name site-dir))
-             #t))
          (replace 'check
            (lambda _
              (with-directory-excursion "../source/test"
@@ -443,8 +426,7 @@ (define-public emacs-ledger-mode
     (inputs
      `(("ledger" ,ledger)))
     (native-inputs
-     `(("emacs-minimal" ,emacs-minimal)
-       ("texinfo" ,texinfo)))
+     `(("texinfo" ,texinfo)))
     (home-page "https://ledger-cli.org/")
     (synopsis "Command-line double-entry accounting program")
     (description
-- 
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#48272; Package guix-patches. (Fri, 07 May 2021 03:59:02 GMT) Full text and rfc822 format available.

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

From: Morgan.J.Smith <at> outlook.com
To: 48272 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Subject: [PATCH v2] gnu: emacs-ledger-mode: Simplify build
Date: Thu,  6 May 2021 23:58:22 -0400
From: Morgan Smith <Morgan.J.Smith <at> outlook.com>

* gnu/packages/finance.scm (emacs-ledger-mode)
[build-system]: Use emacs-build-system instead of cmake
[arguments]:
- Remove modules and imported-modules.
- Move patch-path phase to after unpack so that the substitution actually
causes a change.
- Remove generate-autoload phase as that's built into the build system.
- Remove patch-site-dir as that only affected cmake things
- Set #:exclude to '() so we install ledger-test.el
[native-inputs]: Remove emacs-minimal
---
 gnu/packages/finance.scm | 26 +++++---------------------
 1 file changed, 5 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index b8ec4a9dc0..3e03805fa7 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -400,22 +400,13 @@ (define-public emacs-ledger-mode
        (file-name (git-file-name name version))
        (sha256
         (base32 "1r5rcyxd6d1rqwamzpvqdbkbdf1zbj75aaciqijrklnm59ps244y"))))
-    (build-system cmake-build-system)
+    (build-system emacs-build-system)
     (arguments
-     `(#:modules ((guix build cmake-build-system)
-                  (guix build utils)
-                  (guix build emacs-utils))
-       #:imported-modules (,@%cmake-build-system-modules
-                           (guix build emacs-utils))
+     `(;; ledger-test.el is needed at runtime (but probably not for a good reason).
+       #:exclude '()
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-site-dir
-           (lambda _
-             (substitute* "CMakeLists.txt"
-               (("DESTINATION share/emacs/site-lisp/ledger-mode")
-                "DESTINATION share/emacs/site-lisp"))
-             #t))
-         (add-before 'build 'patch-path
+         (add-after 'unpack 'patch-path
            (lambda* (#:key inputs #:allow-other-keys)
              (let ((ledger (assoc-ref inputs "ledger")))
                (make-file-writable "ledger-exec.el")
@@ -430,12 +421,6 @@ (define-public emacs-ledger-mode
                (invoke "makeinfo" "-o" target
                        "../source/doc/ledger-mode.texi"))
              #t))
-         (add-after 'install 'generate-autoload
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((site-dir (string-append (assoc-ref outputs "out")
-                                             "/share/emacs/site-lisp")))
-               (emacs-generate-autoloads ,name site-dir))
-             #t))
          (replace 'check
            (lambda _
              (with-directory-excursion "../source/test"
@@ -443,8 +428,7 @@ (define-public emacs-ledger-mode
     (inputs
      `(("ledger" ,ledger)))
     (native-inputs
-     `(("emacs-minimal" ,emacs-minimal)
-       ("texinfo" ,texinfo)))
+     `(("texinfo" ,texinfo)))
     (home-page "https://ledger-cli.org/")
     (synopsis "Command-line double-entry accounting program")
     (description
-- 
2.31.1





Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Fri, 14 May 2021 21:48:01 GMT) Full text and rfc822 format available.

Notification sent to Morgan.J.Smith <at> outlook.com:
bug acknowledged by developer. (Fri, 14 May 2021 21:48:01 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Morgan.J.Smith <at> outlook.com
Cc: 48272-done <at> debbugs.gnu.org
Subject: Re: [bug#48272] [PATCH v2] gnu: emacs-ledger-mode: Simplify build
Date: Fri, 14 May 2021 23:47:35 +0200
Hello,

Morgan.J.Smith <at> outlook.com writes:

> * gnu/packages/finance.scm (emacs-ledger-mode)
> [build-system]: Use emacs-build-system instead of cmake
> [arguments]:
> - Remove modules and imported-modules.
> - Move patch-path phase to after unpack so that the substitution actually
> causes a change.
> - Remove generate-autoload phase as that's built into the build system.
> - Remove patch-site-dir as that only affected cmake things
> - Set #:exclude to '() so we install ledger-test.el
> [native-inputs]: Remove emacs-minimal

Applied. Thank you.

Regards,
-- 
Nicolas Goaziou




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

This bug report was last modified 2 years and 316 days ago.

Previous Next


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