writing Tcl port utilities

Clemens Lang cal at macports.org
Wed Dec 16 11:31:28 PST 2015


(re-sent from correct sender address for the list)

Hi René,

On Tue, Dec 15, 2015 at 05:40:30PM +0100, René J.V. Bertin wrote:
> On Tuesday December 15 2015 10:17:58 Daniel J. Luke wrote:
> 
> > Anything is possible, although this seems like a bad idea to me.
> 
> I agree it could lead to lots of problems when wielded in the wrong
> hands (so it might be better to use a dedicated utility rather than
> the port command itself).

It is actually not very hard to write your own client to MacPorts, do
mportopen to get a handle to a Portfile and then run arbitrary code in
a Portfile context. Read through the source code of port, portindex,
port_cutleaves and other similar utilities to see how it's done.

> > Maybe if you included a concise description of exactly what you're
> > trying to do, someone would have an alternate idea that would work?
> 
> From my KF5 PortGroup:

[...]

I would review that, but it's waaaay to complicated to understand what
you're trying to do and what your problem is. Please come up with a
minimal example with all the KDE-specific stuff removed if you want
feedback.

-- 
Clemens


More information about the macports-dev mailing list