Subject: Re: WRKSRC's position in Makefiles, and pkglint
To: Alistair Crooks <agc@pkgsrc.org>
From: Thomas Klausner <wiz@NetBSD.org>
List: tech-pkg
Date: 01/19/2004 17:59:45
On Mon, Jan 19, 2004 at 10:11:52AM +0000, Alistair Crooks wrote:
> I believe strongly that the WRKSRC definition really belongs in the
> build information, and that the first paragraph should be reserved for
> detailing the location of any distfiles, and pertinent information to
> them.

On Mon, Jan 19, 2004 at 11:06:51AM +0000, Alistair Crooks wrote:
> No, the first section has to do with the variables I listed:
> 
> DISTNAME
> PKGNAME
> SVR4_PKGNAME
> CATEGORIES
> MASTER_SITES
> MASTER_SITE_SUBDIR
> EXTRACT_SUFX DISTFILES
> 
> i.e. the categories for the package, where the distfiles are located,
> and what the distfiles are called.

On Mon, Jan 19, 2004 at 04:38:36PM +0000, Alistair Crooks wrote:
> On Mon, Jan 19, 2004 at 05:00:16PM +0100, Thomas Klausner wrote:
> > Ok, then please explain why exactly the CATEGORIES line should be up
> > there. It might as well be in the MAINTAINER section.
> > Or PKGNAME. What does it have to do with the distribution?
> > Nothing, it's our chosen name for registering the package,
> > which just happens to coincide with DISTNAME sometimes.
> 
> PKGNAME and CATEGORIES have to do with binary package creation, but
> I guess you knew that.

Yes, I did.
But see above, it doesn't fall in either of the arguments you proposed
earlier.

> However, the question still stands - why is "WRKSRC=${WRKDIR}" related
> to definitions governing distfiles and binary packages?

Because that's not the only way it is set.
It is also set to ${WRKDIR}/foo-1.0 if the DISTNAME is foo_10 or
something similar, but _the distfile contains a foo-1.0 dir_.
It is not something we _choose_ for pkgsrc and which is more or
less random. It is something that is chosen by the author for
the distribution, and we have to handle it. It is a property of
the distribution tarball. It could change in the next release of
the tarball. Some packages have a different versioning structure inside
the tarball vs. the tarball's name, and so it has to change for each
update. 

The case you pick (WRKSRC=WRKDIR) is only one of many.

> But somehow I sense I'm not getting through to you - are my points
> unclear?

Are mine?
I just don't think that your argument is stronger than mine.

> > I think you are applying too strict reasoning to something that
> > hasn't been defined strictly at all.
> 
> Perhaps I am. But if that's the case, mere laissez faire is not
> the way to proceed, and so I am trying to better the situation.
> I cannot see why this should generate such resistance.

Ok, but then let's please define the whole stuff, not only where
WRKSRC should go.
If you just say "it shouldn't go in the first paragraph", where
do we put it? In the undefined space after the DEPENDS section?

Do we make a new section for common build variables like
USE_BUILDLINK, the TOOLS, config.*, and libtool override?

Cheers,
 Thomas