Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 91 lines (76 sloc) 2.631 kB
a82e823 @mxcl s/require 'brewkit'/require 'formula'/g
mxcl authored
1 require 'formula'
c28a95b @0xffea GNU Emacs formula
0xffea authored
2
0476235 @adamv Use ruby style for inheritance.
adamv authored
3 class Emacs < Formula
5ae89e7 @mjwall emacs 23.3
mjwall authored
4 url 'http://ftp.gnu.org/pub/gnu/emacs/emacs-23.3.tar.bz2'
5 md5 'a673c163b4714362b94ff6096e4d784a'
137dd7e Added ns-fullscreen patch for emacs formula if running with "--cocoa"…
Luke Amdor authored
6 homepage 'http://www.gnu.org/software/emacs/'
7
9906ce3 @dhess Support both bzr and git HEADs for emacs.
dhess authored
8 if ARGV.include? "--use-git-head"
9 head 'git://repo.or.cz/emacs.git'
10 else
11 head 'bzr://http://bzr.savannah.gnu.org/r/emacs/trunk'
12 end
4ba6dc2 @boztek Emacs has --cocoa build option to build Emacs.app using CVS HEAD via git
boztek authored
13
b3ef332 @0xffea emacs: add site-lisp path
0xffea authored
14 def options
15 [
8d0f092 @dhess emacs: version update to 23.2.
dhess authored
16 ["--cocoa", "Build a Cocoa version of emacs"],
de08b2a @adamv Add x11 option to emacs
adamv authored
17 ["--with-x", "Include X11 support"],
9906ce3 @dhess Support both bzr and git HEADs for emacs.
dhess authored
18 ["--use-git-head", "Use repo.or.cz git mirror for HEAD builds"],
b3ef332 @0xffea emacs: add site-lisp path
0xffea authored
19 ]
20 end
21
137dd7e Added ns-fullscreen patch for emacs formula if running with "--cocoa"…
Luke Amdor authored
22 def patches
348c872 @andreabedini Emacs: disable fullscreen patch for HEAD
andreabedini authored
23 if ARGV.include? "--cocoa" and not ARGV.build_head?
24 "https://github.com/downloads/typester/emacs/feature-fullscreen.patch"
25 end
137dd7e Added ns-fullscreen patch for emacs formula if running with "--cocoa"…
Luke Amdor authored
26 end
27
4ba6dc2 @boztek Emacs has --cocoa build option to build Emacs.app using CVS HEAD via git
boztek authored
28 def caveats
1b48aeb @adamv Tweak emacs
adamv authored
29 s = ""
30 if ARGV.include? "--cocoa"
31 s += <<-EOS.undent
32 Emacs.app was installed to:
33 #{prefix}
34
35 EOS
36 else
37 s += <<-EOS.undent
38 Use --cocoa to build a Cocoa-specific Emacs.app.
39
40 EOS
41 end
42
43 s += <<-EOS.undent
44 The initial checkout of the bazaar Emacs repository might take a long
45 time. You might find that using the repo.or.cz git mirror is faster,
46 even after the initial checkout. To use the repo.or.cz git mirror for
47 HEAD builds, use the --use-git-head option in addition to --HEAD. Note
48 that there is inevitably some lag between checkins made to the
49 official Emacs bazaar repository and their appearance on the
50 repo.or.cz mirror. See http://repo.or.cz/w/emacs.git for the mirror's
51 status. The Emacs devs do not provide support for the git mirror, and
52 they might reject bug reports filed with git version information. Use
53 it at your own risk.
54 EOS
9906ce3 @dhess Support both bzr and git HEADs for emacs.
dhess authored
55
1b48aeb @adamv Tweak emacs
adamv authored
56 return s
4ba6dc2 @boztek Emacs has --cocoa build option to build Emacs.app using CVS HEAD via git
boztek authored
57 end
9ce7bc1 @adamv Link "emacs" binary into bin even for a Cocoa app.
adamv authored
58
c28a95b @0xffea GNU Emacs formula
0xffea authored
59 def install
ce8d2f5 @dcreager Fixing several formulae that fail with LLVM
dcreager authored
60 fails_with_llvm "Duplicate symbol errors while linking."
61
3195211 @dhess Emacs - Install info files to separate folder
dhess authored
62 args = ["--prefix=#{prefix}",
63 "--without-dbus",
64 "--enable-locallisppath=#{HOMEBREW_PREFIX}/share/emacs/site-lisp",
65 "--infodir=#{info}/emacs"]
b3ef332 @0xffea emacs: add site-lisp path
0xffea authored
66
4ba6dc2 @boztek Emacs has --cocoa build option to build Emacs.app using CVS HEAD via git
boztek authored
67 if ARGV.include? "--cocoa"
2a0250e @adamv Use startup script instead of symlink for cocoa emacs
adamv authored
68 args << "--with-ns" << "--disable-ns-self-contained"
69 system "./configure", *args
b3ef332 @0xffea emacs: add site-lisp path
0xffea authored
70 system "make bootstrap"
71 system "make install"
72 prefix.install "nextstep/Emacs.app"
72a870a @adamv emacs - revert 'fix' and link emacsclient instead
adamv authored
73
74 bin.mkpath
75 ln_s prefix+'Emacs.app/Contents/MacOS/Emacs', bin+'emacs'
76 ln_s prefix+'Emacs.app/Contents/MacOS/bin/emacsclient', bin
4ba6dc2 @boztek Emacs has --cocoa build option to build Emacs.app using CVS HEAD via git
boztek authored
77 else
de08b2a @adamv Add x11 option to emacs
adamv authored
78 if ARGV.include? "--with-x"
2a0250e @adamv Use startup script instead of symlink for cocoa emacs
adamv authored
79 args << "--with-x"
80 args << "--with-gif=no" << "--with-tiff=no" << "--with-jpeg=no"
de08b2a @adamv Add x11 option to emacs
adamv authored
81 else
2a0250e @adamv Use startup script instead of symlink for cocoa emacs
adamv authored
82 args << "--without-x"
de08b2a @adamv Add x11 option to emacs
adamv authored
83 end
72a870a @adamv emacs - revert 'fix' and link emacsclient instead
adamv authored
84
2a0250e @adamv Use startup script instead of symlink for cocoa emacs
adamv authored
85 system "./configure", *args
b3ef332 @0xffea emacs: add site-lisp path
0xffea authored
86 system "make"
87 system "make install"
88 end
c28a95b @0xffea GNU Emacs formula
0xffea authored
89 end
90 end
Something went wrong with that request. Please try again.