diff options
author | Karl Berry <karl@freefriends.org> | 2009-11-25 22:39:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-11-25 22:39:27 +0000 |
commit | 71f167552ffe8976c05752df7fe64570139e5627 (patch) | |
tree | e7dfa95e8e0e5cdfa0f9e5120a511a93945716ca /Build/source | |
parent | da79c522a1a2f625a27553a76f17aa584f32eede (diff) |
rm getnonfreefonts from source dir too
git-svn-id: svn://tug.org/texlive/trunk@16168 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/texlive/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/texlive/Makefile.am | 2 | ||||
-rw-r--r-- | Build/source/texk/texlive/Makefile.in | 93 | ||||
-rw-r--r-- | Build/source/texk/texlive/getnonfreefonts-sys.man | 1 | ||||
-rw-r--r-- | Build/source/texk/texlive/getnonfreefonts.man | 131 | ||||
-rw-r--r-- | Build/source/texk/texlive/linked_scripts/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/texlive/linked_scripts/Makefile.am | 1 | ||||
-rw-r--r-- | Build/source/texk/texlive/linked_scripts/Makefile.in | 1 | ||||
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/getnonfreefonts/getnonfreefonts.pl | 436 |
9 files changed, 16 insertions, 658 deletions
diff --git a/Build/source/texk/texlive/ChangeLog b/Build/source/texk/texlive/ChangeLog index 2571e62f8d4..e9358ab266f 100644 --- a/Build/source/texk/texlive/ChangeLog +++ b/Build/source/texk/texlive/ChangeLog @@ -1,3 +1,8 @@ +2009-11-25 Karl Berry <karl@tug.org> + + * Makefile.am (dist_man1_MANS): remove this, as getnonfreefonts + will now be separate from TeX Live. + 2009-09-22 Peter Breitenlohner <peb@mppmu.mpg.de> * runscript*, Makefile.am: New version of Win32 wrapper. diff --git a/Build/source/texk/texlive/Makefile.am b/Build/source/texk/texlive/Makefile.am index 5cf2e78b11d..7c5fbb00682 100644 --- a/Build/source/texk/texlive/Makefile.am +++ b/Build/source/texk/texlive/Makefile.am @@ -7,8 +7,6 @@ ACLOCAL_AMFLAGS = -I ../../m4 SUBDIRS = linked_scripts -dist_man1_MANS = getnonfreefonts-sys.man getnonfreefonts.man - ## Win32 wrapper ## EXTRA_DIST = runscript_dll.c runscript_exe.c runscript.dll runscript.exe diff --git a/Build/source/texk/texlive/Makefile.in b/Build/source/texk/texlive/Makefile.in index e3ac248a4f5..e5c974e6c8f 100644 --- a/Build/source/texk/texlive/Makefile.in +++ b/Build/source/texk/texlive/Makefile.in @@ -32,7 +32,7 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . -DIST_COMMON = $(am__configure_deps) $(dist_man1_MANS) \ +DIST_COMMON = $(am__configure_deps) \ $(srcdir)/../../build-aux/install-sh \ $(srcdir)/../../build-aux/missing \ $(srcdir)/../../build-aux/mkinstalldirs $(srcdir)/Makefile.am \ @@ -60,31 +60,6 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man1dir = $(mandir)/man1 -am__installdirs = "$(DESTDIR)$(man1dir)" -NROFF = nroff -MANS = $(dist_man1_MANS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -216,7 +191,6 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I ../../m4 SUBDIRS = linked_scripts -dist_man1_MANS = getnonfreefonts-sys.man getnonfreefonts.man EXTRA_DIST = runscript_dll.c runscript_exe.c runscript.dll \ runscript.exe amstex amstex.bat blue.bat cont-cz.bat cont-de \ cont-de.bat cont-en cont-en.bat cont-nl cont-nl.bat \ @@ -274,40 +248,6 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): -install-man1: $(dist_man1_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -445,19 +385,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -633,12 +560,9 @@ distcleancheck: distclean exit 1; } >&2 check-am: all-am check: check-recursive -all-am: Makefile $(MANS) +all-am: Makefile installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -685,7 +609,7 @@ info: info-recursive info-am: -install-data-am: install-man +install-data-am: install-dvi: install-dvi-recursive @@ -701,7 +625,7 @@ install-info: install-info-recursive install-info-am: -install-man: install-man1 +install-man: install-pdf: install-pdf-recursive @@ -731,9 +655,7 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-man - -uninstall-man: uninstall-man1 +uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive @@ -747,12 +669,11 @@ uninstall-man: uninstall-man1 info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ - install-man install-man1 install-pdf install-pdf-am install-ps \ + install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-man uninstall-man1 + pdf-am ps ps-am tags tags-recursive uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/Build/source/texk/texlive/getnonfreefonts-sys.man b/Build/source/texk/texlive/getnonfreefonts-sys.man deleted file mode 100644 index b402933bfce..00000000000 --- a/Build/source/texk/texlive/getnonfreefonts-sys.man +++ /dev/null @@ -1 +0,0 @@ -.so man1/getnonfreefonts.1 diff --git a/Build/source/texk/texlive/getnonfreefonts.man b/Build/source/texk/texlive/getnonfreefonts.man deleted file mode 100644 index 655d9a71584..00000000000 --- a/Build/source/texk/texlive/getnonfreefonts.man +++ /dev/null @@ -1,131 +0,0 @@ -.TH getnonfreefonts 1 "January 2007" "TeXLive" "TeXLive" -.SH NAME -getnonfreefonts \- download and install fonts which cannot be -distributed on a CD -.LP -getnonfreefonts-sys \- download and install fonts system\-wide which -cannot be distributed on a CD - -.SH SYNOPSIS - -.BI "getnonfreefonts [" options "] [" fontlist ] -.sp -.BI "getnonfreefonts-sys [" options "] [" fontlist ] - -.SH DESCRIPTION -Some font suppliers provided fonts which can be used freely but they -disallow that money is charged for the distribution. Hence, for -distributions on CD or DVD it is usually impossible to include -these fonts. - -.B "getnonfreefonts" -is a script which downloads and installs these fonts. Actually, it -first downloads the program -.BI "getfont"<year> -from tug.org which is then executed. -.BI "getfont"<year> -does the real work. It will be updated occasionally to support more -fonts. -.I <year> -denotes the TeXLive release. - -.B getnonfreefonts -and -.B getnonfreefonts-sys -are identical except that -.B getnonfreefonts -installs files to $TEXMFHOME -while -.B getnonfreefonts-sys -installs files to $TEXMFLOCAL. - -.BI "getfont"<year> -will not be installed permanently on your system. It only -exists in a temporary directory while -.BI getnonfreefonts -is running. - -Run -.B getnonfreefonts --lsfonts -to get a list of supported fonts. - -.SH OPTIONS - -.TP -.BR "-a" , " --all" -.rg -Install all fonts. - -.TP -.BR "-d" , " --debug" -.rg -Provide additional messages for debugging. These messages are sent to -STDERR. - -.TP -.BR "-f" , " --force" -.rg -Install fonts even if they are installed already. - -.TP -.BR "-h" , " --help" -.rg -Print a help message. Nothing is installed but the directories where -the fonts will be installed and the temporary directory are shown. -.BI "<" PID ">" -will be replaced by the process ID of the current -process. - -.TP -.BR "-l" , " --lsfonts" -.rg -List all available fonts and tell whether they are installed already. - -.TP -.B --sys -.rg -If you call -.B getnonfreefonts -with the -.B --sys -option it behaves exactly like -.BR "getnonfreefonts-sys". - -.TP -.BR "-v" , " --verbose" -.rg -Be more verbose. This option is only needed for debugging. - -.TP -.BR "--version" -.rg -Print version number. - -.SH ENVIRONMENT -One of the environment variables -.BR "TMP" , " TEMP" , -or -.B TMPDIR -must exist. They are used to determine where to put the temporary -files. The directory must exist and must be writable. -.B /tmp -will be used if none of the variables is defined. - -.SH REQUIREMENTS -Though this program is supposed to be used with -.B TeX Live -it might work with other TeX distributions too. The programs -.BR "wget" -or -.BR "curl" , -.BR "unzip" , -and -.B kpsewhich -have to be installed and a recent version of -.B updmap -is required which supports the -.B --enable -option. - -.SH BUGS -Please send bug reports to Reinhard Kotucha <reinhard.kotucha@web.de>. diff --git a/Build/source/texk/texlive/linked_scripts/ChangeLog b/Build/source/texk/texlive/linked_scripts/ChangeLog index 11e9cc7e988..f63ae74736f 100644 --- a/Build/source/texk/texlive/linked_scripts/ChangeLog +++ b/Build/source/texk/texlive/linked_scripts/ChangeLog @@ -1,3 +1,7 @@ +2009-11-25 Karl Berry <karl@tug.org> + + * Makefile.am (nobase_dist_scriptx_SCRIPTS): remove getnonfreefonts. + 2009-10-15 Peter Breitenlohner <peb@mppmu.mpg.de> * Makefile.am (bin_links): New list of symlinks within bindir. diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.am b/Build/source/texk/texlive/linked_scripts/Makefile.am index ff1f140b1b9..c5b76005857 100644 --- a/Build/source/texk/texlive/linked_scripts/Makefile.am +++ b/Build/source/texk/texlive/linked_scripts/Makefile.am @@ -16,7 +16,6 @@ bin_SCRIPTS = scriptxdir = ${prefix}/texmf/scripts nobase_dist_scriptx_SCRIPTS = \ a2ping/a2ping.pl \ - getnonfreefonts/getnonfreefonts.pl \ simpdftex/simpdftex \ tetex/e2pall.pl \ tetex/texdoctk.pl \ diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.in b/Build/source/texk/texlive/linked_scripts/Makefile.in index 853c2b2f8cc..1c7be54bdc7 100644 --- a/Build/source/texk/texlive/linked_scripts/Makefile.in +++ b/Build/source/texk/texlive/linked_scripts/Makefile.in @@ -165,7 +165,6 @@ bin_SCRIPTS = scriptxdir = ${prefix}/texmf/scripts nobase_dist_scriptx_SCRIPTS = \ a2ping/a2ping.pl \ - getnonfreefonts/getnonfreefonts.pl \ simpdftex/simpdftex \ tetex/e2pall.pl \ tetex/texdoctk.pl \ diff --git a/Build/source/texk/texlive/linked_scripts/getnonfreefonts/getnonfreefonts.pl b/Build/source/texk/texlive/linked_scripts/getnonfreefonts/getnonfreefonts.pl deleted file mode 100755 index 830bbad4447..00000000000 --- a/Build/source/texk/texlive/linked_scripts/getnonfreefonts/getnonfreefonts.pl +++ /dev/null @@ -1,436 +0,0 @@ -#!/usr/bin/env perl - -## getnonfreefonts -## Copyright 2006-2008 Reinhard Kotucha <reinhard.kotucha@web.de> -# -# This work may be distributed and/or modified under the -# conditions of the LaTeX Project Public License, either version 1.3 -# of this license or (at your option) any later version. -# The latest version of this license is in -# http://www.latex-project.org/lppl.txt -# -# The current maintainer is Reinhard Kotucha. - -my $TL_version='2009'; -my $revision='2009-08-08'; - -use Getopt::Long; -$Getopt::Long::autoabbrev=0; -Getopt::Long::Configure ("bundling"); - -$opt_lsfonts=0; -$opt_force=0; - -sub usage { - print <<'EOF'; -Usage: - getnonfreefonts[-sys] [-a|--all] [-d|--debug] [-f|--force] - [-l|--lsfonts] [-v|--verbose] [--version] [-H|--http] - [font1] [font2] ... - - getnonfreefonts installs fonts in $TEXMFHOME. - getnonfreefonts-sys installs fonts in $TEXMFLOCAL. - - Options: - -a|--all Install all fonts. - - -d|--debug Provide additional messages for debugging. - - -f|--force Install fonts even if they are installed already. - - -h|--help Print this message. - - -l|--lsfonts List all fonts available. - - -v|--verbose Be more verbose. - - -H|--http Use http instead of ftp (see manual). - - --version Print version number. - -EOF -; -} - -@ARGS=@ARGV; - - -$done=GetOptions - "all|a", - "debug|d", - "force|f", - "help|h", - "http|H", - "lsfonts|l", - "verbose|v", - "version", - "sys"; - - -unless ($done) { - print "\n"; usage; exit 1; -} - - -$^W=1 if $opt_debug; - -my $sys=($0=~/-sys$/)? 1:0; -$sys=1 if $opt_sys; -$sys=1 if (defined $ENV{'TEX_SYS_PROG'}); - -@allpackages=@ARGV; - -print "$TL_version\n" and exit 0 if $opt_version; - -if ($opt_help or !@ARGS) { - print "\nThis is getnonfreefonts"; - print '-sys' if ($sys); - print ", version $TL_version, revision $revision.\n\n"; - usage; -} - - -sub win32 { - if ($^O=~/^MSWin(32|64)/i) { - return 1; - } else { - return 0; - } -} - - -sub message { - my $message=shift; - if ($message=~/^\[/) { - print "$message\n"; - } else { - printf "%-60s", $message; - } -} - - -sub debug_msg { - my $message=shift; - if ($opt_debug) { - print STDERR "DEBUG: $message\n"; - } -} - -sub which { - my $prog=shift; - my @PATH; - my $PATH=$ENV{'PATH'}; - if (&win32) { - my @PATHEXT=split ';', $ENV{'PATHEXT'}; - push @PATHEXT, ''; # if argument contains an extension - @PATH=split ';', $PATH; - for my $dir (@PATH) { - $dir=~s/\\/\//g; - for my $ext (@PATHEXT) { - if (-f "$dir/$prog$ext") { - return "$dir/$prog$ext"; - } - } - } - } else { - @PATH=split ':', $PATH; - for my $dir (@PATH) { - if (-x "$dir/$prog") { - return "$dir/$prog"; - } - } - } - return 0; -} - - -sub expand_var { - my $var=shift; - - if (win32) { - open KPSEWHICH, 'kpsewhich --expand-var=$' . "$var |"; - } else { - open KPSEWHICH, 'kpsewhich --expand-var=\$' . "$var |"; - } - while (<KPSEWHICH>) { - chop; - return "$_"; - } - close KPSEWHICH; -} - - -sub expand_braces { - my $var=shift; - my $pathsep; - my $retstring; - my @retlist; - if (win32) { - open KPSEWHICH, 'kpsewhich --expand-braces=$' . "$var |"; - $pathsep=';'; - } else { - open KPSEWHICH, 'kpsewhich --expand-braces=\$' . "$var |"; - $pathsep=':'; - } - $retstring=(<KPSEWHICH>); - close KPSEWHICH; - chop $retstring; - @retlist=split $pathsep, $retstring; - if ($opt_debug) { - my $index=0; - foreach my $entry (@retlist) { - debug_msg "$var\[$index\]: '$entry'."; - ++$index; - } - 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 qw(TMP TEMP TMPDIR) { - if (defined $ENV{$var}) { - debug_msg "Environment variable $var='$ENV{$var}'."; - } else { - debug_msg "Environment variable $var not set."; - } - } -} - -# get TMP|TEMP|TMPDIR environment variable - -if (defined $ENV{'TMP'}) { - $SYSTMP="$ENV{'TMP'}"; -} elsif (defined $ENV{'TEMP'}) { - $SYSTMP="$ENV{'TEMP'}"; -} elsif (defined $ENV{'TMPDIR'}) { - $SYSTMP="$ENV{'TMPDIR'}"; -} else { - $SYSTMP="/tmp"; -} - -debug_msg "Internal variable SYSTMP set to '$SYSTMP'."; - -# Windows usually uses backslashes though forward slashes are probably -# allowed. Perl always needs forward slashes. - -# We convert backslashes to forward slashes on Windows. - -if (win32) { - $SYSTMP=~s/\\/\//g; - debug_msg "Internal variable SYSTMP converted to '$SYSTMP'."; -} - - -sub check_tmpdir{ -die "! ERROR: The temporary directory '$SYSTMP' doesn't exist.\n" - unless (-d "$SYSTMP"); - -die "! ERROR: The temporary directory '$SYSTMP' is not writable.\n" - unless (-w "$SYSTMP"); -} - - -if ($opt_debug) { - debug_msg "Search for kpsewhich in PATH:"; - my $kpsewhich=which "kpsewhich"; - debug_msg "Found '$kpsewhich'."; -} - -# Determine INSTALLROOT. - -$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME'; - -$INSTALLROOT=expand_braces "$INSTALLROOTNAME"; - -# Remove trailing exclamation marks and double slashes. - -debug_msg "Removing leading \"!!\" and trailing \"//\"and set INSTALLROOT:"; - -$INSTALLROOT=~s/^!!//; -$INSTALLROOT=~s/\/\/$//; - -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'."; - -sub check_installroot { - mkdir "$INSTALLROOT" unless (-d "$INSTALLROOT"); - - die "! ERROR: The variable $INSTALLROOTNAME is not set.\n" - unless length ("$INSTALLROOT") > 0; - - die "! ERROR: The install directory '$INSTALLROOT' doesn't " . - "exist.\n" . - " If this is the correct path, please create " . - "this directory manually.\n" - unless (-d "$INSTALLROOT"); - - die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n" - unless (-w "$INSTALLROOT"); -} - -if ($opt_help or !@ARGS) { - print <<"ENDUSAGE"; - Directories: - temporary: '$SYSTMP/getfont-<PID>' - install: '$INSTALLROOT' - -ENDUSAGE -check_tmpdir; -check_installroot; -exit 0; -} - -check_tmpdir; -check_installroot; - -my $tmpdir="$SYSTMP/getfont-$$"; -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'."; - -sub remove_tmpdir { - chdir "$SYSTMP" or die "! ERROR: Can't cd '$SYSTMP'.\n"; - opendir TMPDIR, "$tmpdir" - or print "! ERROR: Can't read directory '$tmpdir'.\n"; - - @alltmps=readdir TMPDIR; - closedir TMPDIR; - - foreach $file (@alltmps) { - next if $file=~/^\./; - unlink "$tmpdir/$file"; - } - rmdir "$tmpdir" or die "! ERROR: Can't remove directory '$tmpdir'.\n"; -} - -# Signal handlers. - -my @common_signals=qw(INT ILL FPE SEGV TERM ABRT); -my @signals_UNIX=qw(QUIT BUS PIPE); -my @signals_Win32=qw(BREAK); - - -if (win32) { - @signals=(@common_signals, @signals_Win32); -} else { - @signals=(@common_signals, @signals_UNIX); -} - -debug_msg "Supported signals: @signals."; - -foreach my $signal (@signals) { - $SIG{"$signal"}=\&remove_tmpdir; -} - - -my $has_wget=0; - -if (win32) { - $has_wget=1; ## shipped with TL. -} elsif (which "wget") { - $has_wget=1; ## wget is in PATH. -} - - -if ($opt_debug) { - my @PATH; - if (win32) { - @PATH=split ';', $ENV{'PATH'}; - } else { - @PATH=split ':', $ENV{'PATH'}; - } - my $index=0; - - foreach my $dir (@PATH) { - debug_msg "PATH\[$index\]: '$dir'."; - ++$index; - } -} - -debug_msg "No wget binary found on your system, trying curl." - unless ($has_wget); - -if ($has_wget) { - 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'."; - system ('curl', '-O', "$getfont_url") == 0 - or die "! Error: Can't execute curl.\n"; -} - -# Download the fonts. - -my @getfont=('perl', "./getfont$TL_version", '--getnonfreefonts'); -push @getfont, "--installroot=$INSTALLROOT"; -push @getfont, '--lsfonts' if $opt_lsfonts; -push @getfont, '--force' if $opt_force; -push @getfont, '--debug' if $opt_debug; -push @getfont, '--verbose' if $opt_verbose; -push @getfont, '--sys' if $sys; -push @getfont, '--all' if $opt_all; -push @getfont, '--http' if $opt_http; -push @getfont, '--use_curl' unless ($has_wget); -push @getfont, @allpackages; - -debug_msg "Running '@getfont'."; - -system @getfont; - -# Evaluate the exit status. It will be 2 if something had been -# installed and in this case we need to run texhash/updmap. - -my $exit_code=$?; -my $exit_status=int($exit_code/256); - -if ($sys) { - debug_msg "Info: Execute updmap-sys if exit status is 2."; -} else { - debug_msg "Info: Execute updmap if exit status is 2."; -} - -debug_msg "Exit status of getfont$TL_version is $exit_status."; - -if ($exit_status==2) { - print "\n"; - system 'texhash', "$INSTALLROOT"; - $updmap_command=($sys)? 'updmap-sys':'updmap'; - @updmap=("$updmap_command"); - push @updmap, '--quiet' unless $opt_verbose; - print "\n"; - message "Updating map files ($updmap_command)..."; - system @updmap; - - message $?? '[failed]':'[done]'; -} - -remove_tmpdir; - -__END__ |