installing mysql-phpmyadmin-apache-php

Matthew Seaman m.seaman at
Tue Apr 27 13:06:41 PDT 2004

On Tue, Apr 27, 2004 at 12:17:37PM -0400, Jonathan Arnold wrote:
> Matthew Seaman wrote:

> >Actually, the versions of apache and mysql are controlled through the
> >dependency chain by the PHP port you install.  The phpmyadmin port
> >just wants to see that PHP is installed.
> >
> >Setting the following in /etc/make.conf will make your system default
> >to apache2 and mysql-5:
> >
> >    APACHE_PORT=    www/apache2
> >    WITH_APACHE2=   yes
> >
> >    WANT_MYSQL_VER= 50

> Interesting note. Is there a way to figure this out? Is there a generic
> way to specify a newer version is okay? What is a "dependency chain" and
> how does one find it?

Figuring out what flags you can use to affect compilation of ports is
usually a matter of grovelling through Makefiles -- the flags are
pretty obvious: anything starting WITH_ or WITHOUT_ or WANT_ should be
a user-tunable.  Anything listed in an OPTIONS variable similarly.
Stuff starting USE_ is not.

There may be other variables you can tweak, but you'll have to read
the Makefiles carefully to understand what they do.  Other sources of
information include the /usr/ports/Mk/bsd.*.mk files: in
particular has a nice comment section explaining what all the
variables it uses are for.  There is a great deal of documentation in
the Porter's Handbook, although that is aimed more at people who write
and maintain ports:
Also you can hang around on the freebsd-ports at ... mailing list, where
there are fairly frequent discussions of this sort of thing.

The WANT_ type variables are generally used to select between a number
of alternate but mutually incompatible versions of some software that
could be used to fulfil a dependency.  If you don't set WANT_FOO, the
port will usually just go with whatever version of FOO you have
already installed, or if you havent already installed FOO, it will
cause a default version to be installed.  This sort of construct is
seen in several families of related ports: MySQL, Berkeley DB,
OpenLDAP for example.  Where the port requires a dependency version
different to and incompatible with what you have already installed, it
should print out a reasonable error message rather than continuing to
install anything.  This mechanism isn't used everywhere it could be,
for instance the way that a Java JVM dependency is specified is quite

The 'dependency chain' is just the list of things that have to be
installed before the port of interest, but expressed in terms of what
explicitly requires what.  Thus databases/phpmyadmin requires one of
the PHP ports to be installed -- choose from lang/php4, www/mod_php4
etc.  lang/php4 requires databases/mysqlXX-client to be installed (by
default: you can turn off mysql support by twiddling with varios

At each stage you can see what each port depends on to build and
install by looking at the value of various _DEPENDS variables. eg:

    % cd /usr/ports/databases/phpmyadmin
    % make -V RUN_DEPENDS
    % make -V BUILD_DEPENDS
    % make -V LIB_DEPENDS

and you can get a summary list of all dependencies and dependencies of
dependencies by:

    % make pretty-print-run-depends-list
    This port requires package(s) "apache-2.0.49 expat-1.95.7 mod_php4-4.3.6,1 mysql-client-4.0.18_1" to run.
    % make pretty-print-build-depends-list

(Bad example -- the build dependencies are empty for this port, but
you get the idea)

The 'pretty-print-...' make targets extract the answer they print out
from the /usr/port/INDEX or INDEX-5 files: a large part of the time
taken to produce those indexes is actually chasing and compiling the
complete list of dependencies for every port.



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP:         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list