From patchwork Fri Jun 9 08:40:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 50801 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id AA96327BBE9; Fri, 9 Jun 2023 20:24:24 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2C3DC27BBE2 for ; Fri, 9 Jun 2023 20:24:22 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q7hiQ-0007G5-06; Fri, 09 Jun 2023 15:24:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q7hiO-0007Fl-92 for guix-patches@gnu.org; Fri, 09 Jun 2023 15:24:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q7hiO-00035e-0V for guix-patches@gnu.org; Fri, 09 Jun 2023 15:24:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q7hiM-0005jJ-6K; Fri, 09 Jun 2023 15:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63984] [PATCH emacs-team 1/2] gnu: Make emacs-next-tree-sitter the new emacs. References: In-Reply-To: Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, liliana.prikler@gmail.com, guix-patches@gnu.org Resent-Date: Fri, 09 Jun 2023 19:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63984 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63984@debbugs.gnu.org Cc: andrew@trop.in, liliana.prikler@gmail.com X-Debbugs-Original-Xcc: andrew@trop.in, liliana.prikler@gmail.com Received: via spool by 63984-submit@debbugs.gnu.org id=B63984.168633863022000 (code B ref 63984); Fri, 09 Jun 2023 19:24:02 +0000 Received: (at 63984) by debbugs.gnu.org; 9 Jun 2023 19:23:50 +0000 Received: from localhost ([127.0.0.1]:60368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7hi9-0005ie-QJ for submit@debbugs.gnu.org; Fri, 09 Jun 2023 15:23:50 -0400 Received: from mail-ej1-f65.google.com ([209.85.218.65]:56437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7hi7-0005iM-OH for 63984@debbugs.gnu.org; Fri, 09 Jun 2023 15:23:48 -0400 Received: by mail-ej1-f65.google.com with SMTP id a640c23a62f3a-977d0ee1736so317177766b.0 for <63984@debbugs.gnu.org>; Fri, 09 Jun 2023 12:23:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686338622; x=1688930622; h=to:content-transfer-encoding:mime-version:subject:date:from :message-id:from:to:cc:subject:date:message-id:reply-to; bh=C+gXYjurqX3oHukagzQcB3iCm/CtfnuSfMSFbmqL5Hw=; b=RX9d5o73mHx6vOXTHq0xeToG3Hbi+z75IeWEx24hBGNrL3VWfja0GdzrDCdTFmkwt0 phrRPM4aYevIKiXXdoMg/M1kqYntZHzK7ljSnFGlYxWqaOEdRxQtZ5ky0MyVtwMGC5SJ NSaKvMKIvKEopgCgArZ5HH8TCVTEspfoV/bYJC4cTrL7yPM4XHULIryPZd7iCAPmXoAA 65jTMoEI4Zx3YRol29PBg9S0rLMEukYKsXS5MN3EkWCMCxtGWA2q3K5xL/PpsQqCZYX9 P9YQz00fL+WZ/rHs9LUjoT/ezTplE2VO5idHw+AqYEnIfXriRokISzGLzTGLl4CgeyRA gFUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686338622; x=1688930622; h=to:content-transfer-encoding:mime-version:subject:date:from :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=C+gXYjurqX3oHukagzQcB3iCm/CtfnuSfMSFbmqL5Hw=; b=MgHZ7RRVSJ979f8t83MRwoMtsLY4pLB+q87SlNdV8w+yBI/7ss4dkuXAM6Q7f07ZWs 8soVh3AoRseuw65tr9bo+B2sHRLbZo6yMajPt6t+d9hgF5NLe7D/yAXYWbvddJQQQHQe Lj66N/Xr5rNs0XcgITtrqP7NGzRGf/DICnZlrkcVd75WIaGrzKWWxv1zXKLUZRS71+JD HWOEkR6BDsZOxxwYMbEAdvpCgrWIkhKKh/qVtsemtw1wVGjqebuYQ0oJ+qvy4W73PaZg Xp2+UVUdz0/OL7d/Emmh6VXhfBLi40vg/9/qV+4VUE1uWBiBN2mtli/1Ja8GM3yl23/b tRYg== X-Gm-Message-State: AC+VfDz8a/zW9A7tNbLWZajMsxG/Uhpe2wpOsvDyAJYF+M/WjLmZuj1v 9yqvwJEBhpvMJMM6r+kO5ZLcviKfEPZjUnka X-Google-Smtp-Source: ACHHUZ7U8zvUpW1/7H2ODEnDwyxsBswcEh2bnTUogYYnY8DySsRFyfxVfcoNpdAvqtTp2qywxfrMtw== X-Received: by 2002:a17:906:ef01:b0:94f:395b:df1b with SMTP id f1-20020a170906ef0100b0094f395bdf1bmr2604628ejs.21.1686338621511; Fri, 09 Jun 2023 12:23:41 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id lw4-20020a170906bcc400b009787209732esm1644930ejb.143.2023.06.09.12.23.40 for <63984@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jun 2023 12:23:41 -0700 (PDT) Message-Id: From: Liliana Marie Prikler Date: Fri, 9 Jun 2023 10:40:32 +0200 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/emacs-source-date-epoch.patch: Delete file * gnu/local.mk (dist_patch_DATA): Remove it from here. * gnu/packages/emacs.scm (emacs): Update to 29.0.91. [source]: Remove “emacs-source-date-epoch.patch”. Add “emacs-pgtk-super-key-fix.patch”. [arguments]: Use “--with-native-compilation=aot” instead of #:make-flags. [inputs]: Add sqlite and tree-sitter. (emacs-next-pgtk): Rename to… (emacs-pgtk): … this. (emacs-next-pgtk-xwidgets): Rename to… (emacs-pgtk-xwidgets): … this. (emacs-minimal)[native-inputs]: Add texinfo. (emacs-xwidgets): Inherit build system, configure-flags and phases normally. (emacs-next, emacs-next-tree-sitter): Remove variables. --- gnu/local.mk | 1 - gnu/packages/emacs.scm | 101 +++++------------- .../patches/emacs-source-date-epoch.patch | 20 ---- 3 files changed, 27 insertions(+), 95 deletions(-) delete mode 100644 gnu/packages/patches/emacs-source-date-epoch.patch base-commit: 44bbfc24e4bcc48d0e3343cd3d83452721af8c36 diff --git a/gnu/local.mk b/gnu/local.mk index ce16d37e2b..057903d10f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1090,7 +1090,6 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-native-comp-driver-options.patch \ %D%/packages/patches/emacs-pasp-mode-quote-file-names.patch \ %D%/packages/patches/emacs-polymode-fix-lexical-variable-error.patch \ - %D%/packages/patches/emacs-source-date-epoch.patch \ %D%/packages/patches/emacs-telega-path-placeholder.patch \ %D%/packages/patches/emacs-telega-test-env.patch \ %D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch \ diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 7831a24922..a6b883aaa2 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -97,17 +97,23 @@ (define (%emacs-modules build-system) (define-public emacs (package (name "emacs") - (version "28.2") + (version "29.0.91") (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/emacs/emacs-" - version ".tar.xz")) + ;; TODO: Restore url-fetch when serving 29.1 + ;; (method url-fetch) + ;; (uri (string-append "mirror://gnu/emacs/emacs-" + ;; version ".tar.xz")) + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/emacs.git/") + (commit (string-append "emacs-" version)))) (sha256 (base32 - "12144dcaihv2ymfm7g2vnvdl4h71hqnsz1mljzf34cpg6ci1h8gf")) + "09jm1q5pvd1dc0xq5rhn66v1j235zlr72kwv5i27xigvi9nfqkv1")) (patches (search-patches "emacs-exec-path.patch" "emacs-fix-scheme-indent-function.patch" - "emacs-source-date-epoch.patch")) + "emacs-native-comp-driver-options.patch" + "emacs-pgtk-super-key-fix.patch")) (modules '((guix build utils))) (snippet '(with-directory-excursion "lisp" @@ -145,9 +151,8 @@ (define-public emacs #:modules (%emacs-modules build-system) #:configure-flags #~(list "--with-modules" "--with-cairo" - "--with-native-compilation" + "--with-native-compilation=aot" "--disable-build-details") - #:make-flags #~(list "NATIVE_FULL_AOT=1") #:phases #~(modify-phases %standard-phases (add-after 'set-paths 'set-libgccjit-path @@ -340,6 +345,8 @@ (define-public emacs ghostscript poppler elogind + sqlite + tree-sitter ;; When looking for libpng `configure' links with `-lpng -lz', so we ;; must also provide zlib as an input. @@ -368,11 +375,6 @@ (define-public emacs (search-path-specification (variable "INFOPATH") (files '("share/info"))) - ;; tree-sitter support is not yet available in emacs 28, but this - ;; search path won't harm and also will be beneficial for - ;; emacs-next and other emacs-* packages, which have tree-sitter - ;; support enabled. Please, remove this comment, when emacs - ;; package is updated to 29. (search-path-specification (variable "TREE_SITTER_GRAMMAR_PATH") (files '("lib/tree-sitter"))))) @@ -390,72 +392,29 @@ (define-public emacs languages.") (license license:gpl3+))) -(define-public emacs-next +(define-public emacs-pgtk (package (inherit emacs) - (name "emacs-next") - (version "29.0.91") - (source - (origin - (inherit (package-source emacs)) - (method git-fetch) - (uri (git-reference - (url "https://git.savannah.gnu.org/git/emacs.git/") - (commit (string-append "emacs-" version)))) - (file-name (git-file-name name version)) - ;; emacs-source-date-epoch.patch is no longer necessary - (patches (search-patches "emacs-exec-path.patch" - "emacs-fix-scheme-indent-function.patch" - "emacs-native-comp-driver-options.patch")) - (sha256 - (base32 - "09jm1q5pvd1dc0xq5rhn66v1j235zlr72kwv5i27xigvi9nfqkv1")))) - (inputs - (modify-inputs (package-inputs emacs) - (prepend sqlite))) - (native-inputs - (modify-inputs (package-native-inputs emacs) - (prepend autoconf))))) - -(define-public emacs-next-tree-sitter - (package - (inherit emacs-next) - (name "emacs-next-tree-sitter") - (inputs - (modify-inputs (package-inputs emacs-next) - (prepend sqlite tree-sitter))) - (synopsis "Emacs text editor with @code{tree-sitter} support") - (description "This Emacs build supports tree-sitter."))) - -(define-public emacs-next-pgtk - (package - (inherit emacs-next-tree-sitter) - (name "emacs-next-pgtk") - (source - (origin - (inherit (package-source emacs-next-tree-sitter)) - (patches - (append (search-patches "emacs-pgtk-super-key-fix.patch") - (origin-patches (package-source emacs-next-tree-sitter)))))) + (name "emacs-pgtk") (arguments - (substitute-keyword-arguments (package-arguments emacs-next-tree-sitter) + (substitute-keyword-arguments (package-arguments emacs) ((#:configure-flags flags #~'()) #~(cons* "--with-pgtk" #$flags)))) - (synopsis "Emacs text editor with @code{pgtk} and @code{tree-sitter} support") + (synopsis "Emacs text editor with @code{pgtk} frames") (description "This Emacs build implements graphical UI purely in terms -of GTK and supports tree-sitter."))) +of GTK."))) -(define-public emacs-next-pgtk-xwidgets +(define-public emacs-pgtk-xwidgets (package - (inherit emacs-next-pgtk) - (name "emacs-next-pgtk-xwidgets") + (inherit emacs-pgtk) + (name "emacs-pgtk-xwidgets") (synopsis "Emacs text editor with @code{xwidgets} and @code{pgtk} support") (arguments - (substitute-keyword-arguments (package-arguments emacs-next-pgtk) + (substitute-keyword-arguments (package-arguments emacs-pgtk) ((#:configure-flags flags #~'()) #~(cons "--with-xwidgets" #$flags)))) (inputs - (modify-inputs (package-inputs emacs-next-pgtk) + (modify-inputs (package-inputs emacs-pgtk) (prepend gsettings-desktop-schemas webkitgtk-with-libsoup2))))) (define-public emacs-minimal @@ -477,23 +436,17 @@ (define-public emacs-minimal (delete 'restore-emacs-pdmp) (delete 'strip-double-wrap))))) (inputs (list ncurses coreutils gzip)) - (native-inputs (list autoconf pkg-config)))) + (native-inputs (list autoconf pkg-config texinfo)))) (define-public emacs-xwidgets (package/inherit emacs (name "emacs-xwidgets") (synopsis "The extensible, customizable, self-documenting text editor (with xwidgets support)") - (build-system gnu-build-system) (arguments (substitute-keyword-arguments (package-arguments emacs) ((#:configure-flags flags #~'()) - #~(cons "--with-xwidgets" #$flags)) - ((#:modules _) (%emacs-modules build-system)) - ((#:phases phases) - #~(modify-phases #$phases - (delete 'restore-emacs-pdmp) - (delete 'strip-double-wrap))))) + #~(cons "--with-xwidgets" #$flags)))) (inputs (modify-inputs (package-inputs emacs) (prepend webkitgtk-with-libsoup2 libxcomposite))))) diff --git a/gnu/packages/patches/emacs-source-date-epoch.patch b/gnu/packages/patches/emacs-source-date-epoch.patch deleted file mode 100644 index 77ea7ac15c..0000000000 --- a/gnu/packages/patches/emacs-source-date-epoch.patch +++ /dev/null @@ -1,20 +0,0 @@ -Honor SOURCE_DATE_EPOCH variable to avoid non-determinism in generated -"autoloads" files. - ---- a/lisp/emacs-lisp/autoload.el -+++ b/lisp/emacs-lisp/autoload.el -@@ -419,8 +419,12 @@ - ;; nil t)) - ;; (match-end 2)))) - (insert generate-autoload-section-header) -- (prin1 `(autoloads ,autoloads ,load-name ,file ,time) -- outbuf) -+ (let* ((env (getenv "SOURCE_DATE_EPOCH")) -+ (time (if env -+ (seconds-to-time (string-to-number env)) -+ time))) -+ (prin1 `(autoloads ,autoloads ,load-name ,file ,time) -+ outbuf)) - (terpri outbuf) - ;; Break that line at spaces, to avoid very long lines. - ;; Make each sub-line into a comment.