Subject: Re: variables for preferred package versions
To: Geert Hendrickx <>
From: Dieter Baron <>
List: tech-pkg
Date: 01/14/2006 23:42:53
In article <> Geert wrote:
: Hello, 

: today a DragonFly user asked me how to make pkgsrc default to a specific
: version of Apache (2.x) and PHP (5.x) when building apache/php related
: packages (he didn't want to manually install www/apache2 and lang/php5
: before starting the other builds).  I looked it up and this is what I
: found: 

:   PKG_APACHE_DEFAULT=apache2    (from mk/
:   PHP_VERSION_DEFAULT=5         (from lang/php/

: Not very consistent.  Other examples are: 

:   PYTHON_VERSION_DEFAULT=24     (from lang/python/
:   TEX_DEFAULT=teTeX3            (from mk/
:   PGSQL_VERSION_DEFAULT=80      (from mk/
:   MYSQL_VERSION_DEFAULT=50      (from mk/

: Shouldn't we standardize variable names (and maybe also the Makefile names
: and location) for this kind of things?  I don't really care what standard
: name format we choose, as long as it's consistent.  The current situation
: is really confusing, and also not well-documented.  

  That sounds good.  It should probably be documented in section 5 of
the pkgsrc guide (configuring pkgsrc).

: FOO_VERSION_DEFAULT seems to be most often used right now, with values not
: including the package name, only a number.  So we could for example declare
: the PKG_APACHE_DEFAULT and TEX_DEFAULT variables deprecated and replace

  That TEX_DEFAULT includes the package name was choosen to allow
supporting TeX distributions other than teTeX in the future.  (See
discussion on tech-pkg.)  This will also be needed for GNU/Linux
binary emulation (for supporting distributions other than SuSE).  This
could also be used to choose a ghostscript distribution.  (I don't
know how that is currently handled.)

  So either we have two kinds of naming schemes (only version
choosable vs. implementation/distribution and version choosable), or
we include the package name in all variables.

  If we choose two naming schemes, I would suggest
<PKGBASE>_VERSION_DEFAULT=<VERSION> for version only and
implementation/distribution and version.

  I would suggest placing all the Makefile fragments in mk/<SYSTEM>.mk
or possibly a subdirectory of mk.  (It usually involves more than one
package directory, and it is often not clear in which to place the

: Opinions?