Subject: Re: pkg/25674: pkgsrc/net/vsftpd compiles on IPv6-capable platforms only
To: None <tech-pkg@netbsd.org, gnats-bugs@gnats.NetBSD.org>
From: Jan Schaumann <jschauma@netmeister.org>
List: tech-pkg
Date: 05/22/2004 17:36:35
--hHWLQfXTYDoKhP50
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
"Jeremy C. Reed" <reed@reedmedia.net> wrote:
> On Sat, 22 May 2004 geos@epost.de wrote:
>=20
> > .include "../../mk/bsd.prefs.mk"
> > .if ${_OPSYS_HAS_INET6} !=3D "yes"
> > # for the time being, vsftpd requires IPv6-enabled system libraries to =
compile
> > NOT_FOR_PLATFORM=3D *-*-*
>=20
> Instead of NOT_FOR_PLATFORM you can use PKG_FAIL_REASON, like:
>=20
> PKG_FAIL_REASON+=3D "${PKGNAME} requires IPv6-enabled system libraries to=
compile"
In addition, we shouldn't use _OPSYS_HAS_INET6. Variables beginning
with a '_' are ``private'' pkgsrc variables that shouldn't be necessar
outside of the .mk files.
Looking at this, it seems that we are not quite conclusive in
mk/bsd.prefs.mk:
,----[ around line #296 ]
| # if the system is IPv6-ready, compile with IPv6 support turned on.
| .if defined(USE_INET6)
| . if empty(USE_INET6:M[Yy][Ee][Ss]) || defined(USE_SOCKS)
| USE_INET6=3D NO
| . else
| USE_INET6=3D YES
| . endif
| .elif empty(_OPSYS_HAS_INET6:M[nN][oO]) && !defined(USE_SOCKS)
| USE_INET6=3D YES
| .else
| USE_INET6=3D NO
| .endif
`----
The first conditional doesn't seem right to me: if USE_INET6 is already
defined, then we should not re-define it, but leave it alone. Even
assuming that there is a good reason to overwrite (and not use
'USE_INET6?=3D'), the above could be simplified to
# if the system is IPv6-ready, compile with IPv6 support turned on.
=2Eif defined(USE_SOCKS)
USE_INET6=3D NO
=2Eelse
=2E if !empty(_OPSYS_HAS_INET6:M[yY][eE][sS])
USE_INET6?=3D YES
=2E else
USE_INET6?=3D NO
=2E endif
=2Eendif
Right?
-Jan
--=20
"The last time anybody made a list of the top hundred character
attributes of New Yorkers, common sense snuck in at number 79."
--hHWLQfXTYDoKhP50
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
iD8DBQFAr8fjfFtkr68iakwRAlivAKDB9o3aIgbSGe8xcGkYwMjbf8/f/QCeMoEx
xSrXkizqNVRgiI3qKE7HZhA=
=8x9E
-----END PGP SIGNATURE-----
--hHWLQfXTYDoKhP50--