Homebrewに移行
Lion搭載Mac miniを買ってから、しばらくはSnow Leopardの環境をほとんどそのまま移動していたので、引き続きMacPortsを使っていたのだが、LionにはPython 2.7が入っているし、MacPortsはパッケージ依存関係でPythonやPerlがあれこれ入れてくるし、libiconvのリンクのトラブルに当たったりと、MacPortsに対し不満が積もってきたので、流行りのHomebrewに移行した。
デフォルトでは、Homebrewは/usr/local以下に色々インストールするらしいが、MacPortsのファイル管理に慣れていたこともあり、/opt/homebrewをprefixとした。こうすればいざという時のアンインストールも簡単だろう。
MacPortsで入れていた、ack、omake、aspell、bash-completion、imagemagick、graphviz、mscgenは、全てHomebrewのデフォルトFomulaにあったので、brew install
ですんなり入った。
ライブラリ関連もまあまあ揃っているようで、さらに、Macにデフォルトで入っているものに関してはその旨を教えてくれる。
$ brew info libxml2
libxml2 2.7.8
http://xmlsoft.org
This formula is keg-only.
Mac OS X already provides this program and installing another version in
parallel can cause all kinds of trouble.
Not installed
http://github.com/mxcl/homebrew/commits/master/Library/Formula/libxml2.rb
LaTeX環境をどうしようかと考え、とりあえずbrew search tex
としたら、素敵なアドバイスが表示された。
$ brew search tex asciitex bibtex2html chktex gettext latex2rtf vilistextum auctex blahtexml cortex html2text texinfo If you meant `tex' precisely: Installing TeX from source is weird and gross, requires a lot of patches, and only builds 32-bit (and thus can't use Homebrew deps on Snow Leopard.) We recommend using a MacTeX distribution: http://www.tug.org/mactex/
というわけで、LaTeX環境(pTeX)はMacTeXに移行した。ファイルのダウンロードにいくらか時間がかかったが、インストールは簡単で、PATHに/usr/texbin
を追加し、以前に個別に入れていたTeXShopやLaTeXiTを消すなどで終わり。Asymptoteなんかもデフォルトで入っている。便利な時代になったと思う。
HomebrewでMercurialをインストールしようとして、searchしたら投げやりなことをぬかしおる。
$ brew search mercurial Install Mercurial with pip: easy_install pip && pip install Mercurial Or easy_install: easy_install Mercurial
PyPIに登録されているものは、Homebrewなど使わずpipを使っていこうと思う。
今のところ、問題なくHomebrewで作った環境上でトラブル無く作業が出来ている。ghcによるコンパイルもwarningが山ほど出るが出来るようになった。