summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf')
-rw-r--r--Master/texmf/doc/man/man1/getnonfreefonts.126
-rwxr-xr-xMaster/texmf/scripts/texlive/getnonfreefonts.pl103
2 files changed, 80 insertions, 49 deletions
diff --git a/Master/texmf/doc/man/man1/getnonfreefonts.1 b/Master/texmf/doc/man/man1/getnonfreefonts.1
index 655d9a71584..12c1046e905 100644
--- a/Master/texmf/doc/man/man1/getnonfreefonts.1
+++ b/Master/texmf/doc/man/man1/getnonfreefonts.1
@@ -1,10 +1,10 @@
-.TH getnonfreefonts 1 "January 2007" "TeXLive" "TeXLive"
+.TH getnonfreefonts 1 "February 2009" "TeXLive" "TeXLive"
.SH NAME
getnonfreefonts \- download and install fonts which cannot be
-distributed on a CD
+distributed on a CD/DVD for the current user
.LP
-getnonfreefonts-sys \- download and install fonts system\-wide which
-cannot be distributed on a CD
+getnonfreefonts-sys \- download and install fonts which
+cannot be distributed on a CD/DVD system\-wide
.SH SYNOPSIS
@@ -34,8 +34,7 @@ and
.B getnonfreefonts-sys
are identical except that
.B getnonfreefonts
-installs files to $TEXMFHOME
-while
+installs files to $TEXMFHOME while
.B getnonfreefonts-sys
installs files to $TEXMFLOCAL.
@@ -77,6 +76,12 @@ will be replaced by the process ID of the current
process.
.TP
+.BR "-H" , " --http"
+.rg
+Use HTTP instead of FTP. This option is only useful if you are hehind
+a firewall which blocks FTP. Not all fonts are available via HTTP.
+
+.TP
.BR "-l" , " --lsfonts"
.rg
List all available fonts and tell whether they are installed already.
@@ -127,5 +132,12 @@ is required which supports the
.B --enable
option.
+.SH FONT LICENSES
+If you intend to modify these fonts, please check the licenses
+first.
+
+.SH SEE ALSO
+texmf-doc/doc/english/texlive-en/texlive-en.pdf .
+
.SH BUGS
-Please send bug reports to Reinhard Kotucha <reinhard.kotucha@web.de>.
+Please report bugs to Reinhard Kotucha <reinhard.kotucha@web.de>.
diff --git a/Master/texmf/scripts/texlive/getnonfreefonts.pl b/Master/texmf/scripts/texlive/getnonfreefonts.pl
index f5b83ec0cde..9132b1779ee 100755
--- a/Master/texmf/scripts/texlive/getnonfreefonts.pl
+++ b/Master/texmf/scripts/texlive/getnonfreefonts.pl
@@ -11,9 +11,9 @@
#
# The current maintainer is Reinhard Kotucha.
-my $TL_version='2008';
+my $TL_version='2008';
+my $revision='2009-01-29';
-use File::Copy;
use Getopt::Long;
$Getopt::Long::autoabbrev=0;
Getopt::Long::Configure ("bundling");
@@ -105,11 +105,10 @@ sub message {
sub debug_msg {
my $message=shift;
if ($opt_debug) {
- print STDERR "DEBUG: $message.\n";
+ print STDERR "DEBUG: $message\n";
}
}
-
sub which {
my $prog=shift;
my @PATH;
@@ -154,16 +153,16 @@ sub expand_var {
}
-sub expand_path {
+sub expand_braces {
my $var=shift;
my $pathsep;
my $retstring;
my @retlist;
if (win32) {
- open KPSEWHICH, 'kpsewhich --expand-path=$' . "$var |";
+ open KPSEWHICH, 'kpsewhich --expand-braces=$' . "$var |";
$pathsep=';';
} else {
- open KPSEWHICH, 'kpsewhich --expand-path=\$' . "$var |";
+ open KPSEWHICH, 'kpsewhich --expand-braces=\$' . "$var |";
$pathsep=':';
}
$retstring=(<KPSEWHICH>);
@@ -171,26 +170,45 @@ sub expand_path {
chop $retstring;
@retlist=split $pathsep, $retstring;
if ($opt_debug) {
+ my $index=0;
foreach my $entry (@retlist) {
- debug_msg "$var: '$entry'";
+ debug_msg "$var\[$index\]: '$entry'.";
+ ++$index;
}
- debug_msg "$var='$retlist[0]'";
+ debug_msg "Extracting the first element of the list ($var\[0\]):";
+ debug_msg "$var\[0\]='$retlist[0]'.";
}
return "$retlist[0]";
}
-
+
+debug_msg "getnonfreefonts rev. $revision (TL $TL_version).";
+
+# Determine the URL.
+
+my $getfont_url;
+
+if ($opt_http) {
+ $getfont_url="http://tug.org/~kotucha/getnonfreefonts/getfont$TL_version";
+} else {
+ $getfont_url="ftp://tug.org/tex/getnonfreefonts/getfont$TL_version";
+}
+($opt_http)?
+ debug_msg 'Download method: HTTP.':debug_msg 'Download method: FTP.';
+
+debug_msg "Note that not all fonts are accessible via HTTP." if $opt_http;
+debug_msg "Try --html if your firewall blocks FTP." unless $opt_http;
+debug_msg "Using script '$getfont_url'.";
if ($opt_debug) {
- for my $var ("TMP","TEMP","TMPDIR") {
+ for my $var qw(TMP TEMP TMPDIR) {
if (defined $ENV{$var}) {
- debug_msg "Environment variable $var='$ENV{$var}'";
+ debug_msg "Environment variable $var='$ENV{$var}'.";
} else {
- debug_msg "Environment variable $var not set";
+ debug_msg "Environment variable $var not set.";
}
}
}
-
# get TMP|TEMP|TMPDIR environment variable
if (defined $ENV{'TMP'}) {
@@ -203,7 +221,7 @@ if (defined $ENV{'TMP'}) {
$SYSTMP="/tmp";
}
-debug_msg "Internal variable SYSTMP set to '$SYSTMP'";
+debug_msg "Internal variable SYSTMP set to '$SYSTMP'.";
# Windows usually uses backslashes though forward slashes are probably
# allowed. Perl always needs forward slashes.
@@ -212,7 +230,7 @@ debug_msg "Internal variable SYSTMP set to '$SYSTMP'";
if (win32) {
$SYSTMP=~s/\\/\//g;
- debug_msg "Internal variable SYSTMP converted to '$SYSTMP'";
+ debug_msg "Internal variable SYSTMP converted to '$SYSTMP'.";
}
@@ -226,25 +244,31 @@ die "! ERROR: The temporary directory '$SYSTMP' is not writable.\n"
if ($opt_debug) {
- debug_msg "Search for kpsewhich in PATH";
+ debug_msg "Search for kpsewhich in PATH:";
my $kpsewhich=which "kpsewhich";
- debug_msg "Found $kpsewhich";
+ debug_msg "Found '$kpsewhich'.";
}
-
# Determine INSTALLROOT.
$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME';
-$INSTALLROOT=expand_path "$INSTALLROOTNAME";
+$INSTALLROOT=expand_braces "$INSTALLROOTNAME";
+
+# Remove trailing exclamation marks and double slashes.
+
+debug_msg "Removing leading \"!!\" and trailing \"//\"and set INSTALLROOT:";
+
+$INSTALLROOT=~s/^!!//;
+$INSTALLROOT=~s/\/\/$//;
-($sys)? debug_msg "sys=true":debug_msg "sys=false";
+debug_msg "INSTALLROOT='$INSTALLROOT'.";
-debug_msg "INSTALLROOT='$INSTALLROOT'";
+($sys)? debug_msg "sys=true.":debug_msg "sys=false.";
$INSTALLROOT=~s/\\/\//g if (win32);
-debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
+debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'.";
sub check_installroot {
mkdir "$INSTALLROOT" unless (-d "$INSTALLROOT");
@@ -278,7 +302,7 @@ check_tmpdir;
check_installroot;
my $tmpdir="$SYSTMP/getfont-$$";
-debug_msg "Internal variable tmpdir set to '$tmpdir'";
+debug_msg "Internal variable tmpdir set to '$tmpdir'.";
mkdir "$tmpdir" or die "! ERROR: Can't mkdir '$tmpdir'.";
chdir "$tmpdir" or die "! ERROR: Can't cd '$tmpdir'.";
@@ -311,21 +335,12 @@ if (win32) {
@signals=(@common_signals, @signals_UNIX);
}
-debug_msg "Supported signals: @signals";
+debug_msg "Supported signals: @signals.";
foreach my $signal (@signals) {
$SIG{"$signal"}=\&remove_tmpdir;
}
-# Download the script from tug.org.
-
-my $getfont_url;
-
-if ($opt_http) {
- $getfont_url="http://tug.org/~kotucha/getnonfreefonts/getfont$TL_version";
-} else {
- $getfont_url="ftp://tug.org/tex/getnonfreefonts/getfont$TL_version";
-}
my $has_wget=0;
@@ -343,19 +358,23 @@ if ($opt_debug) {
} else {
@PATH=split ':', $ENV{'PATH'};
}
+ my $index=0;
+
foreach my $dir (@PATH) {
- debug_msg "PATH: '$dir'";
+ debug_msg "PATH\[$index\]: '$dir'.";
+ ++$index;
}
}
-debug_msg "No wget binary found on your system, trying curl" unless ($has_wget);
+debug_msg "No wget binary found on your system, trying curl."
+ unless ($has_wget);
if ($has_wget) {
- debug_msg "Running 'wget $getfont_url'";
+ debug_msg "Running 'wget $getfont_url'.";
system ('wget', "$getfont_url") == 0
or die "! Error: Can't execute wget.\n";
} else {
- debug_msg "Running 'curl -O $getfont_url'";
+ debug_msg "Running 'curl -O $getfont_url'.";
system ('curl', '-O', "$getfont_url") == 0
or die "! Error: Can't execute curl.\n";
}
@@ -374,7 +393,7 @@ push @getfont, '--http' if $opt_http;
push @getfont, '--use_curl' unless ($has_wget);
push @getfont, @allpackages;
-debug_msg "Running '@getfont'";
+debug_msg "Running '@getfont'.";
system @getfont;
@@ -385,12 +404,12 @@ my $exit_code=$?;
my $exit_status=int($exit_code/256);
if ($sys) {
- debug_msg "Info: Execute updmap-sys if exit status is 2";
+ debug_msg "Info: Execute updmap-sys if exit status is 2.";
} else {
- debug_msg "Info: Execute updmap if exit status is 2";
+ debug_msg "Info: Execute updmap if exit status is 2.";
}
-debug_msg "Exit status of getfont$TL_version is $exit_status";
+debug_msg "Exit status of getfont$TL_version is $exit_status.";
if ($exit_status==2) {
print "\n";