Skip to content

Instantly share code, notes, and snippets.

@tamagokun
Last active August 29, 2015 14:22
Show Gist options
  • Save tamagokun/9a0700f256e1615a09d0 to your computer and use it in GitHub Desktop.
Save tamagokun/9a0700f256e1615a09d0 to your computer and use it in GitHub Desktop.
Homebrew formula for tmux patched with true color support
require 'formula'
class Tmux < Formula
homepage 'http://tmux.sourceforge.net'
url 'https://downloads.sourceforge.net/project/tmux/tmux/tmux-2.0/tmux-2.0.tar.gz'
sha1 '977871e7433fe054928d86477382bd5f6794dc3d'
bottle do
cellar :any
sha256 "91a14274005416c9a20f64f149f732837b0503c0ddcfdc80f87c0576e99ee3fa" => :yosemite
sha256 "d70b62ddf26d2113a108622643550dc50248c98188af27d7e2e76e415f43588d" => :mavericks
sha256 "a1468fd6ac69c18c4773a65c11b2811525d542d911f6c6642e87c0e195f6c4c1" => :mountain_lion
end
head do
url 'git://git.code.sf.net/p/tmux/tmux-code'
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
# Adds true color support. See gist for more information.
patch do
url "https://gist.githubusercontent.com/JohnMorales/0579990993f6dec19e83/raw/75b073e85f3d539ed24907f1615d9e0fa3e303f4/tmux-24.diff"
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
end
end
depends_on 'pkg-config' => :build
depends_on 'libevent'
def install
system "sh", "autogen.sh" if build.head?
ENV.append "LDFLAGS", '-lresolv'
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--sysconfdir=#{etc}"
system "make install"
bash_completion.install "examples/bash_completion_tmux.sh" => 'tmux'
(share/'tmux').install "examples"
end
def caveats; <<-EOS.undent
Example configurations have been installed to:
#{share}/tmux/examples
EOS
end
test do
system "#{bin}/tmux", "-V"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment