[PATCH] gnu: emacs-ledger-mode: Simplify build

  • Done
  • quality assurance status badge
Details
2 participants
  • Morgan.J.Smith
  • Nicolas Goaziou
Owner
unassigned
Submitted by
Morgan.J.Smith
Severity
normal

Debbugs page

Morgan.J.Smith wrote 4 years ago
(address . guix-patches@gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
BN7PR05MB4018C569946050339B519DB0C5579@BN7PR05MB4018.namprd05.prod.outlook.com
From: Morgan Smith <Morgan.J.Smith@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(-)

Toggle diff (55 lines)
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
Morgan.J.Smith wrote 4 years ago
[PATCH v2] gnu: emacs-ledger-mode: Simplify build
(address . 48272@debbugs.gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
BYAPR05MB40238C89A77199BB3543BA09C5579@BYAPR05MB4023.namprd05.prod.outlook.com
From: Morgan Smith <Morgan.J.Smith@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(-)

Toggle diff (56 lines)
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
Nicolas Goaziou wrote 4 years ago
(address . Morgan.J.Smith@outlook.com)(address . 48272-done@debbugs.gnu.org)
87tun5t2bs.fsf@nicolasgoaziou.fr
Hello,

Morgan.J.Smith@outlook.com writes:

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

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 48272
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