HomeFreeBSD

Mk/bsd.port.mk: Allow category_port_VARS= in make.conf for arbitrary per-port…

Description

Mk/bsd.port.mk: Allow category_port_VARS= in make.conf for arbitrary per-port overrides.

Currently the only way to specify make.conf variables (other than port
options which have their own mechanism) in a per-port fashion is to use
conditionals on .CURDIR, which is fragile since it tends to involve
assumptions about where the ports tree is mounted.

Instead, allow category_portname_VARS= to be set in make.conf to provide
arbitrary assignments when building a specified port. For example one
might use

devel_llvm10_VARS= MAKE_JOBS_NUMBER=2

or

converters_lua-iconv_VARS= TRYBROKEN=yes

This is intended to be consistent with the existing
category_portname_SET= variables for port options, and uses the same
syntax for values as option_VARS= in port makefiles, but without the
case-folding behavior since that makes it impossible to handle
mixed-case or lowercase variable names.

Reviewed by: koobs, mat, adamw, mandree, 0mp
Approved by: portmgr (bapt)
Differential Revision: https://reviews.freebsd.org/D24324
VAR+=val can be used to append to a variable, and VAR@ to unset one entirely.

Details

Provenance
andrew_tao173.riddles.org.ukAuthored on Jul 11 2023, 7:44 AM
fuzCommitted on Jul 11 2023, 10:04 PM
Reviewer
koobs
Differential Revision
D24324: Allow category_port_VARS= in make.conf for arbitrary per-port overrides.
Parents
R11:0b0e05c19a9e: devel/goreleaser: update to 1.19.2
Branches
Unknown
Tags
Unknown