Date: Tue, 27 Apr 2004 21:06:27 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Jonathan Arnold <jdarnold@buddydog.org> Cc: freebsd-questions@freebsd.org Subject: Re: installing mysql-phpmyadmin-apache-php Message-ID: <20040427200627.GB95321@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <c6m0v0$kh7$1@sea.gmane.org> References: <407F8006.6010000@wiegand.org> <000601c4237f$0c7bdf80$f4f0a8c0@pcmedx.com> <20040416073705.GB3983@happy-idiot-talk.infracaninophile.co.uk> <c6m0v0$kh7$1@sea.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--+g7M9IMkV8truYOl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=3D www/apache2 > > WITH_APACHE2=3D yes > > > > WANT_MYSQL_VER=3D 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: bsd.port.mk 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: http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/index= =2Ehtml Also you can hang around on the freebsd-ports@... 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 different. 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 options). 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 /usr/local/include/php/main/php.h:/usr/ports/www/mod_php4 % make -V BUILD_DEPENDS =20 % make -V LIB_DEPENDS =20 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 =66rom 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. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --+g7M9IMkV8truYOl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD4DBQFAjr1DdtESqEQa7a0RAtVaAJjR5Dt0Qcr62HsKbFiDsPdqiM32AJ9IDquw ndlN8nLBh6DE8D08UUM/kQ== =C1Yk -----END PGP SIGNATURE----- --+g7M9IMkV8truYOl--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040427200627.GB95321>