# PHP extension?



## circus78 (Nov 2, 2013)

Hi,

Just an example, I need PHP-gd support.
I'm using php53-5.3.27 (installed by ports).
Which one must I install?
php53-gd-5.3.27 OR the one in php53-extension (if I do `make config` inside directory `/usr/ports/lang/php53-extensions`, there is "GD" available).
Thank you.


----------



## ShelLuser (Nov 2, 2013)

It doesn't really matter. If you look at the included Makefile of both ports you'll notice that these are in fact what I like to call "meta ports" (not the official name I think). What those ports do is basically use another port to control a specific extension of that port.

So if you look at lang/php5-extensions you'll see that it doesn't build anything itself (see NO_BUILD) but instead extends on PHP (see USE_PHP_BUILD).

Now, looking at graphics/php5-gd shows us a similar setup:


```
CATEGORIES=     graphics

MASTERDIR=      ${.CURDIR}/../../lang/php5

PKGNAMESUFFIX=  -gd

.include "${MASTERDIR}/Makefile"
```
As you can see the master directory is actually the same as lang/php5, which is the main PHP port.

So basically both ports perform the same action.

My suggestion would be to rely on lang/php5-extensions since that will make it easier to maintain.


----------



## wblock@ (Nov 2, 2013)

These are "slave" ports.  They modify a few options but mostly use the main port's configuration.  A metaport has installs no files of its own, it only depends on other ports.  For example, x11/xorg.


----------

