our %foundrymap;
our $verbose=0;
our $reportfh;
+our $foundryinfo;
sub reportloaded {
return unless $verbose;
print $reportfh @_,"\n" or die $!;
}
+sub statsummary () {
+ return join ' ', ((stat _)[1,7,9,10]);
+}
+
sub loadrules ($) {
my ($key) = @_;
our %cache;
}
sub loadfoundries () {
+ $foundryinfo = '';
foreach my $path (@rulespath) {
+ if (!stat $path) {
+ die "$path $!" unless $!==&ENOENT;
+ next;
+ }
+ $foundryinfo .= statsummary().' '.$path."\0\n";
+
my $p = "$path/foundries";
my $f = new IO::File $p;
if (!$f) {
print $reportfh "foundries: none in $p\n" or die $! if $verbose;
next;
}
+ stat $f or die $!;
while (<$f>) {
s/^\s*//; s/\s+$//;
next if m/^\#/;
my ($usread,$uswrite);
my ($reader,$writer);
my @children;
- foreach my $proc (['zcat'], ['pcf2bdf'], [],
+ foreach my $proc (['gunzip'], ['pcf2bdf'], [],
['bdftopcf'],['',qw(gzip -1)]) {
my $isfinal = (@$proc && $proc->[0] eq '');
if (!$isfinal) {
my $olddone = do "$fontdir/$donefile";
if (!$olddone) {
die "$fontdir $! $@ " unless $!==&ENOENT;
+ }
+ if ($olddone && $olddone->{''} ne $foundryinfo) {
+ our $repro_reported;
+ print $reportfh "reprocessing fonts (rules updated)\n" or die $!
+ unless $repro_reported++;
+ $olddone = undef;
+ }
+ if (!$olddone) {
$olddone = { };
$changed = 1;
}
- my $newdone = { };
+ my $newdone = { '' => $foundryinfo };
my $log = new IO::File "$fontdir/$logfile", "w"
or die "$fontdir/$logfile $!";
my %outfiles; # bitmask: 1 /*exists*/ | 2 /*wanted*/
die "$fontdir $dent" unless -f _;
$anypcfs++;
- my $stats = join ' ', ((stat _)[1,7,9,10]);
+ my $stats = statsummary();
my $tdone = $olddone->{$dent};
my $outdent = $fontprefix.$dent;
if (defined $tdone && $tdone eq $stats) {