Tom Worster wrote:

i'm certainly not smart enough to know what might be a better way to design
ports like php. but one thing seems odd to me. i ended up with dozens of
ports installed that appeared to use nothing but the same php-5.2.8.tar.bz2
distfile. relative to what i'm used to with php (i.e. manual configure,
compile, install) this seems a bit untidy and i'm nervous what it might mean
for maintenance.

Absolutely not.  Don't be confused that the various php5-foo ports all use
the same distfile: it's a big lump of code, and the individual modules 
compile bits of it.  Don't be perturbed that you have a large number of ports
installed -- after all a port is ultimately just a set of files treated together
as a block. This just means you're getting finer grained control over what 
got installed on your machine.

No -- the current design of the way PHP is dealt with in ports is brilliant.

Consider the alternative -- in fact the way it used to be done.  As the
maintainer of the port of a PHP application I need to ensure certain
functionality is compiled into PHP for that application to work.  Unless the 
functionality I need happens to be a strict subset of what is provided by
default, I have to create and maintain slave ports of php4 and php5 with the 
appropriate configuration flags.  Which is a PITA.  Now, ask yourself what
happens if I want to install two different PHP applications simultaneously?
OK, now we need another set of PHP slave ports to support that combination.
Before you know it, the ports tree is buried in a combinatorial explosion of
different PHP slave ports all with slightly different combinations of options.
No one understands quite what they really should be installing in any 
particular circumstance.  Because the ports are now too difficult to use, 
standard advice
on mailing lists is 'compile and install by hand.'  Oh, the embarrassment!

Compare this to the system we have now.  PHP application depends on the foo,
bar and baz modules.   php5-foo and php5-bar are already installed, so now
we just get php5-baz installed automatically to fulfil the dependencies as a
routine effect of installing the app.  Now add yet another app that depends on
baz and quux.  php5-baz is already installed, so just the php5-quux module is
installed as a dependency.  Everyone is happy.

From the port maintainer's point of view, the setup is particularly sweet too.
At a minimum to declare that your port uses PHP and needs modules foo, bar and
baz, all you need to do is add a line:

  USE_PHP =     foo bar baz

to the port's Makefile.   In a lot of cases, that really is /all/ you have to
do.  Even the more complicated stuff with OPTIONS dialogues or that use
different module sets for php4 vs. php5 are only slightly harder to deal with.



Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                 Flat 3
PGP:     Ramsgate
                                                 Kent, CT11 9PW

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to