diff --git a/Formula/emacs.rb b/Formula/emacs.rb index f680e94be813a..cdcfcb18aa6be 100644 --- a/Formula/emacs.rb +++ b/Formula/emacs.rb @@ -1,10 +1,10 @@ class Emacs < Formula desc "GNU Emacs text editor" homepage "https://www.gnu.org/software/emacs/" - url "https://ftp.gnu.org/gnu/emacs/emacs-26.3.tar.xz" - mirror "https://ftpmirror.gnu.org/emacs/emacs-26.3.tar.xz" - sha256 "4d90e6751ad8967822c6e092db07466b9d383ef1653feb2f95c93e7de66d3485" - license "GPL-3.0" + url "https://ftp.gnu.org/gnu/emacs/emacs-27.1.tar.xz" + mirror "https://ftpmirror.gnu.org/emacs/emacs-27.1.tar.xz" + sha256 "4a4c128f915fc937d61edfc273c98106711b540c9be3cd5d2e2b9b5b2f172e41" + license "GPL-3.0-or-later" livecheck do url :stable @@ -27,6 +27,7 @@ class Emacs < Formula depends_on "pkg-config" => :build depends_on "gnutls" + depends_on "jansson" uses_from_macos "libxml2" uses_from_macos "ncurses" @@ -37,7 +38,6 @@ class Emacs < Formula def install args = %W[ - --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=#{HOMEBREW_PREFIX}/share/emacs/site-lisp --infodir=#{info}/emacs @@ -56,6 +56,14 @@ def install system "./autogen.sh" end + File.write "lisp/site-load.el", <<~EOS + (setq exec-path (delete nil + (mapcar + (lambda (elt) + (unless (string-match-p "Homebrew/shims" elt) elt)) + exec-path))) + EOS + system "./configure", *args system "make" system "make", "install"