mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-20 04:02:27 +00:00
23cad417ec
with 5.X or 4.X package sets (i.e., INDEX vs INDEX-5 and tgz vs tbz) OKed by: marcus
32 lines
494 B
Perl
Executable File
32 lines
494 B
Perl
Executable File
#!/usr/bin/perl
|
|
# $FreeBSD$
|
|
|
|
die "$0 <pkgdir> <indexfile>\n" if ($#ARGV != 1);
|
|
|
|
$xdep = 'XFree86-3\.3\.6_10';
|
|
$pkgdir = shift(@ARGV);
|
|
#$ext = 'tbz';
|
|
$ext = 'tgz';
|
|
|
|
print STDERR "scrubindex pkgdir: $pkgdir\n";
|
|
|
|
my $cnt = 0;
|
|
|
|
LOOP:
|
|
while (<>) {
|
|
s/$xdep//g;
|
|
s/ */ /g;
|
|
s/\| /\|/g;
|
|
|
|
@f = split('\|');
|
|
next if (! -f "$pkgdir/$f[0].$ext");
|
|
|
|
foreach $dep (split(' ', $f[8])) {
|
|
next LOOP if (! -f "$pkgdir/$dep.$ext");
|
|
}
|
|
|
|
$cnt++;
|
|
print;
|
|
}
|
|
print STDERR "$cnt lines copied from scrubindex.pl"
|