summaryrefslogtreecommitdiff
path: root/Build/source/extra
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-09-20 18:32:59 +0000
committerKarl Berry <karl@freefriends.org>2013-09-20 18:32:59 +0000
commit456523753386ac4bb3fa1b32078d6c8949f3fd9d (patch)
tree04c69f5a656a4bf2807198b153178cd980367ad8 /Build/source/extra
parenta98bcb6ee9be04a4c22facf3aef31f7f14f1847c (diff)
add --gsopt, tex-live mail from Markus Kuhn, 8 Mar 2013 15:51:17
git-svn-id: svn://tug.org/texlive/trunk@31707 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/extra')
-rw-r--r--Build/source/extra/epstopdf/Makefile5
-rw-r--r--Build/source/extra/epstopdf/epstopdf.111
-rwxr-xr-xBuild/source/extra/epstopdf/epstopdf.pl13
3 files changed, 25 insertions, 4 deletions
diff --git a/Build/source/extra/epstopdf/Makefile b/Build/source/extra/epstopdf/Makefile
index a8f00f62dd7..48630a6e575 100644
--- a/Build/source/extra/epstopdf/Makefile
+++ b/Build/source/extra/epstopdf/Makefile
@@ -13,6 +13,7 @@ check: check-help check-version \
check-help-r \
check-nogs \
check-restricted-gscmd \
+ check-gsopt \
check-filter check-filter-outfile check-write-error check-gscmd \
check-simple check-atend check-binary check-bin2 \
check-binhdr-lf check-binhdr-cr check-binhdr-crlf \
@@ -64,6 +65,10 @@ check-write-error:
check-gscmd:
-$(e2p) --gscmd=true test-simple.eps
+check-gsopt:
+ -$(e2p) --gscmd=echo --gsopt=foo --gsopt=bar test-simple.eps
+ -$(e2p) --restricted --gsopt=bar test-simple.eps
+
check-simple:
$(MAKE) file=test-simple check1
diff --git a/Build/source/extra/epstopdf/epstopdf.1 b/Build/source/extra/epstopdf/epstopdf.1
index fd0f9e0eb40..5fff438f829 100644
--- a/Build/source/extra/epstopdf/epstopdf.1
+++ b/Build/source/extra/epstopdf/epstopdf.1
@@ -1,4 +1,4 @@
-.TH EPSTOPDF 1 "12 May 2013"
+.TH EPSTOPDF 1 "20 September 2013"
.\" $Id$
.SH NAME
epstopdf, repstopdf \- convert an EPS file to PDF
@@ -43,6 +43,9 @@ is, the input PostScript as modified by \fBepstopdf\fP.
scan HiresBoundingBox (default: off).
.IP "\fB--gscmd\fP=\fIval\fP"
pipe output to \fIval\fP (default: [\fBgswin32c\fP on Windows, else \fBgs\fP])
+.IP "\fB--gsopt\fP=\fIval\fP"
+include \fIval\fP on ghostscript command line (can be repeated, not
+allowed in restricted mode).
.IP "\fB--res\fP=\fIdpi\fP"
set image resolution (default: [use gs default])
.IP "\fB--autorotate\fP=\fIval\fP"
@@ -50,9 +53,9 @@ set AutoRotatePages (default: None); recognized \fIval\fP choices:
None, All, PageByPage. For EPS files, PageByPage is equivalent to All.
.IP "\fB--restricted\fP=\fIval\fP"
turn on restricted mode (default: [on for repstopdf, else off]);
-this forbids the use of \fB--gscmd\fP and imposes restrictions on the input and
-output file names according to the values of openin_any and openout_any (see
-the Web2c manual, http://tug.org/web2c).
+this forbids the use of \fB--gscmd\fP and \fB--gsopt\fP and imposes
+restrictions on the input and output file names according to the values
+of openin_any and openout_any (see the Web2c manual, http://tug.org/web2c).
.IP "\fB--help\fP
display help message and exit
.IP "\fB--version\fP
diff --git a/Build/source/extra/epstopdf/epstopdf.pl b/Build/source/extra/epstopdf/epstopdf.pl
index 983e08f399e..2af1ceb1630 100755
--- a/Build/source/extra/epstopdf/epstopdf.pl
+++ b/Build/source/extra/epstopdf/epstopdf.pl
@@ -43,6 +43,7 @@
#
# emacs-page
# History
+# * add --gsopt to pass arbitrary options to Ghostscript.
# 2013/05/12 v2.19 (Karl Berry)
# * explain option naming conventions (= defaults for Getopt::Long).
# 2012/05/22 v2.18 (Karl Berry)
@@ -186,6 +187,7 @@ $::opt_exact = 0;
$::opt_filter = 0;
$::opt_gs = 1;
$::opt_gscmd = "";
+@::opt_gsopt = ();
$::opt_help = 0;
$::opt_hires = 0;
$::opt_outfile = "";
@@ -215,6 +217,7 @@ Options:
--(no)gs run ghostscript (default: $bool[$::opt_gs])
--(no)hires scan HiResBoundingBox (default: $bool[$::opt_hires])
--gscmd=VAL pipe output to VAL (default: $GS)
+ --gsopt=VAL pass command-line option VAL to ghostscript (repeatable)
--res=DPI set image resolution (default: $resmsg)
--autorotate=VAL set AutoRotatePages (default: $rotmsg)
Recognized VAL choices: None, All, PageByPage;
@@ -251,6 +254,7 @@ GetOptions (
"filter!",
"gs!",
"gscmd=s", # \ref{val_gscmd}
+ "gsopt=s@",
"help",
"hires!",
"outfile=s", # \ref{openout_any}
@@ -371,6 +375,15 @@ error "Invalid value for autorotate: '$::opt_autorotate' "
if ($::opt_autorotate and
not $::opt_autorotate =~ /^(None|All|PageByPage)$/);
+### options passed through
+if (@::opt_gsopt) {
+ if ($restricted) {
+ error "--gsopt not allowed in restricted mode: @::opt_gsopt.";
+ } else {
+ push @GS, @::opt_gsopt;
+ }
+}
+
### option BoundingBox types
my $BBName = "%%BoundingBox:";
!($::opt_hires and $::opt_exact) or