diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-12-23 11:09:58 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-12-23 11:09:58 +0000 |
commit | dc9c9350a084881d60de766bab290b9de9883fa5 (patch) | |
tree | 66bc67c95f51391d544d75937e3cd409b7a35545 /Build/source/utils/psutils | |
parent | 47abbac2179669150e15048e32cfda0497d566c6 (diff) |
psutils: extractres: use TEMPDIR or TMP or TEMP
git-svn-id: svn://tug.org/texlive/trunk@20836 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/psutils')
6 files changed, 62 insertions, 5 deletions
diff --git a/Build/source/utils/psutils/psutils-1.17-PATCHES/ChangeLog b/Build/source/utils/psutils/psutils-1.17-PATCHES/ChangeLog index e901e5c181a..4161bef5a23 100644 --- a/Build/source/utils/psutils/psutils-1.17-PATCHES/ChangeLog +++ b/Build/source/utils/psutils/psutils-1.17-PATCHES/ChangeLog @@ -1,3 +1,8 @@ +2010-12-20 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-07-TEMPDIR (new): Honor $TMPDIR, $TEMP, and $TMP. + * patch-08-non-free (new): Adapt to removal of non-free files. + 2010-12-16 Peter Breitenlohner <peb@mppmu.mpg.de> * patch-02-PERL: Adapt to new kpsewhich semantics and diff --git a/Build/source/utils/psutils/psutils-1.17-PATCHES/patch-02-PERL b/Build/source/utils/psutils/psutils-1.17-PATCHES/patch-02-PERL index 241b9602465..2887e44e7eb 100644 --- a/Build/source/utils/psutils/psutils-1.17-PATCHES/patch-02-PERL +++ b/Build/source/utils/psutils/psutils-1.17-PATCHES/patch-02-PERL @@ -41,12 +41,23 @@ diff -ur psutils-1.17.orig/includeres.man psutils-1.17/includeres.man diff -ur psutils-1.17.orig/includeres.pl psutils-1.17/includeres.pl --- psutils-1.17.orig/includeres.pl 1997-03-11 23:52:58.000000000 +0100 +++ psutils-1.17/includeres.pl 2006-01-17 22:16:42.000000000 +0100 -@@ -28,7 +28,7 @@ +@@ -4,6 +4,11 @@ + # Copyright (C) Angus J. C. Duggan 1991-1995 + # See file LICENSE for details. + ++use File::Basename; ++ ++$predir = `kpsewhich -progname=dvips -format="other text files" md71_0.ps`; ++$inc=`dirname $predir`; ++ + $prog = ($0 =~ s=.*/==); + + %extn = ("font", ".pfa", "file", ".ps", "procset", ".ps", # resource extns +@@ -28,7 +33,6 @@ local($comment, @res) = split(/\s+/); local($type) = defined($type{$comment}) ? $type{$comment} : shift(@res); local($name) = &filename(@res); - local($inc) = "@INCLUDE@"; # system include directory -+ local($inc) = ""; # system include directory if (open(RES, $name) || open(RES, "$name$extn{$type}") || open(RES, "$inc/$name") || open(RES, "$inc/$name$extn{$type}")) { while (<RES>) { diff --git a/Build/source/utils/psutils/psutils-1.17-PATCHES/patch-07-TEMPDIR b/Build/source/utils/psutils/psutils-1.17-PATCHES/patch-07-TEMPDIR new file mode 100644 index 00000000000..5ce0d3177fe --- /dev/null +++ b/Build/source/utils/psutils/psutils-1.17-PATCHES/patch-07-TEMPDIR @@ -0,0 +1,14 @@ +diff -ur psutils-1.17.orig/extractres.pl psutils-1.17/extractres.pl +--- psutils-1.17.orig/extractres.pl 1997-03-11 23:52:53.000000000 +0100 ++++ psutils-1.17/extractres.pl 2010-12-20 20:15:37.000000000 +0100 +@@ -27,6 +27,10 @@ + + if (defined($ENV{TMPDIR})) { # set body file name + $body = "$ENV{TMPDIR}/body$$.ps"; ++elsif (defined($ENV{TEMP})) { ++ $body = "$ENV{TEMP}/body$$.ps"; ++elsif (defined($ENV{TMP})) { ++ $body = "$ENV{TMP}/body$$.ps"; + } else { + $body = "body$$.ps"; + } diff --git a/Build/source/utils/psutils/psutils-1.17-PATCHES/patch-08-non-free b/Build/source/utils/psutils/psutils-1.17-PATCHES/patch-08-non-free new file mode 100644 index 00000000000..1ca6840037a --- /dev/null +++ b/Build/source/utils/psutils/psutils-1.17-PATCHES/patch-08-non-free @@ -0,0 +1,25 @@ +diff -ur psutils-1.17.orig/includeres.pl psutils-1.17/includeres.pl +--- psutils-1.17.orig/includeres.pl 2006-01-17 22:16:42.000000000 +0100 ++++ psutils-1.17/includeres.pl 2010-12-20 20:15:37.000000000 +0100 +@@ -4,11 +4,6 @@ + # Copyright (C) Angus J. C. Duggan 1991-1995 + # See file LICENSE for details. + +-use File::Basename; +- +-$predir = `kpsewhich -progname=dvips -format="other text files" md71_0.ps`; +-$inc=`dirname $predir`; +- + $prog = ($0 =~ s=.*/==); + + %extn = ("font", ".pfa", "file", ".ps", "procset", ".ps", # resource extns +@@ -33,8 +28,7 @@ + local($comment, @res) = split(/\s+/); + local($type) = defined($type{$comment}) ? $type{$comment} : shift(@res); + local($name) = &filename(@res); +- if (open(RES, $name) || open(RES, "$name$extn{$type}") || +- open(RES, "$inc/$name") || open(RES, "$inc/$name$extn{$type}")) { ++ if (open(RES, $name) || open(RES, "$name$extn{$type}")) { + while (<RES>) { + print $_; + } diff --git a/Build/source/utils/psutils/psutils-1.17/extractres.pl b/Build/source/utils/psutils/psutils-1.17/extractres.pl index d7520c47d33..b18db0a9c24 100644 --- a/Build/source/utils/psutils/psutils-1.17/extractres.pl +++ b/Build/source/utils/psutils/psutils-1.17/extractres.pl @@ -27,6 +27,10 @@ while (@ARGV) { if (defined($ENV{TMPDIR})) { # set body file name $body = "$ENV{TMPDIR}/body$$.ps"; +elsif (defined($ENV{TEMP})) { + $body = "$ENV{TEMP}/body$$.ps"; +elsif (defined($ENV{TMP})) { + $body = "$ENV{TMP}/body$$.ps"; } else { $body = "body$$.ps"; } diff --git a/Build/source/utils/psutils/psutils-1.17/includeres.pl b/Build/source/utils/psutils/psutils-1.17/includeres.pl index 083e0bfa52e..48fa24f10d0 100644 --- a/Build/source/utils/psutils/psutils-1.17/includeres.pl +++ b/Build/source/utils/psutils/psutils-1.17/includeres.pl @@ -28,9 +28,7 @@ while (<>) { local($comment, @res) = split(/\s+/); local($type) = defined($type{$comment}) ? $type{$comment} : shift(@res); local($name) = &filename(@res); - local($inc) = ""; # system include directory - if (open(RES, $name) || open(RES, "$name$extn{$type}") || - open(RES, "$inc/$name") || open(RES, "$inc/$name$extn{$type}")) { + if (open(RES, $name) || open(RES, "$name$extn{$type}")) { while (<RES>) { print $_; } |