This Portfile hack fixed the issue for me:
{{{
package require md5
set portbuildpath.old ${portbuildpath}
set workdir [md5::md5 -hex ${portpath}]
set portbuildpath [file join ${portdbpath} build ${workdir}]
ui_debug "${portpath}->${workdir} portbuildpath=${portbuildpath}"
pre-fetch {
system "mkdir -p ${portbuildpath}"
}
if {[file exists ${portbuildpath}] && ![file exists ${portbuildpath.old}]} {
ln -s ${portbuildpath} ${portbuildpath.old}
}
}}}
Surprisingly even `port work` returns the actual work dir (i.e. not
`${portbuildpath.old}`) ... but maybe that's I already normalise the return
string in a local hack.
Had it not been enough I would have run crc::cksum from the crc32 package on
the
2 relevant components of `portpath` (the tree root dir and the category/portdir
path), to get a shorter XXXX/YYYY instead of the single
_path_to_portree_category_portdir contraption.
FWIW, I'd love to see the better organisation of the builddir this would give,
instead of the single flat directory it is now.
R.