PDFlib対応のPHPをinstall


FreeBSD/sparcにPHP-4.3.9とPDFlibをinstallする手順のmemo
すでにphp-4.3.6が入っているマシンだったので、細かい手順は省く。
libjpeg,libtiff,libpngをinstall
/usr/ports/graphics/jpegでmake install
/usr/ports/graphics/tiffでmake install
/usr/ports/graphics/pngでmake install
freetype1,2をinstall
/usr/ports/print/freetypeでmake install
/usr/ports/print/freetype2でmake install
freetypeってX依存だと思っていたがそうではないらしい…
PDFlib-Lite-6.0.0p1.tar.gzをinstall
製品版はbinaryしか提供されておらずFreeBSD/sparc用はもちろんないので、PDFlib Liteを使った。
tar xvzf PDFlib-Lite-6.0.0p1.tar.gz
configure
make
make install
tar xvzf php-4.3.9.tar.gz
cd php-4.3.9
./configure –enable-mbstring –enable-mbregex –enable-zend-multibyte –with-pgsql=/usr/local/pgsql –with-apxs=/usr/local/apache/bin/apxs –without-mysql –with-pdflib=/usr/local –with-jpeg-dir=/usr/local/lib –with-tiff-dir=/usr/local/lib –with-png-dir=/usr/local/lib –with-gd –with-zlib –with-freetype-dir=/usr/local/lib
with-pdflib=/usr/local とするのがミソっぽい。/usr/local/libとしたらincludeが発見できなかった。
make
このままだと、pdflibとphpのversionの不整合でmakeが通らない。
詳細はここで。
新しいpeclはここで発見。
cd /usr/local/src/php-4.3.9/ext
fetch http://pecl.php.net/get/pdflib-2.0.2.tgz
tar xvzf pdflib-2.0.2.tgz
mv pdf pdf.org
ln -s pdflib-2.0.2 pdf
cd ..
make clean
make
make install