Subject: Re: Detecting dependancies (was: making aumix X independant)
To: None <tech-pkg@netbsd.org>
From: Julio Merino <slink@unixbsd.org>
List: tech-pkg
Date: 04/07/2002 10:46:15
--Dxnq1zWXvFF0Q93v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

I've been taking a look to bsd.pkg.mk (and others) and I see they do not
take control about which programs are to be used as dependancies or not.
Let me explain it, comparing with FreeBSD's system, as it may seem
confusing.

In FreeBSD, packages define something like WANT_GNOME=3Dyes at the start,
but when they need to know if gnome is beeing used or not, they check
for the variable HAVE_GNOME. Why? Well; a .mk file is included in the
middle, which does some checks and if everything is successful, HAVE_GNOME =
is defined to be used. (I'm not a ports' expert, so correct me if I'm wrong=
).

If you want, you can define by hand a WITHOUT_GNOME=3Dyes (wherever in the
mk.conf or in the command line) and everything else is overriden. The
=2Emk included file will notice it and will unset HAVE_GNOME, so the package
won't use it. This way, autodetection of installed packages is possible.
So for example, suppose you don't have GTK, but aumix *may* require it.
Then, the .mk file will detect if it is installed and setup variables
accordingly. Although you would always force it to use GTK, so it
will be compiled as a dependancy.

As I have seen in NetBSD's .mk files, these things are not implemented.
I don't know if they are the best way to go, but they seem ok to me.
Maybe it's time to have something like this in NetBSD? Or is this a
bad design?

Another solution would be to "standarize" a set of defined options in
makefiles to do these things. So, lets say we use these in makefiles':
USE_GNOME?=3Dyes, and we would override from the command line. The problem
with this is that all other pkgsrc's which want to do something like
this must do it following a convention of names to avoid confusion.
Don't you think it?

Thank you.

On Sun, Apr 07, 2002 at 07:09:48AM +0200, Hubert Feyrer wrote:
> On Sat, 6 Apr 2002, Julio Merino wrote:
> > So, what should I do?
>=20
> For dependencies, make sure the flag's passe on (somehow)=20
>=20
>=20
>  - Hubert
>=20
> --=20
> Want to get a clue on IPv6 but don't know where to start? Try this:
> * Basics -> http://www.onlamp.com/pub/a/onlamp/2001/05/24/ipv6_tutorial.h=
tml
> * Setup  -> http://www.onlamp.com/pub/a/onlamp/2001/06/01/ipv6_tutorial.h=
tml=20
> Of course with your #1 IPv6 ready operating system -> http://www.NetBSD.o=
rg/

--=20
Of course it runs NetBSD - http://www.netbsd.org
Netiquete (spanish): http://www.seei.es/netiquet.htm

Julio Merino <slink@unixbsd.org> #18961975

--Dxnq1zWXvFF0Q93v
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (NetBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE8sAdXzz00ZOPKycwRAiJZAKCIrtcGbwB9MUIgiSmNEO24FeBdBQCgiDHi
sCXJAB8SpNS06WYuVm92I/Y=
=ghKN
-----END PGP SIGNATURE-----

--Dxnq1zWXvFF0Q93v--