[ubuntu][php] Ubuntu(hardy)のphp-gdでimagerotateを使えるようにする
ubuntuのphp-gdパッケージはgdがphpに組み込まれない形でビルドされているのでimagerotateなどの一部の関数が使えない。それはよろしくないのでリビルドする
$ mkdir ~/deb/php5 $ cd ~/deb/php5 $ apt-get source php5 $ sudo apt-get build-dep php5 $ cd ~/deb/php5/php5-5.2.4/ $ vi debian/rules //差分 --- debian/rules.old 2008-10-07 09:37:58.000000000 +0900 +++ debian/rules 2008-10-07 09:38:10.000000000 +0900 @@ -192,7 +192,7 @@ --without-mm \ --with-curl=shared,/usr \ --with-zlib-dir=/usr \ - --with-gd=shared --enable-gd-native-ttf \ + --with-gd=shared,/usr --enable-gd-native-ttf \ --with-gmp=shared,/usr \ --with-jpeg-dir=shared,/usr \ --with-xpm-dir=shared,/usr/X11R6 \ $ debchange -i //適当に何か書いてもいいし書かなくてもいい $ dpkg-buildpackage -rfakeroot $ dpkg -i ../*.deb