texlive[45306] Build/source/extra/epstopdf: --gsopt value extraction
commits+karl at tug.org
commits+karl at tug.org
Thu Sep 14 23:41:37 CEST 2017
Revision: 45306
http://tug.org/svn/texlive?view=revision&revision=45306
Author: karl
Date: 2017-09-14 23:41:37 +0200 (Thu, 14 Sep 2017)
Log Message:
-----------
--gsopt value extraction and checking
Modified Paths:
--------------
trunk/Build/source/extra/epstopdf/Makefile
trunk/Build/source/extra/epstopdf/epstopdf.pl
Modified: trunk/Build/source/extra/epstopdf/Makefile
===================================================================
--- trunk/Build/source/extra/epstopdf/Makefile 2017-09-14 21:17:16 UTC (rev 45305)
+++ trunk/Build/source/extra/epstopdf/Makefile 2017-09-14 21:41:37 UTC (rev 45306)
@@ -51,6 +51,10 @@
! $(re2p) --gscmd=/bin/unsafe test-simple.eps
! $(re2p) --gscmd=unsafe test-simple.eps
+check-restricted-gsopt: $(re2p_script)
+ $(re2p) --gsopt=-dAutoFilterColorImages=true test-simple.eps
+ ! $(re2p) --gsopt=-dNOSAFER=false test-simple.eps
+
check-restricted-safe-in: $(re2p_script)
! $(re2p) /unsafe/in.eps
@@ -79,15 +83,15 @@
check-gscmd:
! $(e2p) --gscmd=false test-simple.eps
- ! $(e2p) --gscmd='foo bar' test-simple.eps # fails
+ ! $(e2p) --gscmd='foo bar' test-simple.eps
check-gsopt:
! $(e2p) --gscmd=false --gsopt=foo --gsopt=bar test-simple.eps
- ! $(e2p) --restricted --gsopt=bar test-simple.eps # fails
+ ! $(e2p) --restricted --gsopt=bar test-simple.eps
check-gsopts:
$(e2p) --gscmd=echo --gsopts='foo bar' test-simple.eps
- ! $(e2p) --restricted --gsopts=bar test-simple.eps # fails
+ ! $(e2p) --restricted --gsopts=bar test-simple.eps
check-nogs:
$(e2p) --no-gs test-simple.eps >test-simple.out
Modified: trunk/Build/source/extra/epstopdf/epstopdf.pl
===================================================================
--- trunk/Build/source/extra/epstopdf/epstopdf.pl 2017-09-14 21:17:16 UTC (rev 45305)
+++ trunk/Build/source/extra/epstopdf/epstopdf.pl 2017-09-14 21:41:37 UTC (rev 45306)
@@ -35,7 +35,11 @@
#
# emacs-page
#
-my $ver = "2.26";
+my $ver = "2.27";
+# 2017/09/14 v2.27 (Karl Berry)
+# * extract value from --gsopt with $3 not $2 (extra regexp group
+# added previously), and check it with ^(...)$ so anchors apply to all.
+# (report to Karl from Yannick Berker, 7 Sep 2017 14:07:09.)
# 2017/01/07 v2.26 (Norbert Preining, Karl Berry)
# * allow cmdline of infile outfile.pdf.
# * explicitly allow -o as abbreviation for --outfile,
@@ -295,6 +299,7 @@
MonoImageFilter /(CCITTFaxEncode|FlateEncode|RunLengthEncode)
MonoImageResolution \d+
NOCIE true
+ NODISPLAY true
NOEPS true
NOINTERPOLATE true
NOPSICC true
@@ -628,9 +633,9 @@
my $ok = 0;
if ($gsopt =~ /^-[dD]([A-Za-z0-9]+)(=(.*))?$/) {
my $name = $1;
- my $value = $2;
+ my $value = $3;
$value = 'true' if not defined $value;
- if ($optcheck{$name} and $value =~ /^$optcheck{$name}$/) {
+ if ($optcheck{$name} and $value =~ /^($optcheck{$name})$/) {
$ok = 1;
}
else {
More information about the tex-live-commits
mailing list