[Bug 262162] ports infrastructure: provide USES_${ARCH}
Date: Thu, 24 Feb 2022 00:43:22 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262162
Bug ID: 262162
Summary: ports infrastructure: provide USES_${ARCH}
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Keywords: feature
Severity: Affects Some People
Priority: ---
Component: Individual Port(s)
Assignee: ports-bugs@FreeBSD.org
Reporter: fuz@fuz.su
CC: koobs@FreeBSD.org
It is currently very awkward to register USES that depend on architecture.
This is a use case that pops up every once in a while (e.g. when a port
requires a certain build tools only on some architectures). See e.g. bug
#261247.
This is because USES cannot be set after <bsd.port.pre.mk> is included, but
including that is required to access the ARCH macro. A possible workaround
is using a construct like
USES+=${ARCH:Mamd64:S/amd64/something}
but that's hard to read and quite ugly. As a solution, the ports
infrastructure
should provide a macro USES_${ARCH} that if set is added to USES, permitting
the definition of architecture specific USES. For example, this could be
achieved by placing
USES+=${USES_${ARCH}}
after the definition of ARCH and before evaluation of USES in bsd.port.mk.
--
You are receiving this mail because:
You are the assignee for the bug.