unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#48272] [PATCH] gnu: emacs-ledger-mode: Simplify build
@ 2021-05-07  0:30 Morgan.J.Smith
  2021-05-07  3:58 ` [bug#48272] [PATCH v2] " Morgan.J.Smith
  0 siblings, 1 reply; 3+ messages in thread
From: Morgan.J.Smith @ 2021-05-07  0:30 UTC (permalink / raw)
  To: 48272; +Cc: Morgan Smith

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(-)

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





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

* [bug#48272] [PATCH v2] gnu: emacs-ledger-mode: Simplify build
  2021-05-07  0:30 [bug#48272] [PATCH] gnu: emacs-ledger-mode: Simplify build Morgan.J.Smith
@ 2021-05-07  3:58 ` Morgan.J.Smith
  2021-05-14 21:47   ` bug#48272: " Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Morgan.J.Smith @ 2021-05-07  3:58 UTC (permalink / raw)
  To: 48272; +Cc: Morgan Smith

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(-)

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





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

* bug#48272: [PATCH v2] gnu: emacs-ledger-mode: Simplify build
  2021-05-07  3:58 ` [bug#48272] [PATCH v2] " Morgan.J.Smith
@ 2021-05-14 21:47   ` Nicolas Goaziou
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Goaziou @ 2021-05-14 21:47 UTC (permalink / raw)
  To: Morgan.J.Smith; +Cc: 48272-done

Hello,

Morgan.J.Smith@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




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

end of thread, other threads:[~2021-05-14 21:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07  0:30 [bug#48272] [PATCH] gnu: emacs-ledger-mode: Simplify build Morgan.J.Smith
2021-05-07  3:58 ` [bug#48272] [PATCH v2] " Morgan.J.Smith
2021-05-14 21:47   ` bug#48272: " 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).