a portlint dilemma

Mark Linimon linimon at lonesome.com
Wed Jul 27 02:42:32 GMT 2005

On Tue, Jul 26, 2005 at 09:56:43PM -0400, Mikhail Teterin wrote:
> I'd like to set the default value for a new port's OPTION depending on the 
> ARCH ("on" for i386, "off" for others).
> However, portlint would not let me. ARCH can only be used _after_ 
> including bsd.port.pre.mk, and OPTIONS can only be modified _before_ it.

If I understand things correctly, this is a design limitation of bsd.port.mk,
not a bug in portlint.  The definition of ARCH is not picked up until you
include bsd.port.pre.mk, so it is meaningless before then: portlint is
telling you the truth here.

I think what you will need to do in this case is define your own local
copy of the variable (e.g. LOCAL_ARCH!=${UNAME} -p) and then define your
OPTIONS from there.

There are some chicken-and-egg problems like this in bsd.port.mk (well,
the part that is invoked by bsd.port.pre.mk).  At one time I understood
which each of them was but I haven't looked at them in a long time.


More information about the freebsd-ports mailing list