From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 45316@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: bug#45316: [PATCH 04/26] gnu: cedille: Adjust following emacs-build-system changes.
Date: Fri, 18 Dec 2020 17:17:01 -0500 [thread overview]
Message-ID: <20201218221723.26829-4-maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <20201218221723.26829-1-maxim.cournoyer@gmail.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=yes, Size: 4073 bytes --]
Also enable byte compilation for most Elisp files.
* gnu/packages/cedille.scm (cedille)[arguments]: Add the cedille-mode and
se-mode to the #:include files list, which allows to...
[phases]{copy-cedille-mode}: ...remove this phase.
{extend-load-path}: New phase.
{build}: Restore phase.
{disable-byte-compilation-on-problematic-files}: New phase.
---
gnu/packages/cedille.scm | 50 ++++++++++++++++++++++++----------------
1 file changed, 30 insertions(+), 20 deletions(-)
diff --git a/gnu/packages/cedille.scm b/gnu/packages/cedille.scm
index d3dd576323..05eb42e9b2 100644
--- a/gnu/packages/cedille.scm
+++ b/gnu/packages/cedille.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
+;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -49,37 +50,46 @@
("ghc-happy" ,ghc-happy)))
(build-system emacs-build-system)
(arguments
- `(#:phases
+ `(#:include (cons* "^cedille-mode/" "^se-mode/" %default-include)
+ #:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-cedille-paths
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* "cedille-mode.el"
- (("/usr/share/emacs/site-lisp/cedille-mode")
- (string-append
- out "/share/emacs/site-lisp/cedille")))
+ ;; As suggested at the top of cedille-mode.el
+ ((".*defmacro cedille-platform-case.*" all)
+ (string-append (format #f "(defconst cedille-path ~s)~%~%"
+ (outputs->elpa-install-dir outputs))
+ all)))
(substitute* "cedille-mode/cedille-mode-info.el"
(("\\(concat cedille-path-el \"cedille-info-main.info\"\\)")
(string-append
"\"" out "/share/info/cedille-info-main.info.gz\"")))
#t)))
- (add-after 'patch-cedille-paths 'copy-cedille-mode
+ (add-before 'build 'extend-load-path
(lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (lisp
- (string-append
- out "/share/emacs/site-lisp/cedille/")))
- (mkdir-p (string-append lisp "cedille-mode"))
- (copy-recursively
- "cedille-mode"
- (string-append lisp "cedille-mode"))
- (mkdir-p (string-append lisp "se-mode"))
- (copy-recursively
- "se-mode"
- (string-append lisp "se-mode"))
- #t)))
- ;; FIXME: Byte compilation fails
- (delete 'build)
+ (let ((install-dir (outputs->elpa-install-dir outputs)))
+ (setenv "EMACSLOADPATH"
+ (string-join
+ (cons (getenv "EMACSLOADPATH")
+ (map (lambda (f)
+ (string-append install-dir "/" f))
+ '("cedille-mode" "se-mode")))
+ ":")))
+ #t))
+ (add-after 'unpack 'disable-byte-compilation-on-problematic-files
+ ;; Some files fail byte compilation (see:
+ ;; https://github.com/cedille/cedille/issues/160).
+ (lambda _
+ (let ((problematic-files '("cedille-mode.el"
+ "cedille-mode/cedille-mode-library.el"
+ "se-mode/se-hole.el")))
+ (for-each (lambda (f)
+ (make-file-writable f)
+ (emacs-batch-disable-compilation f))
+ problematic-files))
+ #t))
(replace 'check
(lambda _
(with-directory-excursion "cedille-tests"
--
2.29.2
next prev parent reply other threads:[~2020-12-18 22:19 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-18 22:00 bug#45316: [PATCH]: Re-introduce Emacs packages specific installation prefix Maxim Cournoyer
2020-12-18 22:16 ` bug#45316: [PATCH 01/26] build-systems/emacs: Install packages in their own directory Maxim Cournoyer
2020-12-18 22:16 ` bug#45316: [PATCH 02/26] gnu: emacs-ert-runner: Adjust following emacs-build-system changes Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 03/26] gnu: emacs-xyz: Do not use --quick or -Q Maxim Cournoyer
2020-12-18 22:17 ` Maxim Cournoyer [this message]
2020-12-18 22:17 ` bug#45316: [PATCH 05/26] gnu: emacs-libgit: Adjust following emacs-build-system changes Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 06/26] gnu: emacs-typit: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 07/26] gnu: emacs-flycheck-grammalecte: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 08/26] gnu: emacs-scel: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 09/26] gnu: emacs-chess: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 10/26] gnu: emacs-org-contrib: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 11/26] gnu: emacs-edbi: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 12/26] gnu: emacs-telega: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 13/26] gnu: emacs-rime: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 14/26] gnu: emacs-haskell-snippets: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 15/26] gnu: guile-wisp: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 16/26] gnu: emacs-pdf-tools: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 17/26] gnu: emacs-emacsql: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 18/26] gnu: emacs-racer: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 19/26] gnu: emacs-magit: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 20/26] gnu: emacs-org-super-agenda: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 21/26] gnu: notmuch: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 22/26] gnu: emacs-howm: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 23/26] gnu: emacs-rjsx-mode: " Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 24/26] gnu: emacs-sudo-edit: Update to commit 0e2c32b, fix tests Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 25/26] gnu: emacs-sly-named-readtables: Adjust following emacs-build-system changes Maxim Cournoyer
2020-12-18 22:17 ` bug#45316: [PATCH 26/26] gnu: emacs-realgud: " Maxim Cournoyer
2021-03-30 9:45 ` bug#45316: [WIP PATCH 1/3] profiles: Add hook for Emacs subdirs Leo Prikler
2021-03-30 9:45 ` bug#45316: [WIP PATCH 2/3] build-system: emacs: Use subdirectories again Leo Prikler
2021-03-30 9:45 ` bug#45316: [WIP PATCH 3/3] gnu: emacs-libgit: Adjust to changes in emacs-build-system Leo Prikler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201218221723.26829-4-maxim.cournoyer@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=45316@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).