"publishing" Tcl support functions used in Portfiles?
René J.V. Bertin
rjvbertin at gmail.com
Wed Sep 9 08:37:56 UTC 2020
On Monday September 07 2020 22:39:50 Joshua Root wrote:
>You do it like this:
>In that proc, $mport is an identifier that was returned from mportopen,
>and the code being executed in the port's interpreter is 'set $key',
>which could of course be replaced with any other code you want.
I think that function is actually designed to return the value of `key`. It took me a while to figure that out, and thus why I couldn't replace `key` with arbitrary code.
The resulting script I came up with: https://github.com/RJVB/macstrop/blob/master/aqua/qt5-kde/files/update-qthelp-collection-mp.tcl
It calls a function from one of my PortGroup files that dependent ports would normally (and still do) evoke in the post-activate. At first I thought that having to specify a port to obtain a port-specific interpreter was going to be a stumbling block but I think that in the end it made things easier for this particular application. I don't have anything to set up beyond getting that interpreter.
More information about the macports-dev