In this short HowTo I will describe how You can rebuild the php5-cgi to use the php5-bundled gd library on debian etch.
This point is sometimes necessary if you or your application will use some special gd functions missing in the libgd but be part of the php5-gd. (i.e. imagefilter() or imagerotate() will be missing if you use the original debian etch php5-cgi)
firrst of all:
change to the source directory
download the source for php5 from debian
download some other stuff for re-building the package:
apt-get build-dep php5-cgi
after that change to the new extract of php5-5*
when i write this the current version is php5-5.2.0:
now edit the debian configuration:
change every line from
to
in the section configure-cgi-stamp: patch-stamp add the following lines: (I didi it after the $(COMMON_CONFIG) line)
--with-jpeg-dir=shared,/usr \
--with-gd \
--enable-gd-native-ttf \
now save the rules file and start the re-building ...
after a cuple of time change back to the source the directory
and you will see a couple of new .deb files.
now install the new cgi binary
dpkg -i php5-cgi_5.2.0-8+etch11_i386.deb
after all restart apache ...
/etc/init.d/apache2 restart
thats all
Harald
Edit: Updated to the last Version, JPEG Support 4 GD enabled.