Cmake export tests: Select "-dALLOWPSTRANSPARENCY" flag for ps2pdf converter

Add parameter "-dALLOWPSTRANSPARENCY" for call to ps2pdf.
Used only in test environment.
The fix is proposed by Scott.

Here his comment:
        "Interestingly, the flag fixes the English Powerdot tests but not the
        French ones."
This commit is contained in:
Kornel Benko 2021-05-30 20:24:42 +02:00
parent c518c57a78
commit bc01f50955

View File

@ -87,17 +87,24 @@ sub getConverter($$)
chomp($l); chomp($l);
my ($from, $to, $cmd, $par); my ($from, $to, $cmd, $par);
($l, $from) = getNext($l); ($l, $from) = getNext($l);
return undef if ($from !~ /(tex|dvi)$/); return undef if ($from !~ /(ps|tex|dvi)$/);
($l, $to) = getNext($l); ($l, $to) = getNext($l);
return undef if ($to !~ /^((dvi3?|pdf[23456]?)(log)?)$/); return undef if ($to !~ /^((dvi3?|pdf[23456]?)(log)?)$/);
my ($checkfor, $substitute); my ($checkfor, $substitute, $extrapar);
if ($from =~ /tex/) { if ($from =~ /tex/) {
$checkfor = qr/\s+\-shell\-(escape|restricted)/; $checkfor = qr/\s+\-shell\-(escape|restricted)/;
$substitute = "-shell-escape"; $substitute = "-shell-escape";
$extrapar = qr/^latex/;
}
elsif ($from =~ /ps$/) {
$checkfor = qr/\s+\-dALLOWPSTRANSPARENCY/;
$substitute = "-dALLOWPSTRANSPARENCY";
$extrapar = qr/hyperref-driver=dvips/;
} }
else { else {
$checkfor = qr/\s+-i\s+dvipdfmx-unsafe.cfg/; $checkfor = qr/\s+-i\s+dvipdfmx-unsafe.cfg/;
$substitute = "-i dvipdfmx-unsafe.cfg"; $substitute = "-i dvipdfmx-unsafe.cfg";
$extrapar = qr/^hyperref-driver=dvipdfm/;
} }
($l, $cmd) = getNext($l); ($l, $cmd) = getNext($l);
if ($add) { if ($add) {
@ -112,7 +119,7 @@ sub getConverter($$)
$cmd =~ s/$checkfor//; $cmd =~ s/$checkfor//;
} }
($l, $par) = getNext($l); ($l, $par) = getNext($l);
return undef if ($par !~ /^(latex|hyperref-driver=dvipdfm)/); return undef if ($par !~ $extrapar);
my $key = "\"$from\" \"$to\""; my $key = "\"$from\" \"$to\"";
if ($add) { if ($add) {
return([$key, [$cmd, $par]]); return([$key, [$cmd, $par]]);