diff options
| author | Adam Vandenberg | 2011-06-14 13:47:35 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2011-06-14 13:47:39 -0700 |
| commit | a39d6e4c905ede80893d333b0d6b198ae1c8a043 (patch) | |
| tree | c0dfa2cf2439af657988145fae29fc6bb8999bfd /Library/Formula | |
| parent | 280143e1f752f6a9116a1a84bf7b1fcc6b96ef4d (diff) | |
| download | homebrew-a39d6e4c905ede80893d333b0d6b198ae1c8a043.tar.bz2 | |
emacs: allow sRGB colors in Cocoa build
Thanks to [milkypostman]
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/emacs.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Formula/emacs.rb b/Library/Formula/emacs.rb index cea36124c..e21e59e52 100644 --- a/Library/Formula/emacs.rb +++ b/Library/Formula/emacs.rb @@ -14,6 +14,7 @@ class Emacs < Formula def options [ ["--cocoa", "Build a Cocoa version of emacs"], + ["--srgb", "Enable sRGB colors in the Cocoa version of emacs"], ["--with-x", "Include X11 support"], ["--use-git-head", "Use repo.or.cz git mirror for HEAD builds"], ] @@ -52,6 +53,14 @@ class Emacs < Formula end if ARGV.include? "--cocoa" + # Patch for color issues described here: + # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8402 + if ARGV.include? "--srgb" + inreplace "src/nsterm.m", + "*col = [NSColor colorWithCalibratedRed: r green: g blue: b alpha: 1.0];", + "*col = [NSColor colorWithDeviceRed: r green: g blue: b alpha: 1.0];" + end + args << "--with-ns" << "--disable-ns-self-contained" system "./configure", *args system "make bootstrap" |
