[MacPorts] #15712: Add versions to platforms
MacPorts
noreply at macports.org
Wed Sep 21 13:45:17 UTC 2022
#15712: Add versions to platforms
--------------------------+-----------------------------
Reporter: raimue | Owner: larryv
Type: enhancement | Status: closed
Priority: Normal | Milestone: MacPorts Future
Component: base | Version:
Resolution: fixed | Keywords:
Port: |
--------------------------+-----------------------------
Changes (by jmroot):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"28666188b01ef181a93b36b7468807ae558c5d3b/macports-base"
28666188b01ef181a93b36b7468807ae558c5d3b/macports-base] (master):
{{{
#!ConfigurableCommitTicketReference repository="macports-base"
revision="28666188b01ef181a93b36b7468807ae558c5d3b"
Support version specifiers in platforms option
To use this functionality, add one or more elements to platforms of the
form: platform operator version [operator version] ...
Elements that do not have all three of these components are ignored, so
existing usage like 'platforms darwin' continues to be displayed but
doesn't do anything else.
Each element where the platform matches the current os.platform is
processed by applying each operator to compare os.version with the
corresponding version. Operators supported are ==, !=, >, <, >= and <=.
For == and !=, a string comparison that allows globs is used. For the
rest, vercmp is used.
If any of the comparisons evaluates to false, the default value of
known_fail is set to yes.
Usage example: A port that works on Darwin versions between 16 and 22
inclusive, except for 18.2.x, and doesn't work on Linux:
platforms {darwin >= 16 != 18.2.* < 23} {linux != *}
The special value 'any' can also be used to indicate broad
compatibility of binary archives (not of the port itself). This only
has an effect on the archive name, allowing the same archive to be used
on either all platforms or all versions of one or more platforms.
Example, the same archive will work anywhere:
platforms any
An archive built on darwin will work on any darwin version, but not
on other platforms:
platforms {darwin any}
This can be combined with version specifiers if needed:
platforms {freebsd any} {darwin > 15}
Fixes: https://trac.macports.org/ticket/15712
}}}
--
Ticket URL: <https://trac.macports.org/ticket/15712#comment:46>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list