Opened 8 years ago
Last modified 8 years ago
#51706 new enhancement
platform statement: support an else clause — at Version 2
Reported by: | RJVB (René Bertin) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | |
Keywords: | haspatch | Cc: | ciserlohn@… |
Port: |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
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.
Change History (3)
Changed 8 years ago by RJVB (René Bertin)
Attachment: | patch-platform-command.diff added |
---|
comment:1 Changed 8 years ago by ci42
Cc: | ciserlohn@… added |
---|
comment:2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Keywords: | haspatch added |
Cc Me!