"php-imlib" is a PHP extension which provides access to imlib2 image functions. It was originally developed by Matt McClanahan. I found the extension useful, so I am trying to keep it working with new releases of PHP and Imlib2.
Current development version can be downloaded from my subversion repository (browse with WebSVN). Unfortunately, no packages are available at the moment.
Download and install an svn client. If you have PHP 5.3.0 or later, get the development version:
mkdir php-imlib
cd php-imlib
svn co https://siedziba.pl:790/svn/repos/php-imlib/trunk/
cd trunk
If you have an older PHP5 version, get PHP5.2 branch:
mkdir php-imlib
cd php-imlib
svn co https://siedziba.pl:790/svn/repos/php-imlib/branches/PHP5.2/
cd PHP5.2
To compile php-imlib you should have PHP 5.0.3 or higher (tested with 5.0.4 - 5.3.11), Imlib2 1.2.0 or higher (tested with 1.2.1 - 1.4.4), t1lib (tested with 5.0.2 - 5.1.2) and libltdl. There is a PHP4 branch but unmaintained.
If all requirements are met, run the following commands:
phpize
./configure
make
If everything went fine, then type as root:
make install
Filter plugins will be compiled and installed automatically when using the current trunk version. For older versions, filters can be compiled and installed manually:
cd filters
Then try to compile each filter plugin that you need with commands like this:
../libtool --mode=compile gcc -c `php-config --includes` -I.. php_bumpmap.c
../libtool --mode=link gcc -module -avoid-version -o php_bumpmap.la \
php_bumpmap.lo -rpath `php-config --extension-dir`/php_imlib_filters -lm
Of course you need to substitute php_bumpmap with the name of a filter you want to compile. If the compilation went fine, then, as root, copy all the *.so and *.la files from .libs to `php-config --extension-dir`/php_imlib_filters (usually /usr/lib/php/php_imlib_filters).
Piotr Pawłow <pp@siedziba.pl>. My PGP key.