Subject: Re: pkg/25674: pkgsrc/net/vsftpd compiles on IPv6-capable platforms only
To: None <,>
From: Jan Schaumann <>
List: tech-pkg
Date: 05/22/2004 17:36:35
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

"Jeremy C. Reed" <> wrote:
> On Sat, 22 May 2004 wrote:
> > .include "../../mk/"
> > .if ${_OPSYS_HAS_INET6} !=3D "yes"
> > # for the time being, vsftpd requires IPv6-enabled system libraries to =
> > NOT_FOR_PLATFORM=3D       *-*-*
> Instead of NOT_FOR_PLATFORM you can use PKG_FAIL_REASON, like:
> PKG_FAIL_REASON+=3D	"${PKGNAME} requires IPv6-enabled system libraries to=

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

,----[ 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
=2E  if !empty(_OPSYS_HAS_INET6:M[yY][eE][sS])
USE_INET6?=3D             YES
=2E  else
USE_INET6?=3D             NO
=2E  endif



"The last time anybody made a list of the top hundred character
attributes of New Yorkers, common sense snuck in at number 79."

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

Version: GnuPG v1.2.3 (NetBSD)