diff options
| author | Jack Nagel | 2014-02-18 17:49:03 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-02-18 17:49:03 -0500 |
| commit | 0f0719bfb1e877f1fe517f23d00c797e6eaacaa5 (patch) | |
| tree | 9f31cf3dffa036f08ccd0373bec08bdd5022a039 | |
| parent | e9689cfc3375b3951abfddf53d60f7bc9086483a (diff) | |
| download | homebrew-0f0719bfb1e877f1fe517f23d00c797e6eaacaa5.tar.bz2 | |
emacs: eliminate some conditionals in the DSL
| -rw-r--r-- | Library/Formula/emacs.rb | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/Library/Formula/emacs.rb b/Library/Formula/emacs.rb index fd7b921c3..f54ee2d61 100644 --- a/Library/Formula/emacs.rb +++ b/Library/Formula/emacs.rb @@ -15,17 +15,24 @@ class Emacs < Formula option "keep-ctags", "Don't remove the ctags executable that emacs provides" option "japanese", "Patch for Japanese input methods" - if build.include? "use-git-head" - head 'http://git.sv.gnu.org/r/emacs.git' - else - head 'bzr://http://bzr.savannah.gnu.org/r/emacs/trunk' - end + head do + if build.include? "use-git-head" + url 'http://git.sv.gnu.org/r/emacs.git' + else + url 'bzr://http://bzr.savannah.gnu.org/r/emacs/trunk' + end - if build.head? or build.include? "cocoa" depends_on :autoconf depends_on :automake end + stable do + if build.include? "cocoa" + depends_on :autoconf + depends_on :automake + end + end + depends_on 'pkg-config' => :build depends_on :x11 if build.include? "with-x" depends_on 'gnutls' => :optional @@ -36,6 +43,8 @@ class Emacs < Formula end def patches + return if build.head? + p = { # Fix default-directory on Cocoa and Mavericks. # Fixed upstream in r114730 and r114882. @@ -53,7 +62,7 @@ class Emacs < Formula p[:p0].push("http://sourceforge.jp/projects/macemacsjp/svn/view/inline_patch/trunk/emacs-inline.patch?view=co&revision=583&root=macemacsjp&pathrev=583") end p - end unless build.head? + end # Follow MacPorts and don't install ctags from Emacs. This allows Vim # and Emacs and ctags to play together without violence. |
