From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id GLRLHwMr3V/bIwAA0tVLHw (envelope-from ) for ; Fri, 18 Dec 2020 22:19:47 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id eGwZGwMr3V8ROAAAB5/wlQ (envelope-from ) for ; Fri, 18 Dec 2020 22:19:47 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C2FAE940919 for ; Fri, 18 Dec 2020 22:19:46 +0000 (UTC) Received: from localhost ([::1]:52254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqO6D-0007n2-Om for larch@yhetil.org; Fri, 18 Dec 2020 17:19:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqO5X-0007Kr-8G for bug-guix@gnu.org; Fri, 18 Dec 2020 17:19:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:57016) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kqO5X-0006zw-0C for bug-guix@gnu.org; Fri, 18 Dec 2020 17:19:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kqO5W-0000CE-Sq for bug-guix@gnu.org; Fri, 18 Dec 2020 17:19:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#45316: [PATCH 04/26] gnu: cedille: Adjust following emacs-build-system changes. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 18 Dec 2020 22:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45316 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: 45316@debbugs.gnu.org Received: via spool by 45316-submit@debbugs.gnu.org id=B45316.1608329902430 (code B ref 45316); Fri, 18 Dec 2020 22:19:02 +0000 Received: (at 45316) by debbugs.gnu.org; 18 Dec 2020 22:18:22 +0000 Received: from localhost ([127.0.0.1]:40266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqO4r-00006k-Rr for submit@debbugs.gnu.org; Fri, 18 Dec 2020 17:18:22 -0500 Received: from mail-qk1-f171.google.com ([209.85.222.171]:41808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqO4o-00005F-Fw for 45316@debbugs.gnu.org; Fri, 18 Dec 2020 17:18:18 -0500 Received: by mail-qk1-f171.google.com with SMTP id 19so3596375qkm.8 for <45316@debbugs.gnu.org>; Fri, 18 Dec 2020 14:18:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MbZx+6vvp4SWhptpkz5NPLN0y+lQWxV67ZrNg2XUvMU=; b=nI25udVpO5wOMmamHj5gDmNLBOTYPpwnM0rVD8jXoc8dMTmWW9USN2Doz7wNHCpt7c 9Rj2oregM7vX0f0utFRurjgi87cZtmmTOMKZxpbTRjmyFPImHQ3cOUqyV/2RgeiXeSDk 9IfjHW/+8JwBicHVxsJk+SsHTuJkIwcAgJlahtijFvNaeErVtI4biPvHPrAZWVyg1hrS nO4LKpb+YOPciHb9FWH4yEVz7DAtTVZoVHqSUzL4Vu9jBNbIqKmHX4VJCx0dp1X7pmuq VCD0x3ele15bEHKDPc+E9MxZGnArdRO3n1y5KlnGRORNP56xVYug/4cmkMaiPxfxNOh+ BCTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MbZx+6vvp4SWhptpkz5NPLN0y+lQWxV67ZrNg2XUvMU=; b=duWCt6YN29JcKRRhZMKOioxTeGzng3qlNTYoytnuimfHSaK13CPz/ZyijIz57j5XyS rW+CRWVDCmNlPB+ML3mpyCd4Z740YEbwjLq21Zk9v1VMqNYocfQ4K/p3aSohdWc1Pk2m OSytfCGH3+ZtQw0gB0U0IPcVKjfl3ccIMwquek97QaiIXGnUggUWZ/ug2QxhQFC5b2R1 MK0ZNrW/8uEe+vbPLSeSoymUpV15Tm9JOW/8/v7PC5Zt+q49bgH25VIW6VgQuyDbOLYy ZLqmw6eASa8dout6DfPCLVMZRptYxnwhMqRjZPxiS73LBgvFqi0itIYQLSz27kj+bu50 z5qQ== X-Gm-Message-State: AOAM530PxrBHW/hfD7zXDOVIbl5HL62neK2dHPYDskpXiCIvcxQJYqlI YwLywNMKbg+eSbX9N+od2uO286U/cX0OIjji X-Google-Smtp-Source: ABdhPJzuQua1uHNTk0LquV5k7PYpYJ9uBEzWHFg5f1YVbFP4nEJygqSmh9KE2Bvu7abF320BRKhLVw== X-Received: by 2002:a37:6845:: with SMTP id d66mr4385518qkc.463.1608329892856; Fri, 18 Dec 2020 14:18:12 -0800 (PST) Received: from localhost.localdomain (dsl-10-146-235.b2b2c.ca. [72.10.146.235]) by smtp.gmail.com with ESMTPSA id b78sm1876162qkg.29.2020.12.18.14.18.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Dec 2020 14:18:12 -0800 (PST) From: Maxim Cournoyer Date: Fri, 18 Dec 2020 17:17:01 -0500 Message-Id: <20201218221723.26829-4-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201218221723.26829-1-maxim.cournoyer@gmail.com> References: <20201218221723.26829-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=yes Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxim Cournoyer Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.22 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=nI25udVp; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: C2FAE940919 X-Spam-Score: -1.22 X-Migadu-Scanner: scn0.migadu.com X-TUID: VphM/E+9Upeh 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 +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; 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