MacPorts から Homebrew に乗り換えてみた

Homebrew

明けましておめでとうございます。

最近、ももクロにどっぷりハマっていまして、年末から暇さえあればライブDVDばかり見ている今日この頃、皆様はどうおすごしでしょうか。

今年はブログ頑張る!!と意気込んでみたものの、既に2月も半ば・・・。
なので、気張らない感じでやっていこうかと思います。

という事で本題。

昨年末、入社以来使っていたMac Pro(1st G)のスペックの底上げをし、CPUはそのまま、メモリ16G・512G SSD+2GB HDDという構成にしました。

CPUも換装したかったんですが、使えるCPUが既にどこにも見当たらない状態だったので諦めました。

それでもお陰様で、電源ONから立ち上がり・終了まで10数秒、VMWareでOS3つ同時立ち上げつつ、Illustrator・Photoshop同時立ち上げでもビクともしない、素晴らしい環境になっています。

SSDってやっぱり凄いなぁ、なんて思っていたんですが、SSDには寿命(書き込み回数)があるという話なので、なるべく書き込みを減らすような環境を整備することに。

やれる事は色々とあると思うんですが、まず始めに、パッケージ管理をMacPortsからHomebrewに移行しました。

と言ってもやる事は少ないです。

まずはこちらを参考に、MacPorts関連のファイルを全て削除。

MacPortsを消す/アンインストールする方法 -
http://satomacoto.blogspot.com/2009/05/macports.html

その後、Homebrewのインストール。

rubyのスクリプトを実行します。


$ ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/Formula/...
/usr/local/Library/Homebrew/...

Press enter to continue
==> /usr/bin/sudo /bin/mkdir /usr/local
Password:
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local
==> Downloading and Installing Homebrew...
==> Installation successful!
Now type: brew help

特にエラーが出ない限り、これで終わりです。

この後は、各自必要なパッケージをインストールして下さい。

HomebrewのアップデートにGitを使用しているので、まずはGitをインストールする事にします。


$ brew search git
bagit		  git-extras	    git-hg	      git-sh		git-svn-abandon	  giter8	    magit	      willgit
git		  git-flow	    git-multipush     git-ssh		git-url-sub	  gitslave	    stgit
git-cola	  git-gerrit	    git-now	      git-subtree	git-utils	  libgit2	    topgit
$ brew install git
==> Downloading http://git-core.googlecode.com/files/git-1.7.9.1.tar.gz
######################################################################## 100.0%
==> make prefix=/usr/local/Cellar/git/1.7.9.1 CC=/usr/bin/llvm-gcc CFLAGS=-O3 -w -pipe -march=core2 -msse4.1 LDFLAGS= install
==> Downloading http://git-core.googlecode.com/files/git-manpages-1.7.9.1.tar.gz
######################################################################## 100.0%
==> Downloading http://git-core.googlecode.com/files/git-htmldocs-1.7.9.1.tar.gz
######################################################################## 100.0%
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

The 'contrib' directory has been installed to:
  /usr/local/share/git-core/contrib
==> Summary
/usr/local/Cellar/git/1.7.9.1: 1152 files, 24M, built in 97 seconds

Gitのインストールが完了しました。

念の為に、インストール済みのパッケージを確認します。


$ brew list
git

インストールされた事が確認できたと思います。

これで完了、と思いきや、そうもいかない状況になっていますが、そちらは次のエントリーで!! (次のエントリーを書かざるを得ない状況に自分を追い込むLife Hack!!)