Portfile/Tcl: stripping `${prefix}/` from a variable

Ryan Schmidt ryandesign at macports.org
Thu Jul 16 15:14:58 PDT 2015


On Jul 16, 2015, at 4:58 PM, René J.V. Bertin wrote:

> path: style dependencies require relative paths, so the problem how to remove the leading `${prefix}/` from path variables must have been solved numerous times already. Is there a function in base that does this?
> Alternatively, is there a variant path: style dependency that takes absolute paths?

path:-style can accept absolute paths already. If the path you give does not begin with a slash, then "${prefix}/" is prepended.



More information about the macports-dev mailing list