[MacPorts] #51706: platform statement: support an else clause
MacPorts
noreply at macports.org
Sat Jun 25 00:26:38 PDT 2016
#51706: platform statement: support an else clause
--------------------------+--------------------------------
Reporter: rjvbertin@… | Owner: macports-tickets@…
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: base | Version:
Resolution: | Keywords: haspatch
Port: |
--------------------------+--------------------------------
Changes (by ryandesign@…):
* keywords: => haspatch
Old description:
> As discussed on the ML a short while ago:
>
> This patch introduces support for an else clause in the `platform`
> statement. Typical use would a port that needs to distinguish between 2
> OS versions that require mutually exclusive treatment in multiple
> locations.
> With an else clause means that can be done without duplicating platform
> statements and without resorting to if/else constructs with their less
> elegant syntax in the test expression.
>
> I haven't tested this yet but it might actually be possible to chain the
> commands:
>
> ```
> platform darwin 10 {
> # older
> } [else] platform darwin 11 {
> # old
> } else {
> # younger
> }
> ```
>
> If this is considered acceptable for a future MacPorts base version I'd
> really like to request a temporary vector to provide the new syntax ASAP,
> for instance through a PortGroup file.
New description:
As discussed on the ML a short while ago:
This patch introduces support for an else clause in the `platform`
statement. Typical use would a port that needs to distinguish between 2 OS
versions that require mutually exclusive treatment in multiple locations.
With an else clause means that can be done without duplicating platform
statements and without resorting to if/else constructs with their less
elegant syntax in the test expression.
I haven't tested this yet but it might actually be possible to chain the
commands:
{{{
platform darwin 10 {
# older
} [else] platform darwin 11 {
# old
} else {
# younger
}
}}}
If this is considered acceptable for a future MacPorts base version I'd
really like to request a temporary vector to provide the new syntax ASAP,
for instance through a PortGroup file.
--
--
Ticket URL: <https://trac.macports.org/ticket/51706#comment:2>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list