Opened 8 years ago

Last modified 7 years ago

#51706 new enhancement

platform statement: support an else clause — at Initial Version

Reported by: RJVB (René Bertin) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version:
Keywords: haspatch Cc:
Port:

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.

Change History (1)

Changed 8 years ago by RJVB (René Bertin)

Attachment: patch-platform-command.diff added
Note: See TracTickets for help on using tickets.