これ良さげだなーと思ってインストールしようと思ったんだけど、どうせだしただインストールするんじゃなくて Homebrew の formula 書いてみようと思って試してみた。
既存の formula を参考に適当に書いた。たしかに書きやすいし楽だ。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Pfff <Formula | |
url 'https://github.com/facebook/pfff/tarball/RELEASE-0.13' | |
homepage 'https://github.com/facebook/pfff' | |
md5 '82e19f8d2f7639e5ec519587cfdf82a4' | |
head 'git://github.com/facebook/pfff.git' | |
depends_on 'objective-caml' | |
depends_on 'pcre' | |
depends_on 'gtk+' => :optional | |
depends_on 'libsvg-cairo' => :optional | |
def install | |
system "./configure", "--prefix=/usr/local/Cellar/pfff/0.13" | |
system "make depend" | |
system "make" | |
bin.install "pfff" | |
bin.install "sgrep" | |
bin.install "spatch" | |
bin.install "scheck" | |
bin.install "stags" | |
bin.install "codemap" | |
bin.install "pfff_db_light" | |
end | |
end |
これでいいだろう、って思って
$ brew install pfff --HEAD
ってやるとエラーが出て make の段階で止まる。 ちなみに、普通に git clone して configure、make depend、make のコマンド叩いて実行するとエラー出ないでコンパイル完了する…。なんで?環境変数?
pcre も /opt/local/include/pcre.h 見てファイル無いよとか configure でエラー吐くしなんか微妙な感じなんだけど、scheck とか結構重宝しそう。今のところ使ってない変数の報告くらいしか見てないけど。
誰か TextMate の bundle 作ってくれるのを待ちたいと思います。