MacBookProにSWFEditorをいれてみた(brew編)
以前はMacPorts使ってた僕ですが、最近はもっぱらbrew派です。
そんな僕ですが、やっぱりSWFEditorは使いたくなる訳です。
ところが今の僕のMacBookProにはSWFEditorには入っていません。
ということでインストールしようと思ったら、libpngが周りでトラブルが・・・・
wget "http://sourceforge.jp/frs/redir.php?m=iij&f=%2Fswfed%2F52887%2Fswfed-0.58.tar.gz"
$ tar zxvf swfed-0.58.tar.gz
$ cd swfed-0.58/src
$ phpize
$ ./configure
またもやconfigureでとまりやがったぜぇええ。。。
checking for the location of ZLIB... no
checking for the location of LIBPNG... no
checking for the location of GIFLIB... no
checking for the location of zlib... /usr
checking for the location of libpng... configure: error: swfed support requires LIBPNG. Use --with-png-dir=<DIR>
to specify prefix where LIBPNG include and library are located
前回同様ですね。。。 giflibとかはbrewでインストールできるんですが、、、libpngだけはだめ。。。
$ brew install libpng
Error: No available formula for libpng
Apple distributed libpng with OS X until 10.8. It is also distributed
as part of XQuartz. You can find the XQuartz installer here:
http://xquartz.macosforge.org
まあ/usr/X11/includeとかその辺にlibpingはいっているとおもうけどなんかうまく行かない。。。
ってことでlibpng12をbrewでいれちゃって解決しました。
$ brew tap homebrew/versions
$ brew install libping12
あとはこんな感じにconfigure指定して適当にmakeすればおkですよー
$ ./configure --with-png-dir=/usr/local --with-gif-dir=/usr/local
$ make
$ sudo make install
あとは最後にphp.iniを変更すれば終わりです。
$ vim /usr/local/ext/php/5.3/php.ini
[SWFEditor]
extension=swfed.so
なんかlibpng12をbrewで入れてる感じが負けてる感満載ですね。。。 だれかもっと良い方法教えてください。