30
30

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Homebrewのemacsをeditしてインラインパッチなどを当てる(Emacs-24.3)

Posted at

Homebrewのemacsをeditしてインラインパッチなどを当てる(Emacs-24.2)』を書いてしばらく経ちましたが、その後Emacs-24.3対応のFormulaが出ました。幸いにしてよくまとまったEmacs 24.3への日本語環境用のパッチがgistにありましたので、今度はそれを使います。

h12o@Exegesis:/usr/local/Library/Formula$ git diff emacs.rb
diff --git a/Library/Formula/emacs.rb b/Library/Formula/emacs.rb
index 7be7cdc..d9dc706 100644
--- a/Library/Formula/emacs.rb
+++ b/Library/Formula/emacs.rb
@@ -38,6 +38,12 @@ class Emacs < Formula
     end
   end
 
+  def patches
+    if build.include? "cocoa" and not build.head?
+       { :p0 => "https://gist.github.com/ganta/5139150/raw/8f6fc32747c40a51de597ce73085f56764a7d3ed/japanese-patch-for-emacs-24.3.patch" }
+    end
+  end
+
   def install
     # HEAD builds are currently blowing up when built in parallel
     # as of April 20 2012
h12o@Exegesis:/usr/local/Library/Formula$ 

ビルドは今回もSuperenvを回避して行いました。

h12o@Exegesis:~$ brew install emacs --cocoa --env=std
==> Downloading http://ftpmirror.gnu.org/emacs/emacs-24.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/emacs-24.3.tar.gz
==> Downloading patches
######################################################################## 100.0%
==> Patching
patching file configure.ac
patching file lisp/term/common-win.el
Hunk #1 succeeded at 127 with fuzz 2.
patching file lisp/term/ns-win.el
patching file src/Makefile.in
patching file src/keyboard.c
patching file src/macim.m
patching file src/nsfns.m
patching file src/nsterm.h
patching file src/nsterm.m
==> ./configure --prefix=/usr/local/Cellar/emacs/24.3 --without-dbus --enable-lo
==> make bootstrap
==> make install
==> Caveats
Emacs.app was installed to:
  /usr/local/Cellar/emacs/24.3

 To link the application to a normal Mac OS X location:
   brew linkapps
 or:
   ln -s /usr/local/Cellar/emacs/24.3/Emacs.app /Applications

 A command line wrapper for the cocoa app was installed to:
  /usr/local/Cellar/emacs/24.3/bin/emacs
Because the official bazaar repository might be slow, we include an option for
pulling HEAD from an unofficial Git mirror:

  brew install emacs --HEAD --use-git-head

There is inevitably some lag between checkins made to the official Emacs bazaar
repository and their appearance on the Savannah mirror. See
http://git.savannah.gnu.org/cgit/emacs.git for the mirror's status. The Emacs
devs do not provide support for the git mirror, and they might reject bug
reports filed with git version information. Use it at your own risk.

Emacs creates an executable `ctags` that stomps on exuberant-ctags. In
order to prevent that, we remove `ctags` and its manpage from the emacs
build before linking. (Add the flag "--keep-ctags" to keep it.) You can
install exuberant-ctags via brew with `brew install ctags`.
(exuberant-ctags can provide both vim-style and emacs-style tags.)
==> Summary
/usr/local/Cellar/emacs/24.3: 3851 files, 111M, built in 6.7 minutes
h12o@Exegesis:~$ 

しかしながら、以下のようなコードがemacs.rbにあったので、ひょっとしたらsuperenv回避の必要はないかもしれません。

emacs.rb
  if build.head? or build.include? "cocoa"
    depends_on :autoconf
    depends_on :automake
  end
30
30
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
30
30

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?