Subject: Re: variables for preferred package versions
To: Geert Hendrickx <firstname.lastname@example.org>
From: Dieter Baron <email@example.com>
Date: 01/14/2006 23:42:53
In article <20060114112822.GA10351@lori.ghen.be> Geert wrote:
: 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
: PKG_APACHE_DEFAULT=apache2 (from mk/apache.mk)
: PHP_VERSION_DEFAULT=5 (from lang/php/phpversion.mk)
: Not very consistent. Other examples are:
: PYTHON_VERSION_DEFAULT=24 (from lang/python/pyversion.mk)
: TEX_DEFAULT=teTeX3 (from mk/tex.buildlink3.mk)
: PGSQL_VERSION_DEFAULT=80 (from mk/pgsql.buildlink3.mk)
: MYSQL_VERSION_DEFAULT=50 (from mk/mysql.buildlink3.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
: them by APACHE_VERSION_DEFAULT and TETEX_VERSION_DEFAULT.
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