For the MacPorts portfiles I made for both Tcl::Tk and Tcl::pTk, I currently use a patch to remove the `$tclsh test-for-tk.tcl` usage from Makefile.PL, since it doesn't work from MacPorts (either there is no X server available to the user that MacPorts runs as, or perl somehow isn’t getting any output from tclsh): cf. https://github.com/macports/macports-ports/pull/2036/files#diff-e284154b6d6ebcccb1e2d72b7d3d318f <https://github.com/macports/macports-ports/pull/2036/files#diff-e284154b6d6ebcccb1e2d72b7d3d318f> https://github.com/macports/macports-ports/pull/2231/files#diff-95d5f695478328ce2638066699edf49b <https://github.com/macports/macports-ports/pull/2231/files#diff-95d5f695478328ce2638066699edf49b> https://trac.macports.org/ticket/56825 <https://trac.macports.org/ticket/56825>
Would it be appropriate to add a flag for Makefile.PL to skip running test-for-tk, for uses such as MacPorts where (hopefully) any dependencies are already installed correctly. Then, all that’s needed by the portfiles are the flag, rather than a patch (which has to stay current with test-for-tk is being run). Or, some better alternative I haven’t thought of?