Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Aug 2006 18:46:51 -0400
From:      Parv <parv@pair.com>
To:        f-ports <freebsd-ports@freebsd.org>
Subject:   A Perl program to make pretty-print-*-depends-list output readable
Message-ID:  <20060805224651.GA7486@holestein.holy.cow>

next in thread | raw e-mail | index | archive | help
Below is a short program to make the single line output of
pretty-print-*-depends-list actually readable.  This prints the case
insensitively sorted & merged output of both run & build dependencies.
Feel free to modify.  Each dependency is listed on its own line.

  #!perl
  use strict; use warnings;

  my @list =
    qx
    { make pretty-print-run-depends-list;
      make pretty-print-build-depends-list
    };

  my $parse =
    qr{\b This \s+ port \s+ requires \s+ package .+? "([^"]+)" }x;

  my %seen;
  print join "\n"
        , sort { lc $a cmp lc $b }
            grep !$seen{ $_ }++
              , map { m/$parse/ ? split ' ' , $1 : () } @list ;
  __END__


  - Parv

-- 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060805224651.GA7486>