Subject: Re: how to deal with USE_INET6 and BUILD_DEFS?
To: Georg Schwarz <georg.schwarz@freenet.de>
From: Lubomir Sedlacik <salo@Xtrmntr.org>
List: tech-pkg
Date: 03/07/2005 17:36:30
--xA/XKXTdy9G3iaIz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

hi,

On Fri, Mar 04, 2005 at 04:41:49PM +0100, Georg Schwarz wrote:
> OK, then maybe I need to ask again to make we have the same
> undertanding of BUILD_DEFS:
>=20
> USE_INET6 can be either YES or NO (so for clarity I here will refer to
> it as "switch").  If the way a package gets compiled depends on the
> setting of a switch, should that switch (not its setting!) then be
> listed in BUILD_DEFS?  My understanding is yes, and it is to added
> independently of the setting of that respective switch.

BUILD_DEFS is a string containing definitions the package was built
with.  having USE_INET6 in BUILD_DEFS while the package was built
without IPv6 support is bogus and wrong.

> This is exactly what is being done for USE_INET6; c.f. e.g.
> net/zebra/Makefile. However, with chat/eggdrop/Makefile things are
> handled differently (and incorrectly, to my undestanding).

it's exactly the other way around, net/zebra/Makefile is broken with
this regard.

> Now I would agree that things are different with options such as inet6
> (see above), but to my knowledge these are not listed in BUILD_DEFS.

they are, indeed.  from bsd.pkg.mk:

 .if defined(PKG_SUPPORTED_OPTIONS) && defined(PKG_OPTIONS)
 BUILD_DEFS+=3D            PKG_OPTIONS
 .endif

so, to summarise, both chat/eggdrop and net/zebra should be converted to
PKG_OPTIONS framework and inet6 option should be set only when USE_INET6
for the given platform is enabled.

HTH,
regards,

--=20
-- Lubomir Sedlacik <salo@{NetBSD,Xtrmntr,silcnet}.org>   --

--xA/XKXTdy9G3iaIz
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iD8DBQFCLIMOiwjDDlS8cmMRAhz+AJ443xHQ2mvGYHU9VUm7R6IashUEFACeJXdy
KW7qH8cdEz50+vc/ApSwm00=
=VQ6P
-----END PGP SIGNATURE-----

--xA/XKXTdy9G3iaIz--