Subject: [PATCH] gnu: emacs-next-minimal: Update to 30.1-rc1.

From: Morgan Smith <[email-masked]>
Date: Mon, 24 Feb 2025 14:53:58 -0500

* gnu/packages/emacs.scm (emacs-next-minimal): Update to 30.1-rc1.
[phases]: Work around the phase 'patch-program-file-names' expecting the file
"lisp/obsolete/terminal.el" in the same way that guile-emacs does.
(emacs->emacs-next)[phases]: Add the same workaround as above.

Change-Id: Ia83ee362fb70ec437b6930ae661b76cb14589b0b
---

Installed this locally on my system.  Everything works as expected.  It can
find the eln files just fine.  Used it to native compile my local manifest of
Emacs packages and loaded those.  Everything worked great.  It found those eln
files.  None of the eln files have a hash in their filename (as expected).

Honestly I was expecting to have to adjust the patches so I am pleasantly
surprised.

 gnu/packages/emacs.scm | 32 ++++++++++++++++++++++++--------
 1 file changed, 24 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index c5e671c6a9..2e59e85f6f 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -573,21 +573,19 @@ (define-public emacs-wide-int
         #~(cons "--with-wide-int" #$flags))))))
 
 (define-public emacs-next-minimal
-  (let ((commit "881d593a9879f3355733f1b627af7cc0c12b429e")
-        (revision "0"))
-   (package
+  (package
     (inherit emacs-minimal)
     (name "emacs-next-minimal")
-    (version (git-version "30.0.92" revision commit))
+    (version "30.1-rc1")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
              (url "https://git.savannah.gnu.org/git/emacs.git")
-             (commit commit)))
+             (commit (string-append "emacs-" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0nj3a7wsl5piqf6a8wnmfyjbpxp2dwl0r48flv9q624jx4nxfr2p"))
+        (base32 "172q4jsfhlccp5i9z7vsn9z1n8amdwb8ak1jqm7ybwpr5941whbr"))
        (patches
         (search-patches "emacs-disable-jit-compilation.patch"
                         "emacs-next-exec-path.patch"
@@ -595,7 +593,18 @@ (define-public emacs-next-minimal
                         "emacs-next-native-comp-driver-options.patch"
                         "emacs-next-native-comp-fix-filenames.patch"
                         "emacs-native-comp-pin-packages.patch"
-                        "emacs-pgtk-super-key-fix.patch")))))))
+                        "emacs-pgtk-super-key-fix.patch"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments emacs-minimal)
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (add-before 'patch-program-file-names 'help-patch-progam-file-names
+              (lambda _
+                (call-with-output-file "lisp/obsolete/terminal.el"
+                  (lambda (port) (display port)))))
+            (add-after 'patch-program-file-names 'remove-help-patch-progam-file-names
+              (lambda _
+                (delete-file "lisp/obsolete/terminal.el")))))))))
 
 (define* (emacs->emacs-next emacs #:optional name
                             #:key (version (package-version emacs-next-minimal))
@@ -629,7 +638,14 @@ (define* (emacs->emacs-next emacs #:optional name
                        #$(local-file
                           (search-auxiliary-file
                            "emacs/comp-integrity-next.el"))
-                       "-f" "ert-run-tests-batch-and-exit")))))))))))
+                       "-f" "ert-run-tests-batch-and-exit")))))
+            (add-before 'patch-program-file-names 'help-patch-progam-file-names
+              (lambda _
+                (call-with-output-file "lisp/obsolete/terminal.el"
+                  (lambda (port) (display port)))))
+            (add-after 'patch-program-file-names 'remove-help-patch-progam-file-names
+              (lambda _
+                (delete-file "lisp/obsolete/terminal.el")))))))))
 
 (define-public emacs-next (emacs->emacs-next emacs))
 (define-public emacs-next-pgtk (emacs->emacs-next emacs-pgtk))

base-commit: 61428ccf41f21f5ea1e4f1eec722ef9b1efc3a0e
-- 
2.48.1