Subject: Re: Consistency in mk/defaults/mk.conf
To: Hubert Feyrer <feyrer@cs.stevens.edu>
From: Roland Illig <rillig@NetBSD.org>
List: tech-pkg
Date: 11/15/2005 10:49:40
Hubert Feyrer wrote:
> On Tue, 15 Nov 2005, Roland Illig wrote:
> 
>> 1. Provide only comments:
>> #ACROREAD_FONTPATH?=    ${PREFIX}/lib/X11/fonts/TTF
> 
> ...
> 
>> 2. Actually provide a default value:
>> PKGSRC_COMPILER?=       gcc
> 
> ...
> 
>> $ pkglint print/acroread7
>> ERROR: print/acroread7/Makefile:54: "ACROREAD_FONTPATH" may only
>>    be set by the user, not the package.
> 
> That sounds useful!

How ironically do you mean that? The exclamation mark confuses me. :)

>> Does anyone see any objections against changing type 1 definitions to 
>> type 2 definitions where that makes sense? Which ones need further 
>> discussion?
> 
> Yes: You're moving the default*value* from the pkg's Makefile to that 
> named file, basically spilling pkg data all over pkgsrc. I think that's 
> not a good idea.

There are three places where this default value is mentioned.

- The commented out assigment.
- The block comment below.
- The package Makefile.

Two of these are likely to be redundant, so why can't we remove them? 
Otherwise we need to check from time to time that they still mention the 
same value.

Therefore I suggest something like this in print/acroread7/Makefile:

# Additional directories to search for fonts
# (see mk/defaults/mk.conf for the default value of this variable)
BUILD_DEFS+=    ACROREAD_FONTPATH


> How about simply looking for some assignment to the variable?

I've done exactly this. Or did you mean to ignore assignments that are 
commented out? That wouldn't work, as for example #SMART_MESSAGES=yes is 
commented out, so packages redefining it could not be detected.

Roland