Skip to content

Instantly share code, notes, and snippets.

@hage
Last active October 10, 2017 04:01
Show Gist options
  • Save hage/3f79037d2a0327b97d688be8b71e323b to your computer and use it in GitHub Desktop.
Save hage/3f79037d2a0327b97d688be8b71e323b to your computer and use it in GitHub Desktop.
tmux 2.2 が何かおかしいので homebrew で tmux 2.1 にダウングレードする ref: http://qiita.com/__hage/items/5280e072edeb47dc8ada
$ brew uninstall tmux
$ brew update
$ brew tap hage/homebrew-formula
$ brew install tmux21
$ git clone https://github.com/Homebrew/homebrew-core.git
$ cd homebrew-core
$ git log master -- Formula/tmux.rb
$ git checkout 78b85
diff --git a/tmux21.rb b/tmux21.rb
index 9922c5c..3b0d4b7 100644
--- a/tmux21.rb
+++ b/tmux21.rb
@@ -1,4 +1,4 @@
-class Tmux < Formula
+class Tmux21 < Formula
desc "Terminal multiplexer"
homepage "https://tmux.github.io/"
@@ -21,14 +21,6 @@ class Tmux < Formula
end
end
- bottle do
- cellar :any
- revision 2
- sha256 "815920cd38a8102360f7d667271d9c724f41087dd79be433db29259390ef8011" => :el_capitan
- sha256 "93e2156c3c7e1c9f3f4b86dd84617e7519e9bee630f1e8769e00a91aa341d274" => :yosemite
- sha256 "03c4ca001f72a1623393c0ec9406dfd82b7e449d745762a6e761da6a95d0fbd9" => :mavericks
- end
-
head do
url "https://github.com/tmux/tmux.git"
@@ -45,8 +37,8 @@ class Tmux < Formula
ENV.append "LDFLAGS", "-lresolv"
system "./configure", "--disable-dependency-tracking",
- "--prefix=#{prefix}",
- "--sysconfdir=#{etc}"
+ "--prefix=#{prefix}",
+ "--sysconfdir=#{etc}"
system "make", "install"
@@ -67,4 +59,11 @@ class Tmux < Formula
test do
system "#{bin}/tmux", "-V"
end
+
+ def patches
+ [
+ "https://gist.githubusercontent.com/waltarix/1399751/raw/8c5f0018c901f151d39680ef85de6d22649b687a/tmux-ambiguous-width-cjk.patch",
+ "https://gist.githubusercontent.com/waltarix/1399751/raw/dc11f40266d9371e730eff41c64a70c84d34484a/tmux-pane-border-ascii.patch"
+ ]
+ end
end
$ mkdir -p ~/project/homebrew-formula
$ cd !$
$ cp /path/to/homebrew-core/Formula/tmux.rb tmux21.rb
$ git init . && git add . && git commit -m 'add: tmux 2.1 formula'
diff --git a/tmux21.rb b/tmux21.rb
index 9922c5c..3b0d4b7 100644
--- a/tmux21.rb
+++ b/tmux21.rb
@@ -1,4 +1,4 @@
-class Tmux < Formula
+class Tmux21 < Formula
desc "Terminal multiplexer"
homepage "https://tmux.github.io/"
@@ -21,14 +21,6 @@ class Tmux < Formula
end
end
- bottle do
- cellar :any
- revision 2
- sha256 "815920cd38a8102360f7d667271d9c724f41087dd79be433db29259390ef8011" => :el_capitan
- sha256 "93e2156c3c7e1c9f3f4b86dd84617e7519e9bee630f1e8769e00a91aa341d274" => :yosemite
- sha256 "03c4ca001f72a1623393c0ec9406dfd82b7e449d745762a6e761da6a95d0fbd9" => :mavericks
- end
-
head do
url "https://github.com/tmux/tmux.git"
@@ -45,8 +37,8 @@ class Tmux < Formula
ENV.append "LDFLAGS", "-lresolv"
system "./configure", "--disable-dependency-tracking",
- "--prefix=#{prefix}",
- "--sysconfdir=#{etc}"
+ "--prefix=#{prefix}",
+ "--sysconfdir=#{etc}"
system "make", "install"
@@ -67,4 +59,11 @@ class Tmux < Formula
test do
system "#{bin}/tmux", "-V"
end
+
+ def patches
+ [
+ "https://gist.githubusercontent.com/waltarix/1399751/raw/8c5f0018c901f151d39680ef85de6d22649b687a/tmux-ambiguous-width-cjk.patch",
+ "https://gist.githubusercontent.com/waltarix/1399751/raw/dc11f40266d9371e730eff41c64a70c84d34484a/tmux-pane-border-ascii.patch"
+ ]
+ end
end
$ brew tap <Your-GitHub-Name>/<Your-Formula-Repository>
$ brew install tmux21
$ brew tap <Your-GitHub-Name>/<Your-Formula-Repository>
$ brew install tmux21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment