Topological sorting of perl modules

Joshua Root jmr at macports.org
Wed Aug 13 04:15:30 PDT 2014


On 2014-8-13 19:54 , Joshua Root wrote:
> On 2014-8-13 18:38 , Mojca Miklavec wrote:
>> Hi,
>>
>> I would like to get a topologically sorted list of perl modules.
>>
>> (Ideally sorted by the number of dependencies first, then
>> alphabetically, but always making sure that all dependencies are
>> listed before any other module depending on them. Alternatively sort
>> by the number of ports depending on a particular module.)
> 
> This does a lot of what you want:
> 
> <https://trac.macports.org/browser/contrib/mpab/chroot-scripts/genportlist.tcl>

In fact, here, have a version modified to take a list of ports as input
and sort just them.

% ./depsort.tcl "ffmpeg zlib poppler libpng freetype bzip2"
bzip2
zlib
libpng
freetype
ffmpeg
poppler

- Josh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: depsort.tcl
Type: application/x-tcl
Size: 3674 bytes
Desc: not available
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20140813/10ef321a/attachment-0001.tcl>


More information about the macports-dev mailing list