Bundling Tcl 8.5

Clemens Lang cal at macports.org
Tue Mar 4 15:23:26 PST 2014


Hi,

> That does bring up one downside of the change: you can no longer just
> open the system tclsh and run 'package require macports'. Can be worked
> around with scripts or aliases or whatever of course.

I don't really see that as a downside, though – you could just use $prefix/libexec/macports/bin/tclsh8.5 instead of your usual tclsh and you'd have solved the problem of finding the "correct" macports package. Importing macports from the system tclsh wouldn't work out of the box, but I'm not sure that really *is* a loss.


> I would say keep it all in the repo, don't download it. Tarballs
> optional. They could be annoying if you want to look at or edit the
> source before configuring.

My current autoconf magic extracts the tarballs if the sources are missing – so you could still look at the source and edit it and your changes wouldn't be overwritten, unless you ran make distclean. make clean would of course descend into the vendor packages properly.

> > The recent changes moving the Portfiles from the registry to the file
> > system changed the install target in base/Makefile.in [4]. Shouldn't this
> > change be reproduced in base/portmgr/dmg/postflight [5] (with appropriate
> > changes to the MacPorts port)? When bundling Tcl with MacPorts I assume
> > TCLSH and TCL_PACKAGE_DIR in this very postflight script should be
> > changed. Should I hardcode the correct paths for prefix=/opt/local or
> > re-inplace them?
> 
> (a) Yes, I made a note to update postflight at the same time as the
> Portfile.

Oh, OK – I thought you forgot. Good to know you haven't.

> (b) postflight has a PREFIX variable you can use.

Not necessarily. The path of the private Tcl currently depends on $libexecdir, and you could certainly set that from ./configure. I'd rather just reinplace the correct value for TCLSH.


> Yeah. It does seem like working with the registry would be easier using
> sqlite from Tcl sometimes... but that's another story.

We can still add the Tcl sqlite package later, if we need to.


-- 
Clemens Lang


More information about the macports-dev mailing list