#43208: PortIndex2MySQL.tcl: can't find package Tclx ---------------------------+-------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.2.99 Resolution: | Keywords: haspatch Port: | ---------------------------+-------------------------------- Changes (by ryandesign@…): * keywords: => haspatch Comment: Replying to [comment:4 jmr@…]:
Replying to [comment:2 ryandesign@…]:
Replying to [comment:1 jmr@…]:
It needs to use the same tclsh as port(1), which would now be ${prefix}/libexec/macports/bin/tclsh8.5.
Damn. Because the script I actually want to use requires Tcl 8.6.
You definitely can’t use 8.6 to run any script that uses the macports API because of the try incompatibility. But apart from that, probably any Tcl installation that has Tclx and tcllib would more or less work.
I already have been running my script under tcl 8.6 for over a year. But I accept that I'll need to change the script to use MacPorts tclsh. Replying to [comment:3 ryandesign@…]:
I would love if we could find a way to fix all the Tcl scripts so that they use MacPorts tclsh8.5, but that the MacPorts prefix does not need to be hardcoded into them. For example, we already know the technique of having the script use `#!/bin/sh` as the first line, then re-launching the script under tclsh. Perhaps this technique could be modified to determine the MacPorts prefix programmatically (using e.g. `dirname $(dirname $(which port))`).
I'm attaching a proposed patch to implement this, which works for me. The executable bit should also be set. If this seems acceptable, I would like similar changes to be made to all the Tcl scripts that need it (i.e. in contrib). I would also like to request that a tclsh symlink be created in ${prefix}/libexec/macports/bin so that later on, once we upgrade MacPorts to 8.6, we don't have to go modifying each script again to change tclsh8.5 to tclsh8.6. -- Ticket URL: <https://trac.macports.org/ticket/43208#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X