MacBookProにSWFEditorをいれてみた(brew編)

Twitter ツイート Hatena Bookmark ブックマーク

以前はMacPorts使ってた僕ですが、最近はもっぱらbrew派です。
そんな僕ですが、やっぱりSWFEditorは使いたくなる訳です。

ところが今の僕のMacBookProにはSWFEditorには入っていません。
ということでインストールしようと思ったら、libpngが周りでトラブルが・・・・

1
2
3
4
5
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でとまりやがったぜぇええ。。。

1
2
3
4
5
6
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だけはだめ。。。

1
2
3
4
5
6
$ 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でいれちゃって解決しました。

1
2
$ brew tap homebrew/versions
$ brew install libping12

あとはこんな感じにconfigure指定して適当にmakeすればおkですよー

1
2
3
$ ./configure --with-png-dir=/usr/local --with-gif-dir=/usr/local
$ make
$ sudo make install

あとは最後にphp.iniを変更すれば終わりです。

1
2
3
4
$ vim /usr/local/ext/php/5.3/php.ini

[SWFEditor]
extension=swfed.so

なんかlibpng12をbrewで入れてる感じが負けてる感満載ですね。。。 だれかもっと良い方法教えてください。

comments powered by Disqus
Built with Hugo
テーマ StackJimmy によって設計されています。