summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-08-11 17:37:45 +0000
committerKarl Berry <karl@freefriends.org>2011-08-11 17:37:45 +0000
commit76ef14b63cb828fe036a1a070fb7913567fa9fa8 (patch)
treebc2aeee5ee92e8a9f38fde060d821a42dac89055
parentdd4b21241ec85e0921346286fc24de51ec75a096 (diff)
pdfcrop 1.32 (10aug11)
git-svn-id: svn://tug.org/texlive/trunk@23499 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/pdfcrop/pdfcrop.pl32
-rw-r--r--Master/texmf-dist/doc/support/pdfcrop/README5
-rwxr-xr-xMaster/texmf-dist/scripts/pdfcrop/pdfcrop.pl32
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds4
4 files changed, 61 insertions, 12 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/pdfcrop/pdfcrop.pl b/Build/source/texk/texlive/linked_scripts/pdfcrop/pdfcrop.pl
index 5e43ec024fd..2be3fda5a0a 100755
--- a/Build/source/texk/texlive/linked_scripts/pdfcrop/pdfcrop.pl
+++ b/Build/source/texk/texlive/linked_scripts/pdfcrop/pdfcrop.pl
@@ -4,7 +4,7 @@ $^W=1; # turn warning on
#
# pdfcrop.pl
#
-# Copyright (C) 2002, 2004, 2005, 2008-2010 Heiko Oberdiek.
+# Copyright (C) 2002, 2004, 2005, 2008-2011 Heiko Oberdiek.
#
# This program may be distributed and/or modified under the
# conditions of the LaTeX Project Public License, either version 1.2
@@ -21,10 +21,10 @@ $^W=1; # turn warning on
#
my $file = "pdfcrop.pl";
my $program = uc($&) if $file =~ /^\w+/;
-my $version = "1.31";
-my $date = "2010/09/17";
+my $version = "1.32";
+my $date = "2011/08/10";
my $author = "Heiko Oberdiek";
-my $copyright = "Copyright (c) 2002-2010 by $author.";
+my $copyright = "Copyright (c) 2002-2011 by $author.";
#
# Reqirements: Perl5, Ghostscript
# History:
@@ -95,6 +95,7 @@ my $copyright = "Copyright (c) 2002-2010 by $author.";
# * Again input file names restricted for Ghostscript
# command line, switch then to symbol link/copy
# method.
+# 2011/08/10 v1.32: * Detection for gswin64c.exe added.
### program identification
my $title = "$program $version, $date - $copyright\n";
@@ -109,6 +110,9 @@ delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
my $Win = 0;
$Win = 1 if $^O =~ /mswin32/i;
$Win = 1 if $^O =~ /cygwin/i;
+use Config;
+my $archname = $Config{'archname'};
+$archname = 'unknown' unless defined $Config{'archname'};
### string constants for Ghostscript run
# get Ghostscript command name
@@ -122,6 +126,8 @@ sub find_ghostscript () {
$system = "cygwin" if $^O =~ /cygwin/i;
$system = "miktex" if defined($ENV{"TEXSYSTEM"}) and
$ENV{"TEXSYSTEM"} =~ /miktex/i;
+ print "* OS name: $^O\n" if $::opt_debug;
+ print "* Arch name: $archname\n" if $::opt_debug;
print "* System: $system\n" if $::opt_debug;
my %candidates = (
'unix' => [qw|gs gsc|],
@@ -131,6 +137,16 @@ sub find_ghostscript () {
'cygwin' => [qw|gs gswin32c|],
'miktex' => [qw|mgs gswin32c gs|]
);
+ if ($system eq 'win' or $system eq 'cygwin' or $system eq 'miktex') {
+ if ($archname =~ /mswin32-x64/i) {
+ my @a = ();
+ foreach my $name (@{$candidates{$system}}) {
+ push @a, 'gswin64c' if $name eq 'gswin32c';
+ push @a, $name;
+ }
+ $candidates{$system} = \@a;
+ }
+ }
my %ext = (
'unix' => '',
'dos' => '.exe',
@@ -140,7 +156,8 @@ sub find_ghostscript () {
'miktex' => '.exe'
);
my $candidates_ref = $candidates{$system};
- my $ext = $ext{$system};
+ my $ext = $Config{'_exe'};
+ $ext = $ext{$system} unless defined $ext;
use File::Spec;
my @path = File::Spec->path();
my $found = 0;
@@ -222,6 +239,11 @@ sub SearchRegistry () {
if ($value and $type == REG_SZ()) {
print " GS_DLL = $value\n" if $::opt_debug;
$value =~ s|([\\/])([^\\/]+\.dll)$|$1gswin32c.exe|i;
+ my $value64 = $value;
+ $value64 =~ s/gswin32c\.exe$/gswin64c.exe/;
+ if ($archname =~ /mswin32-x64/i and -f $value64) {
+ $value = $value64;
+ }
if (-f $value) {
print " EXE found: $value\n" if $::opt_debug;
}
diff --git a/Master/texmf-dist/doc/support/pdfcrop/README b/Master/texmf-dist/doc/support/pdfcrop/README
index 0ce9b3f6ccb..ee1f99c71a0 100644
--- a/Master/texmf-dist/doc/support/pdfcrop/README
+++ b/Master/texmf-dist/doc/support/pdfcrop/README
@@ -1,4 +1,4 @@
-README for pdfcrop 2010/09/17 v1.31
+README for pdfcrop 2011/08/10 v1.32
TABLE OF CONTENTS
=================
@@ -24,7 +24,7 @@ PDF file with removed margins.
B. COPYRIGHT, DISCLAIMER, LICENSE
=================================
-Copyright (C) 2002, 2004, 2005, 2008-2010 Heiko Oberdiek.
+Copyright (C) 2002, 2004, 2005, 2008-2011 Heiko Oberdiek.
This program may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.2
@@ -238,6 +238,7 @@ L. HISTORY
* Again input file names restricted for Ghostscript
command line, switch then to symbol link/copy
method.
+2011/08/10 v1.32: * Detection for gswin64c.exe added.
M. TODO
=======
diff --git a/Master/texmf-dist/scripts/pdfcrop/pdfcrop.pl b/Master/texmf-dist/scripts/pdfcrop/pdfcrop.pl
index 5e43ec024fd..2be3fda5a0a 100755
--- a/Master/texmf-dist/scripts/pdfcrop/pdfcrop.pl
+++ b/Master/texmf-dist/scripts/pdfcrop/pdfcrop.pl
@@ -4,7 +4,7 @@ $^W=1; # turn warning on
#
# pdfcrop.pl
#
-# Copyright (C) 2002, 2004, 2005, 2008-2010 Heiko Oberdiek.
+# Copyright (C) 2002, 2004, 2005, 2008-2011 Heiko Oberdiek.
#
# This program may be distributed and/or modified under the
# conditions of the LaTeX Project Public License, either version 1.2
@@ -21,10 +21,10 @@ $^W=1; # turn warning on
#
my $file = "pdfcrop.pl";
my $program = uc($&) if $file =~ /^\w+/;
-my $version = "1.31";
-my $date = "2010/09/17";
+my $version = "1.32";
+my $date = "2011/08/10";
my $author = "Heiko Oberdiek";
-my $copyright = "Copyright (c) 2002-2010 by $author.";
+my $copyright = "Copyright (c) 2002-2011 by $author.";
#
# Reqirements: Perl5, Ghostscript
# History:
@@ -95,6 +95,7 @@ my $copyright = "Copyright (c) 2002-2010 by $author.";
# * Again input file names restricted for Ghostscript
# command line, switch then to symbol link/copy
# method.
+# 2011/08/10 v1.32: * Detection for gswin64c.exe added.
### program identification
my $title = "$program $version, $date - $copyright\n";
@@ -109,6 +110,9 @@ delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
my $Win = 0;
$Win = 1 if $^O =~ /mswin32/i;
$Win = 1 if $^O =~ /cygwin/i;
+use Config;
+my $archname = $Config{'archname'};
+$archname = 'unknown' unless defined $Config{'archname'};
### string constants for Ghostscript run
# get Ghostscript command name
@@ -122,6 +126,8 @@ sub find_ghostscript () {
$system = "cygwin" if $^O =~ /cygwin/i;
$system = "miktex" if defined($ENV{"TEXSYSTEM"}) and
$ENV{"TEXSYSTEM"} =~ /miktex/i;
+ print "* OS name: $^O\n" if $::opt_debug;
+ print "* Arch name: $archname\n" if $::opt_debug;
print "* System: $system\n" if $::opt_debug;
my %candidates = (
'unix' => [qw|gs gsc|],
@@ -131,6 +137,16 @@ sub find_ghostscript () {
'cygwin' => [qw|gs gswin32c|],
'miktex' => [qw|mgs gswin32c gs|]
);
+ if ($system eq 'win' or $system eq 'cygwin' or $system eq 'miktex') {
+ if ($archname =~ /mswin32-x64/i) {
+ my @a = ();
+ foreach my $name (@{$candidates{$system}}) {
+ push @a, 'gswin64c' if $name eq 'gswin32c';
+ push @a, $name;
+ }
+ $candidates{$system} = \@a;
+ }
+ }
my %ext = (
'unix' => '',
'dos' => '.exe',
@@ -140,7 +156,8 @@ sub find_ghostscript () {
'miktex' => '.exe'
);
my $candidates_ref = $candidates{$system};
- my $ext = $ext{$system};
+ my $ext = $Config{'_exe'};
+ $ext = $ext{$system} unless defined $ext;
use File::Spec;
my @path = File::Spec->path();
my $found = 0;
@@ -222,6 +239,11 @@ sub SearchRegistry () {
if ($value and $type == REG_SZ()) {
print " GS_DLL = $value\n" if $::opt_debug;
$value =~ s|([\\/])([^\\/]+\.dll)$|$1gswin32c.exe|i;
+ my $value64 = $value;
+ $value64 =~ s/gswin32c\.exe$/gswin64c.exe/;
+ if ($archname =~ /mswin32-x64/i and -f $value64) {
+ $value = $value64;
+ }
if (-f $value) {
print " EXE found: $value\n" if $::opt_debug;
}
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 25518f5db05..2c823081c86 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -2631,11 +2631,15 @@ sub doscripts {
if ($p ne "win32") {
my $linktarget = "../../$DEST_TREE/scripts/$package/$s";
&SYSTEM ("ln -s $linktarget $platdir/$linkname");
+ &SYSTEM ("ln -s $linkname $platdir/r$linkname")
+ if $linkname eq "pdfcrop"; # rpdfcrop -> pdfcrop
} else {
# Windows. If a shell script, skip. Else copy the wrapper.
next if $s =~ /\.sh$/;
my $w32_wrapper = "$Build/$build_tldir/w32_wrapper/runscript.exe";
&SYSTEM ("$CP $w32_wrapper $platdir/$linkname.exe");
+ &SYSTEM ("$CP $w32_wrapper $platdir/r$linkname.exe")
+ if $linkname eq "pdfcrop"; # rpdfcrop.exe
}
}
}