GD with freetype support chrooted PDF Print E-mail
User Rating: / 1
PoorBest 
Written by Bart Dorlandt   
Wednesday, 30 April 2008 12:37

I need freetype/truetype support for GD to make use of security images in Joomla. To do this we need some parts of the xbase package. Of course you need the freetype stuff but also another library. Below you'll find a script that will do it for you and also copies the necessary stuff to your chroot.

# be sure to be root for the following tasks
# (sudo su -l root)
part1=`uname -r | cut -d"." -f 1`
part2=`uname -r | cut -d"." -f 2`

cd /tmp
wget ftp://ftp.nluug.nl/pub/OpenBSD/`uname -r`/i386/xbase${part1}${part2}.tgz
cd /
tar xzpf /tmp/xbase${part1}${part2}.tgz *freetype*
tar xzpf /tmp/xbase${part1}${part2}.tgz ./usr/X11R6/lib/libXpm.so.*
tar xzpf /tmp/xbase${part1}${part2}.tgz ./usr/X11R6/lib/libfreetype.so.*
cp -p /usr/X11R6/lib/libXpm.so.* /usr/X11R6/lib/libfreetype.so.* /var/www/usr/lib

After this install gd and php5-gd and do NOT select the "NO_X11".

pkg_add -ai gd php5-gd

Enable gd in php5 and restart your apache. The phpinfo page should show you these 3 extra options:

FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.2.1
Last Updated on Friday, 13 February 2009 15:25
 


Related items: