Date: Mon, 06 Aug 2007 21:42:08 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Rakhesh Sasidharan <rakhesh@rakhesh.com> Cc: "Arend P. van der Veen" <apvanderveen@att.net>, freebsd-ports@freebsd.org Subject: Re: portsdb and cvsup Message-ID: <46B787A0.5030005@infracaninophile.co.uk> In-Reply-To: <20070806214438.O36390@obelix.home.rakhesh.com> References: <46B5E0F8.7050405@att.net> <20070806083111.F74284@obelix.home.rakhesh.com> <46B706BF.40000@att.net> <20070806153345.Y6336@obelix.home.rakhesh.com> <46B750C9.7050108@infracaninophile.co.uk> <20070806214438.O36390@obelix.home.rakhesh.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Rakhesh Sasidharan wrote: > >>> If you ever figure out what special macros are or in which situations >>> the ''-U'' switch is useful, please do let me know. >> >> Having "Special Macros" is (I am almost certain) a strange way of >> saying that you have set various make variables which will affect >> the dependency tree for a port. Eg. if you were to have the >> following in /etc/make.conf: >> >> WANT_OPENLDAP_SASL= yes >> >> Then you'ld find that any port needed LDAP functionality would >> depend on openldap-sasl-client-2.3.37 rather than >> openldap-client-2.3.37 > > Thank you shedding light on that Matthew. I didn't know you could have > variables such as these WANT_* ones. Where can I see what all WANT_* > options are available for a particular port -- in the port's Makefile > itself, or someplace else? There isn't one place you can go to see everything that might affect a particular port. The port's Makefile is a good place to start, and most port Maintainers will document to a greater or lesser extent what tunables and so forth are available within the file, although it does help if you understand make(1) syntax. Some ports will include other Makefiles either from within their own port directory, or from a master port or in fact from almost anywhere else in the ports tree. (PHP ports are a good example. All of the various PHP modules such as databases/php5-mysql use /usr/ports/lang/php5/Makefile for just about everything they need) The next place to look are the shared Makefiles in /usr/ports/Mk/ where there are a large number of such variables defined. Some of those variables in bsd.ports.mk. bsd.commands.mk, bsd.sites.mk etc. have a global effect, others in eg. bsd.emacs.mk, bsd.gnome.mk etc only affect the ports that have the corresponding USE_EMACS or USE_GNOME flags set. Also note the convention: Variables called WITH_FOO or WITHOUT_FOO are user settable. Note that frequently (but not always) the only test on those variables is that they are set, not what they are set to. Thus the converse of WITH_FOO= yes is not: WITH_FOO= no # this actually *enables* FOO but: WITHOUT_FOO= yes Other variables let you select one out of a number of options. So if you want to use MySQL 5.1 generally, then you'ld put: WITH_MYSQL_VER= 51 in /etc/make.conf Variables called 'WANT_FOO' are also user settable -- AFAIK there isn't a corresponding 'DONT_WANT_FOO' construct -- but in this case they tend to indicate a preference rather than an absolute requirement, and the ports system can override them. Variables called USE_FOO however are maintainer only Makefile internal stuff (no user serviceable parts inside) and should not be meddled with. Other variables may or may not be modifiable by the end user -- generally things that are set in the port (or other) Makefile using the ?= operator are things that might be overridden. Thus in the databases/phpmyadmin port there are these settings: MYADMDIR?= www/phpMyAdmin MYADMGRP?= ${WWWGRP} which basically say "install the files into /usr/local/www/phpMyAdmin owned by group 'www'" -- but you can override that should you wish to, either from /etc/make.conf or on the make command line or by setting a variable of the same name in the environment while you're building/installing the port. > A quick clarification: while updating to Emacs 22.1, for instance, > /usr/ports/UPDATING asks one to add a line such as > "EMACS_PORT_NAME=emacs22" to /etc/make.conf. Does that count as a > special macro (and so one should use portsdb -Uu while updating INDEX*.db)? Oh, yes. Definitely that one does. The effect of 'EMACS_PORT_NAME' is quite wide ranging. Many e-lisp ports have a line like this: PKGNAMESUFFIX= -${EMACS_PORT_NAME} which tags on the version of emacs to the package name, hence having quite a big effect on the INDEX. Note that the default set in Mk/bsd.emacs.mk is: EMACS_PORT_NAME?= emacs22 which allows various individual ports to override the setting if they only work with specific emacs versions. If you put EMACS_PORT_NAME= emacs22 in /etc/make.conf (note '=' rather than '?=') then you'll have the effect of forcing some of the e-lisp ports to try and be installed for emacs22 when they may not actually work with that version of emacs. (Or it's possible they'd work just fine, but the port just hasn't been updated yet, so fails to install properly) It will also break building the INDEX quite dramatically because of those non working ports. The best practice is to omit EMACS_PORT_NAME from /etc/make.conf if you're using emacs22 or else to set it with ?= if you're using a different emacs port. Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGt4ef8Mjk52CukIwRCDH4AJ9+B3LRWnN5kMwxkhmy75vXDjTaoQCdFg/k i0cx5V1RTLsIVOZtpc9JHz8= =NdB3 -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46B787A0.5030005>