macports and specific build

Mark Hattam mark at dxradio.demon.co.uk
Thu Oct 12 14:51:55 PDT 2006


>On Oct 12, 2006, at 16:01, Mark Hattam wrote:
>
>>>The php4 port version 4.4.4 revision 2 does include a gd variant. 
>>>Make sure you have the latest version of the port by first saying 
>>>"sudo port sync"
>>
>>Well, I'm obviously missing something, because after doing a
>>
>>sudo port sync
>>sudo port uninstall php4
>>sudo port clean -f php4
>>
>>then a
>>
>>sudo port install -f php4 +apache2+darwin_8+macosx+mysql4+gd
>>
>>it seems to have ignored the +gd bit altogether, as it went through 
>>all the usual parts of the install without apparently doing 
>>anything about gd. I expected it to download and install gd as part 
>>of the php4 install, like it does with expat, gettext, openssl and 
>>the like.
>
>Well, no, it doesn't need to download gd. The php distribution 
>already includes a version of gd, so that gets used.
>
>If you look into the portfile (which you can see by typing "port 
>edit php4") you'll see this section:
>
>variant gd {
>	depends_lib-append	port:jpeg port:libpng port:freetype
>
>	configure.args-append	--with-gd \
>				--with-jpeg-dir=${prefix} \
>				--with-png-dir=${prefix} \
>				--enable-gd-native-ttf \
>				--with-freetype-dir=${prefix}
>}
>
>So you see that when you add the gd variant, it then makes sure the 
>jpeg, libpng and freetype ports are installed. But no gd port is 
>required.


It doesn't seem to pick it up though. For instance this function 
testing for it returns TRUE, and gives the warning, and there's no 
section for gd in the standard php test.php informational page.

if (!function_exists('imagecreatefromjpeg'))
{
	$warnings[] = "The GD imaging library does not exist. Go to 
<a 
href=\"http://www.php.net/manual/en/ref.image.php\">http://www.php.net/manual/en/ref.image.php</a> 
for more information.";
}

http://www.php.net/manual/en/ref.image.php


Mark



More information about the macports-users mailing list