diff options
author | Norbert Preining <preining@logic.at> | 2008-05-10 14:14:16 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-05-10 14:14:16 +0000 |
commit | 5a3eab2360bdd1e8dd22cc6f606ea35edbd3b477 (patch) | |
tree | 6186757e9521a8cd5e70120c5ca48fcab55fff49 /Master/bin/i386-solaris | |
parent | dc7e7ae5248c6f07447bf5f4d455d6dea6741977 (diff) |
add new i386-solaris binaries from Apostolos Syropoulos
git-svn-id: svn://tug.org/texlive/trunk@8021 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/i386-solaris')
275 files changed, 14911 insertions, 0 deletions
diff --git a/Master/bin/i386-solaris/a2ping b/Master/bin/i386-solaris/a2ping new file mode 120000 index 00000000000..5cbfe106996 --- /dev/null +++ b/Master/bin/i386-solaris/a2ping @@ -0,0 +1 @@ +../../texmf/scripts/a2ping/a2ping.pl
\ No newline at end of file diff --git a/Master/bin/i386-solaris/afm2pl b/Master/bin/i386-solaris/afm2pl Binary files differnew file mode 100755 index 00000000000..2a7e8dfbf3b --- /dev/null +++ b/Master/bin/i386-solaris/afm2pl diff --git a/Master/bin/i386-solaris/afm2tfm b/Master/bin/i386-solaris/afm2tfm Binary files differnew file mode 100755 index 00000000000..cd75e3f8b73 --- /dev/null +++ b/Master/bin/i386-solaris/afm2tfm diff --git a/Master/bin/i386-solaris/aleph b/Master/bin/i386-solaris/aleph Binary files differnew file mode 100755 index 00000000000..d6925dd8e4f --- /dev/null +++ b/Master/bin/i386-solaris/aleph diff --git a/Master/bin/i386-solaris/allcm b/Master/bin/i386-solaris/allcm new file mode 100755 index 00000000000..945c7c88457 --- /dev/null +++ b/Master/bin/i386-solaris/allcm @@ -0,0 +1,118 @@ +#!/bin/sh + +test -f /bin/sh5 && test -z "$RUNNING_SH5" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; } +unset RUNNING_SH5 + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +# hack around a bug in zsh: +test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' + +progname=`basename $0` +tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$ + +case "$progname" in + allec) + encoding=T1;; + *) + encoding=OT1;; +esac + +case "$1" in + -r) + DVIPS=dvired + shift + ;; + *) + DVIPS=dvips + ;; +esac + +body() +{ + cat <<-'eof' + \pagestyle{empty} + \parindent0in + \hfuzz=\maxdimen + \hbadness=10000 + \textheight9.5in + \textwidth6.5in + \newcommand{\myformula}{\sum a_{b_{c_d}} = c} + \newcommand{\mytext}{text $\mathcal{\myformula}\mathrm{\myformula} + \mathbf{\myformula}\mathsf{\myformula}\mathtt{\myformula} + \mathnormal{\myformula}\mathit{\myformula}$} + + \newcommand{\TestSizes}{{% + \tiny \mytext\scriptsize \mytext\footnotesize \mytext\small \mytext + \normalsize \mytext + \large \mytext\Large \mytext\LARGE \mytext\huge \mytext\Huge \mytext}} + \newcommand{\TestRM}{rm-family: {\rmfamily\TestSizes}\newline} + \newcommand{\TestSF}{sf-family: {\sffamily\TestSizes}\newline} + \newcommand{\TestTT}{tt-family: {\ttfamily\TestSizes}\newline} + \newcommand{\TestFamilies}{\TestRM\TestSF\TestTT\newline} + \newcommand{\TestMD}{md-series: {\mdseries\TestFamilies}} + \newcommand{\TestBF}{bf-series: {\bfseries\TestFamilies}} + \newcommand{\TestSeries}{\TestBF\TestMD\par} + \newcommand{\TestUP}{up-shape: {\upshape\TestSeries}\par} + \newcommand{\TestIT}{it-shape: {\itshape\TestSeries}\par} + \newcommand{\TestSL}{sl-shape: {\slshape\TestSeries}\par} + \newcommand{\TestSC}{sc-shape: {\scshape\TestSeries}\par} + \newcommand{\TestShapes}{\TestUP\TestIT\TestSL\TestSC} + \begin{document} + \TestShapes + \end{document} +eof +} + +head() +{ + echo '\documentclass['$1'pt]{article}' + echo '\usepackage['$encoding']{fontenc}' +} + +# before we create the tmpdir, set trap for cleanup +trap ' + rm -rf $tmpdir + exit 1 +' 1 2 3 7 13 15 + +(umask 077; mkdir "$tmpdir") || { + echo "$progname: failed to create temp directory." >&2 + exit 1 +} + +cd $tmpdir || exit 1 +echo >&2 +echo "---------------------------------------------------------------------" >&2 +echo ">>>>>>>>>>> Generating testfiles for 10pt, 11pt and 12pt. <<<<<<<<<<" >&2 +echo "---------------------------------------------------------------------" >&2 +head 10 > allcm10.tex +head 11 > allcm11.tex +head 12 > allcm12.tex +body >> allcm10.tex +body >> allcm11.tex +body >> allcm12.tex + +echo >&2 +echo "---------------------------------------------------------------------" >&2 +echo ">>>>>>>>>>> Calling latex... <<<<<<<<<<" >&2 +echo "---------------------------------------------------------------------" >&2 +latex allcm10 >/dev/null +latex allcm11 >/dev/null +latex allcm12 >/dev/null + +echo >&2 +echo "---------------------------------------------------------------------" >&2 +echo ">>>>>>>>>>> Now, calling $DVIPS to make missing fonts... <<<<<<<<<<" >&2 +echo "---------------------------------------------------------------------" >&2 +$DVIPS ${1+"$@"} -V -f allcm10 > /dev/null +$DVIPS ${1+"$@"} -V -f allcm11 > /dev/null +$DVIPS ${1+"$@"} -V -f allcm12 > /dev/null + +cd / +rm -rf $tmpdir diff --git a/Master/bin/i386-solaris/allec b/Master/bin/i386-solaris/allec new file mode 120000 index 00000000000..6d5b04d0d35 --- /dev/null +++ b/Master/bin/i386-solaris/allec @@ -0,0 +1 @@ +allcm
\ No newline at end of file diff --git a/Master/bin/i386-solaris/allneeded b/Master/bin/i386-solaris/allneeded new file mode 100755 index 00000000000..15c62c84adb --- /dev/null +++ b/Master/bin/i386-solaris/allneeded @@ -0,0 +1,46 @@ +#!/bin/sh + +test -f /bin/sh5 && test -z "$RUNNING_SH5" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; } +unset RUNNING_SH5 + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +progname=`basename $0` +dvired=false + +case $1 in +-r) DVIPS="dvips -x707" + shift;; +*) DVIPS=dvips;; +esac + +case $# in +0) echo "Usage: $progname [-r] files ..." >&2 + exit ;; +esac + +findopt= +dvipsopt= + +for i +do + if [ -f $i ] || [ -d $i ]; then + findopt="$findopt $i" + else + dvipsopt="$dvipsopt $i" + fi +done + +find $findopt -name \*.dvi -type f -print | + while true; do + read i + test -z "$i" && exit + echo "processing file '$i' ..." + $DVIPS $dvipsopt -f "$i" >/dev/null + echo + done diff --git a/Master/bin/i386-solaris/amstex b/Master/bin/i386-solaris/amstex new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/amstex @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/bbox b/Master/bin/i386-solaris/bbox Binary files differnew file mode 100755 index 00000000000..e31e1e760e7 --- /dev/null +++ b/Master/bin/i386-solaris/bbox diff --git a/Master/bin/i386-solaris/bg5+latex b/Master/bin/i386-solaris/bg5+latex new file mode 120000 index 00000000000..1366a36e76c --- /dev/null +++ b/Master/bin/i386-solaris/bg5+latex @@ -0,0 +1 @@ +gbklatex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/bg5+pdflatex b/Master/bin/i386-solaris/bg5+pdflatex new file mode 120000 index 00000000000..1e0ce565ca7 --- /dev/null +++ b/Master/bin/i386-solaris/bg5+pdflatex @@ -0,0 +1 @@ +gbkpdflatex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/bg5conv b/Master/bin/i386-solaris/bg5conv Binary files differnew file mode 100755 index 00000000000..a25dc4f1969 --- /dev/null +++ b/Master/bin/i386-solaris/bg5conv diff --git a/Master/bin/i386-solaris/bg5latex b/Master/bin/i386-solaris/bg5latex new file mode 100755 index 00000000000..257a8446e21 --- /dev/null +++ b/Master/bin/i386-solaris/bg5latex @@ -0,0 +1,43 @@ +#! /bin/sh + +# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program in doc/COPYING; if not, write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301 USA + +n=1 +argv= + +# get last argument +while test 1 -lt $#; do + eval argv$n=\$1 + argv="$argv \"\$argv$n\"" + n=`expr $n + 1` + shift +done + +# replace extension with .cjk or append .cjk if there is no extension +tex=$1 +case $tex in +""|*.cjk) + echo >&2 "Usage: $0 [options] latex-file" + exit 1;; +*) + aux=`expr "X$tex" : 'X\(.*\)\.[^/]*$' \| "X$tex" : 'X\(.*\)'`.cjk;; +esac + +bg5conv < "$tex" > "$aux" && eval latex "$argv" "\$aux" + +# EOF diff --git a/Master/bin/i386-solaris/bg5pdflatex b/Master/bin/i386-solaris/bg5pdflatex new file mode 100755 index 00000000000..80adc376a93 --- /dev/null +++ b/Master/bin/i386-solaris/bg5pdflatex @@ -0,0 +1,43 @@ +#! /bin/sh + +# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program in doc/COPYING; if not, write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301 USA + +n=1 +argv= + +# get last argument +while test 1 -lt $#; do + eval argv$n=\$1 + argv="$argv \"\$argv$n\"" + n=`expr $n + 1` + shift +done + +# replace extension with .cjk or append .cjk if there is no extension +tex=$1 +case $tex in +""|*.cjk) + echo >&2 "Usage: $0 [options] pdflatex-file" + exit 1;; +*) + aux=`expr "X$tex" : 'X\(.*\)\.[^/]*$' \| "X$tex" : 'X\(.*\)'`.cjk;; +esac + +bg5conv < "$tex" > "$aux" && eval pdflatex "$argv" "\$aux" + +# EOF diff --git a/Master/bin/i386-solaris/bibtex b/Master/bin/i386-solaris/bibtex Binary files differnew file mode 100755 index 00000000000..85391a4449d --- /dev/null +++ b/Master/bin/i386-solaris/bibtex diff --git a/Master/bin/i386-solaris/bibtex8 b/Master/bin/i386-solaris/bibtex8 Binary files differnew file mode 100755 index 00000000000..5d13d712f97 --- /dev/null +++ b/Master/bin/i386-solaris/bibtex8 diff --git a/Master/bin/i386-solaris/cef5conv b/Master/bin/i386-solaris/cef5conv Binary files differnew file mode 100755 index 00000000000..0e70388ad1e --- /dev/null +++ b/Master/bin/i386-solaris/cef5conv diff --git a/Master/bin/i386-solaris/cef5latex b/Master/bin/i386-solaris/cef5latex new file mode 100755 index 00000000000..7eda1633766 --- /dev/null +++ b/Master/bin/i386-solaris/cef5latex @@ -0,0 +1,43 @@ +#! /bin/sh + +# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program in doc/COPYING; if not, write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301 USA + +n=1 +argv= + +# get last argument +while test 1 -lt $#; do + eval argv$n=\$1 + argv="$argv \"\$argv$n\"" + n=`expr $n + 1` + shift +done + +# replace extension with .cjk or append .cjk if there is no extension +tex=$1 +case $tex in +""|*.cjk) + echo >&2 "Usage: $0 [options] latex-file" + exit 1;; +*) + aux=`expr "X$tex" : 'X\(.*\)\.[^/]*$' \| "X$tex" : 'X\(.*\)'`.cjk;; +esac + +cef5conv < "$tex" > "$aux" && eval latex "$argv" "\$aux" + +# EOF diff --git a/Master/bin/i386-solaris/cef5pdflatex b/Master/bin/i386-solaris/cef5pdflatex new file mode 100755 index 00000000000..25fe066a53f --- /dev/null +++ b/Master/bin/i386-solaris/cef5pdflatex @@ -0,0 +1,43 @@ +#! /bin/sh + +# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program in doc/COPYING; if not, write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301 USA + +n=1 +argv= + +# get last argument +while test 1 -lt $#; do + eval argv$n=\$1 + argv="$argv \"\$argv$n\"" + n=`expr $n + 1` + shift +done + +# replace extension with .cjk or append .cjk if there is no extension +tex=$1 +case $tex in +""|*.cjk) + echo >&2 "Usage: $0 [options] pdflatex-file" + exit 1;; +*) + aux=`expr "X$tex" : 'X\(.*\)\.[^/]*$' \| "X$tex" : 'X\(.*\)'`.cjk;; +esac + +cef5conv < "$tex" > "$aux" && eval pdflatex "$argv" "\$aux" + +# EOF diff --git a/Master/bin/i386-solaris/cefconv b/Master/bin/i386-solaris/cefconv Binary files differnew file mode 100755 index 00000000000..83c7b3f4971 --- /dev/null +++ b/Master/bin/i386-solaris/cefconv diff --git a/Master/bin/i386-solaris/ceflatex b/Master/bin/i386-solaris/ceflatex new file mode 100755 index 00000000000..d34244d9a5b --- /dev/null +++ b/Master/bin/i386-solaris/ceflatex @@ -0,0 +1,43 @@ +#! /bin/sh + +# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program in doc/COPYING; if not, write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301 USA + +n=1 +argv= + +# get last argument +while test 1 -lt $#; do + eval argv$n=\$1 + argv="$argv \"\$argv$n\"" + n=`expr $n + 1` + shift +done + +# replace extension with .cjk or append .cjk if there is no extension +tex=$1 +case $tex in +""|*.cjk) + echo >&2 "Usage: $0 [options] latex-file" + exit 1;; +*) + aux=`expr "X$tex" : 'X\(.*\)\.[^/]*$' \| "X$tex" : 'X\(.*\)'`.cjk;; +esac + +cefconv < "$tex" > "$aux" && eval latex "$argv" "\$aux" + +# EOF diff --git a/Master/bin/i386-solaris/cefpdflatex b/Master/bin/i386-solaris/cefpdflatex new file mode 100755 index 00000000000..4c7309f2bf2 --- /dev/null +++ b/Master/bin/i386-solaris/cefpdflatex @@ -0,0 +1,43 @@ +#! /bin/sh + +# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program in doc/COPYING; if not, write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301 USA + +n=1 +argv= + +# get last argument +while test 1 -lt $#; do + eval argv$n=\$1 + argv="$argv \"\$argv$n\"" + n=`expr $n + 1` + shift +done + +# replace extension with .cjk or append .cjk if there is no extension +tex=$1 +case $tex in +""|*.cjk) + echo >&2 "Usage: $0 [options] pdflatex-file" + exit 1;; +*) + aux=`expr "X$tex" : 'X\(.*\)\.[^/]*$' \| "X$tex" : 'X\(.*\)'`.cjk;; +esac + +cefconv < "$tex" > "$aux" && eval pdflatex "$argv" "\$aux" + +# EOF diff --git a/Master/bin/i386-solaris/cefsconv b/Master/bin/i386-solaris/cefsconv Binary files differnew file mode 100755 index 00000000000..3c36f01cf60 --- /dev/null +++ b/Master/bin/i386-solaris/cefsconv diff --git a/Master/bin/i386-solaris/cefslatex b/Master/bin/i386-solaris/cefslatex new file mode 100755 index 00000000000..619d08c7577 --- /dev/null +++ b/Master/bin/i386-solaris/cefslatex @@ -0,0 +1,43 @@ +#! /bin/sh + +# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program in doc/COPYING; if not, write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301 USA + +n=1 +argv= + +# get last argument +while test 1 -lt $#; do + eval argv$n=\$1 + argv="$argv \"\$argv$n\"" + n=`expr $n + 1` + shift +done + +# replace extension with .cjk or append .cjk if there is no extension +tex=$1 +case $tex in +""|*.cjk) + echo >&2 "Usage: $0 [options] latex-file" + exit 1;; +*) + aux=`expr "X$tex" : 'X\(.*\)\.[^/]*$' \| "X$tex" : 'X\(.*\)'`.cjk;; +esac + +cefsconv < "$tex" > "$aux" && eval latex "$argv" "\$aux" + +# EOF diff --git a/Master/bin/i386-solaris/cefspdflatex b/Master/bin/i386-solaris/cefspdflatex new file mode 100755 index 00000000000..02bf6598f71 --- /dev/null +++ b/Master/bin/i386-solaris/cefspdflatex @@ -0,0 +1,43 @@ +#! /bin/sh + +# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program in doc/COPYING; if not, write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301 USA + +n=1 +argv= + +# get last argument +while test 1 -lt $#; do + eval argv$n=\$1 + argv="$argv \"\$argv$n\"" + n=`expr $n + 1` + shift +done + +# replace extension with .cjk or append .cjk if there is no extension +tex=$1 +case $tex in +""|*.cjk) + echo >&2 "Usage: $0 [options] latex-file" + exit 1;; +*) + aux=`expr "X$tex" : 'X\(.*\)\.[^/]*$' \| "X$tex" : 'X\(.*\)'`.cjk;; +esac + +cefsconv < "$tex" > "$aux" && eval pdflatex "$argv" "\$aux" + +# EOF diff --git a/Master/bin/i386-solaris/cfftot1 b/Master/bin/i386-solaris/cfftot1 Binary files differnew file mode 100755 index 00000000000..b10efc9d71d --- /dev/null +++ b/Master/bin/i386-solaris/cfftot1 diff --git a/Master/bin/i386-solaris/cslatex b/Master/bin/i386-solaris/cslatex new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/cslatex @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/csplain b/Master/bin/i386-solaris/csplain new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/csplain @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/ctangle b/Master/bin/i386-solaris/ctangle Binary files differnew file mode 100755 index 00000000000..7c6842e9937 --- /dev/null +++ b/Master/bin/i386-solaris/ctangle diff --git a/Master/bin/i386-solaris/ctie b/Master/bin/i386-solaris/ctie Binary files differnew file mode 100755 index 00000000000..2db377ca924 --- /dev/null +++ b/Master/bin/i386-solaris/ctie diff --git a/Master/bin/i386-solaris/ctxtools b/Master/bin/i386-solaris/ctxtools new file mode 100755 index 00000000000..84e47bbee3c --- /dev/null +++ b/Master/bin/i386-solaris/ctxtools @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart ctxtools.rb "$@" diff --git a/Master/bin/i386-solaris/cweave b/Master/bin/i386-solaris/cweave Binary files differnew file mode 100755 index 00000000000..0d94122cd3d --- /dev/null +++ b/Master/bin/i386-solaris/cweave diff --git a/Master/bin/i386-solaris/detex b/Master/bin/i386-solaris/detex Binary files differnew file mode 100755 index 00000000000..8b1c5f6de8c --- /dev/null +++ b/Master/bin/i386-solaris/detex diff --git a/Master/bin/i386-solaris/devnag b/Master/bin/i386-solaris/devnag Binary files differnew file mode 100755 index 00000000000..c34a57d9d7e --- /dev/null +++ b/Master/bin/i386-solaris/devnag diff --git a/Master/bin/i386-solaris/disdvi b/Master/bin/i386-solaris/disdvi Binary files differnew file mode 100755 index 00000000000..c21f0f60e56 --- /dev/null +++ b/Master/bin/i386-solaris/disdvi diff --git a/Master/bin/i386-solaris/dmp b/Master/bin/i386-solaris/dmp Binary files differnew file mode 100755 index 00000000000..0a4ac1411f7 --- /dev/null +++ b/Master/bin/i386-solaris/dmp diff --git a/Master/bin/i386-solaris/dt2dv b/Master/bin/i386-solaris/dt2dv Binary files differnew file mode 100755 index 00000000000..eea922ef5d3 --- /dev/null +++ b/Master/bin/i386-solaris/dt2dv diff --git a/Master/bin/i386-solaris/dv2dt b/Master/bin/i386-solaris/dv2dt Binary files differnew file mode 100755 index 00000000000..1e64967eed2 --- /dev/null +++ b/Master/bin/i386-solaris/dv2dt diff --git a/Master/bin/i386-solaris/dvi2fax b/Master/bin/i386-solaris/dvi2fax new file mode 100755 index 00000000000..fdfa83211eb --- /dev/null +++ b/Master/bin/i386-solaris/dvi2fax @@ -0,0 +1,41 @@ +#!/bin/sh +# options for dvips are passwd down + +test -f /bin/sh5 && test -z "$RUNNING_SH5" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; } +unset RUNNING_SH5 + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +# hack around a bug in zsh: +test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' + +progname=`basename "$0"` +help() +{ + echo "Usage: $progname [-hi|-lo] file[.dvi] [options for dvips]" + echo " -hi: use high fax resolution (204x196) (default)" + echo " -lo: use low fax resolution (204x98)" + echo + echo "Example: $progname foo -l 2" +} + +dvipsconf=dfaxhigh; gsdev=dfaxhigh +case $1 in + -hi) gsdev=dfaxhigh; shift;; + -lo) gsdev=dfaxlow; shift;; +esac + +case $# in + 0) help >&2 + exit 1 + ;; +esac + +NAME=`basename "$1" .dvi` +dvips "$@" -P$dvipsconf -f | + gs -q -dSAFER -sDEVICE=$gsdev -sOutputFile="$NAME-%03d.fax" -sNOPAUSE - diff --git a/Master/bin/i386-solaris/dvi2tty b/Master/bin/i386-solaris/dvi2tty Binary files differnew file mode 100755 index 00000000000..37990f4801c --- /dev/null +++ b/Master/bin/i386-solaris/dvi2tty diff --git a/Master/bin/i386-solaris/dvibook b/Master/bin/i386-solaris/dvibook Binary files differnew file mode 100755 index 00000000000..2e0773bd59e --- /dev/null +++ b/Master/bin/i386-solaris/dvibook diff --git a/Master/bin/i386-solaris/dviconcat b/Master/bin/i386-solaris/dviconcat Binary files differnew file mode 100755 index 00000000000..ee40e8ebd6d --- /dev/null +++ b/Master/bin/i386-solaris/dviconcat diff --git a/Master/bin/i386-solaris/dvicopy b/Master/bin/i386-solaris/dvicopy Binary files differnew file mode 100755 index 00000000000..8250ed2b224 --- /dev/null +++ b/Master/bin/i386-solaris/dvicopy diff --git a/Master/bin/i386-solaris/dvidvi b/Master/bin/i386-solaris/dvidvi Binary files differnew file mode 100755 index 00000000000..73e5253ba8b --- /dev/null +++ b/Master/bin/i386-solaris/dvidvi diff --git a/Master/bin/i386-solaris/dvihp b/Master/bin/i386-solaris/dvihp new file mode 100755 index 00000000000..6b149517086 --- /dev/null +++ b/Master/bin/i386-solaris/dvihp @@ -0,0 +1,130 @@ +#!/bin/sh +# $Id: dvihp,v 1.3 1996/12/03 19:53:56 karl Exp karl $ +# Run dvicopy, then dvilj[k]. kb@mail.tug.org, 1994. Public domain. +# Try to accept arguments a la dvips, from Thomas Esser. + +: ${DVILJ=dvilj4} # the dvilj variant to run +: ${SPOOL=lpr} # used to print an LJ file +: ${TMPDIR=${TEMP-${TMP-/tmp}}} # for the dvicopy output + +tmpdir="${TMPDIR}"/dvihp$$ +(umask 077; mkdir "$tmpdir") \ + || { echo "cannot create directory \`$tmpdir'."; exit 1; } + +trap ' + cd "${TMPDIR}" + test -d "$tmpdir" && { rm -f "$tmpdir"/*; rmdir "$tmpdir"; } + exit 0 +' 0 1 2 3 6 7 13 15 + +rcs_revision='$Revision: 1.3 $' +version=`set - $rcs_revision; echo $2` + +usage="Usage: `basename $0` [OPTIONS] [DVIFILE[.dvi]]. + Translate the given DVIFILE to Hewlett-Packard PCL by calling dvicopy + and then \$DVILJ (dvilj4 by default). + In the absence of other options, pipe the PCL to \$SPOOL (lpr by default). + + Options are recognized from dvips where possible: +-A print odd pages +-B print even pages +-d # set debug bits to # (see documentation) +-D # set resolution to # +-f run as filter +-l # don't print pages after # +-m manual feed +-n # print # pages +-O #,# set/change paper offset to #,# mm +-o s output to s instead of spooling +-p # don't print pages before # +-Ps pass directly to lpr +-v verbose operation +-x # set magnification to # + +Other options are passed to the dvilj program. + +Email bug reports to tex-k@mail.tug.org." + + +if test $# -eq 0; then + echo "`basename $0`: Missing argument(s)." >&2 + echo "Try \``basename $0` --help' for more information." >&2 + exit 0 +fi + +unset infile opt output +output_opt=-e +verbose=false + +while test $# -gt 0; do + case "$1" in + -help|--help) echo "$usage"; exit 0;; + -version|--version) + echo "`basename $0` (Dviljk 2.6) $version" + echo "There is NO warranty. This script is public domain." + exit 0;; + -A) opt="$opt -D1";; # -A => -D1 (odd pages) + -B) opt="$opt -D2";; # -B -> -D2 (even pages) + -d) shift; opt="$opt --D$1";; # -d => --D (debug) + -d*) opt="$opt `echo $1 | sed s/d/-D/`";; + -D) shift; opt="$opt -R$1";; # -D => -R (resolution) + -f) infile=; output=-;; # -f (run as filter) + -l) shift; opt="$opt -t$1";; # -l => -t (ending page) + -l*) opt="$opt `echo $1 | sed s/l/t/`";; + -m) opt="$opt -A";; # -m => -A (manual feed) + -n) shift; opt="$opt -p$1";; # -n => -p (page count) + -n*) opt="$opt `echo $1 | sed s/^-n/-p/`";; + -o) if test $# -eq 1; then # -o (output file) + # No remaining args, output to foo.lj. + output=`basename $infile .dvi`.lj + else shift; output="$1"; fi;; + -o*) output="`echo $1 | sed 's/^-o//'`";; + -O) shift; x=`echo $1 | sed 's/,.*//'` # -O => -x, -y (page offsets) + y=`echo $1 | sed 's/.*,//'`; opt="$opt -x$x -y$y";; + -O*) temp="`echo $1 | sed 's/^-O//'`" + x=`echo $temp | sed 's/,.*//'` + y=`echo $temp | sed 's/.*,//'`; + opt="$opt -x$x -y$y";; + -p) shift; opt="$opt -f$1";; # -p => -f (starting page) + -p*) opt="$opt `echo $1 | sed s/p/f/`";; + -P) shift; output=; spool_opt="-P$1";; # -Pprinter + -P*) output=; spool_opt="$1";; + -v) verbose=true; opt="$opt -v";; + -x) shift; opt="$opt -m$1";; # -x => -m (magnification) + -x*) opt="$opt `echo $1 | sed s/x/m/`";; + --) shift; infile="$1"; break;; # -- => end of options + -*) opt="$opt $1";; # pass other options through + *) infile="$1";; + esac + shift +done + +# Make sure the filenames are unique on MS-DOS +vfless_dvi="$tmpdir"/dvi$$.vf + +# Expand VF references. +# If $infile is null, this will read standard input. +# dvilj can't read from a pipe, so always write to a file. +$verbose && echo "Running dvicopy $infile >$vfless_dvi" >&2 +if dvicopy $infile >"$vfless_dvi"; then :; else + echo "$0: dvicopy $infile failed." >&2 + exit 1 +fi +$verbose && ls -l "$vfless_dvi" >&2 + +if test -z "$output"; then + output=- # output to stdout + # Doing this pipe means the true exit status might get lost, but it + # seems worth it to avoid the temporary file. (Bad enough to have one.) + maybe_spool_cmd="| $SPOOL $spool_opt" +else + maybe_spool_cmd= +fi + +# Translate DVI to LJ. +cmd="$DVILJ $opt $output_opt$output \"$vfless_dvi\" $maybe_spool_cmd" +$verbose && echo "Running $cmd" >&2 +if eval $cmd; then :; else + echo "$0: $DVILJ failed." >&2 + exit 2 +fi diff --git a/Master/bin/i386-solaris/dvilj b/Master/bin/i386-solaris/dvilj Binary files differnew file mode 100755 index 00000000000..adbc893f859 --- /dev/null +++ b/Master/bin/i386-solaris/dvilj diff --git a/Master/bin/i386-solaris/dvilj2p b/Master/bin/i386-solaris/dvilj2p Binary files differnew file mode 100755 index 00000000000..9a973f65457 --- /dev/null +++ b/Master/bin/i386-solaris/dvilj2p diff --git a/Master/bin/i386-solaris/dvilj4 b/Master/bin/i386-solaris/dvilj4 Binary files differnew file mode 100755 index 00000000000..0d9f898633d --- /dev/null +++ b/Master/bin/i386-solaris/dvilj4 diff --git a/Master/bin/i386-solaris/dvilj4l b/Master/bin/i386-solaris/dvilj4l Binary files differnew file mode 100755 index 00000000000..57301f9bb19 --- /dev/null +++ b/Master/bin/i386-solaris/dvilj4l diff --git a/Master/bin/i386-solaris/dvilj6 b/Master/bin/i386-solaris/dvilj6 new file mode 120000 index 00000000000..576e6e449cd --- /dev/null +++ b/Master/bin/i386-solaris/dvilj6 @@ -0,0 +1 @@ +dvilj4
\ No newline at end of file diff --git a/Master/bin/i386-solaris/dvipdfm b/Master/bin/i386-solaris/dvipdfm Binary files differnew file mode 100755 index 00000000000..646e0913fd5 --- /dev/null +++ b/Master/bin/i386-solaris/dvipdfm diff --git a/Master/bin/i386-solaris/dvipdfmx b/Master/bin/i386-solaris/dvipdfmx Binary files differnew file mode 100755 index 00000000000..06c6dfc505f --- /dev/null +++ b/Master/bin/i386-solaris/dvipdfmx diff --git a/Master/bin/i386-solaris/dvipdft b/Master/bin/i386-solaris/dvipdft new file mode 100755 index 00000000000..db53bd2f5a0 --- /dev/null +++ b/Master/bin/i386-solaris/dvipdft @@ -0,0 +1,130 @@ +#!/bin/sh + +# +# dvipdft, completely rewtitten by Thomas Esser for teTeX after an +# original script by Mark A. Wicks +# +# Thomas Esser. Public Domain. +# + +# This script makes a first (fast) run with dvipdfm, then calls gs on +# the resulting pdf file to get the thumbnails and finally calls dvipdfm. + +test -f /bin/sh5 && test -z "$RUNNING_SH5" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; } +unset RUNNING_SH5 + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +# hack around a bug in zsh: +test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' + +progname=dvipdft +version=1111942378 # seconds since `00:00:00 1970-01-01 UTC' + # date '+%s' (with GNU date) + +help="Usage: $progname [options] dvifile + $progname --help + $progname --version" + +tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$ + +quoteit() +{ + echo "x$1" | sed "s@.@@; s@'@'\\\\''@; s@^@'@; s@\$@'@" +} + +# process args 1 to (n-1) and scan for a -o argument keep a properly +# quoted backup of the options, so that they can be restored later +unset s outfile +while test $# -gt 1; do + case $1 in + -o) outfile=$2;; + esac + s="$s${s+ }"`quoteit "$1"` + shift +done + +# check for last argument +case $1 in + --help) + echo "$help" + exit 0 + ;; + --version) + echo "$progname version $version by Thomas Esser" + exit 0 + ;; + "") + echo "$help" + exit 1 + ;; +esac + +# args 1 to (n-1) are gone, last one must be the dvifile +dvifile=$1 + +# outfile comes from -o argument, else it is derived from the input file +test -n "$outfile" \ + || outfile=`echo "$dvifile" | sed 's@.*/@@; s@\.dvi$@@; s@$@.pdf@'` + +# outBase is part of the thumbname files just as dvipdfm expects them: +outBase=`echo "$outfile" | sed 's@\.pdf$@@'` + +# restore args 1 to (n-1): +eval set x "$s"; shift + +# Run dvipdfm with the fastest options for the first pass +echo "$progname: running dvipdfm $@ -e -z0 $dvifile" >&2 +dvipdfm ${1+"$@"} -e -z0 "$dvifile" || { + echo "$progname: dvipdfm failed." >&2 + exit 1 +} + +# before we create the tmpdir, set trap for cleanup +trap ' + rm -rf $tmpdir + exit 1 +' 1 2 3 7 13 15 + +mkdir "$tmpdir" || { + echo "$progname: failed to create temp directory." >&2 + exit 1 +} + +# if outBase contains a /, we might need to create a directory +case $outBase in + */*) + fq=`echo "$tmpdir/$outBase" | sed 's@//@/@g; s@/[^/]*$@@'` + test -d "$fq" || mkdir -p "$fq" || { + echo "$progname: failed to create temp thumbnail directory." >&2 + rm -rf $tmpdir + exit 1 + } + ;; +esac + +# run gs +echo "$progname: running gs" >&2 +gs -r10 -dNOPAUSE -dBATCH -sDEVICE=png256 \ + -sOutputFile="$tmpdir/$outBase.%d" "$outfile" || { + echo "$progname: gs failed." >&2 + rm -rf $tmpdir + exit 1 +} + +# run dvipdfm with the users specified options for the last pass +echo "$progname: running dvipdfm -dt $@ $dvifile" >&2 +TMP=$tmpdir dvipdfm -dt ${1+"$@"} "$dvifile" || { + echo "$progname: dvipdfm failed." >&2 + rm -rf $tmpdir + exit 1 +} + +# nothing failed, so cleanup and report success to caller +rm -rf $tmpdir +exit 0 diff --git a/Master/bin/i386-solaris/dvipng b/Master/bin/i386-solaris/dvipng Binary files differnew file mode 100755 index 00000000000..e5aff86ef9f --- /dev/null +++ b/Master/bin/i386-solaris/dvipng diff --git a/Master/bin/i386-solaris/dvipos b/Master/bin/i386-solaris/dvipos Binary files differnew file mode 100755 index 00000000000..a6bc48e7361 --- /dev/null +++ b/Master/bin/i386-solaris/dvipos diff --git a/Master/bin/i386-solaris/dvips b/Master/bin/i386-solaris/dvips Binary files differnew file mode 100755 index 00000000000..04aff122b9c --- /dev/null +++ b/Master/bin/i386-solaris/dvips diff --git a/Master/bin/i386-solaris/dvired b/Master/bin/i386-solaris/dvired new file mode 100755 index 00000000000..4eb3586119d --- /dev/null +++ b/Master/bin/i386-solaris/dvired @@ -0,0 +1,98 @@ +#!/bin/sh +#============================================================================== +# Version: 0.3 +# Module: dvired +# Purpose: Translate dvi-file into postscript with reduced output size. +# Two logical pages will be put on onto each physical sheet of +# paper. +# System: Linux. UNIX(tm) systems may work as well :-) +# Requires: pstops (http://www.dcs.ed.ac.uk/home/ajcd/psutils/), dvips +# Created: 19.11.1992 +# Last Change: 13.08.1999 +# Language: sh +# Author: Thomas Esser +# Address: te@dbs.uni-hannover.de +# Copyright: (c) 1994, 1999 by Thomas Esser +# Copying: GNU GENERAL PUBLIC LICENSE +#============================================================================== + +test -f /bin/sh5 && test -z "$RUNNING_SH5" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; } +unset RUNNING_SH5 + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +help() +{ + cat <<eof + +Usage: dvired [options] file + +This programm behaves like dvips, execpt fot the fact that two logical +pages will be put on onto each physical sheet of paper. + +For options see dvips(1). This program only interprets the options +-o, -P and -f. All other options will directly be passed to dvips. + +If your paper is not in A4 format, you need to adjust the dimensions +in this program. + +Examples: (it is assumed that the PRINTER-variable is set) + dvired -Plw foo send output to printer lw + dvired -o foo.ps foo send output to file foo.ps + dvired -pp4-7 foo send 4 output-pages to printer + dvired foo -f | ghostview - preview output with ghostview +eof +} + +case $# in +0) help ; exit 1 ; ;; +esac + +# This will work for A4 paper. +paper=a4 ; pstopsopt='2:0(7.44mm,7.44mm)+1(7.44mm,-141.06mm)' + +# The following are *UNTESTED*. Please let me know whether they work +# or not, if you can test them. +#paper=a3 ; pstopsopt='2:0(7.44mm,7.44mm)+1(7.44mm,-202.56mm)' +#paper=letter ; pstopsopt='2:0(7.44mm,7.44mm)+1(7.44mm,-132.26mm)' +#paper=legal ; pstopsopt='2:0(7.44mm,7.44mm)+1(7.44mm,-170.36mm)' +#paper=ledger ; pstopsopt='2:0(7.44mm,7.44mm)+1(7.44mm,-132.26mm)' +#paper=tabloid ; pstopsopt='2:0(7.44mm,7.44mm)+1(7.44mm,-208.46mm)' + +of="" +lpr_opt="" + +case "$PRINTER" in +"") dvips_pre="" ;; +*) dvips_pre="-P$PRINTER" ;; +esac + +dvips_pre="$dvips_pre -t $paper -t landscape" + +while [ ! -z "$1" ] ; do + case $1 in + -P) of="" ; dvips_pre="$dvips_pre -P$2" ; lpr_opt="-P$2" + shift ;; + -P*) of="" ; dvips_pre="$dvips_pre $1" ; lpr_opt="$1" ;; + -o) of="$2" + shift ;; + -o*) of="`echo $1| sed 's/..//'`" ;; + -f) of="-" ;; + *) opt="$opt $1" + esac + shift +done + +case "$of" in +"") dvips -x707 $dvips_pre $opt -f | pstops -q $pstopsopt | lpr $lpr_opt + ;; +"-") dvips -x707 $dvips_pre $opt -f | pstops -q $pstopsopt + ;; +*) dvips -x707 $dvips_pre $opt -f | pstops -q $pstopsopt > "$of" + ;; +esac diff --git a/Master/bin/i386-solaris/dviselect b/Master/bin/i386-solaris/dviselect Binary files differnew file mode 100755 index 00000000000..d3ee8fcceaf --- /dev/null +++ b/Master/bin/i386-solaris/dviselect diff --git a/Master/bin/i386-solaris/dvitodvi b/Master/bin/i386-solaris/dvitodvi Binary files differnew file mode 100755 index 00000000000..f93e8f648a0 --- /dev/null +++ b/Master/bin/i386-solaris/dvitodvi diff --git a/Master/bin/i386-solaris/dvitomp b/Master/bin/i386-solaris/dvitomp Binary files differnew file mode 100755 index 00000000000..c651ec9aba4 --- /dev/null +++ b/Master/bin/i386-solaris/dvitomp diff --git a/Master/bin/i386-solaris/dvitype b/Master/bin/i386-solaris/dvitype Binary files differnew file mode 100755 index 00000000000..60aced6222f --- /dev/null +++ b/Master/bin/i386-solaris/dvitype diff --git a/Master/bin/i386-solaris/e2pall b/Master/bin/i386-solaris/e2pall new file mode 120000 index 00000000000..47465883225 --- /dev/null +++ b/Master/bin/i386-solaris/e2pall @@ -0,0 +1 @@ +../../texmf/scripts/tetex/e2pall.pl
\ No newline at end of file diff --git a/Master/bin/i386-solaris/ebb b/Master/bin/i386-solaris/ebb Binary files differnew file mode 100755 index 00000000000..cd08a6d6765 --- /dev/null +++ b/Master/bin/i386-solaris/ebb diff --git a/Master/bin/i386-solaris/ebong b/Master/bin/i386-solaris/ebong new file mode 100755 index 00000000000..08c642ff996 --- /dev/null +++ b/Master/bin/i386-solaris/ebong @@ -0,0 +1,391 @@ +#!/usr/bin/env python
+# look in newbong
+import sre
+A='A'
+B='B'
+S='S'
+s='s'
+F='F'
+X='X'
+
+NCLINE = 0
+global NCWORD,CWORD
+
+
+
+AKSAR={
+ 'k' :[B,'k'],
+ 'kh' :[B,'kh'],
+ 'g' :[B,'g'],
+ 'gh' :[B,'gh'],
+ 'ng' :[B,'NG'],
+
+ 'ch' :[B,'c'],
+ '^ch' :[B,'ch'],
+ 'j' :[B,'j'],
+ 'jh' :[B,'jh'],
+ '^y' :[B,'NJ'],
+ '_n' :[B,'NJ'],
+
+ 't' :[B,'T'],
+ '^th' :[B,'Th'],
+ 'd' :[B,'D'],
+ 'dh' :[B,'Dh'],
+ '^n' :[B,'N'],
+
+ '_t' :[B,'t'],
+ 'th' :[B,'th'],
+ '_d' :[B,'d'],
+ '_dh' :[B,'dh'],
+ 'n' :[B,'n'],
+
+
+ 'p' :[B,'p'],
+ 'ph' :[B,'ph'],
+ 'f' :[B,'ph'],
+ 'b' :[B,'b'],
+ 'bh' :[B,'bh'],
+ 'v' :[B,'bh'],
+ 'm' :[B,'m'],
+ 'M' :[F,'M'],
+
+
+ '^j' :[B,'J'],
+ 'J' :[B,'J'],
+ 'r' :[B,'r'],
+ 'R' :[F,'R'],
+ 'l' :[B,'l'],
+ 'L' :[F,'L'],
+ 'W' :[F,'W'],
+ 'V' :[F,'W'],
+ 'h' :[B,'H'],
+ 'kk' :[B,'kK'],
+ 'kkm' :[B,'kK/N'],
+
+ 'sh' :[B,'sh'],
+ '^s' :[B,'Sh'],
+ '^sh' :[B,'Sh'],
+ 's' :[B,'s'],
+
+ '^r' :[B,'rh'],
+ '^rh' :[B,'rhh'],
+ 'y' :[B,'y'],
+ 'Y' :[F,'Y'],
+ 'JY' :[F,'Y'],
+ '__t' :[B,'t//'],
+ '^ng' :[B,'NNG'],
+ ':h' :[B,'h'],
+ '^' :[F,'NN'],
+ '_' :[F,':/'],
+
+
+
+ 'A' :[S,'A'],
+ 'AA' :[S,'Aa'],
+ 'I' :[S,'I'],
+ 'II' :[S,'II'],
+ 'U' :[S,'U'],
+ 'UU' :[S,'UU'],
+ 'RI' :[S,'RR'],
+ 'E' :[S,'E'],
+ 'OI' :[S,'OI'],
+ 'O' :[S,'O'],
+ 'OU' :[S,'OU'],
+
+
+ 'a' :[X,'o',1],
+ 'aa' :[s,'a',1],
+ 'i' :[s,'i',-1],
+ 'ii' :[s,'ii',1],
+ 'u' :[s,'u',1],
+ 'uu' :[s,'uu',1],
+ 'RII' :[s,'rR',1],
+ 'e' :[s,'e',-1],
+ 'oi' :[s,'oi',-2],
+ 'oo' :[s,'oo',11],
+ 'o' :[X,'o',1],
+ 'ou' :[s,'ou',12],
+
+ '.' :[F,'.'],
+ '..' :[F,'..'],
+ '...' :[F,'...'],
+ '|' :[F,'|'],
+
+
+ '~' :[F,'~'],
+ '`' :[F,'`'],
+ '!' :[F,'!'],
+ '1' :[F,'1'],
+ '2' :[F,'2'],
+ 'at' :[F,'@'],
+ '#' :[F,'#'],
+ '3' :[F,'3'],
+ '$' :[F,'$'],
+ '4' :[F,'4'],
+ '%' :[F,'%'],
+ '5' :[F,'5'],
+ '6' :[F,'6'],
+ '&' :[F,'&'],
+ '7' :[F,'7'],
+ '*' :[F,'*'],
+ '8' :[F,'8'],
+ '(' :[F,'('],
+ '9' :[F,'9'],
+ ')' :[F,')'],
+ '0' :[F,'0'],
+ 'dash' :[F,'-'],
+ '+' :[F,'+'],
+ '=' :[F,'='],
+ '|' :[F,'|'],
+ '{' :[F,'{'],
+ '[' :[F,'['],
+ '}' :[F,'}'],
+ ']' :[F,']'],
+ ':' :[F,':'],
+ ';' :[F,';'],
+ '"' :[F,'"'],
+ "'" :[F,"'"],
+ '<' :[F,'<'],
+ ',' :[F,','],
+ '>' :[F,'>'],
+ '.' :[F,'.'],
+ '?' :[F,'?'],
+ '/' :[F,'/']}
+
+
+
+
+
+
+
+
+CATCODES = {'SS' :[S,'','','',1],
+ 'SB' :[B,'','','',1],
+ 'BS' :[S,'','','',1],
+ 'BB' :[B,'','/','',1],
+ 'BF' :[F,'','','',1],
+ 'Bs1' :[S,'','','',1],
+ 'Bs-1':[S,'\*','','*',1],
+ 'Bs-2':[S,'\*','','*{oi}',0],
+ 'Bs11':[S,'\*','','*ea',0],
+ 'Bs12':[S,'\*','','*eou',0],
+ 'Fs1' :[S,'','','',1],
+ 'Fs-1':[S,'\*','','*',1],
+ 'Fs-2':[S,'\*','','*{oi}',0],
+ 'Fs11':[S,'\*','','*ea',0],
+ 'Fs12':[S,'\*','','*eou',0],
+ 'FF' :[F,'','','',1],
+ 'AX' :[F,'','','',1]}
+
+
+def blocked(line):
+ #print '@ blocked', line , '->',
+ m = sre.findall('@[^@]+@',line)
+ outline = line
+ if not m :
+ #print outline
+ return(outline)
+ else:
+ for i in range(len(m)):
+ s=m[i][:-1].replace(' ','%X%')
+ outline = outline.replace(m[i],s,1)
+ #print outline
+ return(outline)
+
+def unblock(line):
+ #print '@unblock', line, '->',
+ m = sre.findall('@[^\s]+',line)
+ outline = line
+ if not m :
+ #print outline
+ return(outline)
+ else:
+ for i in range(len(m)):
+ s=m[i].replace('@','').replace('%X%',' ')
+ outline = outline.replace(m[i],s)
+ #print outline
+ return(outline)
+
+
+def printamp(line):
+ #print '@unblock', line, '->',
+ m = sre.findall('#AT',line)
+ outline = line
+ if not m :
+ #print outline
+ return(outline)
+ else:
+ for i in range(len(m)):
+ outline = outline.replace('#AT','@')
+ #print outline
+ return(outline)
+
+def readsyll(syll):
+ syllparts=[]
+ start = 0; end = len(syll)
+ while syll[start : end]:
+ slice = syll[start : end]
+ #print slice
+ if AKSAR.has_key(slice):
+ syllparts.append(AKSAR[slice])
+ start = start + len(slice)
+ end = len(syll)
+ else :
+ end = end -1
+ return(syllparts)
+
+def fuse(list1,list2):
+ global CCATCODE
+ #print list1,list2
+ Type1 = list1[0]
+ Type2 = list2[0]
+
+ if Type2 == s:
+ Type3 = str(list2[2])
+ elif Type2 == X:
+ Type1=A
+ Type3=''
+ else:
+ Type3 =''
+
+
+
+
+ Type = Type1+Type2+Type3
+
+ #print 'Type:', Type
+
+ try:
+ CATCODE = CATCODES[Type]
+ TARGET = CATCODE[0]
+ PREFIX = CATCODE[1]
+ MIDFIX = CATCODE[2]
+ POSTFIX = CATCODE[3]
+ FLAG = CATCODE[4]
+
+ #print 'TGT:', TARGET, PREFIX,MIDFIX,POSTFIX,FLAG
+ #print 'RAWC', AKSAR[list1[1]][1],AKSAR[list2[1]][1]
+
+ c1=list1[1]
+ c2=list2[1]
+
+ if FLAG == 1 :
+ c = PREFIX + c1 + MIDFIX + POSTFIX + c2
+ else :
+ c = PREFIX + c1 + MIDFIX + POSTFIX
+
+ fused = [TARGET,c]
+ #print CATCODE
+ return(fused)
+ except KeyError:
+ print '\n ERROR AT LINE:', NCLINE, 'WORD:',NCWORD, '(',CWORD,')'
+ return(['ERROR','UNKNOWN CATCODE'])
+
+
+
+
+
+def fuseatoms(syll):
+ slist=readsyll(syll);
+ #print slist
+ lslist=len(slist);
+ l0=slist[0];
+ for i in range(1,lslist):
+ nextitem = slist[i]
+ l0=fuse(l0,nextitem)
+
+ return(l0[1])
+
+def fuseword(wrd):
+ if wrd[0] == '@' :
+ return(wrd)
+ syllables = wrd.split('-')
+ w0=''
+ for eachsyll in syllables:
+ syll=eachsyll
+ thesyll = fuseatoms(syll)
+ w0 = w0 + thesyll
+ #print 'FUSED WORD',w0
+ return(w0)
+
+
+def fuseline(line):
+ global NCWORD,CWORD
+ NCWORD = 0
+ #line = blocked(line)
+ words = line.split()
+ l0=''
+ for eachword in words:
+ NCWORD=NCWORD+1
+ word = eachword
+ CWORD=word
+ theword=fuseword(word)
+ #print 'XX',theword
+ l0=l0+' '+theword
+ #print 'FUSED LINE', l0
+ return(l0)
+
+
+# The main program
+import sys
+OK=1
+finnam = sys.argv[1]
+foutnam = finnam.split('.')[0] + '.' + 'tex'
+
+fin = file(finnam,'rt')
+fout = file(foutnam,'wt')
+
+textin = fin.readlines()
+nlines = len(textin)
+
+
+textout = []
+
+fin.close()
+
+for eachline in textin:
+ NCLINE = NCLINE+1
+ if eachline[0] == '#' :
+ lineout = eachline[1:]
+ elif eachline[0] == '\\' :
+ lineout = eachline
+ elif eachline == '\n':
+ lineout = eachline
+ else :
+ line1 = eachline.strip()
+ line2 = blocked(line1)
+ lineout = fuseline(line2) + '\n'
+ lineout = lineout[1:]
+ #print ':::', lineout
+ if lineout.find('UNKNOWN CATCODE') == -1 :
+ lineout = unblock(lineout)
+ #print ':::', lineout
+ textout.append(printamp(lineout))
+ else :
+ OK = 0
+ fout.close()
+
+
+
+
+
+
+
+
+
+if OK == 1:
+ fout.writelines(textout)
+ fout.close()
+ print 'done'
+else:
+ print 'Unknown CATCODE, Fix The errors and try again'
+
+
+
+
+
+
+
+
+
+
diff --git a/Master/bin/i386-solaris/eplain b/Master/bin/i386-solaris/eplain new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/eplain @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/epsffit b/Master/bin/i386-solaris/epsffit Binary files differnew file mode 100755 index 00000000000..003d84ff867 --- /dev/null +++ b/Master/bin/i386-solaris/epsffit diff --git a/Master/bin/i386-solaris/epstopdf b/Master/bin/i386-solaris/epstopdf new file mode 120000 index 00000000000..3287ed667d6 --- /dev/null +++ b/Master/bin/i386-solaris/epstopdf @@ -0,0 +1 @@ +../../texmf/scripts/epstopdf/epstopdf.pl
\ No newline at end of file diff --git a/Master/bin/i386-solaris/etex b/Master/bin/i386-solaris/etex new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/etex @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/exatools b/Master/bin/i386-solaris/exatools new file mode 100755 index 00000000000..50ff0f07e46 --- /dev/null +++ b/Master/bin/i386-solaris/exatools @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart exatools.rb "$@" diff --git a/Master/bin/i386-solaris/extconv b/Master/bin/i386-solaris/extconv Binary files differnew file mode 100755 index 00000000000..b656e49a750 --- /dev/null +++ b/Master/bin/i386-solaris/extconv diff --git a/Master/bin/i386-solaris/extractres b/Master/bin/i386-solaris/extractres new file mode 100755 index 00000000000..c54056461a2 --- /dev/null +++ b/Master/bin/i386-solaris/extractres @@ -0,0 +1,96 @@ +#!/usr/bin/env perl +# extractres: extract resources from PostScript file +# +# Copyright (C) Angus J. C. Duggan 1991-1995 +# See file LICENSE for details. + +$prog = ($0 =~ s=.*/==); + +%resources = (); # list of resources included +%merge = (); # list of resources extracted this time +%extn = ("font", ".pfa", "file", ".ps", "procset", ".ps", # resource extns + "pattern", ".pat", "form", ".frm", "encoding", ".enc"); +%type = ("%%BeginFile:", "file", "%%BeginProcSet:", "procset", + "%%BeginFont:", "font"); # resource types + +while (@ARGV) { + $_ = shift; + if (/^-m(erge)?$/) { $merge = 1; } + elsif (/^-/) { + print STDERR "Usage: $prog [-merge] [file]\n"; + exit 1; + } else { + unshift(@ARGV, $_); + last; + } +} + +if (defined($ENV{TMPDIR})) { # set body file name + $body = "$ENV{TMPDIR}/body$$.ps"; +} else { + $body = "body$$.ps"; +} + +open(BODY, $body) && die "Temporary file $body already exists"; +open(BODY, ">$body") || die "Can't write file $body"; + +sub filename { # make filename for resource in @_ + local($name); + foreach (@_) { # sanitise name + s/[!()\$\#*&\\\|\`\'\"\~\{\}\[\]\<\>\?]//g; + $name .= $_; + } + $name =~ s@.*/@@; # drop directories + die "Filename not found for resource ", join(" ", @_), "\n" + if $name =~ /^$/; + $name; +} + +$output = STDOUT; # start writing header out +while (<>) { + if (/^%%BeginResource:/ || /^%%BeginFont:/ || /^%%BeginProcSet:/) { + local($comment, @res) = split(/\s+/); # look at resource type + local($type) = defined($type{$comment}) ? $type{$comment} : shift(@res); + local($name) = &filename(@res, $extn{$type}); # make file name + $saveout = $output; + if (!$resources{$name}) { + print "%%IncludeResource: $type ", join(" ", @res), "\n"; + if (!open(RES, $name)) { + open(RES, ">$name") || die "Can't write file $name"; + $resources{$name} = $name; + $merge{$name} = $merge; + $output = RES; + } else { # resource already exists + close(RES); + undef $output; + } + } elsif ($merge{$name}) { + open(RES, ">>$name") || die "Can't append to file $name"; + $output = RES; + } else { # resource already included + undef $output; + } + } elsif (/^%%EndResource/ || /^%%EndFont/ || /^%%EndProcSet/) { + if (defined $output) { + print $output $_; + close($output); + } + $output = $saveout; + next; + } elsif ((/^%%EndProlog/ || /^%%BeginSetup/ || /^%%Page:/)) { + $output = BODY; + } + print $output $_ + if defined $output; +} + +close(BODY); # close body output file + +open(BODY, $body); # reopen body for input +while (<BODY>) { # print it all + print $_; +} +close(BODY); + +unlink($body); # dispose of body file + diff --git a/Master/bin/i386-solaris/fixdlsrps b/Master/bin/i386-solaris/fixdlsrps new file mode 100755 index 00000000000..2a1d85a654c --- /dev/null +++ b/Master/bin/i386-solaris/fixdlsrps @@ -0,0 +1,54 @@ +#!/usr/bin/env perl +# fixdlsrps: fix DviLaser/PS document to work with PSUtils +# +# Copyright (C) Angus J. C. Duggan 1991-1995 +# See file LICENSE for details. + +$nesting = 0; +$page = 1; +$infont = 0; + +@fonts = (); +@body = (); +$header = 1; + +while (<>) { + if (/^XP/) { + $infont++; + push(@fonts, $_); + $infont-- if /PXL.*RP/ || /DN?F.*RP/; + } elsif ($infont) { + push(@fonts, $_); + $infont-- if /PXL.*RP/ || /DN?F.*RP/; + } elsif ((/^%%EndSetup/ || /^%%Page:/) && $header) { + print @body; + @body = ("%%EndSetup\n"); + $header = 0; + } elsif (/^%%EndProlog/ && !$nesting) { + push(@body, + "\$DviLaser begin/GlobalMode{}bdef/LocalMode{}bdef/XP{}def/RP{}def", + "/DoInitialScaling{72.0 Resolution div dup scale}bdef end\n", $_); + } elsif (/^%%BeginPageSetup/ && !$nesting) { + push(@body, "%%Page: $page $page\n", $_, + "Resolution 72 div dup scale Magnification 1000 div dup scale\n", + "/DocumentInitState where {\n", + "/DocumentInitState [ matrix currentmatrix currentlinewidth", + " currentlinecap currentlinejoin currentdash currentgray", + " currentmiterlimit] cvx put}if\n"); + $page++; + } elsif (/^%%BeginDocument:/ || /^%%BeginBinary:/ || /^%%BeginFile:/) { + push(@body, $_); + $nesting++; + } elsif (/^%%EndDocument/ || /^%%EndBinary/ || /^%%EndFile/) { + push(@body, $_); + $nesting--; + } elsif (!/^%%PageBoundingBox:/ && !/^%%Page:/) { + push(@body, $_); + } +} + +print @fonts; +print @body; + +exit 0; + diff --git a/Master/bin/i386-solaris/fixfmps b/Master/bin/i386-solaris/fixfmps new file mode 100755 index 00000000000..039ac8e5a3e --- /dev/null +++ b/Master/bin/i386-solaris/fixfmps @@ -0,0 +1,21 @@ +#!/usr/bin/env perl +# fixfmps: get conforming PostScript out of FrameMaker version 2 file +# move all FMDEFINEFONTs to start of pages +# +# Copyright (C) Angus J. C. Duggan 1991-1995 +# See file LICENSE for details. + +%fonts=(); + +while (<>) { + if (/^([0-9]+) [0-9]+ .* FMDEFINEFONT$/) { + $fonts{$1} = $_; + } elsif (/^[0-9.]+ [0-9.]+ [0-9]+ FMBEGINPAGE$/) { + print $_, join('',values(%fonts)); + } elsif (m%(.*/PageSize \[paperwidth paperheight\]put )setpagedevice(.*)%) { + print "$1pop$2\n"; + } else { + print $_; + } +} + diff --git a/Master/bin/i386-solaris/fixmacps b/Master/bin/i386-solaris/fixmacps new file mode 100755 index 00000000000..f4cfdb10a9e --- /dev/null +++ b/Master/bin/i386-solaris/fixmacps @@ -0,0 +1,95 @@ +#!/usr/bin/env perl +# fixmacps: swap to sanitised appledict +# +# Copyright (C) Angus J. C. Duggan 1991-1995 +# See file LICENSE for details. + +$line = 0; # keep line count +$predir = `kpsewhich -progname=psutils md71_0.ps`; +$dir=`basename $predir`; +$prefix = "md"; +$default = "md71_0.ps"; + +while ($_ = shift(@ARGV)) { + if (/^-d(ir)?$/) { $dir = shift(@ARGV); } + elsif (/^-n(ame)?$/) { $prefix = shift(@ARGV); } + else { + unshift(@ARGV, $_); + last; + } +} + +%fonts = (); +$nesting = 0; + +while (<>) { + if (/^%!/) { + if (! $line) { + print; + } + } elsif (/^%%(Begin|Include)ProcSet: "?\(AppleDict md\)"? ([0-9]+) ([0-9]+)$/) { + local($inc, $mdv, $mdr) = ($1, $2, $3); + if (open(SANE, "<$dir/$prefix${mdv}_$mdr.ps") || + open(SANE, "<$dir/$default")) { + $sane = <SANE>; + local($snv, $snr) = + $sane =~ /^%%BeginProcSet: \(AppleDict md\) ([0-9]+) ([0-9]+)$/; + if ($mdv == $snv && $mdr == $snr) { + if ( $inc eq "Include" ) { + print STDERR "Inserting ProcSet \"(AppleDict md)\" $snv $snr\n"; + print $sane; + while(<SANE>) { + print; + } + close(SANE); + } + else { + print STDERR "Substituting ProcSet \"(AppleDict md)\" $snv $snr\n"; + $ignore = 1; + } + } else { + print STDERR "Unrecognised AppleDict version $mdv $mdr\n"; + print "%!\n" if !$line; + print; + } + } else { + print STDERR "Can't find sanitised AppleDict\n"; + print "%!\n" if !$line; + print; + } + } elsif (/^%%EndProcSet/) { + if ($ignore) { + $ignore = 0; + print "%!\n" if !$line; + print $sane; + while(<SANE>) { + print; + } + close(SANE); + } else { + print "%!\n" if !$line; + print; + } + } elsif (/^%%Page:/ && $nesting == 0) { + print $_; + print values(%fonts); + } elsif (/^%%BeginDocument/ || /^%%BeginBinary/ || /^%%BeginFile/) { + print $_; + $nesting++; + } elsif (/^%%EndDocument/ || /^%%EndBinary/ || /^%%EndFile/) { + print $_; + $nesting--; + } else { + if (! $ignore) { + if (/^\{\}mark .*rf$/) { + $fonts{$_} = $_; + print; + } else { + print "%!\n" if !$line; + print; + } + } + } + $line++; +} + diff --git a/Master/bin/i386-solaris/fixpsditps b/Master/bin/i386-solaris/fixpsditps new file mode 100755 index 00000000000..2a1728a8204 --- /dev/null +++ b/Master/bin/i386-solaris/fixpsditps @@ -0,0 +1,25 @@ +#!/usr/bin/env perl +# fixpsditps: fix psdit output for use in psutils +# +# Copyright (C) Angus J. C. Duggan 1991-1995 +# See file LICENSE for details. + +$nesting = 0; + +while (<>) { + if (/^\/p{pop showpage pagesave restore \/pagesave save def}def$/) { + print "/p{pop showpage pagesave restore}def\n"; + } elsif (/^%%BeginDocument/ || /^%%BeginBinary/ || /^%%BeginFile/ ) { + print $_; + $nesting++; + } elsif (/^%%EndDocument/ || /^%%EndBinary/ || /^%%EndFile/) { + print $_; + $nesting--; + } elsif (/^%%Page:/ && $nesting == 0) { + print $_; + print "xi\n"; + } elsif (! /^xi$/) { + print $_; + } +} + diff --git a/Master/bin/i386-solaris/fixpspps b/Master/bin/i386-solaris/fixpspps new file mode 100755 index 00000000000..77bba66d6b7 --- /dev/null +++ b/Master/bin/i386-solaris/fixpspps @@ -0,0 +1,58 @@ +#!/usr/bin/env perl +# mangle PostScript produced by PSPrint to make it almost conforming +# +# Copyright (C) Angus J. C. Duggan 1991-1995 +# See file LICENSE for details. + +$header = 1; $ignore = 0; +$verbose = 0; +@body = (); +%fonts = (); $font = ""; +$inchar = 0; @char = (); + +while (<>) { + if (/^\@end$/) { + $ignore = 1; + } elsif (/^[0-9]+ \@bop0$/) { + $ignore = 0; + $header = 1; + } elsif ($header) { + if (/^\/([a-z.0-9]+) \@newfont$/) { + if (! defined($fonts{$1})) { + $fonts{$1} = 1; + print; + } elsif ($verbose) { + print STDERR "$font already defined\n"; + } + } elsif (/^([a-z.0-9]+) sf$/) { + $font = $1; + print; + } elsif (/^\[</) { + $inchar = 1; + push (@char, $_); + } elsif ($inchar) { + push (@char, $_); + if (/.*\] ([0-9]+) dc$/) { + if (! defined($fonts{$font,$1})) { + $fonts{$font,$1} = 1; + print (@char); + } elsif ($verbose) { + print STDERR "$font character $1 already defined\n"; + } + $inchar = 0; + @char = (); + } + } elsif (/^([0-9]+) \@bop1$/) { + $header = 0; + push (@body, "%%Page: ? $1\n"); + push (@body, $_); + } else { + print; + } + } elsif (! $ignore) { + push (@body, $_); + } +} +print (@body); +print ("\@end\n"); + diff --git a/Master/bin/i386-solaris/fixscribeps b/Master/bin/i386-solaris/fixscribeps new file mode 100755 index 00000000000..bd4e9a0e3e0 --- /dev/null +++ b/Master/bin/i386-solaris/fixscribeps @@ -0,0 +1,19 @@ +#!/usr/bin/env perl +# fixscribeps: get conforming PostScript out of Scribe +# +# Copyright (C) Angus J. C. Duggan 1991-1995 +# See file LICENSE for details. + +$inepsf = 0; +$epsfn = 0; +while (<>) { + if (/^([0-9]+ [0-9]+ [0-9]+ PB) (%!.*)/) { + print "$1\n%%BeginDocument: Scribe-EPSF $epsfn 0\n$2\n"; + $inepsf++; + } elsif (/^ PE/ && $inepsf) { + print "%%EndDocument\n", $_; + } else { + print $_; + } +} + diff --git a/Master/bin/i386-solaris/fixtpps b/Master/bin/i386-solaris/fixtpps new file mode 100755 index 00000000000..4239bb9dfc5 --- /dev/null +++ b/Master/bin/i386-solaris/fixtpps @@ -0,0 +1,28 @@ +#!/usr/bin/env perl +# fixtpps: fix tpscript document to work with PSUtils +# +# Copyright (C) Angus J. C. Duggan 1991-1995 +# See file LICENSE for details. + +$nesting = 0; +$header = 1; + +while (<>) { + if (/^%%Page:/ && $nesting == 0) { + print $_; + print "save home\n"; + $header = 0; + } elsif (/^%%BeginDocument/ || /^%%BeginBinary/ || /^%%BeginFile/) { + print $_; + $nesting++; + } elsif (/^%%EndDocument/ || /^%%EndBinary/ || /^%%EndFile/) { + print $_; + $nesting--; + } elsif (/save home/) { + s/save home//; + print $_; + } elsif (!$header || (! /^save$/ && ! /^home$/)) { + print $_; + } +} + diff --git a/Master/bin/i386-solaris/fixwfwps b/Master/bin/i386-solaris/fixwfwps new file mode 100755 index 00000000000..92d88443fe1 --- /dev/null +++ b/Master/bin/i386-solaris/fixwfwps @@ -0,0 +1,33 @@ +#!/usr/bin/env perl +# fixwfwps: fix Word for windows PostScript for printing. +# +# Copyright (C) Angus J. C. Duggan 1991-1995 +# See file LICENSE for details. + +$nesting = 0; +while (<>) { + tr/\000-\010\012-\014\016-\037//d; + foreach (grep($_ ne "", split("\015"))) { + s!/SVDoc\s+save\s+def!!g; + s!SVDoc\s+restore!!g; + if (/^(%!PS-Adobe-\d*\.\d*) EPSF-/ && !$nesting) { + print "$1\n"; + $wfwepsf = 1; + } elsif (/^SS\s*$/ && $wfwepsf) { + print "%%Page: $wfwepsf $wfwepsf\n"; + $wfwepsf++; + print "$_\n"; + } elsif (/^%MSEPS Preamble/) { + print "%%BeginDocument: (Included EPSF)\n"; + print "$_\n"; + $nesting++; + } elsif (/^%MSEPS Trailer/) { + $nesting--; + print "$_\n"; + print "%%EndDocument\n"; + } elsif (! /^%%BoundingBox/) { + print "$_\n"; + } + } +} + diff --git a/Master/bin/i386-solaris/fixwpps b/Master/bin/i386-solaris/fixwpps new file mode 100755 index 00000000000..83a5fdfaf0b --- /dev/null +++ b/Master/bin/i386-solaris/fixwpps @@ -0,0 +1,31 @@ +#!/usr/bin/env perl +# fixwpps: get semi-conforming PostScript out of WordPerfect 5.0 file +# +# Copyright (C) Angus J. C. Duggan 1991-1995 +# See file LICENSE for details. + +$page = 1; +$nesting = 0; + +while (<>) { + s/([^\/]_t)([0-9]+)/\1 \2/g; # fix wp 5.0 bug + if (m!/_[be][dp]! || m!_bp \d+ \d+ roll!) { + print $_; + } elsif (/^(.*)(_bp.*)$/) { + print "$1\n" if $1 ne ""; + print "%%Page: $page $page\n"; + print "$2\n"; + $page++; + $nesting++; + } elsif (/_ep$/) { + print $_; + $nesting--; + } elsif (/^(.*)(_ed.*)/) { + print "$1\n" if $1 ne ""; + print "%%Trailer:\n"; + print "$2\n"; + } else { + print $_; + } +} + diff --git a/Master/bin/i386-solaris/fixwwps b/Master/bin/i386-solaris/fixwwps new file mode 100755 index 00000000000..bfd58c086da --- /dev/null +++ b/Master/bin/i386-solaris/fixwwps @@ -0,0 +1,20 @@ +#!/usr/bin/env perl +# fixwwps: get semi-conforming PostScript out of Windows Write file +# +# Copyright (C) Angus J. C. Duggan 1991-1995 +# See file LICENSE for details. + +$page = 1; + +while (<>) { + if (/^(%!.*) EPSF-\d.\d/) { + print $1, "\n"; + } elsif (/^SS/) { + print "%%Page: $page $page\n"; + print $_; + $page++; + } else { + print $_; + } +} + diff --git a/Master/bin/i386-solaris/fmtutil b/Master/bin/i386-solaris/fmtutil new file mode 100755 index 00000000000..8f35dfdec0f --- /dev/null +++ b/Master/bin/i386-solaris/fmtutil @@ -0,0 +1,901 @@ +#!/bin/sh + +############################################################################### +# fmtutil: utility to maintain format files. +# +# Thomas Esser, public domain. +# +# Commands: +# --all recreate all format files +# --missing create all missing format files +# --refresh recreate only existing format files +# --byfmt formatname (re)create format for `formatname' +# --byhyphen hyphenfile (re)create formats that depend on `hyphenfile' +# --enablefmt formatname enable formatname in config file +# --disablefmt formatname disable formatname in config file +# --listcfg list (enabled and disabled) configurations, +# filtered to available formats +# --catcfg output the content of the config file +# --showhyphen formatname print name of hyphenfile for format `formatname' +# --edit edit fmtutil.cnf file +# --version show version info +# --help show this message +# +# Options: +# --cnffile file set configfile for fmtutil +# --fmtdir directory set destination directory for format files +# --no-engine-subdir don't use $engine subdirectory of the fmtdir +############################################################################### + +############################################################################### +# program history: +# further changes in texk/tetex/ChangeLog. +# 2007-01-04 patch by JK to support $engine subdir (enabled by default) +# Fr Apr 8 19:15:05 CEST 2005 cleanup now has an argument for the return code +# Do Mar 02 10:42:31 CET 2006 add tmpdir to TEXFORMATS +# So Mär 27 18:52:06 CEST 2005 honor $TMPDIR, $TEMP and $TMP, not just $TMP +# Sa Jan 15 18:13:46 CET 2005 avoid multiple variable assignments in one statement +# Di Jan 11 11:42:36 CET 2005 fix --byhyphen with relative hyphenfile +# Fr Dez 31 16:51:29 CET 2004 option catcfg added (for being called by texconfig) +# Do Dez 30 21:53:27 CET 2004 rename variable verbose to verboseFlag +# Sa Dez 25 12:44:23 CET 2004 implementation adopted for teTeX-3.0 (tcfmgr) +# Do Okt 28 11:09:36 CEST 2004 added --refresh +# Fr Sep 17 19:25:28 CEST 2004 save $0 in a variable before calling a function +# Sun May 9 23:24:06 CEST 2004 changes for new web2c: format names +# are now *.fmt, nothing else, disable +# "plain" symlinks +# Thu May 6 14:16:19 CEST 2004: "mv ...</dev/null" to avoid interaction. +# Sun Mar 21 19:44:36 CET 2004: support aleph +# Thu Dec 25 22:11:53 CET 2003: add version string +# Thu Dec 25 12:56:14 CET 2003: new listcfg_loop lists only supported formats +# Sun Dec 21 10:25:37 CET 2003 "mktexfmt pdflatex" did not work (if called +# as mktexfmt, an extention was mandatory) +# Mon Sep 15 13:07:31 CEST 2003 add tmpdir to TEXINPUTS +# Sun Aug 3 11:09:46 CEST 2003 special case for mptopdf +# Sun Apr 20 10:27:09 CEST 2003 allow " " as well as tab in config file +# Wed Feb 19 21:14:52 CET 2003 add eomega support +# Sat Feb 15 22:01:35 CET 2003 let mf-nowin work without mf +# Wed Dec 25 09:47:44 CET 2002 bugfix for localized pool files +# Fri Oct 25 02:29:06 CEST 2002: now more careful about find_hyphenfile() +# Tue Oct 22 22:46:48 CEST 2002: -jobname, oft extension +# Fri Oct 4 22:33:17 CEST 2002: add more cli stuff: enablefmt +# disablefmt listcfg +# Sun Jul 7 21:28:37 CEST 2002: look at log file for possible problems, +# and issue a warning +# Tue Jun 4 21:52:57 CEST 2002: trap / cleanup code from updmap +# Tue Jun 4 19:32:44 CEST 2002: be smarter about stdout / stderr +# Tue Apr 9 22:46:34 CEST 2002: pass -progname=mpost for metafun +# Tue Apr 2 00:37:39 CEST 2002: added mktexfmt functionality +# Tue Jun 5 14:45:57 CEST 2001: added support for mf / mpost +############################################################################### + +test -f /bin/ksh && test -z "$RUNNING_KSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; } +unset RUNNING_KSH + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +# hack around a bug in zsh: +test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' + +progname=fmtutil +argv0=$0 +version=1205513038 # seconds since `00:00:00 1970-01-01 UTC' + # date '+%s' (with GNU date) + +cnf=fmtutil.cnf # name of the config file +export PATH + +############################################################################### +# cleanup() +# clean up the temp area and exit with proper exit status +############################################################################### +cleanup() +{ + rc=$1 + # for debugging, exit $rc here so $tmpdir with its logs sticks around. + $needsCleanup && test -n "$tmpdir" && test -d "$tmpdir" \ + && { cd / && rm -rf "$tmpdir"; } + (exit $rc); exit $rc +} + +############################################################################### +# setupTmpDir() +# set up a temp directory and a trap to remove it +############################################################################### +setupTmpDir() +{ + $needsCleanup && return + + trap 'cleanup 1' 1 2 3 7 13 15 + needsCleanup=true + (umask 077; mkdir "$tmpdir") \ + || abort "could not create directory \`$tmpdir'" +} + +############################################################################### +# configReplace(file, pattern, line) +# The first line in file that matches pattern gets replaced by line. +# line will be added at the end of the file if pattern does not match. +############################################################################### +configReplace() +{ + file=$1; pat=$2; line=$3 + + if grep "$pat" "$file" >/dev/null; then + ed "$file" >/dev/null 2>&1 <<-eof + /$pat/ + c + $line + . + w + q +eof + else + echo "$line" >> $file + fi +} + +############################################################################### +# setmatch(match) +# setting the "match state" to true or false. Used to see if there was at +# least one match. +############################################################################### +setmatch() +{ + match=$1 +} + +############################################################################### +# getmatch() +# return success if there was at least one match. +############################################################################### +getmatch() +{ + test "x$match" = xtrue +} + +############################################################################### +# initTexmfMain() +# get $MT_TEXMFMAIN from $TEXMFMAIN +############################################################################### +initTexmfMain() +{ + case $MT_TEXMFMAIN in + "") MT_TEXMFMAIN=`kpsewhich --var-value=TEXMFMAIN`;; + esac + export MT_TEXMFMAIN +} + +############################################################################### +# cache_vars() +# locate files / kpathsea variables and export variables to environment +# this speeds up future calls to e.g. mktexupd +############################################################################### +cache_vars() +{ + : ${MT_VARTEXFONTS=`kpsewhich --expand-var='$VARTEXFONTS' | sed 's%^!!%%'`} + : ${MT_MKTEXNAM=`kpsewhich --format='web2c files' mktexnam`} + : ${MT_MKTEXNAM_OPT=`kpsewhich --format='web2c files' mktexnam.opt`} + : ${MT_MKTEXDIR=`kpsewhich --format='web2c files' mktexdir`} + : ${MT_MKTEXDIR_OPT=`kpsewhich --format='web2c files' mktexdir.opt`} + : ${MT_MKTEXUPD=`kpsewhich --format='web2c files' mktexupd`} + : ${MT_MKTEX_CNF=`kpsewhich --format='web2c files' mktex.cnf`} + : ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} + export MT_VARTEXFONTS MT_MKTEXNAM MT_MKTEXNAM_OPT MT_MKTEXDIR + export MT_MKTEXDIR_OPT MT_MKTEXUPD MT_MKTEX_CNF MT_MKTEX_OPT +} + +############################################################################### +# help() +# display help message and exit +############################################################################### +help() +{ + cat <<'eof' +Usage: fmtutil [option] ... cmd [argument] + +Valid options: + --cnffile file + --fmtdir directory + --no-engine-subdir don't use engine-specific subdir of the fmtdir + --quiet (not implemented, just for compatibility) + --test (not implemented, just for compatibility) + --dolinks (not implemented, just for compatibility) + --force (not implemented, just for compatibility) + +Valid commands: + --all recreate all format files + --missing create all missing format files + --refresh recreate only existing format files + --byfmt formatname (re)create format for `formatname' + --byhyphen hyphenfile (re)create formats that depend on `hyphenfile' + --enablefmt formatname enable formatname in config file + --disablefmt formatname disable formatname in config file + --listcfg list (enabled and disabled) configurations, + filtered to available formats + --catcfg output the content of the config file + --showhyphen formatname print name of hyphenfile for format `formatname' + --edit edit fmtutil.cnf file + --version show version info + --help show this message +eof + cleanup 0 +} + +version() +{ + cat <<eof +$progname version $version. +eof + cleanup 0 +} + +############################################################################### +# abort(errmsg) +# print `errmsg' to stderr and exit with error code 1 +############################################################################### +abort() +{ + echo "$progname: $1." >&2 + cleanup 1 +} + +############################################################################### +# verboseMsg(msg) +# print `msg' to stderr is $verbose is true +############################################################################### +verboseMsg() { + $verboseFlag && verbose echo ${1+"$@"} +} + +############################################################################### +# byebye() +# report any failures and exit the program +############################################################################### +byebye() +{ + if $has_errors; then + { + cat <<eof + +############################################################################### +$progname: Error! Not all formats have been built successfully. +Visit the log files in directory + $destdir +for details. +############################################################################### + +This is a summary of all \`failed' messages and warnings: +$log_failure_msg +eof + } >&2 + cleanup 1 + else + cleanup 0 + fi +} + +############################################################################### +# init_log_failure() +# reset the list of failure messages +############################################################################### +init_log_failure() +{ + log_failure_msg= + has_errors=false +} + +############################################################################### +# log_failure(errmsg) +# report and save failure message `errmsg' +############################################################################### +log_failure() +{ + echo "Error: $@" >&2 + if test -z "$log_failure_msg"; then + log_failure_msg="$@" + else + OLDIFS=$IFS; IFS= + log_failure_msg="$log_failure_msg +$@" + IFS=$OLDIFS + fi + has_errors=true +} + +############################################################################### +# verbose (cmd) +# execute cmd. Redirect output depending on $mktexfmtMode. +############################################################################### +verbose() +{ + $mktexfmtMode && ${1+"$@"} >&2 || ${1+"$@"} +} + +############################################################################### +# mktexdir(args) +# call mktexdir script, disable all features (to prevent sticky directories) +############################################################################### +mktexdir() +{ + initTexmfMain + MT_FEATURES=none "$MT_TEXMFMAIN/web2c/mktexdir" "$@" >&2 +} + +############################################################################### +# tcfmgr(args) +# call tcfmgr script +############################################################################### +tcfmgr() +{ + initTexmfMain + "$MT_TEXMFMAIN/texconfig/tcfmgr" "$@" +} + +############################################################################### +# mktexupd(args) +# call mktexupd script +############################################################################### +mktexupd() +{ + initTexmfMain + "$MT_TEXMFMAIN/web2c/mktexupd" "$@" +} + +############################################################################### +# main() +# parse commandline arguments, initialize variables, +# switch into temp. direcrory, execute desired command +############################################################################### +main() +{ + destdir= # global variable: where do we put the format files? + cnf_file= # global variable: full name of the config file + cmd= # desired action from command line + needsCleanup=false + need_find_hyphenfile=false + cfgparam= + cfgmaint= + tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$ + verboseFlag=true + + # mktexfmtMode: if called as mktexfmt, set to true. Will echo the + # first generated filename after successful generation to stdout then + # (and nothing else), since kpathsea can only deal with one. + mktexfmtMode=false + case $argv0 in + mktexfmt|*/mktexfmt) + mktexfmtMode=true + fullfmt=$1; shift + case $fullfmt in + *.fmt|*.mem|*.base) + set x --byfmt `echo $fullfmt | sed 's@\.[a-z]*$@@'` ${1+"$@"}; shift + ;; + *.*) + abort "unknown format type: $fullfmt" + ;; + "") + help + ;; + *) + set x --byfmt $fullfmt; shift + ;; + esac + ;; + esac + + use_engine_dir=true # whether to use web2c/$engine subdirs + while + case $1 in + --cnffile) + shift; cnf_file=$1; cfgparam=1;; + --cnffile=*) + cnf_file=`echo "$1" | sed 's/--cnffile=//'`; cfgparam=1; shift ;; + --fmtdir) + shift; destdir=$1;; + --fmtdir=*) + destdir=`echo "$1" | sed 's/--fmtdir=//'`; shift ;; + --no-engine-subdir) + use_engine_dir=false;; + --all|-a) + cmd=all;; + --edit|-e) + cmd=edit; cfgmaint=1;; + --missing|-m) + cmd=missing;; + --refresh|-r) + cmd=refresh;; + --byfmt|-f) + shift; cmd=byfmt; arg=$1;; + --byfmt=*) + cmd=byfmt; arg=`echo "$1" | sed 's/--byfmt=//'`; shift ;; + --byhyphen|-h) + shift; cmd=byhyphen; arg=$1;; + --byhyphen=*) + cmd=byhyphen; arg=`echo "$1" | sed 's/--byhyphen=//'`; shift ;; + --showhyphen|-s) + shift; cmd=showhyphen; arg=$1;; + --showhyphen=*) + cmd=showhyphen; arg=`echo "$1" | sed 's/--showhyphen=//'`; shift ;; + --help|-help) + cmd=help;; + --version) + cmd=version;; + --enablefmt) + shift; cmd=enablefmt; arg=$1; cfgmaint=1;; + --enablefmt=*) + cmd=enablefmt; arg=`echo "$1" | sed 's/--enablefmt=//'`; cfgmaint=1; shift;; + --disablefmt) + shift; cmd=disablefmt; arg=$1; cfgmaint=1;; + --disablefmt=*) + cmd=disablefmt; arg=`echo "$1" | sed 's/--disablefmt=//'`; cfgmaint=1; shift;; + --catcfg) + cmd=catcfg;; + --listcfg) + cmd=listcfg;; + --quiet|-q) + verboseFlag=false;; + --test|--dolinks|--force) + ;; + "") break;; + *) abort "$progname: unknown option \`$1'. Try $progname --help for help";; + esac + do test $# -gt 0 && shift; done + + case "$cmd" in + help|"") help;; + version) version;; + esac + + if test -n "$cfgparam"; then + test -f "$cnf_file" || abort "config file \`$cnf_file' not found" + fi + + if test -n "$cfgmaint"; then + if test -z "$cfgparam"; then + setupTmpDir + co=`tcfmgr --tmp $tmpdir --cmd co --file $cnf` + test $? = 0 || cleanup 1 + set x $co; shift + id=$1; cnf_file=$3; orig=$4 + verboseMsg "$progname: initial config file is \`$orig'" + fi + else + if test -z "$cfgparam"; then + cnf_file=`tcfmgr --cmd find --file $cnf` + test -f "$cnf_file" || abort "config file \`$cnf' not found" + fi + fi + + # showhyphen and edit do not need any temp. directory, so do it here: + case "$cmd" in + showhyphen) + show_hyphen_file "$arg" + cleanup $? + ;; + edit) + ${VISUAL-${EDITOR-vi}} $cnf_file + ;; + enablefmt|disablefmt) + $cmd $arg + ;; + catcfg) + grep -v '^ *#' "$cnf_file" | sed 's@^ *@@; s@ *$@@' | grep . | sort + cleanup $? + ;; + listcfg) + listcfg_loop + cleanup $? + ;; + esac + + if test -n "$cfgmaint"; then + if test -z "$cfgparam"; then + ci=`tcfmgr --tmp $tmpdir --cmd ci --id $id` + if test $? = 0; then + if test -n "$ci"; then + verboseMsg "$progname: configuration file updated: \`$ci'" + else + verboseMsg "$progname: configuration file unchanged." + fi + else + abort "failed to update configuration file." + fi + fi + cleanup $? + fi + + # set up destdir: + if test -z "$destdir"; then + : ${MT_TEXMFVAR=`kpsewhich -var-value=TEXMFVAR`} + destdir=$MT_TEXMFVAR/web2c + fi + test -d "$destdir" || mktexdir "$destdir" >/dev/null 2>&1 + test -d "$destdir" || abort "format directory \`$destdir' does not exist" + test -w "$destdir" || abort "format directory \`$destdir' is not writable" + + thisdir=`pwd` + + : ${KPSE_DOT=$thisdir} + export KPSE_DOT + + # due to KPSE_DOT, we don't search the current directory, so include + # it explicitly for formats that \write and later on \read + TEXINPUTS="$tmpdir:$TEXINPUTS"; export TEXINPUTS + # for formats that load other formats (e.g., jadetex loads latex.fmt), + # add the current directory to TEXFORMATS, too. Currently unnecessary + # for MFBASES and MPMEMS. + TEXFORMATS="$tmpdir:$TEXFORMATS"; export TEXFORMATS + + setupTmpDir + cd "$tmpdir" || cleanup 1 + + # make local paths absolute: + case "$destdir" in + /*) ;; + *) destdir="$thisdir/$destdir";; + esac + case "$cnf_file" in + /*) ;; + *) cnf_file="$thisdir/$cnf_file";; + esac + + cache_vars + init_log_failure + # execute the desired command: + case "$cmd" in + all) + recreate_all;; + missing) + create_missing;; + refresh) + recreate_existing;; + byfmt) + recreate_by_fmt "$arg";; + byhyphen) + recreate_by_hyphenfile "$arg";; + esac + + byebye +} + +############################################################################### +# parse_line(config_line) sets global variables: +# format: name of the format, e.g. pdflatex +# engine: name of the TeX engine, e.g. tex, etex, pdftex +# texargs: flags for initex and name of the ini file (e.g. -mltex frlatex.ini) +# fmtfile: name of the format file (without directory, but with extension) +# +# Support for building internationalized formats sets: +# pool: base name of pool file (to support translated pool files) +# tcx: translation file used when creating the format +# +# Example (for fmtutil.cnf): +# mex-pl tex mexconf.tex nls=tex-pl,il2-pl mex.ini +# +# The nls parameter (pool,tcx) can only be specified as the first argument +# inside the 4th field in fmtutil.cnf. +# +# exit code: returns error code if the ini file is not installed +############################################################################### +parse_line() +{ + case $1 in + '#!') disabled=true; shift;; + *) disabled=false;; + esac + format=$1 + engine=$2 + hyphenation=$3 + shift; shift; shift + + # handle nls support: pool + tcx + pool=; tcx= + case $1 in + nls=*) + pool=`echo $1 | sed 's@nls=@@; s@,.*@@'` + tcx=`echo $1 | sed 's@nls=[^,]*@@; s@^,@@'` + shift # nls stuff is not handled by the engine directly, + # so we shift this away + ;; + esac + + texargs="$@" + + eval lastarg=\$$# + inifile=`echo $lastarg | sed 's%^\*%%'` + + case "$engine" in + mpost) fmtfile="$format.mem"; kpsefmt=mpost; texengine=metapost;; + mf|mfw|mf-nowin) fmtfile="$format.base"; kpsefmt=mf; texengine=metafont;; + *) fmtfile="$format.fmt"; kpsefmt=tex; texengine=$engine;; + esac + + # See if we can find $inifile for return code: + kpsewhich -progname=$format -format=$kpsefmt $inifile >/dev/null 2>&1 +} + +############################################################################### +# find_hyphenfile(format, hyphenation) searches for hyphenation along +# searchpath of format +# exit code: returns error is file is not found +############################################################################### +find_hyphenfile() +{ + format="$1"; hyphenation="$2" + case $hyphenation in + -) ;; + *) kpsewhich -progname="$format" -format=tex "$hyphenation";; + esac +} + +############################################################################### +# find_info_for_name(format) +# Look up the config line for format `format' and call parse_line to set +# global variables. +############################################################################### +find_info_for_name() +{ + format="$1" + + # set x `awk '$1 == format {print; exit}' format="$format" "$cnf_file"`; shift + set x `egrep "^$format( | )" "$cnf_file" | sed q`; shift + test $# = 0 && abort "no info for format \`$format'" + parse_line "$@" +} + +############################################################################### +# run_initex() +# Calls initex. Assumes that global variables are set by parse_line. +############################################################################### +run_initex() +{ + + # install a pool file and set tcx flag if requested in lang= option: + rm -f *.pool + poolfile= + tcxflag= + test -n "$pool" \ + && poolfile=`(kpsewhich -progname=$engine $pool.pool) 2>/dev/null` + if test -n "$poolfile" && test -f "$poolfile"; then + verboseMsg "$progname: attempting to create localized format using pool=$pool and tcx=$tcx." + cp "$poolfile" $engine.pool + test -n "$tcx" && tcxflag=-translate-file=$tcx + localpool=true + else + localpool=false + fi + + jobswitch="-jobname=$format" + case "$format" in + metafun) prgswitch=-progname=mpost;; + mptopdf|cont-??) prgswitch=-progname=context;; + *) prgswitch=-progname=$format;; + esac + + rm -f $fmtfile + + # Check for infinite recursion before running the iniTeX: + case :$mktexfmt_loop: in + *:"$format":*) + abort "Infinite recursion detected, giving up!" ;; + esac + mktexfmt_loop=$mktexfmt_loop:$format + export mktexfmt_loop + + verboseMsg "$progname: running \`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' ..." + + # run in a subshell to get a local effect of TEXPOOL manipulation: + ( + # If necessary, set TEXPOOL. Use absolute path, because of KPSE_DOT. + $localpool && { TEXPOOL="`pwd`:$TEXPOOL"; export TEXPOOL; } + verbose $engine -ini $tcxflag $jobswitch $prgswitch $texargs + ) </dev/null + + if test $use_engine_dir; then + fulldestdir="$destdir/$texengine" + else + fulldestdir="$destdir" + fi + mkdir -p "$fulldestdir" + if test -f $fmtfile; then + grep '^! ' $format.log >/dev/null 2>&1 && + log_failure "\`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' possibly failed." + + # We don't want user-interaction for the following "mv" commands: + mv "$format.log" "$fulldestdir/$format.log" </dev/null + if mv "$fmtfile" "$fulldestdir/$fmtfile" </dev/null; then + verboseMsg "$progname: $fulldestdir/$fmtfile installed." + # + $mktexfmtMode && $mktexfmtFirst \ + && echo "$fulldestdir/$fmtfile" && mktexfmtFirst=false + # + mktexupd "$fulldestdir" "$fmtfile" + fi + else + log_failure "\`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' failed" + fi +} + +############################################################################### +# recreate_loop() +# for each line in config file: check match-condition and recreate format +# if there is a match +############################################################################### +recreate_loop() +{ + OIFS=$IFS + IFS=' +' + set `echo x; sed '/^#/d; /^[ ]*$/d' "$cnf_file"`; shift + IFS=$OIFS + for line + do + parse_line $line || continue + check_match || continue + run_initex + done +} + +############################################################################### +# listcfg_loop() +# prints all format definitions in config files (enabled and disabled ones) +# for supported formats (i.e. for those which have an existing ini file) +############################################################################### +listcfg_loop() +{ + OIFS=$IFS + IFS=' +' + set `echo x; sed '/^#$/d; /^#[^!]/d; /^[ ]*$/d' "$cnf_file"`; shift + IFS=$OIFS + for line + do + parse_line $line && echo "$line" + done +} + +############################################################################### +# check_match() +# recreate all formats +############################################################################### +check_match() +{ + $need_find_hyphenfile && \ + this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"` + + eval $match_cmd && setmatch true +} + +############################################################################### +# recreate_by_fmt(fmtname) +# recreate all versions of fmtname +############################################################################### +recreate_by_fmt() +{ + fmtname=$1 + match_cmd="test x\$format = x$fmtname" + recreate_loop +} + +############################################################################### +# create_missing() +# create all missing format files +############################################################################### +create_missing() +{ + # match_cmd='test ! -f $destdir/$fmtfile' + match_cmd='test ! -f "`kpsewhich -engine=$texengine -progname=$format $fmtfile`"' + recreate_loop +} + +############################################################################### +# recreate_existing() +# recreate only existing format files +############################################################################### +recreate_existing() +{ + match_cmd='test -f "`kpsewhich -engine=$texengine -progname=$format $fmtfile`"' + recreate_loop +} + +############################################################################### +# recreate_all() +# recreate all formats +############################################################################### +recreate_all() +{ + match_cmd=true + recreate_loop +} + +############################################################################### +# recreate_by_hyphenfile(hyphenfile) +# recreate all formats that depend on hyphenfile +############################################################################### +recreate_by_hyphenfile() +{ + hyphenfile=$1 + + case $hyphenfile in + /*) + : + ;; + ./*) + hyphenfile="$KPSE_DOT/"`echo "$hyphenfile" | sed 's@..@@'` + ;; + *) + hyphenfile="$KPSE_DOT/$hyphenfile" + ;; + esac + need_find_hyphenfile=true + match_cmd="test x\$this_hyphenfile = x$hyphenfile" + + # No match before the loop: + setmatch false + + recreate_loop + + # Now check if there was at least one match: + getmatch || abort "no format depends on \`$hyphenfile'" +} + + +############################################################################### +# show_hyphen_file(format) +# prints full name of the hyphenfile for format +# +# exit code: returns error code if the ini file is not installed or if +# the hyphen file cannot be found +############################################################################### +show_hyphen_file() +{ + fmtname=$1 + + find_info_for_name "$fmtname" || abort "no info for format \`$fmtname'" + if test "x$hyphenation" = x-; then + echo - + cleanup 0 + fi + find_hyphenfile "$format" "$hyphenation" \ + || abort "hyphenfile \`$hyphenation' not found" +} + +############################################################################### +# disablefmt(format) +# disables format in configuration file +############################################################################### +disablefmt() +{ + grep "^$1[ ]" $cnf_file >/dev/null || { (exit 0); return 0; } + + ed $cnf_file >/dev/null 2>&1 <<-eof + g/^$1[ ]/s/^/#! / + w + q +eof + (exit 0); return 0 +} + +############################################################################### +# enablefmt(format) +# enables format in configuration file +############################################################################### +enablefmt() +{ + grep "^#![ ]*$1[ ]" $cnf_file >/dev/null || { (exit 0); return 0; } + ed $cnf_file >/dev/null 2>&1 <<-eof + g/^#![ ]*$1[ ]/s/..[ ]*// + w + q +eof + (exit 0); return 0 +} + +main ${1+"$@"} +cleanup 0 diff --git a/Master/bin/i386-solaris/fmtutil-sys b/Master/bin/i386-solaris/fmtutil-sys new file mode 100755 index 00000000000..bfb52f94e1f --- /dev/null +++ b/Master/bin/i386-solaris/fmtutil-sys @@ -0,0 +1,29 @@ +#!/bin/sh + +# fmtutil-sys: Thomas Esser, public domain. + +# wrapper script for fmtutil with TEXMFVAR and TEXMFCONFIG set to +# TEXMFSYSVAR / TEXMFSYSCONFIG + +test -f /bin/ksh && test -z "$RUNNING_KSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; } +unset RUNNING_KSH + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +# hack around a bug in zsh: +test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' +export PATH + +v=`kpsewhich -var-value TEXMFSYSVAR` +c=`kpsewhich -var-value TEXMFSYSCONFIG` + +TEXMFVAR="$v" +TEXMFCONFIG="$c" +export TEXMFVAR TEXMFCONFIG + +exec fmtutil ${1+"$@"} diff --git a/Master/bin/i386-solaris/fontinst b/Master/bin/i386-solaris/fontinst new file mode 100755 index 00000000000..7d1271517ad --- /dev/null +++ b/Master/bin/i386-solaris/fontinst @@ -0,0 +1,16 @@ +#!/bin/sh + +test -f /bin/sh5 && test -z "$RUNNING_SH5" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; } +unset RUNNING_SH5 + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +# hack around a bug in zsh: +test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' + +tex -progname=fontinst \&tex ${1+"$@"} diff --git a/Master/bin/i386-solaris/foo b/Master/bin/i386-solaris/foo new file mode 100755 index 00000000000..fae53fd8c69 --- /dev/null +++ b/Master/bin/i386-solaris/foo @@ -0,0 +1,11 @@ +ls: cannot access ../../i386-solaris/foo: No such file or directory +ls: cannot access ../../i386-solaris/htxelatex: No such file or directory +ls: cannot access ../../i386-solaris/htxetex: No such file or directory +ls: cannot access ../../i386-solaris/luatex: No such file or directory +ls: cannot access ../../i386-solaris/makeglossaries: No such file or directory +ls: cannot access ../../i386-solaris/mkjobtexmf: No such file or directory +ls: cannot access ../../i386-solaris/pdftexi2dvi: No such file or directory +ls: cannot access ../../i386-solaris/texcount: No such file or directory +ls: cannot access ../../i386-solaris/tl-package-manager: No such file or directory +ls: cannot access ../../i386-solaris/wordcount.sh: No such file or directory +ls: cannot access ../../i386-solaris/xbb: No such file or directory diff --git a/Master/bin/i386-solaris/gbklatex b/Master/bin/i386-solaris/gbklatex new file mode 100755 index 00000000000..f799f7b6e63 --- /dev/null +++ b/Master/bin/i386-solaris/gbklatex @@ -0,0 +1,43 @@ +#! /bin/sh + +# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program in doc/COPYING; if not, write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301 USA + +n=1 +argv= + +# get last argument +while test 1 -lt $#; do + eval argv$n=\$1 + argv="$argv \"\$argv$n\"" + n=`expr $n + 1` + shift +done + +# replace extension with .cjk or append .cjk if there is no extension +tex=$1 +case $tex in +""|*.cjk) + echo >&2 "Usage: $0 [options] latex-file" + exit 1;; +*) + aux=`expr "X$tex" : 'X\(.*\)\.[^/]*$' \| "X$tex" : 'X\(.*\)'`.cjk;; +esac + +extconv < "$tex" > "$aux" && eval latex "$argv" "\$aux" + +# EOF diff --git a/Master/bin/i386-solaris/gbkpdflatex b/Master/bin/i386-solaris/gbkpdflatex new file mode 100755 index 00000000000..6dd3ee3de9e --- /dev/null +++ b/Master/bin/i386-solaris/gbkpdflatex @@ -0,0 +1,43 @@ +#! /bin/sh + +# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program in doc/COPYING; if not, write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301 USA + +n=1 +argv= + +# get last argument +while test 1 -lt $#; do + eval argv$n=\$1 + argv="$argv \"\$argv$n\"" + n=`expr $n + 1` + shift +done + +# replace extension with .cjk or append .cjk if there is no extension +tex=$1 +case $tex in +""|*.cjk) + echo >&2 "Usage: $0 [options] pdflatex-file" + exit 1;; +*) + aux=`expr "X$tex" : 'X\(.*\)\.[^/]*$' \| "X$tex" : 'X\(.*\)'`.cjk;; +esac + +extconv < "$tex" > "$aux" && eval pdflatex "$argv" "\$aux" + +# EOF diff --git a/Master/bin/i386-solaris/getafm b/Master/bin/i386-solaris/getafm new file mode 100755 index 00000000000..1c6cd21cf77 --- /dev/null +++ b/Master/bin/i386-solaris/getafm @@ -0,0 +1,358 @@ +#!/bin/sh + +if [ $# -ne 1 ]; then + echo "usage: $0 font-name | gsnd - >font-name.afm" >&2 + exit 1 +fi + +cat << EOF +%! +% produce .afm for $1 +% (c) 1993 by Robert Joop <rj@rainbow.in-berlin.de> +% inspired by two other versions of this theme which are +% getafm 1.00 (c) AJCD +% and getafm.ps by an unknown author, +% modified by J. Daniel Smith <dsmith@mailhost.aa.cad.slb.com> + +% Metrics dictionary code added by AJCD, 7/6/93 + +/getafmdict 100 dict dup begin + + /buf 256 string def + /buf2 16 string def + + /prany % dict dictname printname -> dict + { + 2 index 2 index cvn known + { + print % printname + ( ) print + 1 index exch cvn get = + } + { + (Comment /FontInfo contains no /) print + 2 copy eq + { + = % printname + pop % dictname + } + { + exch + print % dictname + (, therefore no ) print + = % printname + } + ifelse + } + ifelse + } + bind def + + /printfontname + { + (FontName)dup prany + } + bind def + + /printfontinfo + { + dup /FontInfo known + { + dup /FontInfo get + (FullName)dup prany + (FamilyName)dup prany + (Weight)dup prany + (ItalicAngle)dup prany + (isFixedPitch)(IsFixedPitch) prany + (UnderlinePosition)dup prany + (UnderlineThickness)dup prany + (Version)(version) prany + (Notice)dup prany + pop + } + { + (Comment Font lacks a /FontInfo!)= + } + ifelse + } + bind def + + /prbbox % llx lly urx ury -> - + { + 4 1 roll 3 1 roll exch % swap top 4 elements + 4 { ( ) print buf cvs print } repeat + } + bind def + + /getbbox % fontdict chardict character -> fontdict chardict llx lly urx ury + { + gsave + 2 index setfont 0 0 moveto + false charpath flattenpath pathbbox + grestore + } + bind def + + /printmiscinfo + { + dup /FontBBox known + { + (FontBBox) print + dup /FontBBox get aload pop prbbox ()= + } + { + (Comment missing required /FontBBox)= + quit + } + ifelse + 2 copy exch get + dup /H known + 1 index /x known and + 1 index /d known and + 1 index /p known and + dup /looksRoman exch def + { + (CapHeight ) print + (H) getbbox + ceiling cvi = pop pop pop + (XHeight ) print + (x) getbbox + ceiling cvi = pop pop pop + (Ascender ) print + (d) getbbox + ceiling cvi = pop pop pop + (Descender ) print + (p) getbbox + pop pop floor cvi = pop + } + { + (Comment font doesn't contain H, x, d and p; therefore no CapHeight, XHeight, Ascender and Descender)= + } + ifelse + pop + dup /Encoding get + [ + [ (ISOLatin1Encoding) /ISOLatin1Encoding ] + [ (AdobeStandardEncoding) /StandardEncoding ] + ] + { + aload pop dup where + { + exch get 2 index eq + { + (EncodingScheme ) print + buf cvs = + } + { + pop + } + ifelse + } + { + pop pop + } + ifelse + } + forall + pop + } + bind def + + /printcharmetric + { + % chardictname fontdict charnamedict encoding charindex charname + + 4 index dup length dict dup begin exch + { + 1 index /FID ne + 2 index /UniqueID ne + and + { + 1 index /Encoding eq { 256 array copy } if + def + } + { pop pop } + ifelse + } + forall + end + dup /Encoding get 32 3 index put + /f2 exch definefont + setfont + + (C ) print + 1 index buf cvs print + + ( ; WX ) print +% Metrics entries are: +% 1 number: which is the character width +% an array of 2 numbers: which are the left sidebearing and width +% an array of 4 numbers: x & y left sidebearing, width and height + dup 5 index % /charname fontdict + dup /Metrics known { + /Metrics get exch 2 copy known { + get dup type /arraytype eq { + dup length 2 eq + {1 get} {2 get} ifelse + } if + round cvi buf cvs print + } { + pop pop ( ) stringwidth pop round cvi buf cvs print + } ifelse + } { + pop pop ( ) stringwidth pop round cvi buf cvs print + } ifelse + + ( ; N ) print + dup buf cvs print + + ( ; B) print + gsave + newpath 0 0 moveto + ( ) true charpath flattenpath pathbbox + grestore + 2 { ceiling cvi 4 1 roll } repeat + 2 { floor cvi 4 1 roll } repeat + prbbox + + looksRoman + { + [ + [ /f [ /i /f /l ] ] + [ /ff [ /i /l ] ] + ] + { + aload pop 1 index 3 index eq + { + { + 1 index buf cvs + length + 1 index buf2 cvs dup length + 2 index add + buf + 4 2 roll putinterval + buf 0 + 3 -1 roll getinterval + dup cvn + 7 index + exch known + { + exch + ( ; L ) print + buf2 cvs print + ( ) print + print + } + { + pop pop + } + ifelse + } + forall + pop + } + { + pop pop + } + ifelse + } + forall + } + if + pop + + ( ;)= + } + bind def + + /printcharmetrics + { + (StartCharMetrics ) print + 2 copy exch get length 1 sub buf cvs = + + 256 dict dup begin + 1 index /Encoding get + { null def } + forall + end + % chardictname fontdict charnamedict + 1 index /Encoding get + 0 1 255 + { + % encoding index + 2 copy get + dup /.notdef eq { pop } { printcharmetric } ifelse + pop % index + } for + + -1 + 3 index 5 index get + { + pop + dup /.notdef eq + { pop } + { + % chardictname fontdict charnamedict encoding charindex charname + dup 4 index exch known + { pop } + { printcharmetric } + ifelse + } + ifelse + } + forall + % charnamedict encoding index + pop pop pop + + (EndCharMetrics)= + } + bind def + + /printfontmetrics + { + (StartFontMetrics 3.0)= + (Comment Produced by getafm 3.0 (which is by rj@rainbow.in-berlin.de))= + + printfontname + printfontinfo + printmiscinfo + printcharmetrics + + (EndFontMetrics)= + } + bind def + +end def + +/getafm +{ + getafmdict begin + save exch + findfont 1000 scalefont + + null + [ /CharDefs /CharData /CharProcs /CharStrings ] + { + 2 index 1 index known { exch } if + pop + } + forall + dup null eq + { + (can't find dictionary with character data!)= + quit + } + if + exch % dictname fontdict + + printfontmetrics + + pop pop + restore + end +} +bind def + +/$1 getafm + +EOF diff --git a/Master/bin/i386-solaris/getnonfreefonts b/Master/bin/i386-solaris/getnonfreefonts new file mode 100755 index 00000000000..9c419e65bd7 --- /dev/null +++ b/Master/bin/i386-solaris/getnonfreefonts @@ -0,0 +1,306 @@ +#!/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='2008'; + +my $getfont_url="ftp://tug.org/tex/getnonfreefonts/getfont$TL_version"; + +use File::Copy; +use Getopt::Long; +$Getopt::Long::autoabbrev=0; + +$opt_lsfonts=0; +$opt_force=0; + +sub usage { + print <<'EOF'; +Usage: + getnonfreefonts[-sys] [-a|--all] [-d|--debug] [-f|--force] + [-l|--lsfonts] [-v|--verbose] [--version] [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. + + --version Print version number. + +EOF +; +} + +@ARGS=@ARGV; + +GetOptions + "all|a", + "debug|d", + "force|f", + "help|h", + "lsfonts|l", + "verbose|v", + "version", + "sys"; + +$^W=1 if $opt_debug; + +my $sys=($0=~/-sys$/)? 1:0; +$sys=1 if $opt_sys; + +@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.\n\n"; + usage; +} + + +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 expand_var { + my $var=shift; + + if (-d "/usr/bin") { + open KPSEWHICH, 'kpsewhich --expand-var=\$' . "$var |"; + } else { + open KPSEWHICH, 'kpsewhich --expand-var=$' . "$var |"; + } + while (<KPSEWHICH>) { + chop; + return "$_"; + } + close KPSEWHICH; +} + + +# get TMP|TEMP|TMPDIR environment variable + +if ($opt_debug) { + for my $var ("TMP","TEMP","TMPDIR") { + if (defined $ENV{$var}) { + debug_msg "Environment variable $var='$ENV{$var}'"; + } else { + debug_msg "Environment variable $var not set"; + } + } +} + + +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. +$SYSTMP=~s/\\/\//g if ($^O=~/^MSWin(32|64)/i); + + +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"); +} + +# Determine INSTALLROOT. + +if ($opt_debug) { + my @path=split ':', $ENV{PATH}; + for my $dir (@path) { + debug_msg "Search for kpsewhich in '$dir'"; + opendir DIR, "$dir"; + my @kpsewichs=grep /^kpsewhich/, readdir DIR; + closedir DIR; + for (@kpsewichs) { + debug_msg "Found $dir/$_" if /^kpsewhich/; + } + } +} + + +$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME'; + +$INSTALLROOT=expand_var "$INSTALLROOTNAME"; + +($sys)? debug_msg "sys=true":debug_msg "sys=false"; + +debug_msg "INSTALLROOT='$INSTALLROOT'"; + +$INSTALLROOT=~s/\\/\//g if ($^O=~/^MSWin(32|64)/i); + +debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'"; + +sub check_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 ($^O=~/^MSWin(32|64)$/i) { + @signals=(@common_signals, @signals_Win32); +} else { + @signals=(@common_signals, @signals_UNIX); +} + +debug_msg "Supported signals: @signals\n"; + +foreach my $signal (@signals) { + $SIG{"$signal"}=\&remove_tmpdir; +} + +# Download the script from tug.org. + +debug_msg "Running 'wget $getfont_url'"; + +system ('wget', "$getfont_url") == 0 or die "! Error: Can't execute wget.\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, @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__ diff --git a/Master/bin/i386-solaris/getnonfreefonts-sys b/Master/bin/i386-solaris/getnonfreefonts-sys new file mode 120000 index 00000000000..d1e30f335dd --- /dev/null +++ b/Master/bin/i386-solaris/getnonfreefonts-sys @@ -0,0 +1 @@ +getnonfreefonts
\ No newline at end of file diff --git a/Master/bin/i386-solaris/gftodvi b/Master/bin/i386-solaris/gftodvi Binary files differnew file mode 100755 index 00000000000..73fd764480e --- /dev/null +++ b/Master/bin/i386-solaris/gftodvi diff --git a/Master/bin/i386-solaris/gftopk b/Master/bin/i386-solaris/gftopk Binary files differnew file mode 100755 index 00000000000..45935a9139c --- /dev/null +++ b/Master/bin/i386-solaris/gftopk diff --git a/Master/bin/i386-solaris/gftype b/Master/bin/i386-solaris/gftype Binary files differnew file mode 100755 index 00000000000..2ef237b0864 --- /dev/null +++ b/Master/bin/i386-solaris/gftype diff --git a/Master/bin/i386-solaris/giftopng b/Master/bin/i386-solaris/giftopng new file mode 100755 index 00000000000..e218c61fe6b --- /dev/null +++ b/Master/bin/i386-solaris/giftopng @@ -0,0 +1,4 @@ +#!/bin/sh +X=`kpsewhich $1` +Y=`basename $X .gif`.png +convert $X $Y diff --git a/Master/bin/i386-solaris/gsftopk b/Master/bin/i386-solaris/gsftopk Binary files differnew file mode 100755 index 00000000000..09f26b189df --- /dev/null +++ b/Master/bin/i386-solaris/gsftopk diff --git a/Master/bin/i386-solaris/hbf2gf b/Master/bin/i386-solaris/hbf2gf Binary files differnew file mode 100755 index 00000000000..020a5ed64b8 --- /dev/null +++ b/Master/bin/i386-solaris/hbf2gf diff --git a/Master/bin/i386-solaris/ht b/Master/bin/i386-solaris/ht new file mode 100755 index 00000000000..e5fb159acc2 --- /dev/null +++ b/Master/bin/i386-solaris/ht @@ -0,0 +1,6 @@ +$1 $2 +$1 $2 +$1 $2 +tex4ht $2 +t4ht $2 $3 # -d~/WWW/temp/ -m644 + diff --git a/Master/bin/i386-solaris/htcontext b/Master/bin/i386-solaris/htcontext new file mode 100755 index 00000000000..34d534636eb --- /dev/null +++ b/Master/bin/i386-solaris/htcontext @@ -0,0 +1,7 @@ +#!/bin/sh + texexec --arg="ht-1=$2" --use=tex4ht --dvi --nobackend $5 $1 + tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 + t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644 + + + diff --git a/Master/bin/i386-solaris/htlatex b/Master/bin/i386-solaris/htlatex new file mode 100755 index 00000000000..1b8b7cea74a --- /dev/null +++ b/Master/bin/i386-solaris/htlatex @@ -0,0 +1,9 @@ +#!/bin/sh + latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 + latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 + latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 + tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 + t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644 + + + diff --git a/Master/bin/i386-solaris/htmex b/Master/bin/i386-solaris/htmex new file mode 100755 index 00000000000..b4aa3d9a06e --- /dev/null +++ b/Master/bin/i386-solaris/htmex @@ -0,0 +1,9 @@ +#!/bin/sh + mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1 + mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1 + mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1 + tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 + t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644 + + + diff --git a/Master/bin/i386-solaris/httex b/Master/bin/i386-solaris/httex new file mode 100755 index 00000000000..44920e72077 --- /dev/null +++ b/Master/bin/i386-solaris/httex @@ -0,0 +1,9 @@ +#!/bin/sh + tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1 + tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1 + tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1 + tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 + t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644 + + + diff --git a/Master/bin/i386-solaris/httexi b/Master/bin/i386-solaris/httexi new file mode 100755 index 00000000000..0ce3cb4a589 --- /dev/null +++ b/Master/bin/i386-solaris/httexi @@ -0,0 +1,10 @@ +#!/bin/sh + tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1 + tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1 + tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1 + tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 + t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644 +# texindex ? + + + diff --git a/Master/bin/i386-solaris/htxelatex b/Master/bin/i386-solaris/htxelatex new file mode 100755 index 00000000000..5d0a57d9e67 --- /dev/null +++ b/Master/bin/i386-solaris/htxelatex @@ -0,0 +1,9 @@ +#!/bin/sh + xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 + xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 + xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 + tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 + t4ht -.xdv -f/$1 $4 ## -d~/WWW/temp/ -m644 + + + diff --git a/Master/bin/i386-solaris/htxetex b/Master/bin/i386-solaris/htxetex new file mode 100755 index 00000000000..3386f1e0be4 --- /dev/null +++ b/Master/bin/i386-solaris/htxetex @@ -0,0 +1,9 @@ +#!/bin/sh + xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1 + xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1 + xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1 + tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 + t4ht -.xdv -f/$1 $4 ## -d~/WWW/temp/ -m644 + + + diff --git a/Master/bin/i386-solaris/includeres b/Master/bin/i386-solaris/includeres new file mode 100755 index 00000000000..4547357cd93 --- /dev/null +++ b/Master/bin/i386-solaris/includeres @@ -0,0 +1,46 @@ +#!/usr/bin/env perl +# includeres: include resources in PostScript file +# +# Copyright (C) Angus J. C. Duggan 1991-1995 +# See file LICENSE for details. + +$prog = ($0 =~ s=.*/==); + +%extn = ("font", ".pfa", "file", ".ps", "procset", ".ps", # resource extns + "pattern", ".pat", "form", ".frm", "encoding", ".enc"); +%type = ("%%BeginFile:", "file", "%%BeginProcSet:", "procset", + "%%BeginFont:", "font"); # resource types + +sub filename { # make filename for resource in @_ + local($name); + foreach (@_) { # sanitise name + s/[!()\$\#*&\\\|\`\'\"\~\{\}\[\]\<\>\?]//g; + $name .= $_; + } + $name =~ s@.*/@@; # drop directories + die "Filename not found for resource ", join(" ", @_), "\n" + if $name =~ /^$/; + $name; +} + +while (<>) { + if (/^%%IncludeResource:/ || /^%%IncludeFont:/ || /^%%IncludeProcSet:/) { + 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}")) { + while (<RES>) { + print $_; + } + close(RES); + } else { + print "%%IncludeResource: ", join(" ", $type, @res), "\n"; + print STDERR "Resource $name not found\n"; + } + } else { + print $_; + } +} + diff --git a/Master/bin/i386-solaris/info b/Master/bin/i386-solaris/info Binary files differnew file mode 100755 index 00000000000..ce97865e147 --- /dev/null +++ b/Master/bin/i386-solaris/info diff --git a/Master/bin/i386-solaris/infokey b/Master/bin/i386-solaris/infokey Binary files differnew file mode 100755 index 00000000000..80b1240096a --- /dev/null +++ b/Master/bin/i386-solaris/infokey diff --git a/Master/bin/i386-solaris/install-info b/Master/bin/i386-solaris/install-info Binary files differnew file mode 100755 index 00000000000..0cc36cd90a0 --- /dev/null +++ b/Master/bin/i386-solaris/install-info diff --git a/Master/bin/i386-solaris/jadetex b/Master/bin/i386-solaris/jadetex new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/jadetex @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/kpseaccess b/Master/bin/i386-solaris/kpseaccess Binary files differnew file mode 100755 index 00000000000..30576fc243f --- /dev/null +++ b/Master/bin/i386-solaris/kpseaccess diff --git a/Master/bin/i386-solaris/kpsepath b/Master/bin/i386-solaris/kpsepath new file mode 120000 index 00000000000..30de0e13853 --- /dev/null +++ b/Master/bin/i386-solaris/kpsepath @@ -0,0 +1 @@ +kpsetool
\ No newline at end of file diff --git a/Master/bin/i386-solaris/kpsereadlink b/Master/bin/i386-solaris/kpsereadlink Binary files differnew file mode 100755 index 00000000000..b8b2deb8e43 --- /dev/null +++ b/Master/bin/i386-solaris/kpsereadlink diff --git a/Master/bin/i386-solaris/kpsestat b/Master/bin/i386-solaris/kpsestat Binary files differnew file mode 100755 index 00000000000..fb1c66766ba --- /dev/null +++ b/Master/bin/i386-solaris/kpsestat diff --git a/Master/bin/i386-solaris/kpsetool b/Master/bin/i386-solaris/kpsetool new file mode 100755 index 00000000000..463097fd4a9 --- /dev/null +++ b/Master/bin/i386-solaris/kpsetool @@ -0,0 +1,118 @@ +#!/bin/sh + +# kpsetool. Script to make teTeX-style kpsetool, kpsexpand and kpsepath +# available. Web2C's kpsewhich offers a superset of the functionality. +# For compatibilty with old versions of teTeX, this script provides the +# old command line interface of kpsetool, kpsexpand and kpsepath. All the +# real work is done inside Web2C's kpsewhich. +# Thomas Esser <te@dbs.uni-hannover.de>, Mar 1997, public domain. + +export PATH + +usage=" +Usage: kpsexpand [options] string +Usage: kpsetool -w [options] pathtype filename +Usage: kpsepath [options] pathtype + +Valid options are the following: + -n progname : pretend to be progname to kpathsea + -m mode : set Metafont mode + -w : locate files (similar to kpsewhich) + -p : act like kpsepath + -v : act like kpsexpand + +Valid pathtypes are: + gf : generic font bitmap + pk : packed bitmap font + base : Metafont memory dump + bib : BibTeX bibliography source + bst : BibTeX style files + cnf : Kpathsea runtime configuration files + fmt : TeX memory dump + mem : MetaPost memory dump + mf : Metafont source + mfpool : Metafont program strings + mp : MetaPost source + mppool : MetaPost program strings + mpsupport : MetaPost support files + pict : Other kinds of figures + tex : TeX source + texpool : TeX program strings + tfm : TeX font metrics + vf : virtual font + dvips_config : dvips config files + dvips_header : dvips header files + troff_font : troff fonts +" + +action=kpsexpand +case $0 in + */kpsewhich) action=kpsewhich;; + */kpsepath) action=kpsepath;; +esac + +progname=`echo $0 | sed 's@.*/@@'` +flags='' + +while true; do + case x"$1" in + x-n) + if test $# = 1; then + echo "$progname: missing argument for -n." + echo "$usage"; exit 1 + else + flags="$flags -progname=$2"; shift; shift + fi;; + x-m) + if test $# = 1; then + echo "$progname: missing argument for -m." + echo "$usage"; exit 1 + else + flags="$flags -mode=$2"; shift; shift + fi;; + x-w) action=kpsewhich; shift;; + x-p) action=kpsepath; shift;; + x-v) action=kpsexpand; shift;; + *) break;; + esac +done + +case "$action" in + kpsewhich|kpsepath) + case "$1" in + gf) format='gf';; + pk) format='pk';; + base) format='.base';; + bib) format='.bib';; + bst) format='.bst';; + cnf) format='.cnf';; + fmt) format='.fmt';; + mem) format='.mem';; + mf) format='.mf';; + mfpool) format='.pool';; + mp) format='.mp';; + mppool) format='.pool';; + mpsupport) format='MetaPost support';; + pict) format='.eps';; + tex) format='.tex';; + texpool) format='.pool';; + tfm) format='.tfm';; + vf) format='.vf';; + dvips_config) format='dvips config';; + dvips_header) format='.pro';; + troff_font) format='Troff fonts';; + *) echo "$progname: $1: unknown format"; echo "$usage"; exit 1;; + esac + shift;; +esac + +case "$action" in + kpsewhich) + test $# = 1 || { echo "$progname: missing filename"; echo "$usage"; exit 1; } + kpsewhich $flags -format="$format" "$1";; + kpsepath) + kpsewhich $flags -show-path="$format";; + kpsexpand) + test $# = 1 || { echo "$progname: missing string"; echo "$usage"; exit 1; } + kpsewhich $flags -expand-var="$1";; +esac diff --git a/Master/bin/i386-solaris/kpsewhere b/Master/bin/i386-solaris/kpsewhere new file mode 100755 index 00000000000..51088ee80d6 --- /dev/null +++ b/Master/bin/i386-solaris/kpsewhere @@ -0,0 +1,63 @@ +#!/bin/sh +# +# Thomas Esser, Hans Fredrik Nordhaug, 2003, 2004. +# Public domain. +# +# kpsewhere is an extension to kpsewhich (as where is for which in tcsh). +# The intention is to provide a way to check for conflicts/shadowed +# files. +# +# Original version by Hans Fredrik Nordhaug <hans.fredrik@nordhaug.no> +# +# Bugs / limitations: +# conflicts/shadowed files whithin each texmf tree are not found. +# + + +test -f /bin/sh5 && test -z "$RUNNING_SH5" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; } +unset RUNNING_SH5 + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +export PATH + +help='Usage: kpsewhere [OPTION]... [FILENAME]... + Expanding kpsewhich to iterate over each texmf tree listed in $TEXMF + separately. + + See kpsewhich for help on options. + + --help show this help' + +options= +while + case $1 in + -h|-help|--help) + echo "$help" >&2 + exit 0;; + -*) options="${options} '${1}'";; + *) break;; + esac +do shift; done + +case $# in + 0) + echo "$help" >&2 + exit 1 + ;; +esac + +IFS=':' +for file +do + for path in `kpsewhich --expand-path='$TEXMF'` + do + eval TEXMF=\$path kpsewhich $options \"\$file\" + done +done +exit 0 diff --git a/Master/bin/i386-solaris/kpsewhich b/Master/bin/i386-solaris/kpsewhich Binary files differnew file mode 100755 index 00000000000..8a91318a017 --- /dev/null +++ b/Master/bin/i386-solaris/kpsewhich diff --git a/Master/bin/i386-solaris/kpsexpand b/Master/bin/i386-solaris/kpsexpand new file mode 120000 index 00000000000..30de0e13853 --- /dev/null +++ b/Master/bin/i386-solaris/kpsexpand @@ -0,0 +1 @@ +kpsetool
\ No newline at end of file diff --git a/Master/bin/i386-solaris/lacheck b/Master/bin/i386-solaris/lacheck Binary files differnew file mode 100755 index 00000000000..761b71c7412 --- /dev/null +++ b/Master/bin/i386-solaris/lacheck diff --git a/Master/bin/i386-solaris/lambda b/Master/bin/i386-solaris/lambda new file mode 120000 index 00000000000..de9fd6e773d --- /dev/null +++ b/Master/bin/i386-solaris/lambda @@ -0,0 +1 @@ +omega
\ No newline at end of file diff --git a/Master/bin/i386-solaris/lamed b/Master/bin/i386-solaris/lamed new file mode 120000 index 00000000000..b02b132b9c1 --- /dev/null +++ b/Master/bin/i386-solaris/lamed @@ -0,0 +1 @@ +aleph
\ No newline at end of file diff --git a/Master/bin/i386-solaris/latex b/Master/bin/i386-solaris/latex new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/latex @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/luatex b/Master/bin/i386-solaris/luatex Binary files differnew file mode 100755 index 00000000000..20a2eb62e9e --- /dev/null +++ b/Master/bin/i386-solaris/luatex diff --git a/Master/bin/i386-solaris/luatools b/Master/bin/i386-solaris/luatools new file mode 100755 index 00000000000..cb3ec1add4a --- /dev/null +++ b/Master/bin/i386-solaris/luatools @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart luatools.lua "$@" diff --git a/Master/bin/i386-solaris/mag b/Master/bin/i386-solaris/mag Binary files differnew file mode 100755 index 00000000000..7e0342a1c27 --- /dev/null +++ b/Master/bin/i386-solaris/mag diff --git a/Master/bin/i386-solaris/makeglossaries b/Master/bin/i386-solaris/makeglossaries new file mode 120000 index 00000000000..526413aa3ea --- /dev/null +++ b/Master/bin/i386-solaris/makeglossaries @@ -0,0 +1 @@ +../../texmf-dist/scripts/glossaries/makeglossaries
\ No newline at end of file diff --git a/Master/bin/i386-solaris/makeindex b/Master/bin/i386-solaris/makeindex Binary files differnew file mode 100755 index 00000000000..91086b38323 --- /dev/null +++ b/Master/bin/i386-solaris/makeindex diff --git a/Master/bin/i386-solaris/makeinfo b/Master/bin/i386-solaris/makeinfo Binary files differnew file mode 100755 index 00000000000..35153306ed3 --- /dev/null +++ b/Master/bin/i386-solaris/makeinfo diff --git a/Master/bin/i386-solaris/makempx b/Master/bin/i386-solaris/makempx Binary files differnew file mode 100755 index 00000000000..fb382d1e254 --- /dev/null +++ b/Master/bin/i386-solaris/makempx diff --git a/Master/bin/i386-solaris/makempy b/Master/bin/i386-solaris/makempy new file mode 100755 index 00000000000..4bf7a1af230 --- /dev/null +++ b/Master/bin/i386-solaris/makempy @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart makempy.pl "$@" diff --git a/Master/bin/i386-solaris/mex b/Master/bin/i386-solaris/mex new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/mex @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/mf b/Master/bin/i386-solaris/mf Binary files differnew file mode 100755 index 00000000000..ec3690f2107 --- /dev/null +++ b/Master/bin/i386-solaris/mf diff --git a/Master/bin/i386-solaris/mf-nowin b/Master/bin/i386-solaris/mf-nowin Binary files differnew file mode 100755 index 00000000000..2189291b07b --- /dev/null +++ b/Master/bin/i386-solaris/mf-nowin diff --git a/Master/bin/i386-solaris/mft b/Master/bin/i386-solaris/mft Binary files differnew file mode 100755 index 00000000000..b477fa0b45e --- /dev/null +++ b/Master/bin/i386-solaris/mft diff --git a/Master/bin/i386-solaris/mk4ht b/Master/bin/i386-solaris/mk4ht new file mode 100755 index 00000000000..796872ece31 --- /dev/null +++ b/Master/bin/i386-solaris/mk4ht @@ -0,0 +1,384 @@ +#!/usr/bin/env perl +#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +# mk4ht 2007-11-14-18:40 % +# Copyright (C) 2003--2007 Eitan M. Gurari % +# % +# % +# 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 % +# and version 1.3 or later is part of all distributions % +# of LaTeX version 2003/12/01 or later. % +# % +# This work has the LPPL maintenance status "maintained".% +# % +# This Current Maintainer of this work % +# is Eitan M. Gurari. % +# % +# gurari@cse.ohio-state.edu % +# http://www.cse.ohio-state.edu/~gurari % +#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +use strict; +$^W=1; # turn warning on +my @options = ( + "", "ht", "", "", "", "-cvalidatehtml", + "ht", "htlatex", "latex", "", "", "-cvalidatehtml", + "ht", "httex", "tex", "", "", "-cvalidatehtml", + "ht", "httexi", "texi", "", "", "-cvalidatehtml", + "ht", "htcontext", "context", "", "", "-cvalidatehtml", + "ht", "htxetex", "xetex", "", "", "-cvalidatehtml", + "ht", "htxelatex", "xelatex", "", "", "-cvalidatehtml", + "xh", "xhlatex", "latex", "xhtml", "", "-cvalidate", + "xh", "xhtex", "tex", "xhtml", "", "-cvalidate", + "xh", "xhtexi", "texi", "xhtml", "", "-cvalidate", + "xh", "xhcontext","context", "xhtml", "", "-cvalidat", + "xh", "xhxelatex", "xelatex", "xhtml", "", "-cvalidate", + "xh", "xhxetex", "xetex", "xhtml", "", "-cvalidate", + "uxh", "uxhlatex", "latex", "xhtml,uni-html4", " -cunihtf", "-cvalidate", + "uxh", "uxhtex", "tex", "xhtml,uni-html4", " -cunihtf", "-cvalidate", + "uxh", "uxhtexi", "texi", "xhtml,uni-html4", " -cunihtf", "-cvalidate", + "uxh", "uxhcontext","context", "xhtml,uni-html4", " -cunihtf", "-cvalidate", + "uxh", "uxhxelatex", "xelatex", "xhtml,uni-html4", " -cunihtf", "-cvalidate", + "uxh", "uxhxetex", "xetex", "xhtml,uni-html4", " -cunihtf", "-cvalidate", + "xhm", "xhmlatex", "latex", "xhtml,mathml", " -cunihtf", "-cvalidate", + "xhm", "xhmtex", "tex", "xhtml,mathml", " -cunihtf", "-cvalidate", + "xhm", "xhmtexi", "texi", "xhtml,mathml", " -cunihtf", "-cvalidate", + "xhm", "xhmcontext","context", "xhtml,mathml", " -cunihtf", "-cvalidate", + "xhm", "xhmxelatex", "xelatex", "xhtml,mathml", " -cunihtf", "-cvalidate", + "xhm", "xhmxetex", "xetex", "xhtml,mathml", " -cunihtf", "-cvalidate", + "mz", "mzlatex", "latex", "xhtml,mozilla", " -cmozhtf", "-cvalidate", + "mz", "mztex", "tex", "xhtml,mozilla", " -cmozhtf", "-cvalidate", + "mz", "mztexi", "texi", "xhtml,mozilla", " -cmozhtf", "-cvalidate", + "mz", "mzcontext", "context", "xhtml,mozilla", " -cmozhtf", "-cvalidate", + "mz", "mzxelatex", "xelatex", "xhtml,mozilla", " -cmozhtf", "-cvalidate", + "mz", "mzxetex", "xetex", "xhtml,mozilla", " -cmozhtf", "-cvalidate", + "oo", "oolatex", "latex", "xhtml,ooffice", "ooffice/\! -cmozhtf", "-cooxtpipes -coo", + "oo", "ootex", "tex", "xhtml,ooffice", "ooffice/\! -cmozhtf", "-cooxtpipes -coo", + "oo", "ootexi", "texi", "xhtml,ooffice", "ooffice/\! -cmozhtf", "-cooxtpipes -coo", + "oo", "oocontext", "context", "xhtml,ooffice", "ooffice/\! -cmozhtf", "-cooxtpipes -coo", + "oo", "ooxelatex", "xelatex", "xhtml,ooffice", "ooffice/\! -cmozhtf", "-cooxtpipes -coo", + "oo", "ooxetex", "xetex", "xhtml,ooffice", "ooffice/\! -cmozhtf", "-cooxtpipes -coo", + "es", "eslatex", "latex", "xhtml,emspk", " -cemspkhtf -s4es", "-cemspk", + "es", "estex", "tex", "xhtml,emspk", " -cemspkhtf -s4es", "-cemspk", + "es", "estexi", "texi", "xhtml,emspk", " -cemspkhtf -s4es", "-cemspk", + "es", "escontext", "context", "xhtml,emspk", " -cemspkhtf -s4es", "-cemspk", + "es", "esxelatex", "xelatex", "xhtml,emspk", " -cemspkhtf -s4es", "-cemspk", + "es", "esxetex", "xetex", "xhtml,emspk", " -cemspkhtf -s4es", "-cemspk", + "js", "jslatex", "latex", "xhtml,jsml", " -cjsmlhtf", "-cjsml", + "js", "jstex", "tex", "xhtml,jsml", " -cjsmlhtf", "-cjsml", + "js", "jstexi", "texi", "xhtml,jsml", " -cjsmlhtf", "-cjsml", + "js", "jscontext", "context", "xhtml,jsml", " -cjsmlhtf", "-cjsml", + "js", "jsxelatex", "xelatex", "xhtml,jsml", " -cjsmlhtf", "-cjsml", + "js", "jsxetex", "xetex", "xhtml,jsml", " -cjsmlhtf", "-cjsml", + "jm", "jmlatex", "latex", "xhtml,jsmath", " -cmozhtf", "", + "jm", "jmtex", "tex", "xhtml,jsmath", " -cmozhtf", "", + "jm", "jmtexi", "texi", "xhtml,jsmath", " -cmozhtf", "", + "jm", "jmcontext", "context", "xhtml,jsmath", " -cmozhtf", "", + "jm", "jmxelatex", "xelatex", "xhtml,jsmath", " -cmozhtf", "", + "jm", "jmxetex", "xetex", "xhtml,jsmath", " -cmozhtf", "", + "tei", "teilatex", "latex", "xhtml,tei", " -cunihtf", "-cvalidate", + "tei", "teitex", "tex", "xhtml,tei", " -cunihtf", "-cvalidate", + "tei", "teitexi", "texi", "xhtml,tei", " -cunihtf", "-cvalidate", + "tei", "teicontext","context", "xhtml,tei", " -cunihtf", "-cvalidate", + "teim", "teimlatex", "latex", "xhtml,tei-mml"," -cunihtf", "-cvalidate", + "teim", "teimtex", "tex", "xhtml,tei-mml"," -cunihtf", "-cvalidate", + "teim", "teimtexi", "texi", "xhtml,tei-mml"," -cunihtf", "-cvalidate", + "teim", "teimcontext","context","xhtml,tei-mml"," -cunihtf", "-cvalidate", + "tei", "teixelatex", "xelatex", "xhtml,tei", " -cunihtf", "-cvalidate", + "tei", "teixetex", "xetex", "xhtml,tei", " -cunihtf", "-cvalidate", + "db", "dblatex", "latex", "xhtml,docbook", " -cunihtf", "-cvalidate -cdocbk", + "db", "dbtex", "tex", "xhtml,docbook", " -cunihtf", "-cvalidate -cdocbk", + "db", "dbtexi", "texi", "xhtml,docbook", " -cunihtf", "-cvalidate -cdocbk", + "db", "dbcontext", "context", "xhtml,docbook", " -cunihtf", "-cvalidate -cdocbk", + "dbm", "dbmlatex", "latex", "xhtml,docbook-mml", " -cunihtf", "-cdocbk", + "dbm", "dbmtex", "tex", "xhtml,docbook-mml", " -cunihtf", "-cdocbk", + "dbm", "dbmtexi", "texi", "xhtml,docbook-mml", " -cunihtf", "-cdocbk", + "dbm", "dbmcontext","context", "xhtml,docbook-mml", " -cunihtf", "-cdocbk", + "db", "dbxelatex", "xelatex", "xhtml,docbook", " -cunihtf", "-cvalidate -cdocbk", + "db", "dbxetex", "xetex", "xhtml,docbook", " -cunihtf", "-cvalidate -cdocbk", + "w", "wlatex", "latex", "xhtml,word", " -csymhtf", "", + "w", "wtex", "tex", "xhtml,word", " -csymhtf", "", + "w", "wtexi", "texi", "xhtml,word", " -csymhtf", "", + "w", "wcontext", "context", "xhtml,word", " -csymhtf", "", + "w", "wxelatex", "xelatex", "xhtml,word", " -csymhtf", "", + "w", "wxetex", "xetex", "xhtml,word", " -csymhtf", "", + "jh", "jhlatex", "latex", "html,javahelp,3.2,unicode", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidatehtml", + "jh", "jhtex", "tex", "html,javahelp,3.2,unicode", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidatehtml", + "jh", "jhtexi", "texi", "html,javahelp,3.2,unicode", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidatehtml", + "jh", "jhcontext","context", "html,javahelp,3.2,unicode", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidatehtml", + "jh", "jhxelatex", "xelatex", "html,javahelp,3.2,unicode", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidatehtml", + "jh", "jhxetex", "xetex", "html,javahelp,3.2,unicode", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidatehtml", + "jh1", "jh1latex", "latex", "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp", + "jh1", "jh1tex", "tex", "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp", + "jh1", "jh1texi", "texi", "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp", + "jh1", "jh1context","context", "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp", + "jh1", "jh1xelatex", "xelatex", "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp", + "jh1", "jh1xetex", "xetex", "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp", + +); + +sub showInstrucions(){ + print " option1: mk4ht #1 \"#2\" \"#3\" \"#4\" \"#5\"\n"; + print " \n"; + print " #1: htlatex, xhlatex, mzlatex, oolatex, dblatex, dbmlatex,\n"; + print " jhlatex, eslatex, teilatex, teimlatex, uxhlatex, \n"; + print " wlatex, xhmlatex\n"; + print " \n"; + print " also 'tex', 'texi', 'context', 'xetex', and 'xelatex'\n"; + print " instead of 'latex'\n"; + print " \n"; + print " #2: file name\n"; + print " #3: optional arguments for latex/tex/... \n"; + print " #4: optional arguments for tex4ht.c\n"; + print " #5: optional arguments for t4ht.c\n"; + print " \n"; + print " option2: mk4ht ht #2 #3 \"#4\" \"#5\"\n"; + print " \n"; + print " #1: ht\n"; + print " #2: latex, tex\n"; + print " #3: file name\n"; + print " #4: optional arguments for tex4ht.c\n"; + print " #5: optional arguments for t4ht.c\n"; + print " \n"; + print " Within the program, in column three of the options\n"; + print " variable, the requests for the commands \"latex\",\n"; + print " \"tex\", etc. can be replaced with other equivalent\n"; + print " commands (e.g., \"tex -fmt=latex\").\n"; + + print "--------------------------------------------------------------------------\n"; +print " Private configuration file: mk4ht.cfg\n"; +print "--------------------------------------------------------------------------\n"; +print "\n"; +print "A private configuration file mk4ht.cfg or .mk4ht may be placed at the\n"; +print "work or home directory, to update existing commands and introduce new\n"; +print "ones. The configuration file may contain records of the following\n"; +print "kinds.\n"; +print "\n"; +print " # Comment\n"; +print " \n"; +print " name = type\n"; +print " Defines a ht*tex like command, and assocites to it the \n"; +print " TeX compiler of the specified type. Examples of TeX \n"; +print " types: latex, tex, texi, context, xetex, and xelatex.\n"; +print " \n"; +print " name.tex = options\n"; +print " Command line options for the compilation under\n"; +print " the (la)tex compiler\n"; +print " \n"; +print " name.tex4ht = options\n"; +print " Command line options for tex4ht.c \n"; +print " \n"; +print " name.t4ht = options\n"; +print " Command line options for t4ht.c\n"; +print " \n"; +print "Each record should appear in a different line. Variants\n"; +print "`name.tex += options', `name.tex4ht += options',\n"; +print "`name.t4ht += options' of the above records are also allowed.\n"; +print "They append the listed options to the base values.\n"; +print "\n"; +print "Example:\n"; +print "\n"; +print " foohlatex = latex\n"; +print " foohlatex.tex = xhtml,uni-html4\n"; +print " foohlatex.tex4ht += -cunihtf\n"; +print " foohlatex.t4ht = -cvalidate\n"; +print " htlatex.t4ht += -d./\n"; + + + print "--------------------------------------------------------------------------\n"; +print " Deleting files\n"; +print "--------------------------------------------------------------------------\n"; +print "\n"; +print "The configuration file mk4ht.cfg may also contain requests for\n"; +print "removing files created in the work directory during the compilation.\n"; +print "The requests are to be made through records of the following forms.\n"; +print "\n"; +print " clean ext1 ext2 ...\n"; +print " The extensions of the file name to be removed.\n"; +print " \n"; +print " clean.name ext1 ext2 ...\n"; +print " Conditional request. The `name' refers to the ht*tex \n"; +print " like command in use.\n"; +print "\n"; +print "Example:\n"; +print " clean dvi idv\n"; +print " clean.foohlatex lg \n"; +print " clean.htlatex lg tmp\n"; + +} + +print "mk4ht (2007-11-14-18:40)\n"; +if( !@ARGV ){ + print "improper command\n"; + showInstrucions(); exit(1); +} +my @command=("","","","",""); +my $i=0; +my $j=0; +my $param; +my $name; +my $compiler; +my $tex; +my $tex4ht; +my $t4ht; +my $texp; +my $tex4htp = ""; +my $t4htp = ""; +my @ext; + +foreach $param (@ARGV) { + if( $i == 0 ){ + my $inf; +open $inf, "<mk4ht.cfg" +or +( open $inf, "<.mk4ht" + or + ( + open $inf, "<" . $ENV{HOME} . "/mk4ht.cfg" + or + ( + open $inf, "<" . $ENV{HOME} . "/.mk4ht" + or $inf = "" +) ) ) +; + +if( $inf ){ + print "(mk4ht cfg)\n"; + while(<$inf>) { + my($line) = $_; + chomp($line); # remove eoln char + if ($line =~ m|\s*#.*|) {} + elsif($line =~ m|^\s*(\S*)\.(\S*)\s*\+=\s*(.*\S)\s*$|) { + if( ($param."tex4ht") eq ($1.$2) ){ + $tex4htp = $tex4htp . " " . $3; + } + elsif( ($param."t4ht") eq ($1.$2) ){ + $t4htp = $t4htp . " " . $3; + } + elsif( ($param."tex") eq ($1.$2) ){ + $texp = $texp . "," . $3; + } + } + elsif($line =~ m|^\s*(\S*)\.(\S*)\s*=\s*(.*\S)\s*$|) { + if( ($param."tex4ht") eq ($1.$2) ){ + $tex4ht = $3 . " "; + $tex4htp = ""; + } + elsif( ($param."t4ht") eq ($1.$2) ){ + $t4ht = $3 . " "; + $t4htp = ""; + } + elsif( ($param."tex") eq ($1.$2) ){ + $tex = $3 . ","; + $texp = ""; + } + } + elsif($line =~ m|^\s*(\S*)\s*=\s*(.*\S)\s*$|) { + if( $param eq $1 ){ + $name = $1; + $compiler = $2; + } + } + elsif($line =~ m|^\s*clean\s+(.+)|){ + my(@array) = split(' ',$1); + push(@ext,@array); +} elsif($line =~ m|^\s*clean\.(\S+)\s+(.+)|){ + if( $1 eq @ARGV[0] ){ + my(@array) = split(' ',$2); + push(@ext,@array); +} } + + elsif ($line) { print "--- Error --- " . $line . "\n"; } + } + close $inf; +} + + for( $j=1; $j<$#options; $j+=6 ){ + if( $param eq $options[$j] ){ + if( $name ){ + $command[0] = "ht".$compiler; +if( $tex ){ $command[2] = $tex; } else { $command[2] = ""; } +if( $tex4ht ){ $command[3] = $tex4ht; } else { $command[3] = ""; } +if( $t4ht ){ $command[4] = $t4ht; } else { $command[4] = ""; } + + } else { + if( $options[$j-1] eq "" ){ + $command[0] = $options[$j]; +} else { + $command[0] = "ht".$options[$j+1]; +} +if( $tex ){ $command[2] = $tex; } else { $command[2] = $options[$j+2]; } +if( $tex4ht ){ $command[3] = $tex4ht; } else { $command[3] = $options[$j+3]; } +if( $t4ht ){ $command[4] = $t4ht; } else { $command[4] = $options[$j+4]; } + + } + if( $texp ){ $command[2] = $command[2] . "," . $texp; } +if( $tex4htp){ $command[3] = $command[3] . " " . $tex4htp; } +if( $t4htp ){ $command[4] = $command[4] . " " . $t4htp; } + + last; + } } + if( $j>$#options ){ + if( $name ){ $command[0] = "ht".$compiler; +if( $tex ){ $command[2] = $tex; } else { $command[2] = ""; } +if( $tex4ht ){ $command[3] = $tex4ht; } else { $command[3] = ""; } +if( $t4ht ){ $command[4] = $t4ht; } else { $command[4] = ""; } + } + else { + print "improper command: $param \n"; + showInstrucions(); exit(1); + } } + } elsif ( $i== 1 ) { + $command[1] = $param; + } elsif ( $i== 2 ) { + if( $command[2] eq "" ){ + $command[2] = $param; + } else { + $command[2] = $param. "," . $command[2]; + } + } elsif ( $i== 3 ) { + $command[3] = $param . $command[3]; + } else { + $command[4] = $param. " " .$command[4]; + } + $i++; +} +my $cmd; +open (KPSEA, "kpsewhich " . $command[0] . " |"); +if ($cmd = <KPSEA>){ + $cmd =~ s/\s+$//; +} else { + $cmd = $command[0]; +} +close KPSEA; + +my $commando = $cmd . " " . $command[1] . " \"". + $command[2] . "\" \"". $command[3] . "\" \"" . + $command[4] . "\""; +print "$commando\n"; +my $rtrn; +if( $rtrn = system($commando) ){ + print "--- error --- failed to execute command\n"; +} else { + my $file; +my $ext; +my(@array) = split('\.',@ARGV[1]); +my $texFile = @array[0]; +opendir(DIR,".") ; +while ($file = readdir(DIR) ){ + if(index($file,$texFile) == 0 ){ + foreach $ext(@ext){ + if (index($file,$ext,length($file)-length($ext)) != -1){ + if( stat($file)){ + unlink($file); + print "Deleted: ". $file . "\n"; +} } } } } +closedir(DIR); + +} +exit( $rtrn ); + diff --git a/Master/bin/i386-solaris/mkindex b/Master/bin/i386-solaris/mkindex new file mode 100755 index 00000000000..565f805695d --- /dev/null +++ b/Master/bin/i386-solaris/mkindex @@ -0,0 +1,39 @@ +#!/bin/sh + +test -f /bin/sh5 && test -z "$RUNNING_SH5" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; } +unset RUNNING_SH5 + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +progname=`basename $0` +case $# in + 0) + echo "usage: `basename $0` file[.idx] ..." 1>&2 + exit 1 + ;; +esac + +gind=gind.ist +gglo=gglo.ist + +# remember starting directory +dir=`pwd` + +# loop over all files +for i +do + destdir=`echo $i | sed 's/^[^\/]*$/./; s/\/[^\/]*$//'` + test -d "$destdir"||continue + cd "$destdir" + FILENAME=`basename $i .idx` + test -f "$FILENAME".idx \ + && makeindex -s $gind "$FILENAME" + test -f "$FILENAME".glo \ + && makeindex -s $gglo -o "$FILENAME".gls "$FILENAME".glo + cd "$dir" +done diff --git a/Master/bin/i386-solaris/mkjobtexmf b/Master/bin/i386-solaris/mkjobtexmf new file mode 120000 index 00000000000..90b7a69f9f5 --- /dev/null +++ b/Master/bin/i386-solaris/mkjobtexmf @@ -0,0 +1 @@ +../../texmf-dist/scripts/mkjobtexmf/mkjobtexmf.pl
\ No newline at end of file diff --git a/Master/bin/i386-solaris/mkocp b/Master/bin/i386-solaris/mkocp new file mode 100755 index 00000000000..41ffead8bf1 --- /dev/null +++ b/Master/bin/i386-solaris/mkocp @@ -0,0 +1,6 @@ +#!/bin/sh +# Initial definition. Will leave the .ocp file in the local directory. +( +otp2ocp `basename "$1" .ocp` || exit 1 +) 1>&2 </dev/null +echo `basename "$1" .ocp`.ocp diff --git a/Master/bin/i386-solaris/mkofm b/Master/bin/i386-solaris/mkofm new file mode 100755 index 00000000000..ef820171f08 --- /dev/null +++ b/Master/bin/i386-solaris/mkofm @@ -0,0 +1,3 @@ +#!/bin/sh +# Initial definition. For the moment only makes .tfm files. +mktextfm $* diff --git a/Master/bin/i386-solaris/mktexfmt b/Master/bin/i386-solaris/mktexfmt new file mode 120000 index 00000000000..817cc8aaa1b --- /dev/null +++ b/Master/bin/i386-solaris/mktexfmt @@ -0,0 +1 @@ +fmtutil
\ No newline at end of file diff --git a/Master/bin/i386-solaris/mktexlsr b/Master/bin/i386-solaris/mktexlsr new file mode 100755 index 00000000000..9f729e4d495 --- /dev/null +++ b/Master/bin/i386-solaris/mktexlsr @@ -0,0 +1,163 @@ +#!/bin/sh +# original mktexlsr -- create or rebuild ls-R. +# +# (If you change or delete the word `original' on the previous line, +# installation won't write this script over yours.) +# +# Suitable for calling from cron, as in: +# 0 * * * * cd /your/texmf/root && /usr/local/bin/mktexlsr +# unless the scripts live in a different directory than the 'kpseaccess', +# 'kpsestat', 'kpsereadlink', and 'kpsewhich' binaries. +# +# Originally written as `texhash' by Thomas Esser +# <te@dbs.uni-hannover.de>, Okt., 1994. +# Public domain. + +version='$Id: mktexlsr,v 1.46 2005/06/21 14:32:26 olaf Exp $' +progname=`echo $0 | sed 's%.*/%%'` +usage="Usage: $progname [DIR]... + +Only options are --help, --version, and --verbose. If standard input is +a terminal, --verbose is on by default. + +Rebuild all necessary ls-R filename databases completely. If one or +more arguments DIRS are given, these are used as texmf directories to +build ls-R for. Else all directories in the search path for ls-R files +(\$TEXMFDBS) are used." + +# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate +# directories in path lists whereas Unix uses `:'. Make an exception for +# Cygwin, which pretends to be UNIX. +# Create a variable that holds the right character to be used by the scripts. +DOSISH=no +case `uname -s` in + CYGWIN*|Cygwin*|cygwin*) ;; + *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi +esac +if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi + +# Add the location of the script to the PATH if necessary. This must +# be done before kpsewhich can be called, and thus cannot be put into +# mktex.opt. +dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` +case $dirname in + "") # Do nothing + ;; + /* | [A-z]:/*) # Absolute name + PATH="$dirname$SEP$PATH" + export PATH ;; + *) # Relative name + PATH="`pwd`/$dirname$SEP$PATH" + export PATH ;; +esac + +if tty -s; then verbose=true; else verbose=false; fi + +# A copy of some stuff from mktex.opt, so we can run in the presence of +# terminally damaged ls-R files. +if test "x$1" = x--help || test "x$1" = x-help; then + echo "$usage" + exit 0 +elif test "x$1" = x--version || test "x$1" = x-version; then + echo "`basename $0` $version" + kpsewhich --version + exit 0 +elif test "x$1" = x--verbose || test "x$1" = x-verbose; then + verbose=true + shift +fi + +# mktexupd and mktexlsr make sure they're coordinated via this. A copy +# is found mktex.opt. +ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' +# The old string, which should continue to work. +old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' + +trap 'cd / ; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; exit' 0 1 2 3 7 13 15 + +# Get list of directories from $TEXMFDBS; eliminate duplicates. +test $# = 0 && { + OIFS=$IFS + IFS=' +' + set x `kpsewhich --show-path=ls-R | tr : ' +' | sort | uniq`; shift + IFS=$OIFS +} + +for TEXMFLS_R in "$@"; do + # Prepend cwd if the directory was relative. + case "$TEXMFLS_R" in + "") continue ;; # Strictly speaking, it is an error if this case is taken. + /* | [A-z]:/*) ;; + *) TEXMFLS_R="`pwd`/$TEXMFLS_R" + esac + # Allow for ls-R and ls-r to exist. But create ls-R if we're working + # from scratch. + if test -f "$TEXMFLS_R/ls-R"; then + db_file="$TEXMFLS_R/ls-R" + elif test -f "$TEXMFLS_R/ls-r"; then + db_file="$TEXMFLS_R/ls-r" + else + db_file="$TEXMFLS_R/ls-R" + fi + # Follow a possible symlink to get the right filesystem. + # The '|| true' construct prevents an sh -e aborting. + db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true + case "$db_readlink" in + "") ;; + /* | [A-z]:/*) db_file="$db_readlink" ;; + *) db_file="$TEXMFLS_R/$db_readlink" + esac + db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname + + test -d "$db_dir" || continue + test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } + + if test ! -f "$db_file"; then + cp /dev/null "$db_file" + # Use same permissions as parent directory, minus x,s, or t bits. + chmod `kpsestat -xst "$db_dir"` "$db_file" + elif test -s "$db_file" \ + && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ + && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then + echo "$progname: $db_file lacks magic string. Skipping..." >&2 + continue + fi + + # Skip if we cannot write the file: + kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission. Skipping..." >&2; continue; } + + db_dir_tmp="$db_dir/lsR$$.tmp" + (umask 077 && mkdir "$db_dir_tmp" ) \ + || { echo "$progname: could not create directory '$db_dir_tmp'. Skipping..." >&2; continue; } + db_file_tmp="$db_dir_tmp/lsR$$.tmp" + rm -f "$db_file_tmp" + + $verbose && echo "$progname: Updating $db_file... " >&2 + echo "$ls_R_magic" >"$db_file_tmp" + + # The main task. We put ./: in the output, so top-level files can be + # found via ls-R. Probably irrelevant in practice. + # The sed command inserts the leading ./ for directory names, and + # removes ., .., and .svn entries from the list. Also omit contents + # of any .svn directories; sed apparently requires that we do that + # operation in a separate invocation. + # We do not try to support colons in directory names. + # + echo "./:" >>"$db_file_tmp" + (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ + | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^\.svn$/d;' \ + -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ + | sed -e '/\.svn.*:$/,/^$/d' \ + >>"$db_file_tmp" + + # To be really safe, a loop. + until PERMS=`kpsestat = "$db_file"`; do sleep 1; done + chmod $PERMS "$db_file_tmp" + rm -f "$db_file" + mv "$db_file_tmp" "$db_file" + rm -rf "$db_dir_tmp" +done +$verbose && echo "$progname: Done." >&2 +exit 0 diff --git a/Master/bin/i386-solaris/mktexmf b/Master/bin/i386-solaris/mktexmf new file mode 100755 index 00000000000..32bb85ec3d8 --- /dev/null +++ b/Master/bin/i386-solaris/mktexmf @@ -0,0 +1,139 @@ +#!/bin/sh +# original mktexmf -- make a new MF file, because one wasn't found. +# +# (If you change or delete the word `original' on the previous line, +# installation won't write this script over yours.) +# +# te@dbs.uni-hannover.de, kb@mail.tug.org, and infovore@xs4all.nl. +# Public domain. + +version='$Id: mktexmf,v 1.27 2005/01/25 17:39:21 olaf Exp $' +progname=`echo $0 | sed 's%.*/%%'` +usage="Usage: $progname FONT. + +Makes the Metafont source file for FONT, if possible. For example, +\`ecr12' or \`cmr11'." + +# Common code for all scripts. +: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} +: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} +test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" +if test ! -f "$MT_MKTEX_OPT"; then + echo "$progname: Cannot find mktex.opt; check your installation." >&2 + exit 1 +fi + +. "$MT_MKTEX_OPT" + +( +# See comments in mktexpk. +name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" +rootname=`echo "$name" | sed 's/[0-9]*$//'` +pointsize=`echo "$name" | sed "s/^$rootname//"` + +sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` +if test -n "$sauterroot"; then + rootfile=$sauterroot + rootname=b-$rootname +else + case $rootname in + # csso12[0-5][0-9] from CJK package; unsupported by mktexmf + csso12[0-5][0-9]) + rootfile=;; + cs*|lcsss*|icscsc*|icstt*|ilcsss*) + rootfile=`kpsewhich cscode.mf`;; + wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) + lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` + rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; + *) + rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; + esac +fi +{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 + +#if test -z "$MT_MFNAME"; then +OIFS=$IFS; IFS=$SEP +set x `"$MT_MKTEXNAM" $name`; shift +IFS=$OIFS +MT_MFNAME="$3" +#fi + +destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` +test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 +cd "$destdir" || exit 1 + +case "$pointsize" in + "") echo "$progname: no pointsize."; exit 1;; + 11) realsize=10.95;; # \magstephalf + 14) realsize=14.4;; # \magstep2 + 17) realsize=17.28;; # \magstep3 + 20) realsize=20.74;; # \magstep4 + 25) realsize=24.88;; # \magstep5 + 30) realsize=29.86;; # \magstep6 + 36) realsize=35.83;; # \magstep7 + # The new convention is to have three or four letters for the + # font name and four digits for the pointsize. The number is + # pointsize * 100. We effectively divide by 100 by ignoring the + # last two digits. + ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; + *) realsize="$pointsize";; +esac + +mfname="$name.mf" +if test -r "$mfname"; then + echo "$progname: $destdir/$mfname already exists." + echo "$destdir/$mfname" >$STDOUT + "$MT_MKTEXUPD" "$destdir" "$mfname" + exit 0 +fi + +case "$name" in + ec*|tc*) + cat > "mf$$.tmp" <<END +if unknown exbase: input exbase fi; +gensize:=$realsize; +generate $rootname; +END + ;; + dc*) + cat > "mf$$.tmp" <<END +if unknown dxbase: input dxbase fi; +gensize:=$realsize; +generate $rootname; +END + ;; + cs*|lcsss*|icscsc*|icstt*|ilcsss*) + cat > "mf$$.tmp" <<END +input cscode +use_driver; +END + ;; + wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) + cat > "mf$$.tmp" <<END +input fikparm; +END + ;; + g[lmorst][bijmtwx][cilnoru]*) + # A small superset of the names of the cbgreek fonts. + cat > "mf$$.tmp" <<END +% generated by mktexmf +input cbgreek; +END + ;; + *) + cat > "mf$$.tmp" <<END +design_size := $realsize; +input $rootname; +END + ;; +esac + +chmod `kpsestat -xst,go-w .` "mf$$.tmp" +rm -f "$mfname" +mv "mf$$.tmp" "$mfname" + +echo "$destdir/$mfname" >$STDOUT +echo "$progname: $destdir/$mfname: successfully generated." >&2 +"$MT_MKTEXUPD" "$destdir" "$mfname" +exit 0 +) 1>&2 </dev/null diff --git a/Master/bin/i386-solaris/mktexpk b/Master/bin/i386-solaris/mktexpk new file mode 100755 index 00000000000..baed82a83fa --- /dev/null +++ b/Master/bin/i386-solaris/mktexpk @@ -0,0 +1,265 @@ +#!/bin/sh +# original mktexpk -- make a new PK font, because one wasn't found. +# +# (If you change or delete the word `original' on the previous line, +# installation won't write this script over yours.) +# +# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. +# Report bugs to tex-k@tug.org. +# Public domain. + +version='$Id: mktexpk,v 1.34 2005/06/21 10:49:10 olaf Exp $' +progname=`echo $0 | sed 's%.*/%%'` +usage="Usage: $progname [OPTIONS] NAME [REDIRECT], + Create a PK font. + +--dpi DPI use resolution DPI. +--bdpi BDPI use base resolution BDPI. +--mag MAG use magnificiation MAG. +--mfmode MODE use MODE as the METAFONT mode. +--destdir DESTDIR write fonts in DESTDIR. + +Try to create a PK file for NAME at resolution DPI, with an assumed +device base resolution of BDPI, and a Metafont \`mag' of MAG. Use MODE +for the METAFONT mode. Use DESTDIR for the root of where to install +into, either the absolute directory name to use (if it starts with a +/) or relative to the default DESTDIR (if not). REDIRECT, if supplied, +is a string of the form '>&n', where n is the number of the file +descriptor which is to receive, instead of stdout, the name of the +newly created pk file." + +# Handle non-positional options, except for --version/--help +while test $# -gt 0; do + case "$1" in + --destdir) shift; DEST="$1"; shift ;; + --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; + --dpi) shift; DPI="$1"; shift ;; + --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; + --bdpi) shift; BDPI="$1"; shift ;; + --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; + --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; + --mfmode=*) test "x$1" != "x--mfmode/" \ + && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; + --mag) shift; MAG="$1"; shift;; + --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; + --version|-version) break ;; + --help|-help) break ;; + *) break ;; + esac +done + +if test "x$2" != x; then + tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" + if test -z "$tail"; then + echo "$progname: argument '$2' ignored - bad file number" >&2 + elif test "$tail" != 1; then + eval 'exec 1>&$tail' + fi +fi + +mt_max_args=2 + +# Common code for all scripts. +: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} +: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} +test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" +if test ! -f "$MT_MKTEX_OPT"; then + echo "$progname: Cannot find mktex.opt; check your installation." >&2 + exit 1 +fi + +. "$MT_MKTEX_OPT" + +# Where do potential driver files belong? +case "$MT_FEATURES" in + *nomfdrivers*) + : ${MT_MFDESTDIR=`pwd`} + export MT_MFDESTDIR;; +esac + +# Since we want to pass the generated filename and only that filename +# back to the caller on standard output, we do some redirections so +# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. +# Then the contents of $STDOUT will be echoed to stdout by a trap. + +# start of redirection stdout -> stderr, stdin <- /dev/null +( + +NAME=$1 + +if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then + # determine the progname of metafont to use; prefer mf-nowin. + if (mf-nowin --version) >/dev/null 2>&1; then + MF="mf-nowin -progname=mf" + else + MF=mf + fi + + # Check that $BDPI and $MODE are consistent; if not, ignore the mode and + # hope we can correctly guess it from bdpi. (People like to specify the + # resolution on the command line, not the mode so much.) + if test -n "$MODE"; then + mf_bdpi=`$MF \ +'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ + </dev/null \ + | awk '/DPI=/ {print $2}'` + if test "x$mf_bdpi" != x$BDPI; then + echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 + MODE= + fi + fi + + # If an explicit mode is not supplied, try to guess. You can get a + # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. + if test -z "$MODE" || test "x$MODE" = xdefault; then + case "$BDPI" in + 85) MODE=sun;; + 100) MODE=nextscrn;; + 180) MODE=toshiba;; + 300) MODE=cx;; + 360) MODE=epstylus;; + 400) MODE=nexthi;; + 600) MODE=ljfour;; + 720) MODE=epscszz;; + 1200) MODE=ultre;; + 1270) MODE=linoone;; + 8000) MODE=dpdfezzz;; + *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 + echo "$progname: Use a config file or option to specify the mode; see:" >&2 + echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 + exit 1 + esac + fi + + # Run Metafont. Always use plain Metafont, since reading cmbase.mf + # does not noticeably slow things down. + cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" +else + MODE=modeless + # ps_to_pk is set in mktex.opt + case $ps_to_pk in + gsftopk) + if $ps_to_pk -t "$NAME"; then + cmd="$ps_to_pk $NAME $DPI" + fi;; + ps2pk) + # grep for the font in $PSMAPFILE. These are base font names, such as + # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). + : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} + pattern="^$NAME"'([ ]|$)' + psline=`egrep "$pattern" $PSMAPFILE | tail -1` + if test -n "$psline"; then + set x `echo "$psline" | sed 's%[<["]%%g'` + shift; shift; shift; + encoding=; psname=; slant=; extend= + while test ! -z "$1"; do + case "$1" in + *.enc) encoding="-e $1";; + *.pf[ab]) psname="$1";; + *SlantFont) slant="-S $lastopt";; + *ExtendFont) extend="-E $lastopt";; + esac + lastopt="$1" + shift + done + # Guessing the name of the type1 font file as fallback: + ANAME=`echo $NAME | sed 's/8r$/8a/'` + for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do + if kpsewhich $i >/dev/null 2>&1; then + psname=$i + break + fi + done + + if [ -n "$psname" ]; then + cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" + else + if gsftopk -t "$NAME"; then + echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 + cmd="gsftopk $NAME $DPI" + fi + fi + fi;; + esac + + # unsupported by $ps_to_pk, try other conversions: + if test -z "$cmd"; then + if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then + cmd="ttf2pk -q $NAME $DPI" + elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then + cmd="hbf2gf -q -p $NAME $DPI" + else + echo "$progname: don't know how to create bitmap font for $NAME." >&2 + exit 1 + fi + fi +fi + +OIFS=$IFS; IFS=$SEP +set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift +IFS=$OIFS + +PKDEST="$1" +PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname +PKNAME=`basename "$PKDEST"` +GFNAME=$NAME.${DPI}gf + +if test -r "$PKDESTDIR/$PKNAME"; then + echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 + echo "$PKDESTDIR/$PKNAME" >$STDOUT + "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME + exit 0 +fi + +"$MT_MKTEXDIR" "$PKDESTDIR" +if test ! -d "$PKDESTDIR"; then + echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 + exit 1 +fi + +echo "$progname: Running $cmd" +$cmd </dev/null || { + # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" + # errors occurr. + grep '^!' $NAME.log | sort >$$.errs 2>/dev/null + grep '^! Strange path' $$.errs >$$.strange 2>/dev/null + grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null + grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null + cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept + if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then + test -s $$.strange >/dev/null 2>&1 \ + && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 + test -s $$.badpos >/dev/null 2>&1 \ + && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 + test -s $$.angle >/dev/null 2>&1 \ + && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 + else + echo "$progname: \`$cmd' failed." >&2 + test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" + exit 1; + fi +} + +test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } +test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME +if test ! -s $PKNAME; then + echo "$progname: \`$cmd' failed to make $PKNAME." >&2 + exit 1 +fi + +# Install the PK file carefully, since others may be working simultaneously. +# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. +mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ + || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 +cd "$PKDESTDIR" || exit 1 +chmod `kpsestat -xst,go-w .` pk$$.tmp +test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 + +# Update ls-R if necessary. +"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME + +# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk +# will think mktexpk failed. Any other output to stdout will also lose. +echo "$PKDESTDIR/$PKNAME" >$STDOUT +echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 +) 1>&2 </dev/null diff --git a/Master/bin/i386-solaris/mktextfm b/Master/bin/i386-solaris/mktextfm new file mode 100755 index 00000000000..a423d0309b0 --- /dev/null +++ b/Master/bin/i386-solaris/mktextfm @@ -0,0 +1,152 @@ +#!/bin/sh +# original mktextfm -- make a new TFM file, because one wasn't found. +# +# (If you change or delete the word `original' on the previous line, +# installation won't write this script over yours.) +# +# te@dbs.uni-hannover.de, kb@mail.tug.org, and infovore@xs4all.nl. +# Public domain. + +version='$Id: mktextfm,v 1.27 2004/07/03 19:25:15 olaf Exp $' +progname=`echo $0 | sed 's%.*/%%'` +usage="Usage: $progname [--destdir DESTDIR] FONT. + +Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where +to install into, either the absolute directory name to use (if it starts +with a /) or relative to the default DESTDIR (if not)." + +# Handle non-positional options, except for --version/--help +while test $# -gt 0; do + case "$1" in + --destdir) shift; DEST="$1"; shift ;; + --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; + --version|-version) break ;; + --help|-help) break ;; + *) break ;; + esac +done + +# Common code for all scripts. +: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} +: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} +test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" +if test ! -f "$MT_MKTEX_OPT"; then + echo "$progname: Cannot find mktex.opt; check your installation." >&2 + exit 1 +fi + +. "$MT_MKTEX_OPT" + +# Where do potential mf driver files go? +case "$MT_FEATURES" in + *nomfdrivers*) + : ${MT_MFDESTDIR=`pwd`} + export MT_MFDESTDIR;; +esac + +# start of redirection stdout -> stderr, stdin <- /dev/null +( + +NAME=`basename "$1" .tfm` +MAG=1 +#DEST="$2" +DPI=$BDPI + +OIFS=$IFS; IFS=$SEP +set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift +IFS=$OIFS + +PKDEST="$1" +TFMDEST="$2" +PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname +TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` +PKNAME=`basename "$PKDEST"` +TFMNAME=$NAME.tfm +GFNAME=$NAME.$DPI'gf' + +if test -r "$TFMDESTDIR/$TFMNAME"; then + echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 + echo "$TFMDESTDIR/$TFMNAME" >$STDOUT + "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME + exit +fi + +# Try to create the destdir first. Do not create fonts, if this fails. +"$MT_MKTEXDIR" "$TFMDESTDIR" +if test ! -d "$TFMDESTDIR"; then + echo "$progname: mktexdir $TFMDESTDIR failed." + exit 1 +fi + +# Check if this font is supported by hbf2gf else use metafont. +if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then + cmd="hbf2gf -g $NAME $DPI" +else + # determine the progname of metafont to use; prefer mf-nowin. + if (mf-nowin --version) >/dev/null 2>&1; then + MF="mf-nowin -progname=mf" + else + MF=mf + fi + + cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" +fi + +echo "$progname: Running $cmd" +$cmd </dev/null || { + # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" + # errors occurr. + grep '^!' $NAME.log | sort >$$.errs 2>/dev/null + grep '^! Strange path' $$.errs >$$.strange 2>/dev/null + grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null + grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null + cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept + if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then + test -s $$.strange >/dev/null 2>&1 \ + && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 + test -s $$.badpos >/dev/null 2>&1 \ + && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 + test -s $$.angle >/dev/null 2>&1 \ + && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 + else + echo "$progname: \`$cmd' failed." >&2 + test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" + exit 1; + fi +} + +# hbf2gf just produces a .pl file: +test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME +test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } + +# Install the TFM file carefully, since others may be working simultaneously. +# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. +mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ + || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 +cd "$TFMDESTDIR" || exit 1 +chmod `kpsestat -xst,go-w .` tfm$$.tmp +test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 + +# OK, success with the TFM. +"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME +echo "$TFMDESTDIR/$TFMNAME" >$STDOUT +echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 + +# Since we probably made a GF(->PK) file, too, may as well install it if +# it's needed. +cd $TEMPDIR +if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then + gftopk ./$GFNAME $PKNAME || exit 1 + "$MT_MKTEXDIR" "$PKDESTDIR" + mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ + || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 + cd "$PKDESTDIR" || exit 1 + if test -f $PKNAME; then + rm -f pk$$.tmp + else + chmod `kpsestat -xst,go-w .` pk$$.tmp + mv pk$$.tmp $PKNAME + "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME + fi +fi +) 1>&2 </dev/null diff --git a/Master/bin/i386-solaris/mllatex b/Master/bin/i386-solaris/mllatex new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/mllatex @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/mltex b/Master/bin/i386-solaris/mltex new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/mltex @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/mmafm b/Master/bin/i386-solaris/mmafm Binary files differnew file mode 100755 index 00000000000..ed26ea2108f --- /dev/null +++ b/Master/bin/i386-solaris/mmafm diff --git a/Master/bin/i386-solaris/mmpfb b/Master/bin/i386-solaris/mmpfb Binary files differnew file mode 100755 index 00000000000..ccf8548a1a9 --- /dev/null +++ b/Master/bin/i386-solaris/mmpfb diff --git a/Master/bin/i386-solaris/mpost b/Master/bin/i386-solaris/mpost Binary files differnew file mode 100755 index 00000000000..e0df01ca430 --- /dev/null +++ b/Master/bin/i386-solaris/mpost diff --git a/Master/bin/i386-solaris/mpstools b/Master/bin/i386-solaris/mpstools new file mode 100755 index 00000000000..b4c8f634548 --- /dev/null +++ b/Master/bin/i386-solaris/mpstools @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart mpstools.rb "$@" diff --git a/Master/bin/i386-solaris/mpto b/Master/bin/i386-solaris/mpto Binary files differnew file mode 100755 index 00000000000..894bcf52fcf --- /dev/null +++ b/Master/bin/i386-solaris/mpto diff --git a/Master/bin/i386-solaris/mptopdf b/Master/bin/i386-solaris/mptopdf new file mode 100755 index 00000000000..980a3123d1a --- /dev/null +++ b/Master/bin/i386-solaris/mptopdf @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart mptopdf.pl "$@" diff --git a/Master/bin/i386-solaris/mtxtools b/Master/bin/i386-solaris/mtxtools new file mode 100755 index 00000000000..2922e0b4674 --- /dev/null +++ b/Master/bin/i386-solaris/mtxtools @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart mtxtools.rb "$@" diff --git a/Master/bin/i386-solaris/musixflx b/Master/bin/i386-solaris/musixflx Binary files differnew file mode 100755 index 00000000000..a6447a23818 --- /dev/null +++ b/Master/bin/i386-solaris/musixflx diff --git a/Master/bin/i386-solaris/newer b/Master/bin/i386-solaris/newer Binary files differnew file mode 100755 index 00000000000..ea9c8fa33c5 --- /dev/null +++ b/Master/bin/i386-solaris/newer diff --git a/Master/bin/i386-solaris/odvicopy b/Master/bin/i386-solaris/odvicopy Binary files differnew file mode 100755 index 00000000000..d2016970ab0 --- /dev/null +++ b/Master/bin/i386-solaris/odvicopy diff --git a/Master/bin/i386-solaris/odvips b/Master/bin/i386-solaris/odvips new file mode 120000 index 00000000000..2e853c89507 --- /dev/null +++ b/Master/bin/i386-solaris/odvips @@ -0,0 +1 @@ +dvips
\ No newline at end of file diff --git a/Master/bin/i386-solaris/odvitype b/Master/bin/i386-solaris/odvitype Binary files differnew file mode 100755 index 00000000000..18423806926 --- /dev/null +++ b/Master/bin/i386-solaris/odvitype diff --git a/Master/bin/i386-solaris/ofm2opl b/Master/bin/i386-solaris/ofm2opl new file mode 120000 index 00000000000..b1299fc008c --- /dev/null +++ b/Master/bin/i386-solaris/ofm2opl @@ -0,0 +1 @@ +omfonts
\ No newline at end of file diff --git a/Master/bin/i386-solaris/omega b/Master/bin/i386-solaris/omega Binary files differnew file mode 100755 index 00000000000..6c938c96b80 --- /dev/null +++ b/Master/bin/i386-solaris/omega diff --git a/Master/bin/i386-solaris/omfonts b/Master/bin/i386-solaris/omfonts Binary files differnew file mode 100755 index 00000000000..c64778f36eb --- /dev/null +++ b/Master/bin/i386-solaris/omfonts diff --git a/Master/bin/i386-solaris/opl2ofm b/Master/bin/i386-solaris/opl2ofm new file mode 120000 index 00000000000..b1299fc008c --- /dev/null +++ b/Master/bin/i386-solaris/opl2ofm @@ -0,0 +1 @@ +omfonts
\ No newline at end of file diff --git a/Master/bin/i386-solaris/otangle b/Master/bin/i386-solaris/otangle Binary files differnew file mode 100755 index 00000000000..caac5ba7332 --- /dev/null +++ b/Master/bin/i386-solaris/otangle diff --git a/Master/bin/i386-solaris/otfinfo b/Master/bin/i386-solaris/otfinfo Binary files differnew file mode 100755 index 00000000000..b9ff8d35b24 --- /dev/null +++ b/Master/bin/i386-solaris/otfinfo diff --git a/Master/bin/i386-solaris/otftotfm b/Master/bin/i386-solaris/otftotfm Binary files differnew file mode 100755 index 00000000000..a38c1fcce30 --- /dev/null +++ b/Master/bin/i386-solaris/otftotfm diff --git a/Master/bin/i386-solaris/otp2ocp b/Master/bin/i386-solaris/otp2ocp Binary files differnew file mode 100755 index 00000000000..1ffa421cc13 --- /dev/null +++ b/Master/bin/i386-solaris/otp2ocp diff --git a/Master/bin/i386-solaris/outocp b/Master/bin/i386-solaris/outocp Binary files differnew file mode 100755 index 00000000000..5bc3dbbf329 --- /dev/null +++ b/Master/bin/i386-solaris/outocp diff --git a/Master/bin/i386-solaris/ovf2ovp b/Master/bin/i386-solaris/ovf2ovp new file mode 120000 index 00000000000..b1299fc008c --- /dev/null +++ b/Master/bin/i386-solaris/ovf2ovp @@ -0,0 +1 @@ +omfonts
\ No newline at end of file diff --git a/Master/bin/i386-solaris/ovp2ovf b/Master/bin/i386-solaris/ovp2ovf new file mode 120000 index 00000000000..b1299fc008c --- /dev/null +++ b/Master/bin/i386-solaris/ovp2ovf @@ -0,0 +1 @@ +omfonts
\ No newline at end of file diff --git a/Master/bin/i386-solaris/oxdvi b/Master/bin/i386-solaris/oxdvi new file mode 120000 index 00000000000..cf7065c02ca --- /dev/null +++ b/Master/bin/i386-solaris/oxdvi @@ -0,0 +1 @@ +xdvi
\ No newline at end of file diff --git a/Master/bin/i386-solaris/patgen b/Master/bin/i386-solaris/patgen Binary files differnew file mode 100755 index 00000000000..c48e37f79ef --- /dev/null +++ b/Master/bin/i386-solaris/patgen diff --git a/Master/bin/i386-solaris/pdfclose b/Master/bin/i386-solaris/pdfclose Binary files differnew file mode 100755 index 00000000000..c483892842c --- /dev/null +++ b/Master/bin/i386-solaris/pdfclose diff --git a/Master/bin/i386-solaris/pdfcrop b/Master/bin/i386-solaris/pdfcrop new file mode 120000 index 00000000000..d5235ebbcb7 --- /dev/null +++ b/Master/bin/i386-solaris/pdfcrop @@ -0,0 +1 @@ +../../texmf-dist/scripts/pdfcrop/pdfcrop.pl
\ No newline at end of file diff --git a/Master/bin/i386-solaris/pdfcslatex b/Master/bin/i386-solaris/pdfcslatex new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/pdfcslatex @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/pdfcsplain b/Master/bin/i386-solaris/pdfcsplain new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/pdfcsplain @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/pdfetex b/Master/bin/i386-solaris/pdfetex new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/pdfetex @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/pdfjadetex b/Master/bin/i386-solaris/pdfjadetex new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/pdfjadetex @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/pdflatex b/Master/bin/i386-solaris/pdflatex new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/pdflatex @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/pdfmex b/Master/bin/i386-solaris/pdfmex new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/pdfmex @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/pdfopen b/Master/bin/i386-solaris/pdfopen Binary files differnew file mode 100755 index 00000000000..ca07a2f4bba --- /dev/null +++ b/Master/bin/i386-solaris/pdfopen diff --git a/Master/bin/i386-solaris/pdftex b/Master/bin/i386-solaris/pdftex Binary files differnew file mode 100755 index 00000000000..4c98ca9886e --- /dev/null +++ b/Master/bin/i386-solaris/pdftex diff --git a/Master/bin/i386-solaris/pdftexi2dvi b/Master/bin/i386-solaris/pdftexi2dvi new file mode 100755 index 00000000000..17708e76579 --- /dev/null +++ b/Master/bin/i386-solaris/pdftexi2dvi @@ -0,0 +1,19 @@ +#!/bin/sh +# $Id: pdftexi2dvi,v 1.3 2007/07/05 15:22:26 karl Exp $ +# Written by Thomas Esser. Public domain. +# Execute texi2dvi --pdf. + +test -f /bin/ksh && test -z "$RUNNING_KSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; } +unset RUNNING_KSH + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +# hack around a bug in zsh: +test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' + +texi2dvi --pdf ${1+"$@"} diff --git a/Master/bin/i386-solaris/pdfthumb b/Master/bin/i386-solaris/pdfthumb new file mode 100755 index 00000000000..98fcf307468 --- /dev/null +++ b/Master/bin/i386-solaris/pdfthumb @@ -0,0 +1,29 @@ +#!/bin/sh +# +# pdfthumb shell script file last update: 13 Sep 2002 +# +# minimal usage: +# pdfthumb input.pdf output.pdf +# +# Note: input.pdf and output.pdf must be different. +# GhostScript (gs) must me available to create the images. +# Unfortunately it fails on some input files for unknown reasons. +# +# It is assumed that you have at least Java 1.2.x installed +# and can call it with the command java. Otherwise specify the +# path for your Java runtime system. +# +# Modify this script such that jarfile contains the full path +# of the pp4p.jar file. +# +#jarfile=/common/Java/lib/ppower4/pp4p.jar +# +# If you use a web2c distribution, you can place pp4p.jar +# e.g. into the directory texmf/java/ppower4, run mktexlsr, +# comment the assignment above and uncomment the assignment below. +# Thanks to Reinhard Kotucha for contributing this suggestion. +# +jarfile=`kpsewhich -progname=java -format='other binary files' pp4p.jar` +# +# +java -cp ${jarfile} de.tu_darmstadt.sp.pdftools.ThumbGen "$@" diff --git a/Master/bin/i386-solaris/pdftools b/Master/bin/i386-solaris/pdftools new file mode 100755 index 00000000000..92ee803a868 --- /dev/null +++ b/Master/bin/i386-solaris/pdftools @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart pdftools.rb "$@" diff --git a/Master/bin/i386-solaris/pdftosrc b/Master/bin/i386-solaris/pdftosrc Binary files differnew file mode 100755 index 00000000000..fb91c2e583c --- /dev/null +++ b/Master/bin/i386-solaris/pdftosrc diff --git a/Master/bin/i386-solaris/pdfxmltex b/Master/bin/i386-solaris/pdfxmltex new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/pdfxmltex @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/perltex b/Master/bin/i386-solaris/perltex new file mode 120000 index 00000000000..d135aa6f8e4 --- /dev/null +++ b/Master/bin/i386-solaris/perltex @@ -0,0 +1 @@ +../../texmf-dist/scripts/perltex/perltex.pl
\ No newline at end of file diff --git a/Master/bin/i386-solaris/pfb2pfa b/Master/bin/i386-solaris/pfb2pfa Binary files differnew file mode 100755 index 00000000000..f63cf170937 --- /dev/null +++ b/Master/bin/i386-solaris/pfb2pfa diff --git a/Master/bin/i386-solaris/physe b/Master/bin/i386-solaris/physe new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/physe @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/phyzzx b/Master/bin/i386-solaris/phyzzx new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/phyzzx @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/pk2bm b/Master/bin/i386-solaris/pk2bm Binary files differnew file mode 100755 index 00000000000..01111862348 --- /dev/null +++ b/Master/bin/i386-solaris/pk2bm diff --git a/Master/bin/i386-solaris/pkfix b/Master/bin/i386-solaris/pkfix new file mode 120000 index 00000000000..7d1c767c21f --- /dev/null +++ b/Master/bin/i386-solaris/pkfix @@ -0,0 +1 @@ +../../texmf/scripts/pkfix/pkfix.pl
\ No newline at end of file diff --git a/Master/bin/i386-solaris/pktogf b/Master/bin/i386-solaris/pktogf Binary files differnew file mode 100755 index 00000000000..fbdaef048b5 --- /dev/null +++ b/Master/bin/i386-solaris/pktogf diff --git a/Master/bin/i386-solaris/pktype b/Master/bin/i386-solaris/pktype Binary files differnew file mode 100755 index 00000000000..721b8c2c883 --- /dev/null +++ b/Master/bin/i386-solaris/pktype diff --git a/Master/bin/i386-solaris/pltotf b/Master/bin/i386-solaris/pltotf Binary files differnew file mode 100755 index 00000000000..19a35a66aea --- /dev/null +++ b/Master/bin/i386-solaris/pltotf diff --git a/Master/bin/i386-solaris/pooltype b/Master/bin/i386-solaris/pooltype Binary files differnew file mode 100755 index 00000000000..243d59edd6a --- /dev/null +++ b/Master/bin/i386-solaris/pooltype diff --git a/Master/bin/i386-solaris/ppower4 b/Master/bin/i386-solaris/ppower4 new file mode 120000 index 00000000000..a407a5af300 --- /dev/null +++ b/Master/bin/i386-solaris/ppower4 @@ -0,0 +1 @@ +../../texmf-dist/scripts/ppower4/ppower4.texlua
\ No newline at end of file diff --git a/Master/bin/i386-solaris/ps2eps b/Master/bin/i386-solaris/ps2eps new file mode 120000 index 00000000000..81d5f53cfde --- /dev/null +++ b/Master/bin/i386-solaris/ps2eps @@ -0,0 +1 @@ +../../texmf/scripts/ps2eps/ps2eps.pl
\ No newline at end of file diff --git a/Master/bin/i386-solaris/ps2frag b/Master/bin/i386-solaris/ps2frag new file mode 100755 index 00000000000..b8e673be087 --- /dev/null +++ b/Master/bin/i386-solaris/ps2frag @@ -0,0 +1,11 @@ +#!/bin/sh + +tty -s && { + echo + echo "Warning: the ps2frag script is not needed with this version of psfrag." + echo "Please read the manpage ps2frag(1) and the documentation of the" + echo "psfrag package." + echo +} >&2 + +exit 0 diff --git a/Master/bin/i386-solaris/ps2pk b/Master/bin/i386-solaris/ps2pk Binary files differnew file mode 100755 index 00000000000..3cb09aa3bd6 --- /dev/null +++ b/Master/bin/i386-solaris/ps2pk diff --git a/Master/bin/i386-solaris/ps4pdf b/Master/bin/i386-solaris/ps4pdf new file mode 120000 index 00000000000..7e99e0b8d18 --- /dev/null +++ b/Master/bin/i386-solaris/ps4pdf @@ -0,0 +1 @@ +../../texmf-dist/scripts/pst-pdf/ps4pdf
\ No newline at end of file diff --git a/Master/bin/i386-solaris/psbook b/Master/bin/i386-solaris/psbook Binary files differnew file mode 100755 index 00000000000..d8fca5fa388 --- /dev/null +++ b/Master/bin/i386-solaris/psbook diff --git a/Master/bin/i386-solaris/pslatex b/Master/bin/i386-solaris/pslatex new file mode 100755 index 00000000000..4badef0ec12 --- /dev/null +++ b/Master/bin/i386-solaris/pslatex @@ -0,0 +1,46 @@ +#!/bin/sh + +# Copyright 1994 David Carlisle +# This file may be redistributed and/or modified under the terms of the +# LaTeX Project Public License distributed from CTAN archives in directory +# macros/latex/base/lppl.txt; either version 1 of the License, or (at +# your option) any later version. + +test -f /bin/sh5 && test -z "$RUNNING_SH5" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; } +unset RUNNING_SH5 + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +# hack around a bug in zsh: +test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' + +# we want to be able to use options to latex: +while :; do + case $1 in + -*) + latexoptions="$latexoptions \"$1\"" + shift;; + *) + break;; + esac +done + +echo +echo "*************************************" +echo "* Using LaTeX, with pslatex package *" +echo "*************************************" +echo + +# messing around with \PSLATEXTMP is for AUCTeX which calls +# documents via latex \nonstopmode \input{file} + +latex $latexoptions \ + "\AtBeginDocument{\RequirePackage{pslatex}}"\ + "\def\PSLATEXTMP{\futurelet\PSLATEXTMP\PSLATEXTMPB}"\ + "\def\PSLATEXTMPB{\ifx\PSLATEXTMP\nonstopmode\else\input\fi}"\ + "\PSLATEXTMP" ${1+"$@"} diff --git a/Master/bin/i386-solaris/psmerge b/Master/bin/i386-solaris/psmerge new file mode 100755 index 00000000000..9500bcdf7e6 --- /dev/null +++ b/Master/bin/i386-solaris/psmerge @@ -0,0 +1,85 @@ +#!/usr/bin/env perl +# psmerge: merge PostScript files produced by same application and setup +# usage: psmerge [-oout.ps] [-thorough] file1.ps file2.ps ... +# +# Copyright (C) Angus J. C. Duggan 1991-1995 +# See file LICENSE for details. + +$prog = ($0 =~ s=.*/==); + +while ($ARGV[0] =~ /^-/) { + $_ = shift; + if (/^-o(.+)/) { + if (!close(STDOUT) || !open(STDOUT, ">$1")) { + print STDERR "$prog: can't open $1 for output\n"; + exit 1; + } + } elsif (/^-t(horough)?$/) { + $thorough = 1; + } else { + print STDERR "Usage: $prog [-oout] [-thorough] file...\n"; + exit 1; + } +} + +$page = 0; +$first = 1; +$nesting = 0; + +@header = (); +$header = 1; + +@trailer = (); +$trailer = 0; + +@pages = (); +@body = (); + +@resources = (); +$inresource = 0; + +while (<>) { + if (/^%%BeginFont:/ || /^%%BeginResource:/ || /^%%BeginProcSet:/) { + $inresource = 1; + push(@resources, $_); + } elsif ($inresource) { + push(@resources, $_); + $inresource = 0 if /^%%EndFont/ || /^%%EndResource/ || /^%%EndProcSet/; + } elsif (/^%%Page:/ && $nesting == 0) { + $header = $trailer = 0; + push(@pages, join("", @body)) if @body; + $page++; + @body = ("%%Page: ($page) $page\n"); + } elsif (/^%%Trailer/ && $nesting == 0) { + push(@trailer, $_); + push(@pages, join("", @body)) if @body; + @body = (); + $trailer = 1; + $header = 0; + } elsif ($header) { + push(@trailer, $_); + push(@pages, join("", @body)) if @body; + @body = (); + $trailer = 1; + $header = 0; + } elsif ($trailer) { + if (/^%!/ || /%%EOF/) { + $trailer = $first = 0; + } elsif ($first) { + push(@trailer, $_); + } + } elsif (/^%%BeginDocument/ || /^%%BeginBinary/ || /^%%BeginFile/) { + push(@body, $_); + $nesting++; + } elsif (/^%%EndDocument/ || /^%%EndBinary/ || /^%%EndFile/) { + push(@body, $_); + $nesting--; + } else { + print $_ if $print; + } +} + +print @trailer; + +exit 0; + diff --git a/Master/bin/i386-solaris/psnup b/Master/bin/i386-solaris/psnup Binary files differnew file mode 100755 index 00000000000..f2801452a72 --- /dev/null +++ b/Master/bin/i386-solaris/psnup diff --git a/Master/bin/i386-solaris/psresize b/Master/bin/i386-solaris/psresize Binary files differnew file mode 100755 index 00000000000..bbc342d3fd2 --- /dev/null +++ b/Master/bin/i386-solaris/psresize diff --git a/Master/bin/i386-solaris/psselect b/Master/bin/i386-solaris/psselect Binary files differnew file mode 100755 index 00000000000..f68e769f62c --- /dev/null +++ b/Master/bin/i386-solaris/psselect diff --git a/Master/bin/i386-solaris/pstopdf b/Master/bin/i386-solaris/pstopdf new file mode 100755 index 00000000000..5b38ed426cb --- /dev/null +++ b/Master/bin/i386-solaris/pstopdf @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart pstopdf.rb "$@" diff --git a/Master/bin/i386-solaris/pstops b/Master/bin/i386-solaris/pstops Binary files differnew file mode 100755 index 00000000000..de9b2a184d8 --- /dev/null +++ b/Master/bin/i386-solaris/pstops diff --git a/Master/bin/i386-solaris/rlxtools b/Master/bin/i386-solaris/rlxtools new file mode 100755 index 00000000000..41cea40fc09 --- /dev/null +++ b/Master/bin/i386-solaris/rlxtools @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart rlxtools.rb "$@" diff --git a/Master/bin/i386-solaris/rubibtex b/Master/bin/i386-solaris/rubibtex new file mode 100755 index 00000000000..373e6e1194d --- /dev/null +++ b/Master/bin/i386-solaris/rubibtex @@ -0,0 +1,110 @@ +#!/bin/sh + +# rubibtex, based on the original version contained in the t2 bundle. +# Thomas Esser, Public Domain. + +progname=rubibtex +tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$ +job=$1 +backup="$tmpdir/orig.aux" + +case $job in + "") + echo "usage: $progname file" >&2 + exit 1 +esac + +if test ! -f "$job.aux"; then + echo "$progname: file \`$job.aux' does not exist." >&2 + exit 1 +fi + +trap ' + rm -rf "$tmpdir" + exit 1 +' 1 2 3 7 13 15 +(umask 077; mkdir "$tmpdir") \ + || { echo "$progname: could not create directory \`$tmpdir'" >&2; exit 1; } + +cat <"$job.aux" >"$backup" || { + echo "$progname: could not create backup of file \`$job.aux' as \`$backup'." >&2 + rm -rf "$tmpdir" + exit 1 +} + +sed ' + /^\\citation/ { + s/\\IeC {\\CYRA }/á/g + s/\\IeC {\\CYRB }/â/g + s/\\IeC {\\CYRV }/÷/g + s/\\IeC {\\CYRG }/ç/g + s/\\IeC {\\CYRD }/ä/g + s/\\IeC {\\CYRE }/å/g + s/\\IeC {\\CYRYO }/³/g + s/\\IeC {\\CYRZH }/ö/g + s/\\IeC {\\CYRZ }/ú/g + s/\\IeC {\\CYRI }/é/g + s/\\IeC {\\CYRISHRT }/ê/g + s/\\IeC {\\CYRK }/ë/g + s/\\IeC {\\CYRL }/ì/g + s/\\IeC {\\CYRM }/í/g + s/\\IeC {\\CYRN }/î/g + s/\\IeC {\\CYRO }/ï/g + s/\\IeC {\\CYRP }/ð/g + s/\\IeC {\\CYRR }/ò/g + s/\\IeC {\\CYRS }/ó/g + s/\\IeC {\\CYRT }/ô/g + s/\\IeC {\\CYRU }/õ/g + s/\\IeC {\\CYRF }/æ/g + s/\\IeC {\\CYRH }/è/g + s/\\IeC {\\CYRC }/ã/g + s/\\IeC {\\CYRCH }/þ/g + s/\\IeC {\\CYRSH }/û/g + s/\\IeC {\\CYRSHCH }/ý/g + s/\\IeC {\\CYRHRDSN }/ÿ/g + s/\\IeC {\\CYRERY }/ù/g + s/\\IeC {\\CYRSFTSN }/ø/g + s/\\IeC {\\CYREREV }/ü/g + s/\\IeC {\\CYRYU }/à/g + s/\\IeC {\\CYRYA }/ñ/g + s/\\IeC {\\cyra }/Á/g + s/\\IeC {\\cyrb }/Â/g + s/\\IeC {\\cyrv }/×/g + s/\\IeC {\\cyrg }/Ç/g + s/\\IeC {\\cyrd }/Ä/g + s/\\IeC {\\cyre }/Å/g + s/\\IeC {\\cyryo }/£/g + s/\\IeC {\\cyrzh }/Ö/g + s/\\IeC {\\cyrz }/Ú/g + s/\\IeC {\\cyri }/É/g + s/\\IeC {\\cyrishrt }/Ê/g + s/\\IeC {\\cyrk }/Ë/g + s/\\IeC {\\cyrl }/Ì/g + s/\\IeC {\\cyrm }/Í/g + s/\\IeC {\\cyrn }/Î/g + s/\\IeC {\\cyro }/Ï/g + s/\\IeC {\\cyrp }/Ð/g + s/\\IeC {\\cyrr }/Ò/g + s/\\IeC {\\cyrs }/Ó/g + s/\\IeC {\\cyrt }/Ô/g + s/\\IeC {\\cyru }/Õ/g + s/\\IeC {\\cyrf }/Æ/g + s/\\IeC {\\cyrh }/È/g + s/\\IeC {\\cyrc }/Ã/g + s/\\IeC {\\cyrch }/Þ/g + s/\\IeC {\\cyrsh }/Û/g + s/\\IeC {\\cyrshch }/Ý/g + s/\\IeC {\\cyrhrdsn }/ß/g + s/\\IeC {\\cyrery }/Ù/g + s/\\IeC {\\cyrsftsn }/Ø/g + s/\\IeC {\\cyrerev }/Ü/g + s/\\IeC {\\cyryu }/À/g + s/\\IeC {\\cyrya }/Ñ/g + } +' <"$backup" >"$job.aux" + +bibtex "$job" + +cat "$backup" > "$job.aux" +rm -rf "$tmpdir" +exit 0 diff --git a/Master/bin/i386-solaris/rumakeindex b/Master/bin/i386-solaris/rumakeindex new file mode 100755 index 00000000000..b7b0c072729 --- /dev/null +++ b/Master/bin/i386-solaris/rumakeindex @@ -0,0 +1,77 @@ +#!/bin/sh + +BASE=`basename "$1" .idx` +IDX=$BASE.idx +IND=$BASE.ind +ILG=$BASE.ilg + +sed ' +/^\\indexentry{/ { +s/\\IeC {\\CYRA }/¾/g +s/\\IeC {\\cyra }/¿/g +s/\\IeC {\\CYRB }/À/g +s/\\IeC {\\cyrb }/Á/g +s/\\IeC {\\CYRV }/Â/g +s/\\IeC {\\cyrv }/Ã/g +s/\\IeC {\\CYRG }/Ä/g +s/\\IeC {\\cyrg }/Å/g +s/\\IeC {\\CYRD }/Æ/g +s/\\IeC {\\cyrd }/Ç/g +s/\\IeC {\\CYRE }/È/g +s/\\IeC {\\cyre }/É/g +s/\\IeC {\\CYRYO }/Ê/g +s/\\IeC {\\cyryo }/Ë/g +s/\\IeC {\\CYRZH }/Ì/g +s/\\IeC {\\cyrzh }/Í/g +s/\\IeC {\\CYRZ }/Î/g +s/\\IeC {\\cyrz }/Ï/g +s/\\IeC {\\CYRI }/Ð/g +s/\\IeC {\\cyri }/Ñ/g +s/\\IeC {\\CYRISHRT }/Ò/g +s/\\IeC {\\cyrishrt }/Ó/g +s/\\IeC {\\CYRK }/Ô/g +s/\\IeC {\\cyrk }/Õ/g +s/\\IeC {\\CYRL }/Ö/g +s/\\IeC {\\cyrl }/×/g +s/\\IeC {\\CYRM }/Ø/g +s/\\IeC {\\cyrm }/Ù/g +s/\\IeC {\\CYRN }/Ú/g +s/\\IeC {\\cyrn }/Û/g +s/\\IeC {\\CYRO }/Ü/g +s/\\IeC {\\cyro }/Ý/g +s/\\IeC {\\CYRP }/Þ/g +s/\\IeC {\\cyrp }/ß/g +s/\\IeC {\\CYRR }/à/g +s/\\IeC {\\cyrr }/á/g +s/\\IeC {\\CYRS }/â/g +s/\\IeC {\\cyrs }/ã/g +s/\\IeC {\\CYRT }/ä/g +s/\\IeC {\\cyrt }/å/g +s/\\IeC {\\CYRU }/æ/g +s/\\IeC {\\cyru }/ç/g +s/\\IeC {\\CYRF }/è/g +s/\\IeC {\\cyrf }/é/g +s/\\IeC {\\CYRH }/ê/g +s/\\IeC {\\cyrh }/ë/g +s/\\IeC {\\CYRC }/ì/g +s/\\IeC {\\cyrc }/í/g +s/\\IeC {\\CYRCH }/î/g +s/\\IeC {\\cyrch }/ï/g +s/\\IeC {\\CYRSH }/ð/g +s/\\IeC {\\cyrsh }/ñ/g +s/\\IeC {\\CYRSHCH }/ò/g +s/\\IeC {\\cyrshch }/ó/g +s/\\IeC {\\CYRHRDSN }/ô/g +s/\\IeC {\\cyrhrdsn }/õ/g +s/\\IeC {\\CYRERY }/ö/g +s/\\IeC {\\cyrery }/÷/g +s/\\IeC {\\CYRSFTSN }/ø/g +s/\\IeC {\\cyrsftsn }/ù/g +s/\\IeC {\\CYREREV }/ú/g +s/\\IeC {\\cyrerev }/û/g +s/\\IeC {\\CYRYU }/ü/g +s/\\IeC {\\cyryu }/ý/g +s/\\IeC {\\CYRYA }/þ/g +s/\\IeC {\\cyrya }/ÿ/g +}' $IDX | makeindex -t $ILG | tr '¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' \ + 'áÁâÂ÷×çÇäÄåų£öÖúÚéÉêÊëËìÌíÍîÎïÏðÐòÒóÓôÔõÕæÆèÈãÃþÞûÛýÝÿßùÙøØüÜàÀñÑ' > $IND diff --git a/Master/bin/i386-solaris/runtools b/Master/bin/i386-solaris/runtools new file mode 100755 index 00000000000..ff9a333791b --- /dev/null +++ b/Master/bin/i386-solaris/runtools @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart runtools.rb "$@" diff --git a/Master/bin/i386-solaris/showchar b/Master/bin/i386-solaris/showchar new file mode 100755 index 00000000000..e685e99ae8c --- /dev/null +++ b/Master/bin/i386-solaris/showchar @@ -0,0 +1,118 @@ +#!/bin/sh +# showchar: show character with information +# usage: +# showchar Font-Name Char-Name | lpr -Pprinter + +if [ $# != 2 ]; then + echo "Usage: `basename $0` Font-Name Char-Name" >&2 + exit 1 +fi + +cat <<EOF +%! +% Get character metrics and bounding box for $1 +/ns 30 string def +/fname /$1 def +/cname /$2 def +/fn fname findfont 1000 scalefont def +/thin 0.7 def +/reduction 2.0 def + +/sn { ns cvs show } def +/sc { (\()show exch sn (,)show sn (\))show } def + +/Times-Roman findfont 10 scalefont setfont + +72 242 translate % one inch in, 3 1/2 inch up +newpath 0 0 moveto +gsave % print character name + 0 468 rmoveto + ($2 from font $1 displayed on `date` by `basename $0` 1.00 (C) AJCD 1991) + show +grestore + +gsave + thin setlinewidth % cross hairs + -9 0 rmoveto 18 0 rlineto + -9 -9 rmoveto 0 18 rlineto + stroke % position info + -9 -9 moveto ((0,0)) stringwidth pop neg 0 rmoveto + ((0,0)) show +grestore + +% create encoding with a single character at all positions +/MyEncoding 256 array def + +0 1 255 { % fill out with notdefs + MyEncoding exch cname put +} for + +fn dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding MyEncoding def + currentdict +end /newfont exch definefont +/fn exch def +/en MyEncoding def + +gsave % draw character (enlarged) + .75 setgray + fn 1 reduction div scalefont setfont + (\000) show +grestore + +% show character info +fn /Metrics known { + dup fn /Metrics get exch get + dup type /arraytype eq { + dup length 2 eq + {1 get 0} {dup 2 get exch 3 get} ifelse + } { + round 0 + } ifelse +} { + gsave + fn setfont (\000) stringwidth round exch round exch + grestore +} ifelse +gsave % show width + thin setlinewidth + 2 copy + reduction div exch reduction div exch rlineto + gsave + 1 1 rmoveto sc + grestore + -4 -3 rlineto 0 6 rmoveto 4 -3 rlineto + stroke +grestore + +gsave + gsave % get bounding box + fn setfont + (\000) true charpath flattenpath pathbbox + grestore + thin setlinewidth + 3 index reduction div % put coords on top of stack + 3 index reduction div + 3 index reduction div + 3 index reduction div + 3 index 3 index moveto + gsave % llx lly + 0 -9 rmoveto 7 index 7 index sc + grestore + 1 index 3 index lineto + gsave % urx lly + 0 -9 rmoveto 5 index 7 index sc + grestore + 1 index 1 index lineto + gsave % urx ury + 0 9 rmoveto 5 index 5 index sc + grestore + 3 index 1 index lineto + gsave % llx ury + 0 9 rmoveto 7 index 5 index sc + grestore + closepath stroke +grestore +showpage +EOF diff --git a/Master/bin/i386-solaris/simpdftex b/Master/bin/i386-solaris/simpdftex new file mode 100755 index 00000000000..86f8ec0e623 --- /dev/null +++ b/Master/bin/i386-solaris/simpdftex @@ -0,0 +1,570 @@ +#!/bin/sh + +# Created by Gerben Wierda, May 2001 +# Rewritten by Gerben Wierda, January 2002 + +# Modified by Joachim Kock, May 2003 + +# COPYRIGHT Gerben Wierda 2001--2004 +# This file is free software. You are free to use this file in any way you like +# However, if you change it you should note in this file that you did and who +# you are, you also need to change the version string if you do. That way +# I will not get support questions for software that is not entirely mine. + +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# $Id: altpdftex,v 2.18 2004/11/15 20:36:11 gerben Exp $ + +# This script assumes that there is a config.pdf somewhere that sets +# the bitmap mode to something large but realistic (real mode) so that +# unavailable pfb fonts will be included as bitmaps. + +# Version 1.0: added the string above for identification purposes +# Version 1.0a: Cosmetic change: do not display dir of argv[0] all the time +# Added calledas variable to hold command basename +# Version 1.1: Use calledas instead of $0 which means the sed command +# for determining format below also works when there is no dir +# (run from dir where altpdftex resides, not very likely...) +# Version 1.2: Force the use of tex binaries from the same directory as +# this script +# Version 1.3: Added --echo-version option, placed argument check after +# switch, inside while to prevent subscript out of range error +# Added --tex-path to override directory where this script +# resides. Added --gs-path to override a new default gs +# directory /usr/local/bin. Also, force gs directory at the +# start of the path to repair for broken installations of +# TeX, gs and such +# Version 1.4: Moved path changes to just before calling gs so that only +# ps2pdf is affected +# Version 1.5: Removed some path-related redundancy from GS calling +# Version 1.5a: Missing ${extradviopts} from echo +# Added version to --help output +# Added wolfram.map +# Version 1.6: Fixed bug: --dviopts did not work because it did set +# the wrong variable +# Changed dviopts to dvipsopts (better name) +# Version 1.7: Added --distiller and --distiller-filter option +# Changed --gs-path to --distiller-path +# Changed distiller semantics +# Fixed bug --tex-path flag needed trailing '/' +# Some extra quoting to be more robust for whitespace +# in names, also internally +# Version 1.8: Added pstill and u-psbuild info to help +# Version 1.9: Removed textrace bbold font (textrace is broken) +# Version 1.10: Added amstex support +# Simplified different format support +# Version 1.11: Do not source ~/.{t}cshrc, use the environment 'as is' +# Version 1.11 says it is version 1.10! +# Version 1.12: Added textrace bold font (textrace 0.48 is ok) +# Version 1.13: Changed success message at the end +# Echo version on by default +# Debug option +# Version 1.13b:Date report on version was very out of date, removed + +# Version 2.0: Rewritten in /bin/sh because (t)csh does not handle signals +# very well... +# This version works, but you need to send the SIGTERM to +# the process group (the negative PID) to get it to work +# Version 2.1: Small bug fixes +# Version 2.2: Fixed bug where argument without extension was interpreted +# as dvi file. +# Removed dependencies on smart sh versions +# Version 2.3: Removed map file knowledge (needs to be outside this script) +# beyond the standard map files +# Version 2.4: Added support for omega and lambda (use odvips) +# Version 2.5: Changed maxpk and maxpfb implementation to recent updmap +# Version 2.6: Use ps2pdf13 as the default distiller +# Version 2.7: Changed help +# Version 2.8: Checked into CVS. +# Added handling of outdir for TeX +# Version 2.9: Added auto-outdir flag +# Version 2.10: Changed --outdir behaviour to mimick TEXMFOUTPUT, +# removed --auto-outdir +# Version 2.11: Fixed typo +# Version 2.12: RCS changes, from now on, the version number is the RCS number +# These notes here will become a ChangeLog. +# 2003/05/20 Joachim's modification: write first to a pdf file in tmp, +# and only upon completion copy the file to its final +# destination. This is done in order to minimise the time where +# the pdf file in current directory is in an unstable state, +# because a PDF viewer might be tracking the file, and +# if it finds the pdf file in an intermediate state it will +# display a blank page until the new version is ready. +# 2003/05/21 Joachim's modification used /bin/cp. Gerben made it truly +# atomic by using /bin/cp in combination with /bin/mv +# 2003/11/23 Added supportfor passing flasg to tex at the request of +# Dick Koch. +# 2004/09/05 Bugfix: make it work better with directories with whitespace +# in their name +# 2004/11/15 New calling mode: simpdftex format foo.tex +# e.g.: +# simpdftex latex foo.tex +# In the future, the old modes (altpdflatex and friends) through +# symlinks will disappear from my distribution, though they will +# still work. + +# FEATURE: it seems -u +foo.map -u -foo.map does not work. So --extradvipsopts +# cannot be used to remove a map from the standard list + +# BUG: Handling of file name extensions is not completely equialent to TeX +# i.e. foo.bar.bla gets you foo.bar.pdf not foo.bar.bla.pdf +# Give all extensions + +version='$Revision: 2.18 $' +calledas=`basename "$0"` +if [ "${calledas}" = "simpdftex" ] +then + argwithoutlead=`echo -n "$1"|sed 's/^--//'` + if [ "$1" != "" -a "$1" = "${argwithoutlead}" ] + then + formatname="$1" + shift + calledas="altpdf${formatname}" + fi +fi +argvbackup="$*" + +# maxpkdvipsopts: use only pfb's for real PS fonts, bitmaps are default for the others +maxpkdvipsopts="-Ppk" +# maxpfbdvipsopts: use as many pfb's as possible +maxpfbdvipsopts="-Poutline" +opt_dvipsopts="" + +# Defaults: +# altpdftex --default is the default setting, it also works +# when there is no config.pdf file +extradvipsoptions="" +dvipsoptions="$maxpfbdvipsopts" +outputpostfix=".maxpfb" +simplename="yes" +keeppsfile="no" +echoversion="yes" +texpath=`dirname "$0"` +# Default distiller is ps2pdf from /usr/local/bin in no filter mode +# as the direct call to a filtering gs does not work yet for some reason +#distillerpath="" +#distillerprog="/usr/local/bin/gs -dCompatibility=1.3 -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=- -c save pop" +#distillerfilter="yes" +distillerpath="/usr/local/bin" +distillerprog="ps2pdf13" +distillerfilter="no" +unset outdir +debug="no" + +usage() +{ + cat <<_eof_help +This is simpdftex, $version + +Usage: simpdftex formatname + [--dvipsopts dvipsoptstring] [--extradvipsopts dvipsoptstring] [--pdf] + [--default] [--maxpk] [--maxpfb] [--extendedname] [--no-echo-version] + [--tex-path dir] [--keep-psfile] [--distiller-path dir] [--debug] + [--distiller prog] [--distiller-filter prog] [--help] + [--outdir dir] [--extratexopts texoptsstring] tex-or-dvi-file + +simpdftex is a way to do pdf{e}{la}tex without having pdf{e}{la}tex. It needs a +working TeX environment and ghostscript. Since pdf{e}{la}tex cannot handle +insertion of .eps graphics, simpdftex gives an alternative. The output for both +systems is comparable. + +simpdftex compiles the file with {LA}TeX, processes the DVI file with dvips into +PostScript and uses gs to produce pdf (with ps2pdf). There is finegrained +control over the resulting filename and the options with which dvips produces +the PostScript intermediary file. + +Dvips will call Metafont to produce bitmaps or include PostScript .pfb files +depending on the flags. See below. + +Default settings is normal name, maximal use of pfb's, just like pdf{la}tex, +in other words, "pdftex file.tex" and "altpdftex file.tex" both produce an +output file file.pdf. For pdftex, output options are controlled by pdftex.cfg, +for altpdftext by config.ps (unless --pdf is given). + +Arguments: + tex-or-dvi-file + If a .dvi file is given, skip the TeX process. Otherwise, TeX + the input file, dvips the resulting dvi file and ps2pdf the + resulting ps file + --help + Display this message and exit + --no-echo-version + Do not echo location and version of this script. Does not exit + so can be used tochange info to the output of a real run + --debug + Add some debug output + --extendedname + Depending on the mode, adds intermediary extensions to the + output filename. If the mode is --pdf, .pdfmode is added. If + the mode is --maxpk, ,maxpk is added and if the mode is + --maxpfb, .maxpfb is added. Example: + tex-or-dvi-file-basename.maxpfb.pdf + --maxpk + Use Metafont bitmaps (pk files) when possible. Only real + PostScript fonts (like Times Roman) are included as + PostScript fonts. All other fonts are included as bitmaps + for the default printer resolution. This options produces + optimal results for the chosen printer. + For file contents (not name) equivalent to: + --dvipsopts "-Ppk" + --maxpfb + Use PostScript pfb files whenever possible. This produces + optimal results for the screen. + For file contents (not name) equivalent to: + --dvipsopts "-Poutline" + If any font is included as TeX pk bitmap, it is rendered + at the default resolution. + --pdf + Select .pdfmode extension for the output file name if + --extendedname has been set. Use printer definition + config.pdf. For file contents (not name) equivalent to + --dvipsopts "-Ppdf" + Note that the default config.pdf assumes resolution 8000 + for bitmaps and bitmap generation fails at this resolution + because there exists no known mode for that resolution. + --default + Select no extension for the output file name, even if + --extendedfilename has been set. Use standard printer + definition config.ps. For file contents (not name) equivalent + to: + --dvipsopts "" --noextendedname + --dvipsopts + Give arbitrary arguments to dvips, e.g. + --dvipsopts "-M" + Sets extension for --extendedfilename to .custom. --dvipsopts + overrides other flags that set dvipsopts. + --extratexopts + Give extra arbitrary arguments to tex, e.g. + --extratexopts "--interaction=nonstopmode" + Sets extra options for the tex command that is used. + --extradvipsopts + Give extra arbitrary arguments to dvips, e.g. + --extradvipsopts "-M" + Sets extra options for dvips and does not set extension + or override other options. Options will be added to the end + of the options for dvips + --keep-psfile + After running dvips, copy the ps file over to the directory + where the tex file is, possibly overwriting a ps file + that is there. Use with caution, a ps file could be input + as well. + --tex-path + Give path of TeX binaries, use directory of this script + otherwise + --distiller prog + Use a distiller different from ps2pdf which is the default. + Argument must be an executable or executable script that + gets called iwth two arguments: input file (PS) and output + file (PDF). E.g.: + --distiller=/usr/local/alternate/bin/ps2pdf + --distiller=pstill + Using this flag sets the distiller filter mode to off + --distiller-filter prog + Use a distiller executable or executable script which is + called with the PS input as standard input and which writes + the PDF output to standard output. E.g.: + --distiller-filter=u-psbuild + --distiller-path + Give path needed by the distiller binary. This path is added + to the begin of you PATH environment before the distiller is + run. The reason is that for instance ps2pdf uses the path to + find gs and sets the path to something with /sw/bin at the + beginning. Thus, installing gs from fink would make + /usr/local/bin/ps2pdf find another gs than intended. By giving + an empty path, the path is not changed before the distiller + program is run. The default is empty. + --outdir dir + Write files here *if* our current directory is unwritable. This + mimicks the TEXMFOUTPUT environment variable of TeX, but + differently. The current dir becomes the value of --outdir and + the directory where the old current dir is added to TEXINPUTS. + This is more robust for reading and locating files. + You can also set TEXMFOUTPUT instead, but with a disadvantage: + you will be running TeXin the current dir. And you will not be + able to read files in the outdir unless you also adapt + TEXINPUTS. + + The defaults for the distiller are + Path addition: "${distillerpath}" + Filter mode: "${distillerfilter}" + Program: "${distillerprog}" + + Later flags override settings of earlier flags. +_eof_help +} + +while test $# -gt 0 +do + case $1 in + --help) + usage + exit 0;; + --dvipsopts) + shift + outputpostfix=".custom" + dvipsoptions="$1" + ;; + --extradvipsopts) + shift + extradvipsoptions="$1" + ;; + --extratexopts) + shift + extratexoptions="$1" + ;; + --tex-path) + shift + texpath="$1" + ;; + --pdf) + outputpostfix=".pdfmode" + dvipsoptions="-P pdf" + ;; + --default) + outputpostfix="" + dvipsoptions="" + # Use the default print option in config.ps + ;; + --maxpk) + outputpostfix=".maxpk" + dvipsoptions="$maxpkdvipsopts" + ;; + --maxpfb) + outputpostfix=".maxpbfb" + dvipsoptions="$maxpfbdvipsopts" + ;; + --extendedname) + simplename="no" + ;; + --keep-psfile) + keeppsfile="yes" + ;; + --debug) + debug="yes" + ;; + --distiller-path) + shift + distillerpath="$1" + ;; + --distiller) + shift + distillerprog="$1" + distillerfilter="no" + ;; + --outdir) + shift + export TEXINPUTS=`pwd`:`kpsewhich --expand-var '$TEXINPUTS'` + export TEXMFOUTPUT="$1" + outdir="$1/" + outdirset="yes" + cd "$1" + ;; + --distiller-filter) + shift + distillerprog="$1" + distillerfilter="yes" + ;; + --no-echo-version) + echoversion="no" + ;; + --*) + echo "Unknown option $1" + exit 1;; + "") + ;; + *) + break;; + esac + shift +done + +if [ "${echoversion}" = "yes" -a "${debug}" = "no" ] +then + echo "### This is $0, Version ${version}" +fi + +if [ "${debug}" = "yes" ] +then + echo "##### This is $0, Version ${version}" + echo "##### Arguments: ${argvbackup}" +fi + +cleanup() +{ + if [ "${tmpdir}" != "" -a "${debug}" = "no" ] + then + rm -rf "${tmpdir}" + fi +} + +terminated() +{ + cleanup + exit 1; +} + +trap 'terminated' 15 + +main() +{ + if [ "${file}" = "" ] + then + echo "simpdftex Empty argument: tex-or-dvi-file-name" + exit 1 + fi + + # Argument handling + + if [ "${simplename}" = "yes" ] + then + outputpostfix="" + fi + + startwithdvi="no" + basename=`basename "${file}"` + nosuffixbasename=`echo -n ${basename}|sed 's/\.[^.]*$//'` + nodvisuffixbasename=`echo -n ${basename}|sed 's/\.[dD][vV][iI]$//'` + if [ "${nodvisuffixbasename}" = "${nosuffixbasename}" -a \ + "${basename}" != "${nosuffixbasename}" ] + then + startwithdvi="yes" + fi + + kpsefilename=`kpsewhich "${file}"` + slashdirname=`dirname "${kpsefilename}"`/ + + if [ ! -w "." ] + then + if [ "${TEXMFOUTPUT}" != "" ] + then + outdir="${TEXMFOUTPUT}/" + outdirset="yes" + if [ "${autoinput}" = "yes" ] + then + export TEXINPUTS=${TEXMFOUTPUT}:`kpsewhich --expand-var '$TEXINPUTS'` + + fi + else + echo "### Cannot write in current directory and no redirect found. Bailing out..." + exit 1 + fi + fi + + # Assume the command is called altpdf* where the rest is the actual tex + # program to be run + texprogram=`echo ${calledas}|sed 's/altpdf//'` + if [ "${texprogram}" = "omega" -o "${texprogram}" = "lambda" ] + then + dvips="odvips" + else + dvips="dvips" + fi + + # Handle temp dir (cleanup is called on signal) + tmpext=$$-`/bin/date +"%s"` + tmpdir="/tmp/altpdf${texprogram}.${tmpext}" + # Force removal of possible existing tmpdir + cleanup + # Make new version + mkdir "${tmpdir}" + + if [ "${startwithdvi}" = "yes" ] + then + dvifile="${file}" + else + texfile="${file}" + dvifile="${outdir}${nosuffixbasename}.dvi" + fi + + psfile="${tmpdir}/${nosuffixbasename}${outputpostfix}.ps" + savedpsfile="${outdir}${nosuffixbasename}.ps" + pdffile="${tmpdir}/${nosuffixbasename}${outputpostfix}.pdf" + savedpdffile="${outdir}${nosuffixbasename}${outputpostfix}.pdf" + + if [ "${debug}" = "yes" ] + then + echo "##### TeX file: $texfile" + echo "##### DVI file: $dvifile" + echo "##### PS file: $psfile" + echo "##### Saved PS file: $savedpsfile" + echo "##### Created PDF file: $pdffile" + echo "##### Final PDF file: $savedpdffile" + echo "##### Environment:" + env | sed 's/^/##### /g' + fi + + if [ "${startwithdvi}" = "yes" ]; then + echo "### Skipping ${texprogram} ${texfile} [dvi->pdf only]" + else + echo "### ${texpath}/${texprogram} ${texfile}" + "${texpath}/${texprogram}" ${extratexoptions} "${texfile}" || \ + echo "### WARNING: TeX returned non zero exit status ${status}" + fi + + echo "### ${texpath}/${dvips} -R ${dvipsoptions} ${extradvipsoptions} -o ${psfile} ${dvifile}" + "${texpath}/${dvips}" -R ${dvipsoptions} ${extradvipsoptions} -o "${psfile}" "${dvifile}" || \ + { echo "### FAILED to generate ${psfile} (${status})"; \ + exit 1; } + + if [ "${keeppsfile}" = "yes" ]; then + echo "### Saving intermediary ps file ${psfile} as ${savedpsfile}" + /bin/cp "${psfile}" "${savedpsfile}" || \ + echo "### FAILED to save ${psfile} (${status})" + fi + + if [ "${distillerpath}" != "" ]; then + PATH="${distillerpath}:${PATH}";export PATH + if [ "${debug}" = "yes" ]; then + echo "##### PATH set to ${PATH}" + fi + fi + + if [ "${distillerfilter}" = "yes" ]; then + echo "### ${distillerprog} <${psfile} >${pdffile}" + "${distillerprog}" <"${psfile}" >"${pdffile}" || \ + { echo "### FAILED to generate ${pdffile} (${status})" + exit 1; } + else + echo "### ${distillerprog} ${psfile} ${pdffile}" + "${distillerprog}" "${psfile}" "${pdffile}" || \ + { echo "### FAILED to generate ${pdffile} (${status})" + exit 1; } + fi + + echo "### Copying/moving pdf file ${pdffile} to ${savedpdffile}" + /bin/cp "${pdffile}" "${savedpdffile}.${tmpext}" || \ + echo "### FAILED to copy ${pdffile} (${status})" + /bin/rm -f "${savedpdffile}" + /bin/mv "${savedpdffile}.${tmpext}" "${savedpdffile}" || \ + echo "### FAILED to rename ${savedpdffile}.${tmpext} (${status})" + + if [ "${startwithdvi}" = "yes" ]; then + if [ "${keeppsfile}" = "yes" ]; then + echo "### Succesfully generated ${savedpdffile} and ${savedpsfile}" + else + echo "### Succesfully generated ${savedpdffile}" + fi + else + if [ "${keeppsfile}" = "yes" ]; then + echo "### Succesfully generated ${dvifile}, ${savedpdffile} and ${savedpsfile}" + else + echo "### Succesfully generated ${dvifile} and ${savedpdffile}" + fi + fi + + cleanup +} + +for file in "$@" +do + main +done diff --git a/Master/bin/i386-solaris/sjisconv b/Master/bin/i386-solaris/sjisconv Binary files differnew file mode 100755 index 00000000000..39d300d06d1 --- /dev/null +++ b/Master/bin/i386-solaris/sjisconv diff --git a/Master/bin/i386-solaris/sjislatex b/Master/bin/i386-solaris/sjislatex new file mode 100755 index 00000000000..68c554e6d71 --- /dev/null +++ b/Master/bin/i386-solaris/sjislatex @@ -0,0 +1,43 @@ +#! /bin/sh + +# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program in doc/COPYING; if not, write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301 USA + +n=1 +argv= + +# get last argument +while test 1 -lt $#; do + eval argv$n=\$1 + argv="$argv \"\$argv$n\"" + n=`expr $n + 1` + shift +done + +# replace extension with .cjk or append .cjk if there is no extension +tex=$1 +case $tex in +""|*.cjk) + echo >&2 "Usage: $0 [options] latex-file" + exit 1;; +*) + aux=`expr "X$tex" : 'X\(.*\)\.[^/]*$' \| "X$tex" : 'X\(.*\)'`.cjk;; +esac + +sjisconv < "$tex" > "$aux" && eval latex "$argv" "\$aux" + +# EOF diff --git a/Master/bin/i386-solaris/sjispdflatex b/Master/bin/i386-solaris/sjispdflatex new file mode 100755 index 00000000000..e8d070e9dc6 --- /dev/null +++ b/Master/bin/i386-solaris/sjispdflatex @@ -0,0 +1,43 @@ +#! /bin/sh + +# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program in doc/COPYING; if not, write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301 USA + +n=1 +argv= + +# get last argument +while test 1 -lt $#; do + eval argv$n=\$1 + argv="$argv \"\$argv$n\"" + n=`expr $n + 1` + shift +done + +# replace extension with .cjk or append .cjk if there is no extension +tex=$1 +case $tex in +""|*.cjk) + echo >&2 "Usage: $0 [options] latex-file" + exit 1;; +*) + aux=`expr "X$tex" : 'X\(.*\)\.[^/]*$' \| "X$tex" : 'X\(.*\)'`.cjk;; +esac + +sjisconv < "$tex" > "$aux" && eval pdflatex "$argv" "\$aux" + +# EOF diff --git a/Master/bin/i386-solaris/t1ascii b/Master/bin/i386-solaris/t1ascii Binary files differnew file mode 100755 index 00000000000..f5038cf08f8 --- /dev/null +++ b/Master/bin/i386-solaris/t1ascii diff --git a/Master/bin/i386-solaris/t1asm b/Master/bin/i386-solaris/t1asm Binary files differnew file mode 100755 index 00000000000..aa29886d8ed --- /dev/null +++ b/Master/bin/i386-solaris/t1asm diff --git a/Master/bin/i386-solaris/t1binary b/Master/bin/i386-solaris/t1binary Binary files differnew file mode 100755 index 00000000000..028512cb1f8 --- /dev/null +++ b/Master/bin/i386-solaris/t1binary diff --git a/Master/bin/i386-solaris/t1disasm b/Master/bin/i386-solaris/t1disasm Binary files differnew file mode 100755 index 00000000000..c2b6d71238a --- /dev/null +++ b/Master/bin/i386-solaris/t1disasm diff --git a/Master/bin/i386-solaris/t1dotlessj b/Master/bin/i386-solaris/t1dotlessj Binary files differnew file mode 100755 index 00000000000..3fcd000f076 --- /dev/null +++ b/Master/bin/i386-solaris/t1dotlessj diff --git a/Master/bin/i386-solaris/t1lint b/Master/bin/i386-solaris/t1lint Binary files differnew file mode 100755 index 00000000000..9c3bd503cfd --- /dev/null +++ b/Master/bin/i386-solaris/t1lint diff --git a/Master/bin/i386-solaris/t1mac b/Master/bin/i386-solaris/t1mac Binary files differnew file mode 100755 index 00000000000..a3d7d4d171b --- /dev/null +++ b/Master/bin/i386-solaris/t1mac diff --git a/Master/bin/i386-solaris/t1reencode b/Master/bin/i386-solaris/t1reencode Binary files differnew file mode 100755 index 00000000000..48ff98d6337 --- /dev/null +++ b/Master/bin/i386-solaris/t1reencode diff --git a/Master/bin/i386-solaris/t1testpage b/Master/bin/i386-solaris/t1testpage Binary files differnew file mode 100755 index 00000000000..fc12323fac0 --- /dev/null +++ b/Master/bin/i386-solaris/t1testpage diff --git a/Master/bin/i386-solaris/t1unmac b/Master/bin/i386-solaris/t1unmac Binary files differnew file mode 100755 index 00000000000..a1f34d86d36 --- /dev/null +++ b/Master/bin/i386-solaris/t1unmac diff --git a/Master/bin/i386-solaris/t4ht b/Master/bin/i386-solaris/t4ht Binary files differnew file mode 100755 index 00000000000..d868bec4916 --- /dev/null +++ b/Master/bin/i386-solaris/t4ht diff --git a/Master/bin/i386-solaris/tangle b/Master/bin/i386-solaris/tangle Binary files differnew file mode 100755 index 00000000000..f8e000781f7 --- /dev/null +++ b/Master/bin/i386-solaris/tangle diff --git a/Master/bin/i386-solaris/tcdialog b/Master/bin/i386-solaris/tcdialog Binary files differnew file mode 100755 index 00000000000..6037c578782 --- /dev/null +++ b/Master/bin/i386-solaris/tcdialog diff --git a/Master/bin/i386-solaris/tex b/Master/bin/i386-solaris/tex Binary files differnew file mode 100755 index 00000000000..f964b261002 --- /dev/null +++ b/Master/bin/i386-solaris/tex diff --git a/Master/bin/i386-solaris/tex4ht b/Master/bin/i386-solaris/tex4ht Binary files differnew file mode 100755 index 00000000000..0a5050b5529 --- /dev/null +++ b/Master/bin/i386-solaris/tex4ht diff --git a/Master/bin/i386-solaris/texconfig b/Master/bin/i386-solaris/texconfig new file mode 100755 index 00000000000..b2129f8814a --- /dev/null +++ b/Master/bin/i386-solaris/texconfig @@ -0,0 +1,1407 @@ +#!/bin/sh + +# TeXConfig version 3.0 +# Thomas Esser, te@dbs.uni-hannover.de. Public domain. + +# invoke the right shell: + +test -f /bin/ksh && test -z "$RUNNING_KSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; } +unset RUNNING_KSH + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +export PATH + +# hack around a bug in zsh: +test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' + +# initializations... +progname=texconfig + +# the version string +version=20080505.2038 + +envVars=" + AFMFONTS BIBINPUTS BSTINPUTS CMAPFONTS CWEBINPUTS ENCFONTS GFFONTS + GLYPHFONTS INDEXSTYLE LIGFONTS MFBASES MFINPUTS MFPOOL MFTINPUTS + MISCFONTS MPINPUTS MPMEMS MPPOOL MPSUPPORT OCPINPUTS OFMFONTS + OPENTYPEFONTS OPLFONTS OTPINPUTS OVFFONTS OVPFONTS PDFTEXCONFIG PKFONTS + PSHEADERS SFDFONTS T1FONTS T1INPUTS T42FONTS TEXBIB TEXCONFIG TEXDOCS + TEXFONTMAPS TEXFONTS TEXFORMATS TEXINDEXSTYLE TEXINPUTS TEXMFCNF + TEXMFDBS TEXMFINI TEXMFSCRIPTS TEXPICTS TEXPKS TEXPOOL TEXPSHEADERS + TEXSOURCES TFMFONTS TRFONTS TTFONTS VFFONTS WEB2C WEBINPUTS +" +tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/tctmp.$$ +needsCleanup=false +lastUpdatedFile= + +# +############################################################################### +# setupFMT(void) - find a suitable version of fmt / adjust +# +setupFMT() +{ + case $FMT in + "") + FMT=fmt + test ! -x /bin/fmt && test ! -f /usr/bin/fmt && + { test -x /bin/adjust || test -x /usr/bin/adjust; } && FMT=adjust + ;; + *) + return + ;; + esac +} + +############################################################################### +# myFmt(args) - run $FMT +# +myFmt() +{ + setupFMT + $FMT ${1+"$@"} +} + +############################################################################### +# echoShowVariable(args ...) +# show environment variables which names are as args and their values +# +echoShowVariable() +{ + for esv + do + var=$esv + eval val=\"\${$var+=}\${$var- is unset}\" + echo "$var$val" + done | grep -v 'is unset$' +} + +############################################################################### +# echoShowKpseVariable(args ...) +# show kpathsea variables which names are as args and their values +# +echoShowKpseVariable() +{ + for eskv + do + var=$eskv + val=`kpsewhich -var-value="$eskv"` + echo "$var=$val" + done +} + +############################################################################### +# echoLocateBinary(args ...) - show where programs actually exist +# +echoLocateBinary() +{ + for elb + do + elbLoc=`checkForBinary "$elb"` + if test -n "$ELB_PATH_ONLY"; then + test -n "$elbLoc" && echo "$elbLoc" + else + case $elbLoc in + "") echo "$elb: not found";; + *) echo "$elb: $elbLoc";; + esac + fi + done +} + +############################################################################### +# echoLocateCfgfile(args ...) - show where files actually exist +# +echoLocateCfgfile() +{ + for elc + do + case $elc in + texmf.cnf) elcLoc=`kpsewhich $elc`;; + *) elcLoc=`tcfmgr --cmd find --file "$elc"`;; + esac + case $elcLoc in + "") echo "$elc: not found";; + *) echo "$elcLoc";; + esac + done +} + +############################################################################### +# checkForBinary(prog) - echo full path of prog +# +checkForBinary() +{ + cfbBinary=$1 + + OLDIFS=$IFS + IFS=: + set x `echo "$PATH" | sed 's/^:/.:/; s/:$/:./; s/::/:.:/g'`; shift + found=false + for pathElem + do + case $pathElem in + "") continue;; + *) test -f "$pathElem/$cfbBinary" && { echo "$pathElem/$cfbBinary"; found=true; break; } + esac + done + IFS=$OLDIFS + case $found in + true) (exit 0); return 0;; + false) (exit 1); return 1;; + esac +} + +############################################################################### +# cleanup() - clean up the temp area and exit with proper exit status +# +cleanup() +{ + rc=$1 + $needsCleanup && test -n "$tmpdir" && test -d "$tmpdir" \ + && { cd / && rm -rf "$tmpdir"; } + (exit $rc); exit $rc +} + +############################################################################### +# setupTmpDir() - set up a temp directory and a trap to remove it +# +setupTmpDir() +{ + case $needsCleanup in + true) return;; + esac + + trap 'cleanup 1' 1 2 3 7 13 15 + needsCleanup=true + (umask 077; mkdir "$tmpdir") \ + || abort "could not create directory \`$tmpdir'" +} + +############################################################################### +# setupTexmfmain() - get value for MT_TEXMFMAIN (with caching) +# +setupTexmfmain() +{ + case $MT_TEXMFMAIN in + "") MT_TEXMFMAIN=`kpsewhich -var-value=TEXMFMAIN`;; + *) return;; + esac +} + +############################################################################### +# setupTexmfmain() - get value for MT_TEXMFDIST (with caching) +# +setupTexmfdist() +{ + case $MT_TEXMFDIST in + "") MT_TEXMFDIST=`kpsewhich -var-value=TEXMFDIST`;; + *) return;; + esac +} + +############################################################################### +# setupTexmfvar() - get value for MT_TEXMFVAR (with caching) +# +setupTexmfvar() +{ + case $MT_TEXMVAR in + "") MT_TEXMVAR=`kpsewhich -var-value=TEXMFVAR`;; + *) return;; + esac +} + +############################################################################### +# setupSystexmf() - get value for MT_SYSTEXMF (with caching) +# +setupSystexmf() +{ + case $MT_SYSTEXMF in + "") MT_SYSTEXMF=`kpsewhich -var-value=SYSTEXMF`;; + *) return;; + esac +} + +############################################################################### +# abort(errmsg) +# print `errmsg' to stderr and exit with error code 1 +# +abort() +{ + echo "$progname: $1." >&2 + cleanup 1 +} + +############################################################################### +# mktexdir(args) +# call mktexdir script, disable all features (to prevent sticky directories) +# +mktexdir() +{ + setupTexmfmain + MT_FEATURES=none "$MT_TEXMFMAIN/web2c/mktexdir" "$@" >&2 +} + +############################################################################### +# tcfmgr(args) - call tcfmgr script +# +tcfmgr() +{ + setupTexmfmain + "$MT_TEXMFMAIN/texconfig/tcfmgr" "$@" +} + +############################################################################### +# mktexupd(args) - call mktexupd script +# +mktexupd() +{ + setupTexmfmain + "$MT_TEXMFMAIN/web2c/mktexupd" "$@" +} + +############################################################################### +# getRelDir(file) +# matches file against SYSTEXMF. Returns relative directory of file within +# a texmf tree in variable relPart. +# +getRelDir() +{ + file=$1 + relPart= + + setupSystexmf + OLDIFS=$IFS + IFS=' +' + set x `echo "$MT_SYSTEXMF" | tr : ' +'`; shift + IFS=$OLDIFS + + # now loop over all components of SYSTEXMF + for dir + do + test -n "$dir" || continue + case "$file" in + $dir/*) + relPart=`echo "$file" | sed "s%$dir/*%%"` + break + ;; + esac + done + + # now check for success / failure + case $relPart in + ""|$file) + # empty or full filename -> getRelDir failed! + (exit 1); return 1 + ;; + *) + # relPart should just have the "dirname" part: + relPart=`echo "$relPart" | sed 's%/*[^/]*$%%'` + (exit 0); return 0 + ;; + esac +} + +############################################################################### +# configReplace(file pattern line) +# The first line in file that matches pattern gets replaced by line. +# line will be added at the end of the file if pattern does not match. +# +configReplace() +{ + configReplaceFile=$1; configReplacePat=$2; configReplaceLine=$3 + + if grep "$configReplacePat" "$configReplaceFile" >/dev/null; then + ed "$configReplaceFile" >/dev/null 2>&1 <<-eof + /$configReplacePat/c + $configReplaceLine + . + w + q +eof + else + echo "$configReplaceLine" >> $configReplaceFile + fi +} + +############################################################################### +# fmgrConfigReplace (file regex value) +# replaces line matching regex by value in file +# +fmgrConfigReplace() +{ + fmgrConfigReplaceChanged=false + + moreArgs="" + while + case $1 in + --*) moreArgs="$moreArgs $1 $2";; + *) break;; + esac + do shift; shift; done + fmgrConfigReplaceFile=$1 + fmgrConfigReplaceRegex=$2 + fmgrConfigReplaceValue=$3 + + setupTmpDir + co=`tcfmgr $moreArgs --tmp $tmpdir --cmd co --file $fmgrConfigReplaceFile` + if test $? != 0; then + echo "$progname: fmgrConfigReplace co failed for \`$fmgrConfigReplaceFile'" >&2 + (exit 1); return 1 + fi + set x $co; shift + fmgrConfigReplaceID=$1; fmgrConfigReplaceCfgFile=$3; fmgrConfigReplaceOrigFile=$4 + configReplace "$fmgrConfigReplaceCfgFile" "$fmgrConfigReplaceRegex" "$fmgrConfigReplaceValue" + ci=`tcfmgr --tmp $tmpdir --cmd ci --id "$fmgrConfigReplaceID"` + if test $? != 0; then + echo "$progname: fmgrConfigReplace ci failed for \`$fmgrConfigReplaceFile'" >&2 + (exit 1); return 1 + fi + case $ci in + "") :;; + $lastUpdatedFile) + fmgrConfigReplaceChanged=true;; + *) echo "$progname: updated configuration saved as file \`$ci'" >&2 + fmgrConfigReplaceChanged=true + lastUpdatedFile=$ci;; + esac + (exit 0); return 0 +} + +############################################################################### +# setupDvipsPaper(paper) +# rearranges config.ps to make paper the first paper definition +# +setupDvipsPaper() +{ + setupDvipsPaperChanged=false + setupDvipsPaperFile=config.ps + setupDvipsPaperDftPaper=$1 + + setupTmpDir + co=`tcfmgr --tmp $tmpdir --cmd co --file $setupDvipsPaperFile` + if test $? != 0; then + echo "$progname: setupDvipsPaper co failed for \`$setupDvipsPaperFile'" >&2 + (exit 1); return 1 + fi + set x $co; shift + setupDvipsPaperID=$1; setupDvipsPaperCfgFile=$3; setupDvipsPaperOrigFile=$4 + + ed "$setupDvipsPaperCfgFile" > /dev/null 2>&1 <<-eof + /@ /ka + \$a + @ + . + /@ $setupDvipsPaperDftPaper /;/@ /-1m'a-1 + \$d + w + q +eof + + ci=`tcfmgr --tmp $tmpdir --cmd ci --id "$setupDvipsPaperID"` + if test $? != 0; then + echo "$progname: setupDvipsPaper ci failed for \`$setupDvipsPaperFile'" >&2 + (exit 1); return 1 + fi + case $ci in + "") :;; + $lastUpdatedFile) + setupDvipsPaperChanged=true;; + *) echo "$progname: updated configuration saved as file \`$ci'" >&2 + setupDvipsPaperChanged=true + lastUpdatedFile=$ci;; + esac + (exit 0); return 0 +} + +############################################################################### +# setupModesMfFile(void) - find modes.mf file (with caching) +# +setupModesMfFile() +{ + case $modesMfFile in + "") + modesMfFile=`tcfmgr --cmd find --file modes.mf` + ;; + *) + return + ;; + esac +} + +############################################################################### +# locateConfigPsFile(void) - find config.ps file (with caching) +# +locateConfigPsFile() +{ + case $configPsFile in + "") + configPsFile=`tcfmgr --cmd find --file config.ps` + ;; + *) + return + ;; + esac +} + +############################################################################### +# listMfModes(file) - list modes from modes.mf file +# +listMfModes() +{ + grep mode_def "$modesMfFile" | + sed -e "s/mode_def //" \ + -e "s/ .*%[^ ]* / '/" \ + -e "s/\$/' /" | + egrep -v "^(help|%)" | sort +} + +############################################################################### +# listDvipsPapers(void) - list paper definitions from config.ps +# +listDvipsPapers() +{ + grep '@ ' $configPsFile | sed "s/..//;s/ / '/;s/\$/' /" +} + +############################################################################### +# getFormatsForHyphen(void) +# list all formats which have customizable hyphenation +# +getFormatsForHyphen() +{ + fmtutil --catcfg | awk '$3 != "-" {print $1}' | sort +} + +############################################################################### +# getRes(mode) - print resolution (both X and Y axis) to metafont mode +# +getRes() +{ + getResMode=$1 + ( + cd $tmpdir + cat >mftmp.mf <<-'eof' + let myexit = primitive_end_; + mode_setup; + string xdpi; + xdpi := decimal round pixels_per_inch; + message "XDPI = " & xdpi; + string ydpi; + ydpi := decimal round (pixels_per_inch * aspect_ratio); + message "YDPI = " & ydpi; + fontmaking := 0; + myexit; +eof + mf '\mode='"$getResMode"'; \input ./mftmp' </dev/null \ + | awk '$1 == "XDPI" || $1 == "YDPI" { print $3 }' + ) +} + +############################################################################### +# checkElemInList(elem, list) +# check if element exists in list +############################################################################### +checkElemInList() +{ + checkElemInListElem=$1; shift + checkElemInListFound=false + for checkElemInListIter + do + case "x$checkElemInListElem" in + x$checkElemInListIter) + checkElemInListFound=true + break + ;; + esac + done + case $checkElemInListFound in + true) (exit 0); return 0;; + esac + (exit 1); return 1 +} + + +# show version information from the distribution, if we have any. +showDistVersionInfo() +{ + # TeX Live file. + test -f $MT_TEXMFMAIN/../release-texlive.txt \ + && sed 1q $MT_TEXMFMAIN/../release-texlive.txt + + # no harm in continuing to look for the teTeX files. + test -f $MT_TEXMFMAIN/release-tetex-src.txt \ + && "teTeX-src release: `cat $MT_TEXMFMAIN/release-tetex-src.txt`" + test -f $MT_TEXMFDIST/release-tetex-texmf.txt \ + && "teTeX-texmf release: `cat $MT_TEXMFDIST/release-tetex-texmf.txt`" +} + +# +############################################################################### +# tcBatch(args) +# handle batch mode +############################################################################### +tcBatch() +{ + help="texconfig supports adjusting and updating many aspects of +the TeX installation. + +Usage: $progname conf (show configuration information) + $progname dvipdfmx paper PAPER (dvipdfmx paper size) + $progname dvipdfm paper PAPER (dvipdfm paper size) + $progname dvips [OPTION...] (dvips options) + $progname faq (show teTeX faq) + $progname findprog PROG... (show locations of PROGs, a la which) + $progname font vardir DIR + $progname font ro + $progname font rw + $progname formats (edit fmtutil.cnf) + $progname help (or --help; show this help) + $progname hyphen FORMAT (edit hyphenation config for FORMAT) + $progname init [FORMAT]... (rebuild FORMATs, or all formats + plus run texlinks and updmap) + $progname mode MODE (set Metafont MODE) + $progname paper PAPER (set default paper size to PAPER) + $progname pdftex [OPTION]... (pdftex options) + $progname rehash (rebuild ls-R files with mktexlsr) + $progname version (or --version; show version info) + $progname xdvi paper PAPER (xdvi paper size) + +Get more help with: + $progname dvipdfmx + $progname dvipdfm + $progname dvips + $progname font + $progname hyphen + $progname mode + $progname paper + $progname pdftex + $progname xdvi + +See http://tug.org/texlive/ for other documentation, etc. +Report bugs to <tex-k@tug.org>." + + case $1 in + # texconfig conf + conf|confall) + setupTexmfmain + setupTexmfdist + echo '=========================== version information ==========================' + showDistVersionInfo + echo + echo '==================== binaries found by searching $PATH ===================' + echo "PATH=$PATH" + echoLocateBinary kpsewhich updmap fmtutil texconfig tex pdftex mktexpk dvips dvipdfm + echo + echo '=========================== active config files ==========================' + echoLocateCfgfile texmf.cnf updmap.cfg fmtutil.cnf config.ps mktex.cnf XDvi pdftexconfig.tex config | sort -k 2 + echo + echo '============================= font map files =============================' + for m in psfonts.map pdftex.map ps2pk.map dvipdfm.map; do + echo "$m: `kpsewhich $m`" + done + echo + echo '=========================== kpathsea variables ===========================' + echoShowKpseVariable TEXMFMAIN TEXMFDIST TEXMFLOCAL TEXMFSYSVAR TEXMFSYSCONFIG TEXMFVAR TEXMFCONFIG TEXMFHOME VARTEXFONTS TEXMF SYSTEXMF TEXMFDBS WEB2C TEXPSHEADERS TEXCONFIG ENCFONTS TEXFONTMAPS + + echo + echo '==== kpathsea variables from environment only (ok if no output here) ====' + echoShowVariable $envVars + ;; + + # texconfig dvipdfm + dvipdfm) + help="Usage: $progname dvipdfm paper PAPER + +Valid PAPER settings: + letter legal ledger tabloid a4 a3" + case $2 in + # texconfig dvipdfm paper + paper-list) + for p in letter legal ledger tabloid a4 a3; do echo $p; done + ;; + paper) + case $3 in + letter|legal|ledger|tabloid|a4|a3) + fmgrConfigReplace config '^p' "p $3";; + "") echo "$help" >&2; rc=1;; + *) + echo "$progname: unknown PAPER \`$3' given as argument for \`$progname dvipdfm paper'" >&2 + echo "$progname: try \`$progname dvipdfm paper' for help" >&2 + rc=1 ;; + esac ;; + # texconfig dvipdfm "" + "") + echo "$help" >&2; rc=1 ;; + # texconfig dvipdfm <unknown> + *) + echo "$progname: unknown option \`$2' given as argument for \`$progname dvipdfm'" >&2 + echo "$progname: try \`$progname dvipdfm' for help" >&2 + rc=1 + ;; + esac + ;; + + # texconfig dvipdfmx + dvipdfmx) + help="Usage: $progname dvipdfmx paper PAPER + +Valid PAPER settings: + letter legal ledger tabloid a4 a3" + case $2 in + # texconfig dvipdfmx paper + paper-list) + for p in letter legal ledger tabloid a4 a3; do echo $p; done + ;; + paper) + case $3 in + letter|legal|ledger|tabloid|a4|a3) + fmgrConfigReplace dvipdfmx.cfg '^p' "p $3";; + "") echo "$help" >&2; rc=1;; + *) + echo "$progname: unknown PAPER \`$3' given as argument for \`$progname dvipdfmx paper'" >&2 + echo "$progname: try \`$progname dvipdfmx paper' for help" >&2 + rc=1 ;; + esac ;; + # texconfig dvipdfmx "" + "") + echo "$help" >&2; rc=1 ;; + # texconfig dvipdfmx <unknown> + *) + echo "$progname: unknown option \`$2' given as argument for \`$progname dvipdfmx'" >&2 + echo "$progname: try \`$progname dvipdfmx' for help" >&2 + rc=1 + ;; + esac + ;; + + # texconfig dvips + dvips) + shift + help="Usage: $progname dvips add PRINTER + $progname dvips del PRINTER + $progname dvips paper PAPER + $progname dvips [-P PRINTER] mode MODE + $progname dvips [-P PRINTER] offset OFFSET + $progname dvips [-P PRINTER] printcmd CMD" + case $1 in + -P) + case $2 in + "") + echo "$progname: missing arg for parameter -P" >&2 + rc=1; (exit $rc); return $rc + ;; + *) + otherPrinter=true + otherPrinterName=$2 + otherPrinterFile=`kpsewhich -format='dvips config' "config.$otherPrinterName"` + case $otherPrinterFile in + "") + echo "$progname: configuration file \`config.$otherPrinterName' for printer \`$otherPrinterName' not found" >&2 + rc=1; (exit $rc); return $rc + ;; + *) shift; shift;; + esac + ;; + esac + ;; + *) + otherPrinter=false + ;; + esac + case $otherPrinter in + true) + tcBatchDvipsPrinter=$otherPrinterName + moreFmgrArgs="--reldir dvips/config --infile $otherPrinterFile" + ;; + *) + tcBatchDvipsPrinter=ps + ;; + esac + case $1 in + add) + case $2 in + "") + echo "Usage: $progname dvips add PRINTER" >&2 + rc=1 + ;; + *) + printerName=$2 + pFile=`kpsewhich -format='dvips config' "config.$printerName"` + case $pFile in + "") + setupTmpDir + tcfRet=`tcfmgr --emptyinfile --reldir dvips/config --cmd co --tmp $tmpdir --file "config.$printerName"` + if test $? != 0; then + echo "$progname: failed to add new configuration file \`config.$printerName'" >&2 + rc=1 + else + set x $tcfRet; shift + tcBatchDvipsAddID=$1; tcBatchDvipsAddFile=$3 + echo "% file config.$printerName; added by texconfig" > "$tcBatchDvipsAddFile" + tcfRet=`tcfmgr --tmp $tmpdir --id "$tcBatchDvipsAddID" --cmd ci` + if test $? != 0; then + echo "$progname: failed to add new configuration file \`config.$printerName'" >&2 + rc=1 + else + echo "$progname: file $tcfRet added" >&2 + fi + fi + ;; + *) + echo "$progname: configuration file for printer \`$printerName' already exists (\`$pFile')" >&2 + rc=1 + ;; + esac + ;; + esac + ;; + del) + case $2 in + "") + echo "Usage: $progname dvips del PRINTER" >&2 + rc=1 + ;; + *) + printerName=$2 + pFile=`kpsewhich -format='dvips config' "config.$printerName"` + case $pFile in + "") + echo "$progname: configuration file for printer \`$printerName' (config.$printerName) not found" >&2 + rc=1 + ;; + *) + if rm "$pFile"; then + echo "$progname: file \`$pFile' removed" >&2 + else + echo "$progname: failed to remove file \`$pFile'" >&2 + rc=1 + fi + ;; + esac + ;; + esac + ;; + paper-list) + locateConfigPsFile + listDvipsPapers + ;; + paper) + case $2 in + "") + echo "Usage: $progname dvips paper PAPER" >&2 + echo >&2; echo "Valid PAPER settings:" >&2 + locateConfigPsFile + listDvipsPapers | sed 's@ .*@@; s@^@ @' | myFmt + rc=1 + ;; + *) + tcBatchDvipsPaper=$2 + locateConfigPsFile + case "$configPsFile" in + "") + echo "$progname: file config.ps not found" >&2; rc=1 + ;; + *) + if grep "@ $tcBatchDvipsPaper " $configPsFile >/dev/null 2>&1; then + setupDvipsPaper "$tcBatchDvipsPaper" + else + echo "$progname: paper \`$tcBatchDvipsPaper' not found in file \`$configPsFile'" >&2; rc=1 + fi + ;; + esac + ;; + esac + ;; + mode) + case $2 in + "") + echo "Usage: $progname dvips mode MODE + +Valid MODE settings:" + setupModesMfFile + listMfModes | sed 's@ .*@@; s@^@ @' | myFmt + rc=1 + ;; + *) + tcBatchDvipsMode=$2 + setupTmpDir + setupModesMfFile + if checkElemInList "$tcBatchDvipsMode" `listMfModes | sed 's@ .*@@'`; then + set x `getRes "$tcBatchDvipsMode"`; shift + resX=$1; resY=$2 + fmgrConfigReplace $moreFmgrArgs config.$tcBatchDvipsPrinter '^M' "M $tcBatchDvipsMode" + fmgrConfigReplace $moreFmgrArgs config.$tcBatchDvipsPrinter '^D' "D $resX" + fmgrConfigReplace $moreFmgrArgs config.$tcBatchDvipsPrinter '^X' "X $resX" + fmgrConfigReplace $moreFmgrArgs config.$tcBatchDvipsPrinter '^Y' "Y $resY" + else + echo "$progname: unknown MODE \`$tcBatchDvipsMode' given as argument for \`$progname dvips mode'" >&2 + echo "$progname: try \`$progname dvips mode' for help" >&2 + rc=1 + fi + ;; + esac + ;; + offset) + offset=$2 + case $offset in + "") + echo "Usage: $progname dvips offset OFFSET" + rc=1 + ;; + *) + fmgrConfigReplace $moreFmgrArgs config.$tcBatchDvipsPrinter '^O' "O $offset" + esac + ;; + printcmd) + printcmd=$2 + case $printcmd in + "") + echo "Usage: $progname dvips printcmd CMD" + rc=1 + ;; + -) + fmgrConfigReplace $moreFmgrArgs config.$tcBatchDvipsPrinter '^o' o + ;; + *) + fmgrConfigReplace $moreFmgrArgs config.$tcBatchDvipsPrinter '^o' "o |$printcmd" + ;; + esac + ;; + "") + echo "$help" >&2; rc=1 + ;; + *) + echo "$progname: unknown option \`$1' given as argument for \`$progname dvips'" >&2 + echo "$progname: try \`$progname dvips' for help" >&2 + rc=1 + ;; + esac + ;; + + faq) + setupTexmfmain + if test -f $MT_TEXMFMAIN/doc/tetex/teTeX-FAQ; then + <$MT_TEXMFMAIN/doc/tetex/teTeX-FAQ eval ${PAGER-more} + else + echo "$progname: faq not found (usually in \$TEXMFMAIN/doc/tetex/teTeX-FAQ)" >&2 + rc=1 + fi + ;; + + findprog) + shift + ELB_PATH_ONLY=1 echoLocateBinary "$@" + ;; + + # handle "texconfig font" + font) + help="Usage: $progname font vardir DIR + $progname font ro + $progname font rw + +The vardir option changes the VARTEXFONTS variable in the texmf.cnf file. + +The rw option makes the VARTEXFONTS directory (and subtrees pk, tfm, +source) world writable and sets the features appendonlydir:varfonts +in mktex.cnf. + +The ro option makes the VARTEXFONTS directory (and subtrees pk, tfm, +source) writable for the owner only and sets the feature texmfvar in +mktex.cnf. + +For more information about these \`features', consult the teTeX manual +(e.g. by running \`texdoc TETEXDOC')." + + case $2 in + vardir) + case $3 in + "") + echo "$help" >&2 + rc=1 + ;; + *) + tcBatchFontVardir=$3 + tfc=`kpsewhich texmf.cnf` + if test -n "$tfc"; then + if test -w "$tfc"; then + configReplace "$tfc" '^VARTEXFONTS' "VARTEXFONTS = $tcBatchFontVardir" + else + echo "$progname: setting up vardir failed. Reason: no permission to write file \`$tfc'" >&2 + rc=1 + fi + else + echo "$progname: setting up vardir failed. Reason: failed to find file texmf.cnf" >&2 + rc=1 + fi + ;; + esac + ;; + rw) + MT_VARTEXFONTS=`kpsewhich -var-value VARTEXFONTS` + if test -z "$MT_VARTEXFONTS"; then + echo "$progname: failed to set \`font rw'; reason: could not determine VARTEXFONTS variable." >&2; rc=1 + return + fi + test -d "$MT_VARTEXFONTS" || mktexdir "$MT_VARTEXFONTS" + if test ! -d "$MT_VARTEXFONTS"; then + echo "$progname: failed to set \`font rw'; reason: directory \`$MT_VARTEXFONTS' does not exist." >&2; rc=1 + return + fi + chmod 1777 "$MT_VARTEXFONTS" || { + echo "$progname: failed to modify permissions in \`$MT_VARTEXFONTS'." >&2; rc=1 + return; + } + ( + cd "$MT_VARTEXFONTS" || exit + echo "$progname: modifying permissions in \`$MT_VARTEXFONTS' ..." >&2 + for d in pk tfm source; do + test -d "$d" && find $d -type d -exec chmod 1777 '{}' \; + done + echo "$progname: all permissions set." >&2 + ) + setupTmpDir + fmgrConfigReplace mktex.cnf '^: ..MT_FEATURES=' ": \${MT_FEATURES=appendonlydir:varfonts}" + ;; + ro) + MT_VARTEXFONTS=`kpsewhich -var-value VARTEXFONTS` + if test -z "$MT_VARTEXFONTS"; then + echo "$progname: failed to set \`font ro'; reason: could not determine VARTEXFONTS variable." >&2; rc=1 + return + fi + test -d "$MT_VARTEXFONTS" || mktexdir "$MT_VARTEXFONTS" + if test ! -d "$MT_VARTEXFONTS"; then + echo "$progname: failed to set \`font ro'; reason: directory \`$MT_VARTEXFONTS' does not exist." >&2; rc=1 + return + fi + chmod 755 "$MT_VARTEXFONTS" || { + echo "$progname: failed to modify permissions in \`$MT_VARTEXFONTS'." >&2; rc=1 + return; + } + ( + cd "$MT_VARTEXFONTS" || exit + echo "$progname: modifying permissions in \`$MT_VARTEXFONTS' ..." >&2 + for d in pk tfm source; do + test -d "$d" && find "$d" -type d -exec chmod 755 '{}' \; + done + echo "$progname: all permissions set." >&2 + ) + setupTmpDir + fmgrConfigReplace mktex.cnf '^: ..MT_FEATURES=' ": \${MT_FEATURES=texmfvar}" + ;; + "") echo "$help" >&2; rc=1;; + *) echo "$progname: unknown option \`$2' given as argument for \`$progname font'" >&2 + echo "$progname: try \`$progname font' for help" >&2 + rc=1 + ;; + esac + ;; + + formats) + setupTmpDir + echo "$progname: analyzing old configuration..." >&2 + fmtutil --catcfg > $tmpdir/pre + fmtutil --edit + echo "$progname: analyzing new configuration..." >&2 + fmtutil --catcfg > $tmpdir/post + + if cmp $tmpdir/pre $tmpdir/post >/dev/null 2>&1; then + echo "$progname: no new/updated formats available ..." >&2 + else + echo "$progname: updating formats ..." >&2 + comm -13 $tmpdir/pre $tmpdir/post > $tmpdir/addOrChange + for i in `awk '{print $1}' $tmpdir/addOrChange`; do + fmtutil --byfmt "$i" || rc=1 + done + texlinks --multiplatform || rc=1 + fi + ;; + + help|--help|-h) + echo "$help" + ;; + + # "hyphen FORMAT" + hyphen) + tcBatchHyphenFormat=$2 + formatsForHyphen=`getFormatsForHyphen` + formatsForHyphenFmt=`echo "$formatsForHyphen" | myFmt | sed 's@^@ @'` + help="Usage: $progname hyphen FORMAT + +Valid FORMATs are: +$formatsForHyphenFmt" + case $tcBatchHyphenFormat in + "") + echo "$help" >&2; rc=1 + ;; + *) + if checkElemInList "$tcBatchHyphenFormat" $formatsForHyphen; then + + tcBatchHyphenFile=`fmtutil --showhyphen "$tcBatchHyphenFormat"` + case $tcBatchHyphenFile in + "") + echo "$progname: could not find hyphen setup file for format \`$tcBatchHyphenFormat'" >&2 + rc=1 + return + ;; + esac + + getRelDir "$tcBatchHyphenFile" + case $relPart in + "") + # edit tcBatchHyphenFile directly + tcBatchHFID= + setupTmpDir + tcBatchHFEdit=$tcBatchHyphenFile + tcBatchHFOrig=$tmpdir/hforig + cp "$tcBatchHyphenFile" "$tcBatchHFOrig" + ;; + *) + # use tcfmgr + tcBatchHyphenFileBasename=`echo "$tcBatchHyphenFile" | sed 's@.*/@@'` + setupTmpDir + co=`tcfmgr --tmp $tmpdir --cmd co --file "$tcBatchHyphenFileBasename" --reldir "$relPart" --infile "$tcBatchHyphenFile"` + if test $? != 0; then + echo "$progname: failed to check out file \`$tcBatchHyphenFile'" >&2 + rc=1 + return 1 + else + set x $co; shift + tcBatchHFID=$1; tcBatchHFEdit=$3; tcBatchHFOrig=$4 + fi + ;; + esac + ${VISUAL-${EDITOR-vi}} "$tcBatchHFEdit" + if cmp "$tcBatchHFEdit" "$tcBatchHFOrig" >/dev/null 2>&1; then + echo "$progname: configuration unchanged." >&2 + else + case $tcBatchHFID in + "") + tcBatchHFOut=$tcBatchHFEdit + echo "$progname: updated configuration saved as file \`$tcBatchHFOut'" >&2 + lastUpdatedFile=$ci + ;; + *) + ci=`tcfmgr --tmp $tmpdir --cmd ci --id "$tcBatchHFID"` + if test $? != 0; then + echo "$progname: failed to check in file \`$tcBatchHyphenFileBasename'" >&2 + rc=1 + return + else + tcBatchHFOut=$ci + echo "$progname: updated configuration saved as file \`$tcBatchHFOut'" >&2 + lastUpdatedFile=$ci + fi + ;; + esac + fmtutil --byhyphen "$tcBatchHFOut" + fi + else + echo "$progname: invalid format \`$tcBatchHyphenFormat' specified as argument for \`$progname hyphen'" >&2 + echo "$progname: for getting help, try \`$progname hyphen'" >&2 + rc=1 + fi + ;; + esac + ;; + + hyphen-list) + getFormatsForHyphen + ;; + + init) + if test -n "$texconfig_sys"; then # set by texconfig-sys + fmtutil=fmtutil-sys + updmap=updmap-sys + else + fmtutil=fmtutil + updmap=updmap + fi + + case $2 in + "") + if $fmtutil --all \ + && texlinks --multiplatform \ + && $updmap; then + : + else + rc=1 + fi + ;; + *) + shift 1 + for i in "$@"; do + $fmtutil --byfmt "$i" || rc=1 + done + ;; + esac + ;; + + mode-list) + setupModesMfFile + listMfModes + ;; + + mode) + case $2 in + "") + echo "Usage: $progname mode MODE + +Valid MODE settings:" + setupModesMfFile + listMfModes | sed 's@ .*@@; s@^@ @' | myFmt + rc=1 + ;; + *) + tcBatchMode=$2 + setupModesMfFile + if checkElemInList $tcBatchMode `listMfModes | sed 's@ .*@@'`; then + + # modify mktex.cnf + setupTmpDir + fmgrConfigReplace mktex.cnf '^: ..MODE=' ": \${MODE=$tcBatchMode}" + set x `getRes "$tcBatchMode"`; shift + tcBatchRes=$1 + fmgrConfigReplace mktex.cnf '^: ..BDPI=' ": \${BDPI=$tcBatchRes}" + + if checkForBinary dvips >/dev/null && tcfmgr --cmd find --file config.ps >/dev/null 2>&1; then + tcBatch dvips mode "$tcBatchMode" + fi + if checkForBinary pdftex >/dev/null && tcfmgr --cmd find --file pdftexconfig.tex >/dev/null 2>&1; then + tcBatch pdftex mode "$tcBatchMode" + fi + else + echo "$progname: unknown mode \`$tcBatchMode' specified as argument for \`$progname mode'" >&2; rc=1 + fi + ;; + esac + ;; + + paper) + help="Usage: $progname paper PAPER + +Valid PAPER settings: + letter a4" + + p=$2; pXdvi=$2; pDvips=$2 + case $2 in + letter) + pXdvi=us;; + a4) + pXdvi=a4;; + "") echo "$help" >&2; rc=1; return;; + *) + echo "$progname: unknown PAPER \`$2' given as argument for \`$progname paper'" >&2 + echo "$progname: try \`$progname paper' for help" >&2 + rc=1 + return;; + esac + if checkForBinary dvips >/dev/null && tcfmgr --cmd find --file config.ps >/dev/null 2>&1; then + tcBatch dvips paper $pDvips + fi + if checkForBinary dvipdfm >/dev/null && tcfmgr --cmd find --file config >/dev/null 2>&1; then + tcBatch dvipdfm paper $p + fi + if checkForBinary dvipdfmx >/dev/null && tcfmgr --cmd find --file dvipdfmx.cfg >/dev/null 2>&1; then + tcBatch dvipdfmx paper $p + fi + if checkForBinary xdvi >/dev/null && tcfmgr --cmd find --file XDvi >/dev/null 2>&1; then + tcBatch xdvi paper $pXdvi + fi + if checkForBinary pdftex >/dev/null && tcfmgr --cmd find --file pdftexconfig.tex >/dev/null 2>&1; then + tcBatch pdftex paper $p + fi + ;; + + pdftex) + help="Usage: $progname pdftex paper PAPER + +Valid PAPER settings: + a4 letter" + case $2 in + + mode) + case $3 in + "") + echo "Usage: $progname pdftex mode MODE" + rc=1 + ;; + *) + tcBatchPdftexMode=$3 + setupTmpDir + setupModesMfFile + if checkElemInList "$tcBatchPdftexMode" `listMfModes | sed 's@ .*@@'`; then + set x `getRes "$tcBatchPdftexMode"`; shift + fmgrConfigReplace pdftexconfig.tex 'pdfpkresolution' "\\pdfpkresolution=$1" + if $fmgrConfigReplaceChanged; then + fmtutil --refresh + fi + else + echo "$progname: unknown MODE \`$tcBatchPdftexMode' given as argument for \`$progname pdftex mode'" >&2 + rc=1 + fi + ;; + esac + ;; + + paper) + case $3 in + letter) + w="8.5 true in"; h="11 true in" + setupTmpDir + fmgrConfigReplace pdftexconfig.tex pdfpagewidth '\pdfpagewidth='"$w" + wChanged=$fmgrConfigReplaceChanged + fmgrConfigReplace pdftexconfig.tex pdfpageheight '\pdfpageheight='"$h" + if $wChanged || $fmgrConfigReplaceChanged; then + fmtutil --refresh + fi + ;; + a4) + w="210 true mm"; h="297 true mm" + fmgrConfigReplace pdftexconfig.tex pdfpagewidth '\pdfpagewidth='"$w" + wChanged=$fmgrConfigReplaceChanged + fmgrConfigReplace pdftexconfig.tex pdfpageheight '\pdfpageheight='"$h" + if $wChanged || $fmgrConfigReplaceChanged; then + fmtutil --refresh + fi + ;; + "") echo "$help" >&2; rc=1;; + *) + echo "$progname: unknown PAPER \`$3' given as argument for \`$progname pdftex paper'" >&2 + echo "$progname: try \`$progname pdftex paper' for help" >&2 + rc=1 ;; + esac ;; + "") + echo "$help" >&2; rc=1;; + *) + echo "$progname: unknown option \`$2' given as argument for \`$progname pdftex'" >&2 + echo "$progname: try \`$progname pdftex' for help" >&2 + rc=1 + ;; + esac + ;; + + rehash) + mktexlsr + ;; + + # + version|--version) + echo "$progname version $version" + setupTexmfmain + setupTexmfdist + showDistVersionInfo + (exit 0); exit 0;; + + # handle "xdvi paper PAPER" + xdvi) + tcBatchXdviPapers='us "8.5x11" +usr "11x8.5" +legal "8.5x14" +foolscap "13.5x17.0" +a1 "59.4x84.0cm" +a2 "42.0x59.4cm" +a3 "29.7x42.0cm" +a4 "21.0x29.7cm" +a5 "14.85x21.0cm" +a6 "10.5x14.85cm" +a7 "7.42x10.5cm" +a1r "84.0x59.4cm" +a2r "59.4x42.0cm" +a3r "42.0x29.7cm" +a4r "29.7x21.0cm" +a5r "21.0x14.85cm" +a6r "14.85x10.5cm" +a7r "10.5x7.42cm" +b1 "70.6x100.0cm" +b2 "50.0x70.6cm" +b3 "35.3x50.0cm" +b4 "25.0x35.3cm" +b5 "17.6x25.0cm" +b6 "13.5x17.6cm" +b7 "8.8x13.5cm" +b1r "100.0x70.6cm" +b2r "70.6x50.0cm" +b3r "50.0x35.3cm" +b4r "35.3x25.0cm" +b5r "25.0x17.6cm" +b6r "17.6x13.5cm" +b7r "13.5x8.8cm" +c1 "64.8x91.6cm" +c2 "45.8x64.8cm" +c3 "32.4x45.8cm" +c4 "22.9x32.4cm" +c5 "16.2x22.9cm" +c6 "11.46x16.2cm" +c7 "8.1x11.46cm" +c1r "91.6x64.8cm" +c2r "64.8x45.8cm" +c3r "45.8x32.4cm" +c4r "32.4x22.9cm" +c5r "22.9x16.2cm" +c6r "16.2x11.46cm" +c7r "11.46x8.1cm"' + help="Usage: $progname xdvi paper PAPER + +Valid PAPER settings: + a1 a1r a2 a2r a3 a3r a4 a4r a5 a5r a6 a6r a7 a7r + b1 b1r b2 b2r b3 b3r b4 b4r b5 b5r b6 b6r b7 b7r + c1 c1r c2 c2r c3 c3r c4 c4r c5 c5r c6 c6r c7 c7r + foolscap legal us usr" + case $2 in + paper-list) + echo "$tcBatchXdviPapers" + ;; + paper) + case $3 in + a1|a1r|a2|a2r|a3|a3r|a4|a4r|a5|a5r|a6|a6r|a7|a7r|b1|b1r|b2|b2r|b3|b3r|b4|b4r|b5|b5r|b6|b6r|b7|b7r|c1|c1r|c2|c2r|c3|c3r|c4|c4r|c5|c5r|c6|c6r|c7|c7r|foolscap|legal|us|usr) + fmgrConfigReplace XDvi paper: "*paper: $3" + ;; + "") echo "$help" >&2; rc=1;; + *) + echo "$progname: unknown PAPER \`$3' given as argument for \`$progname xdvi paper'" >&2 + echo "$progname: try \`$progname xdvi paper' for help" >&2 + rc=1 ;; + esac ;; + "") + echo "$help" >&2; rc=1;; + *) + echo "$progname: unknown option \`$2' given as argument for \`$progname xdvi'" >&2 + echo "$progname: try \`$progname xdvi' for help" >&2 + rc=1 + ;; + esac + ;; + *) + echo "$progname: unknown option \`$1' given as argument for \`$progname'" >&2 + echo "$progname: try \`$progname help' for help" >&2 + rc=1 + esac +} + +############################################################################### +# tcInteractive(void) +# handle interactive mode +############################################################################### +tcInteractive() +{ + texconfig-dialog +} + +############################################################################### +# main() +############################################################################### +rc=0 +case $# in + 0) tcInteractive;; + *) tcBatch "$@";; +esac + +cleanup $rc diff --git a/Master/bin/i386-solaris/texconfig-dialog b/Master/bin/i386-solaris/texconfig-dialog new file mode 100755 index 00000000000..8ccda930dd7 --- /dev/null +++ b/Master/bin/i386-solaris/texconfig-dialog @@ -0,0 +1,495 @@ +#!/bin/sh + +# TeX-Config version 3.0 +# Thomas Esser, te@dbs.uni-hannover.de. Public domain. + +# invoke the right shell: + +test -f /bin/ksh && test -z "$RUNNING_KSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; } +unset RUNNING_KSH + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +export PATH + +# hack around a bug in zsh: +test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' + +# the version string +version=1184605103 # seconds since `00:00:00 1970-01-01 UTC' + # date '+%s' (with GNU date) + +: ${PAGER=more} +progname=texconfig-dialog +tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/tcdtmp.$$ +log=$tmpdir/log +tmpmenu=$tmpdir/tmpmenu +needsCleanup=false + +############################################################################### +# cleanup() +# clean up the temp area and exit with proper exit status +############################################################################### +cleanup() +{ + rc=$1 + $needsCleanup && test -n "$tmpdir" && test -d "$tmpdir" \ + && { cd / && rm -rf "$tmpdir"; } + termCtl reset + (exit $rc); exit $rc +} + +############################################################################### +# setupTmpDir() +# set up a temp directory and a trap to remove it +############################################################################### +setupTmpDir() +{ + case $needsCleanup in + true) return;; + esac + + trap 'cleanup 1' 1 2 3 7 13 15 + needsCleanup=true + (umask 077; mkdir "$tmpdir") \ + || abort "could not create directory \`$tmpdir'" +} + +############################################################################### +# abort(errmsg) +# print `errmsg' to stderr and exit with error code 1 +############################################################################### +abort() +{ + echo "$progname: $1." >&2 + cleanup 1 +} + +logexec() +{ + (echo; echo ">>> Executing \`$@' <<<") >> $log + "$@" 2>&1 | tee -a $log +} + +############################################################################### +# runDialog(args, ...) +# execute the right dialog program with the right default parameters +############################################################################### +runDialog() +{ + termCtl clear + if test -n "$DIALOG_PROG"; then + $DIALOG_PROG --title "TeX setup utility" ${1+"$@"} + runDialogRc=$? + else + TERM=$DIALOG_TERM TERMINFO=$DIALOG_TERMINFO \ + tcdialog --title "TeX setup utility" ${1+"$@"} + runDialogRc=$? + fi + termCtl clear + (exit $runDialogRc) + return $runDialogRc +} + +############################################################################### +# findDialog(void) +# Some systems have their own dialog. Use it then and do not use +# faked TERM and TERMINFO variables when calling that dialog. +############################################################################### +findDialog() +{ + for bin in whiptail dialog + do + binLoc=`texconfig findprog $bin` + case $binLoc in + "") DIALOG_PROG="";; + *) DIALOG_PROG=$binLoc; break;; + esac + done + case $DIALOG_PROG in + "") + : ${DIALOG_TERMINFO=$TEXMFMAIN/texconfig} + : ${DIALOG_TERM=generic} + esac +} + +############################################################################### +# mktexdir(args) +# call mktexdir script, disable all features (to prevent sticky directories) +############################################################################### +mktexdir() +{ + MT_FEATURES=none "$TEXMFMAIN/web2c/mktexdir" "$@" >&2 +} + +############################################################################### +# termCtl(arg) +# some convenience utilities for terminal control +############################################################################### +termCtl() +{ + case $1 in + clear) + test -n "$NO_CLEAR" && return + tty >/dev/null 2>&1 && clear + ;; + reset) + test -n "$NO_CLEAR" && return + reset 2>/dev/null + stty sane 2>/dev/null + reset 2>/dev/null + termCtl clear + ;; + readln) + echo + echo "press return to continue..." + read a + ;; + esac +} + +############################################################################### +# menuMain(void) +# the main menu +############################################################################### +menuMain() +{ + cat <<-'eof' + The interactive texconfig utility will be started now. Make sure + your screen has at least 24 rows and 80 columns. If texconfig + crashes now, you can still set up your teTeX system using the + batch mode of texconfig. Try 'texconfig help' to get a list + of options. + + The interactive mode works best with a real vt100 terminal or + inside an xterm window. +eof + termCtl readln + + while :; do + logMessage='view logfile' + + runDialog \ + --menu " +Hint: all output of external commands (e.g. tex) is logged into +a file. You can look at this file using "LOG". If cursor keys make +trouble, you may have more luck with +/- and TAB. +" \ + 23 80 14 \ + EXIT 'exit' \ + PAPER 'default paper: A4 or letter (us)' \ + MODE 'default metafont mode and resolution' \ + REHASH 'rebuild filename databases' \ + FORMATS 'edit format definitions' \ + HYPHENATION 'customize hyphenation' \ + DVIPS 'dvips configuration' \ + FAQ 'view frequently asked questions + answers' \ + CONF 'show configuration' \ + LOG "$logMessage" \ + 2>"$tmpmenu" || break + + case `cat "$tmpmenu"` in + EXIT) + break + ;; + PAPER) + menuPaper + ;; + MODE) + menuMode + ;; + REHASH) + logexec texconfig rehash + termCtl readln + ;; + FORMATS) + texconfig formats + termCtl readln + ;; + HYPHENATION) + menuHyphenation + ;; + DVIPS) + menuDvips + ;; + FAQ) + texconfig faq + termCtl readln + ;; + CONF) + logexec texconfig conf + termCtl readln + ;; + LOG) + <"$log" eval $PAGER + termCtl readln + ;; + esac + done +} + +menuGetMode() +{ + # we need eval to get the command line right... :-( + eval \ + runDialog \ + --menu \"" +Chosse a mode to be used when metafont generates font bitmaps. The resolution is the most important point, but there might +be differences between modes of the same resolution. See the comments in the file modes.mf for more details. +\"" \ + 23 80 14 \ + `texconfig mode-list` 2>"$tmpmenu" +} + +menuMode() +{ + menuGetMode + mode=`cat "$tmpmenu"` + + if test -n "$mode"; then + logexec texconfig mode "$mode" + termCtl readln + fi +} + +menuDvips() +{ + menuDvipsDest=ps + + while :; do + case $menuDvipsDest in + ps) + menuDvipsPrinterOpt= + menuDvipsMsg=" +dvips GLOBAL section. Define the most common default settings (config.ps). +To define settings for a specific printer, first ADD a printer definition, +then CHANGE it. +" + ;; + *) + menuDvipsPrinterOpt="-P $menuDvipsDest" + menuDvipsMsg=" +dvips settings for printer $menuDvipsDest (config.$menuDvipsDest). Define +local settings for this printer. To switch back to global settings mode, +select GLOBAL. +" + ;; + esac + + runDialog \ + --menu "$menuDvipsMsg +You can use dvips for non PostScript printers, if you can setup your +printing system to convert PostScript to a format that your printer can +handle. Maybe, you can use GhostScript to do the conversion (if your +printer is supported)." \ + 23 80 9 \ + RETURN 'back to the main menu' \ + DEST 'define default destination of the generated Postscript' \ + MODE 'change metafont mode/resolution' \ + OFFSET 'shift output by some offset' \ + PAPER 'define the default paper' \ + GLOBAL 'change global settings (config.ps)' \ + CHANGE 'change printer settings (config.$PRINTER)' \ + ADD 'add a printer configuration' \ + DEL 'remove a printer configuration' \ + 2>"$tmpmenu" || break + + menuDvipsAns=`cat "$tmpmenu"` + case $menuDvipsAns in + RETURN) + break + ;; + DEST) + runDialog --inputbox "Enter the command to print. + +In general, you need a command like 'lpr' or 'lpr -Pfoo'. + +NOTE: If you just press return, printing will be disabled and the output saved to a file by default. +" 23 80 2>"$tmpmenu" + if test $? = 0; then + menuDvipsAns=`cat "$tmpmenu"` + case $menuDvipsAns in + "") + menuDvipsPrintOpt=- + ;; + *) + menuDvipsPrintOpt=$menuDvipsAns + ;; + esac + logexec texconfig dvips $menuDvipsPrinterOpt printcmd "$menuDvipsPrintOpt" + termCtl readln + fi + ;; + MODE) + menuGetMode + mode=`cat "$tmpmenu"` + + if test -n "$mode"; then + logexec texconfig dvips $menuDvipsPrinterOpt mode "$mode" + termCtl readln + fi + ;; + OFFSET) + runDialog --inputbox "Enter a dimension pair (a rightwards offset and a downwards +offset), e.g. 2mm,-0.5in (right 2mm and up .5in):" 23 80 2>"$tmpmenu"; menuDvipsAns=`cat "$tmpmenu"` + case $menuDvipsAns in + "") : ;; + *) + logexec texconfig dvips $menuDvipsPrinterOpt offset "$menuDvipsAns" + termCtl readln + ;; + esac + ;; + PAPER) + eval runDialog \ + --menu \'\\n\\nChoose the default papersize definition for dvips.\\n\\n\' \ + 23 80 8 `texconfig dvips paper-list` \ + 2>"$tmpmenu" + paper=`cat "$tmpmenu"` + if test -n "$paper"; then + logexec texconfig dvips paper "$paper" + termCtl readln + fi + ;; + GLOBAL) + menuDvipsDest=ps + ;; + CHANGE) + runDialog --inputbox "Printer name (for future settings of DEST / MODE / OFFSET)" 23 80 2>"$tmpmenu" + menuDvipsAns=`cat $tmpmenu` + case $menuDvipsAns in + "") : ;; + *) menuDvipsDest=$menuDvipsAns;; + esac + ;; + ADD) + runDialog --inputbox "Printer name (for printer to add)" 23 80 2>"$tmpmenu" + menuDvipsAns=`cat $tmpmenu` + case $menuDvipsAns in + "") : ;; + *) + logexec texconfig dvips add $menuDvipsAns + termCtl readln + ;; + esac + ;; + DEL) + runDialog --inputbox "Printer name (for printer to delete)" 23 80 2>"$tmpmenu" + menuDvipsAns=`cat $tmpmenu` + case $menuDvipsAns in + "") : ;; + *) + logexec texconfig dvips del $menuDvipsAns + termCtl readln + ;; + esac + ;; + esac + done +} + +menuPaper() +{ + runDialog \ + --menu " +Select your default paper format. +" \ + 23 80 14 \ + RETURN 'return to the main menu' \ + A4 'ISO A4 (210x297mm)' \ + LETTER 'US (8.5x11in)' 2>"$tmpmenu" + + p=`cat "$tmpmenu"` + case $p in + A4) + logexec texconfig paper a4 + termCtl readln + ;; + LETTER) + logexec texconfig paper letter + termCtl readln + ;; + esac +} + +menuHyphenation() +{ + runDialog \ + --menu " +Choose format to set up hyphenation for. +" \ + 23 80 14 \ + `texconfig hyphen-list | sed 's@\(.*\)@\1 \1@'` 2>"$tmpmenu" + p=`cat "$tmpmenu"` + case $p in + "") + return + ;; + *) + texconfig hyphen "$p" + termCtl readln + esac +} + +# main() + +case $1 in + help|--help) + cat <<-eof + Usage: $progname [--help|--version] +eof + exit 0 + ;; + --version) + cat <<-eof + $progname version $version. +eof + exit 0 + ;; +esac + + +: ${TEXMFCONFIG=`kpsewhich -var-value=TEXMFCONFIG`} +: ${TEXMFVAR=`kpsewhich -var-value=TEXMFVAR`} +: ${TEXMFMAIN=`kpsewhich -var-value=TEXMFMAIN`} +export TEXMFCONFIG TEXMFVAR TEXMFMAIN + +setupTmpDir +echo "$progname: started `date`" > $log +findDialog + +test -d "$TEXMFCONFIG" \ + || mktexdir "$TEXMFCONFIG" >/dev/null 2>&1 \ + || echo "$progname: directory \`$TEXMFCONFIG' (from TEXMFCONFIG variable) does not exist and cannot be created" >&2 + +canWriteConfig=false +if test -d "$TEXMFCONFIG"; then + if test -w "$TEXMFCONFIG"; then + canWriteConfig=true + else + echo "$progname: directory \`$TEXMFCONFIG' (from TEXMFCONFIG variable) is not writable." + echo "$progname: configuration data cannot be changed." >&2 + fi +fi + +test -d "$TEXMFVAR" \ + || mktexdir "$TEXMFVAR" >/dev/null 2>&1 \ + || echo "$progname: directory \`$TEXMFVAR' (from TEXMFVAR variable) does not exist and cannot be created" >&2 + +canWriteVardata=false +if test -d "$TEXMFVAR"; then + if test -w "$TEXMFVAR"; then + canWriteVardata=true + else + echo "$progname: directory \`$TEXMFVAR' (from TEXMFVAR variable) is not writable." + echo "$progname: cached variable runtime data files cannot be written." >&2 + fi +fi + +menuMain +cleanup 0 diff --git a/Master/bin/i386-solaris/texconfig-sys b/Master/bin/i386-solaris/texconfig-sys new file mode 100755 index 00000000000..8a88750098c --- /dev/null +++ b/Master/bin/i386-solaris/texconfig-sys @@ -0,0 +1,32 @@ +#!/bin/sh +# $Id: texconfig-sys 5067 2007-09-30 18:06:26Z karl $ + +# texconfig-sys: Thomas Esser, public domain. + +# wrapper script for texconfig with TEXMFVAR and TEXMFCONFIG set to +# TEXMFSYSVAR / TEXMFSYSCONFIG + +test -f /bin/ksh && test -z "$RUNNING_KSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; } +unset RUNNING_KSH + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +export PATH + +# hack around a bug in zsh: +test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' + +v=`kpsewhich -var-value TEXMFSYSVAR` +c=`kpsewhich -var-value TEXMFSYSCONFIG` + +TEXMFVAR="$v" +TEXMFCONFIG="$c" +texconfig_sys=1 +export TEXMFVAR TEXMFCONFIG + +exec texconfig ${1+"$@"} diff --git a/Master/bin/i386-solaris/texcount b/Master/bin/i386-solaris/texcount new file mode 120000 index 00000000000..dedfa7d2c3e --- /dev/null +++ b/Master/bin/i386-solaris/texcount @@ -0,0 +1 @@ +../../texmf-dist/scripts/texcount/TeXcount.pl
\ No newline at end of file diff --git a/Master/bin/i386-solaris/texdoc b/Master/bin/i386-solaris/texdoc new file mode 100755 index 00000000000..a3d1a8639ae --- /dev/null +++ b/Master/bin/i386-solaris/texdoc @@ -0,0 +1,207 @@ +#!/bin/sh +# $Id: texdoc 6434 2008-01-28 09:34:08Z martin $ +# +# Thomas Esser, David Aspinall, Simon Wilkinson. +# Public domain. +# +# Simple script to attempt to find documentation for tex files. +# Uses kpsewhich to find a .dvi, .pdf or .ps file along the +# 'TeX system documentation' ($TEXDOCS, default: $TEXMF/doc) search path. +# +# Original version by David Aspinall <da@dcs.ed.ac.uk> +# +# This version rewritten for use with bash 2 and teTeX under Linux by +# Simon Wilkinson <sxw@dcs.ed.ac.uk> +# +# Changes for web2c-7.2 resp. teTeX-0.9 and portability fixes by +# Thomas Esser <te@dbs.uni-hannover.de>, Jun 14 1998 +# +# Support for compressed documentation implemented by adopting changes +# made by debian. Thomas Esser, Dec. 2004. + +test -f /bin/sh5 && test -z "$RUNNING_SH5" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; } +unset RUNNING_SH5 + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +export PATH + +needsCleanup=false +progname=texdoc +tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$ + +############################################################################### +# setupTmpDir() +# set up a temp directory and a trap to remove it +############################################################################### +setupTmpDir() +{ + $needsCleanup && return + + trap 'cleanup --force' 1 2 3 7 13 15 + needsCleanup=true + mkdir "$tmpdir" || abort "could not create directory \`$tmpdir'" +} + +############################################################################### +# abort(errmsg) +# print `errmsg' to stderr and exit with error code 1 +############################################################################### +abort() +{ + warn "$progname: $1." + cleanup + (exit 1) + exit 1 +} + +############################################################################### +# cleanup() +# clean up the temp area +############################################################################### +cleanup() +{ + case $1 in + --force) + $needsCleanup && test -n "$tmpdir" && test -d "$tmpdir" \ + && { rm -f "$tmpdir"/*; cd /; rmdir "$tmpdir"; } + ;; + *) # directory might not be empty if some other viewer is still + # running, so be quiet about it + rmdir $tmpdir >/dev/null 2>&1;; + esac +} + + +# Viewing programs, according to filename extension. (You can +# override or add to them by setting environment variables). +# MacOS X: does not have X11 by default, so give dvi a low priority +case `(uname -s) 2>/dev/null` in + Darwin) + : ${TEXDOCVIEW_dvi='(open %s >/dev/console 2>&1 || xdvi %s &) || echo "Method for opening %s did not work"'} + : ${TEXDOCVIEW_ps='open %s'} + : ${TEXDOCVIEW_pdf='open %s'} + : ${TEXDOCVIEW_html='open %s'} + : ${TEXDOCVIEW_txt="open -a TextEdit.app %s"} + : ${TEXDOCVIEW_="open -a TextEdit.app %s"} # no extension, default to pager + extlist='.pdf .ps .txt .dvi .html' + ;; + *) + : ${TEXDOCVIEW_dvi='(xdvi %s) &'} + : ${TEXDOCVIEW_pdf='(acroread %s) &'} + : ${TEXDOCVIEW_ps='(gv %s) &'} + : ${TEXDOCVIEW_html='firefox -remote openURL'"'(%s)'"' 2>/dev/null || firefox %s &'} + : ${TEXDOCVIEW_txt="${PAGER-more} %s"} + : ${TEXDOCVIEW_="${PAGER-more} %s"} # no extension, default to pager + extlist='.dvi .dvi.gz .dvi.bz2 .pdf .pdf.gz .pdf.bz2 .ps .ps.gz .ps.bz2 .txt .txt.gz .txt.bz2 .html' + + # Commands run to uncompress files, according to filename extension. + : ${TEXDOCUNZIP_gz='gzip -d -c'} + : ${TEXDOCUNZIP_bz2='bzip2 -d -c'} + ;; +esac + +mode=viewer +help='Usage: texdoc [OPTION]... [NAME]... + Search for NAME in the TeX documentation and start a viewer. + + --help show this help + -v verbose mode: show viewer command + -l just list all matching files. Do not start a viewer. + -s search the disk. remaining arguments will be passed + as egrep patterns to filter the find output.' + +verbosemode=false +while + case $1 in + -s) mode=search; shift; break;; + -l) mode=list;; + -v) verbosemode=true;; + *-help) + echo "$help" >&2 + exit 1;; + -*) echo "texdoc: option $1 not recognized" 1>&2;; + *) break;; + esac +do shift; done + +case $# in + 0) + echo "$help" >&2 + exit 1 + ;; +esac + +for name +do + case $mode in + search) + find `kpsewhich --expand-path='$TEXDOCS' | tr : ' '` -type f -print | + egrep $name + continue + ;; + esac + + case $name in + texdoc) + man texdoc; continue;; + esac + + found=false + for ext in "" $extlist; do + + filename=`kpsewhich -format='TeX system documentation' $name$ext 2>/dev/null` + test -z "$filename" && continue + found=true + + if test $mode = list; then + echo $filename + else + dir=`echo $filename | sed 's%/[^/]*$%%'` + ext=`echo $filename | sed -n 's%.*\.\([^/]*\)$%\1%p'` + + eval uncompress="\$TEXDOCUNZIP_$ext" + if test -n "$uncompress" + then + ext=`echo $filename | sed -e "s|\\.$ext\$||" | sed 's%.*\.%%'` + fi + viewer=\$"TEXDOCVIEW_$ext" + if test -n "$uncompress"; then + src=`echo "$filename" | sed -e 's%.*/%%' -e 's%\.[^.]*$%%'` + + # only one viewer per file, if the same file is given more + # than once + test -f "$tmpdir/$src" && break + + setupTmpDir + eval "$uncompress $filename > $tmpdir/$src" + filename=$tmpdir/$src + viewer=`eval echo $viewer | sed -e "s|%s|$filename; rm -f $filename; cleanup|"` + else + viewer=`eval echo $viewer | sed -e "s|%s|$filename|g"` + fi + + if test -z "$viewer" + then + echo "Don't know how to view file type $ext" 1>&2 + echo "(matching file was $filename)" 1>&2 + else + $verbosemode && echo $viewer + test -n "$dir" && test -d "$dir" && cd "$dir" + eval $viewer + break # just stop after the first usable extension + fi + fi + + done + $found || echo "Can't find documentation for \`$name'" 1>&2 +done + +cleanup +(exit 0) +exit 0 diff --git a/Master/bin/i386-solaris/texdoctk b/Master/bin/i386-solaris/texdoctk new file mode 120000 index 00000000000..56729104154 --- /dev/null +++ b/Master/bin/i386-solaris/texdoctk @@ -0,0 +1 @@ +../../texmf/scripts/tetex/texdoctk.pl
\ No newline at end of file diff --git a/Master/bin/i386-solaris/texexec b/Master/bin/i386-solaris/texexec new file mode 100755 index 00000000000..2158172906a --- /dev/null +++ b/Master/bin/i386-solaris/texexec @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart texexec.rb "$@" diff --git a/Master/bin/i386-solaris/texfont b/Master/bin/i386-solaris/texfont new file mode 100755 index 00000000000..a91f786e3f8 --- /dev/null +++ b/Master/bin/i386-solaris/texfont @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart texfont.pl "$@" diff --git a/Master/bin/i386-solaris/texhash b/Master/bin/i386-solaris/texhash new file mode 120000 index 00000000000..fe296c273bb --- /dev/null +++ b/Master/bin/i386-solaris/texhash @@ -0,0 +1 @@ +mktexlsr
\ No newline at end of file diff --git a/Master/bin/i386-solaris/texi2dvi b/Master/bin/i386-solaris/texi2dvi new file mode 100755 index 00000000000..4607be1949e --- /dev/null +++ b/Master/bin/i386-solaris/texi2dvi @@ -0,0 +1,1716 @@ +#! /bin/sh +# texi2dvi --- produce DVI (or PDF) files from Texinfo (or (La)TeX) sources. +# $Id: texi2dvi,v 1.122 2008/04/17 18:45:49 karl Exp $ +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +# Original author: Noah Friedman. +# +# Please send bug reports, etc. to bug-texinfo@gnu.org. +# If possible, please send a copy of the output of the script called with +# the `--debug' option when making a bug report. + +test -f /bin/ksh && test -z "$RUNNING_KSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; } +unset RUNNING_KSH + +# No failure shall remain unpunished. +set -e + +# This string is expanded by rcs automatically when this file is checked out. +rcs_revision='$Revision: 1.122 $' +rcs_version=`set - $rcs_revision; echo $2` +program=`echo $0 | sed -e 's!.*/!!'` +version="texi2dvi (GNU Texinfo 4.12) $rcs_version + +Copyright (C) 2008 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +" + +build_mode=${TEXI2DVI_BUILD_MODE:-local} +build_dir=${TEXI2DVI_BUILD_DIRECTORY:-.} + +usage="Usage: $program [OPTION]... FILE... + +Run each Texinfo or (La)TeX FILE through TeX in turn until all +cross-references are resolved, building all indices. The directory +containing each FILE is searched for included files. The suffix of FILE +is used to determine its language ((La)TeX or Texinfo). To process +(e)plain TeX files, set the environment variable LATEX=tex. + +In order to make texi2dvi a drop-in replacement of TeX/LaTeX in AUC-TeX, +the FILE may also be composed of the following simple TeX commands. + \`\\input{FILE}' the actual file to compile + \`\\nonstopmode' same as --batch + +Makeinfo is used to perform Texinfo macro expansion before running TeX +when needed. + +General options: + -b, --batch no interaction + -D, --debug turn on shell debugging (set -x) + -h, --help display this help and exit successfully + -o, --output=OFILE leave output in OFILE (implies --clean); + only one input FILE may be specified in this case + -q, --quiet no output unless errors (implies --batch) + -s, --silent same as --quiet + -v, --version display version information and exit successfully + -V, --verbose report on what is done + +TeX tuning: + -@ use @input instead of \input for preloaded Texinfo + --dvi output a DVI file [default] + -e, -E, --expand force macro expansion using makeinfo + -I DIR search DIR for Texinfo files + -l, --language=LANG specify the LANG of FILE (LaTeX or Texinfo) + --no-line-error do not pass --file-line-error to TeX + -p, --pdf use pdftex or pdflatex for processing + -r, --recode call recode before TeX to translate input + --recode-from=ENC recode from ENC to the @documentencoding + --src-specials pass --src-specials to TeX + -t, --command=CMD insert CMD in copy of input file + or --texinfo=CMD multiple values accumulate + --translate-file=FILE use given charset translation file for TeX + +Build modes: + --build=MODE specify the treatment of auxiliary files [$build_mode] + --tidy same as --build=tidy + -c, --clean same as --build=clean + --build-dir=DIR specify where the tidy compilation is performed; + implies --tidy; + defaults to TEXI2DVI_BUILD_DIRECTORY [$build_dir] + --mostly-clean remove the auxiliary files and directories + but not the output + +The MODE specifies where the TeX compilation takes place, and, as a +consequence, how auxiliary files are treated. The build mode +can also be set using the environment variable TEXI2DVI_BUILD_MODE. + +Valid MODEs are: + \`local' compile in the current directory, leaving all the auxiliary + files around. This is the traditional TeX use. + \`tidy' compile in a local *.t2d directory, where the auxiliary files + are left. Output files are copied back to the original file. + \`clean' same as \`tidy', but remove the auxiliary directory afterwards. + Every compilation therefore requires the full cycle. + +Using the \`tidy' mode brings several advantages: + - the current directory is not cluttered with plethora of temporary files. + - clutter can be even reduced using --build-dir=dir: all the *.t2d + directories are stored there. + - clutter can be reduced to zero using, e.g., --build-dir=/tmp/\$USER.t2d + or --build-dir=\$HOME/.t2d. + - the output file is updated after every succesful TeX run, for + sake of concurrent visualization of the output. In a \`local' build + the viewer stops during the whole TeX run. + - if the compilation fails, the previous state of the output file + is preserved. + - PDF and DVI compilation are kept in separate subdirectories + preventing any possibility of auxiliary file incompatibility. + +On the other hand, because \`tidy' compilation takes place in another +directory, occasionally TeX won't be able to find some files (e.g., when +using \\graphicspath): in that case use -I to specify the additional +directories to consider. + +The values of the BIBTEX, LATEX (or PDFLATEX), MAKEINDEX, MAKEINFO, +TEX (or PDFTEX), TEXINDEX, and THUMBPDF environment variables are used +to run those commands, if they are set. Any CMD strings are added +after @setfilename for Texinfo input, in the first line for LaTeX input. + +Email bug reports to <bug-texinfo@gnu.org>, +general questions and discussion to <help-texinfo@gnu.org>. +Texinfo home page: http://www.gnu.org/software/texinfo/" + +# Initialize variables for option overriding and otherwise. +# Don't use `unset' since old bourne shells don't have this command. +# Instead, assign them an empty value. +action=compile +batch=false # true for batch mode +debug=false +escape="\\" +expand= # t for expansion via makeinfo +includes= +line_error=true # Pass --file-line-error to TeX. +no_line_error=false # absolutely do not pass --file-line-error to TeX +oname= # --output +out_lang=dvi +quiet=false # by default let the tools' message be displayed +recode=false +set_language= +src_specials= +textra= # Extra TeX commands to insert in the input file. +txiprereq=19990129 # minimum texinfo.tex version with macro expansion +verb=false # true for verbose mode +translate_file= # name of charset translation file +recode_from= # if not empty, recode from this encoding to @documentencoding + +orig_pwd=`pwd` + +# We have to initialize IFS to space tab newline since we save and +# restore IFS and apparently POSIX allows stupid/broken behavior with +# empty-but-set IFS. +# http://lists.gnu.org/archive/html/automake-patches/2006-05/msg00008.html +# We need space, tab and new line, in precisely that order. And don't leave +# trailing blanks. +space=' ' +tab=' ' +newline=' +' +IFS="$space$tab$newline" + +# In case someone pedantic insists on using grep -E. +: ${EGREP=egrep} + +# Systems which define $COMSPEC or $ComSpec use semicolons to separate +# directories in TEXINPUTS -- except for Cygwin et al., where COMSPEC +# might be inherited, but : is used. +if test -n "$COMSPEC$ComSpec" \ + && uname | $EGREP -iv 'cygwin|mingw|djgpp' >/dev/null; then + path_sep=";" +else + path_sep=":" +fi + +# Pacify verbose cds. +CDPATH=${ZSH_VERSION+.}$path_sep + +# If $TEX is set to a directory, don't use it. +test -n "$TEX" && test -d "$TEX" && unset TEX + +# +## --------------------- ## +## Auxiliary functions. ## +## --------------------- ## + +# In case `local' is not supported by the shell, provide a function +# that simulates it by simply performing the assignments. This means +# that we must not expect `local' to work, i.e., we must not (i) rely +# on it during recursion, and (ii) have two local declarations of the +# same variable. (ii) is easy to check statically, and our test suite +# does make sure there is never twice a static local declaration of a +# variable. (i) cannot be checked easily, so just be careful. +# +# Note that since we might use a function simulating `local', we can +# no longer rely on the fact that no IFS-splitting is performed. So, +# while +# +# foo=$bar +# +# is fine (no IFS-splitting), never write +# +# local foo=$bar +# +# but rather +# +# local foo="$bar" +( + foo=bar + test_local () { + local foo=foo + } + test_local + test $foo = bar +) || local () { + case $1 in + *=*) eval "$1";; + esac +} + + +# cd_orig +# ------- +# Return to the original directory. +cd_orig () +{ + # In case $orig_pwd is on a different drive (for DOS). + cd / + + # Return to the original directory so that + # - the next file is processed in correct conditions + # - the temporary file can be removed + cd "$orig_pwd" || exit 1 +} + +# func_dirname FILE +# ----------------- +# Return the directory part of FILE. +func_dirname () +{ + dirname "$1" 2>/dev/null \ + || { echo "$1" | sed 's!/[^/]*$!!;s!^$!.!'; } +} + + +# absolute NAME -> ABS-NAME +# ------------------------- +# Return an absolute path to NAME. +absolute () +{ + case $1 in + [\\/]* | ?:[\\/]*) + # Absolute paths don't need to be expanded. + echo "$1" + ;; + *) local slashes + slashes=`echo "$1" | sed -n 's,.*[^/]\(/*\)$,\1,p'` + local rel + rel=$orig_pwd/`func_dirname "$1"` + if test -d "$rel"; then + (cd "$rel" 2>/dev/null && + local n + n=`pwd`/`basename "$1"`"$slashes" + echo "$n") + else + error 1 "not a directory: $rel" + fi + ;; + esac +} + + +# findprog PROG +# ------------- +# Return true if PROG is somewhere in PATH, else false. +findprog () +{ + local saveIFS="$IFS" + IFS=$path_sep # break path components at the path separator + for dir in $PATH; do + IFS=$saveIFS + # The basic test for an executable is `test -f $f && test -x $f'. + # (`test -x' is not enough, because it can also be true for directories.) + # We have to try this both for $1 and $1.exe. + # + # Note: On Cygwin and DJGPP, `test -x' also looks for .exe. On Cygwin, + # also `test -f' has this enhancement, bot not on DJGPP. (Both are + # design decisions, so there is little chance to make them consistent.) + # Thusly, it seems to be difficult to make use of these enhancements. + # + if { test -f "$dir/$1" && test -x "$dir/$1"; } || + { test -f "$dir/$1.exe" && test -x "$dir/$1.exe"; }; then + return 0 + fi + done + return 1 +} + +# report LINE1 LINE2... +# --------------------- +# Report some information on stderr. +report () +{ + for i in "$@" + do + echo >&2 "$0: $i" + done +} + +# verbose WORD1 WORD2 +# ------------------- +# Report some verbose information. +verbose () +{ + if $verb; then + echo >&2 "$0: $@" + fi +} + +# run COMMAND-LINE +# ---------------- +# Run the COMMAND-LINE verbosely, and catching errors as failures. +run () +{ + verbose "Running $@" + "$@" 2>&5 1>&2 || + error 1 "$1 failed" +} + + +# error EXIT_STATUS LINE1 LINE2... +# -------------------------------- +# Report an error and exit with failure if EXIT_STATUS is non null. +error () +{ + local s="$1" + shift + report "$@" + if test "$s" != 0; then + exit $s + fi +} + +# ensure_dir DIR1 DIR2... +# ----------------------- +# Make sure the directories exist. +ensure_dir () +{ + for dir + do + test -d "$dir" \ + || mkdir "$dir" \ + || error 1 "cannot create directory: $dir" + done +} + + +## ---------------- ## +## Handling lists. ## +## ---------------- ## + + +# list_append LIST-NAME ELEM +# -------------------------- +# Set LIST-NAME to its former contents, with ELEM appended. +list_append () +{ + local la_l="$1" + shift + eval set X \$$la_l "$@" + shift + eval $la_l=\""$@"\" +} + +# list_prefix LIST-NAME SEP -> STRING +# ----------------------------------- +# Return a string that is composed of the LIST-NAME with each item +# preceded by SEP. +list_prefix () +{ + local lp_p="$2" + eval set X \$$1 + shift + local lp_res + for i + do + lp_res="$lp_res \"$lp_p\" \"$i\"" + done + echo "$lp_res" +} + +# list_infix LIST-NAME SEP -> STRING +# ---------------------------------- +# Same as list_prefix, but a separator. +list_infix () +{ + eval set X \$$1 + shift + local la_IFS="$IFS" + IFS=$path_sep + echo "$*" + IFS=$la_IFS +} + +# list_dir_to_abs LIST-NAME +# ------------------------- +# Convert the list to using only absolute dir names. +# Currently unused, but should replace absolute_filenames some day. +list_dir_to_abs () +{ + local ld_l="$1" + eval set X \$$ld_l + shift + local ld_res + for dir + do + dir=`absolute "$dir"` + test -d "$dir" || continue + ld_res="$ld_res \"$dir\"" + done + set X $ld_res; shift + eval $ld_l=\"$@\" +} + + +## ------------------------------ ## +## Language auxiliary functions. ## +## ------------------------------ ## + +# out_lang_tex +# ------------ +# Return the tex output language (DVI or PDF) for $OUT_LANG. +out_lang_tex () +{ + case $out_lang in + dvi | ps | dvipdf ) echo dvi;; + pdf ) echo $out_lang;; + html | info | text ) echo $out_lang;; + *) error 1 "$0: invalid out_lang: $1";; + esac +} + + +# out_lang_ext +# ------------ +# Return the extension for $OUT_LANG. +out_lang_ext () +{ + case $out_lang in + dvipdf ) echo pdf;; + dvi | html | info | pdf | ps | text ) echo $out_lang;; + *) error 1 "$0: invalid out_lang: $1";; + esac +} + + +## ------------------------- ## +## TeX auxiliary functions. ## +## ------------------------- ## + +# Save TEXINPUTS so we can construct a new TEXINPUTS path for each file. +# Likewise for bibtex and makeindex. +tex_envvars="BIBINPUTS BSTINPUTS DVIPSHEADERS INDEXSTYLE MFINPUTS MPINPUTS \ +TEXINPUTS TFMFONTS" +for var in $tex_envvars; do + eval ${var}_orig=\$$var + export $var +done + + +# absolute_filenames TEX-PATH -> TEX-PATH +# --------------------------------------- +# Convert relative paths to absolute paths, so we can run in another +# directory (e.g., in tidy build mode, or during the macro-support +# detection). +# +# Empty path components are meaningful to tex. We rewrite them +# as `EMPTY' so they don't get lost when we split on $path_sep. +# Hopefully no one will have an actual directory named EMPTY. +absolute_filenames () +{ + local replace_empty="-e 's/^$path_sep/EMPTY$path_sep/g' \ + -e 's/$path_sep\$/${path_sep}EMPTY/g' \ + -e 's/$path_sep$path_sep/${path_sep}EMPTY:/g'" + local res + res=`echo "$1" | eval sed $replace_empty` + save_IFS=$IFS + IFS=$path_sep + set x $res; shift + res=. + for dir + do + case $dir in + EMPTY) + res=$res$path_sep + ;; + *) + if test -d $dir; then + res=$res$path_sep`absolute "$dir"` + fi + ;; + esac + done + echo "$res" +} + + +# output_base_name FILE +# --------------------- +# The name of FILE, possibly renamed to satisfy --output. +output_base_name () +{ + case $oname in + '') echo "$1";; + *) local out_noext + out_noext=`echo "$oname" | sed 's/\.[^.]*$//'` + local file_ext + file_ext=`echo "$1" | sed 's/^.*\.//'` + echo "$out_noext.$file_ext" + ;; + esac +} + + +# move_to_dest FILE... +# -------------------- +# Move FILE to the place where the user expects it. Truly move it, that +# is, it must not remain in its build location unless that is also the +# output location. (Otherwise it might appear as an extra file in make +# distcheck.) +# +# FILE can be the principal output (in which case -o directly applies), or +# an auxiliary file with the same base name. +move_to_dest () +{ + local dest + local destfile + local destdir + local destbase + local sourcedir + local sourcebase + + for file + do + case $tidy:$oname in + true:) dest=$orig_pwd;; + false:) dest=;; + *:*) dest=`output_base_name "$file"`;; + esac + if test ! -f "$file"; then + error 1 "no such file or directory: $file" + fi + if test -n "$dest"; then + # We need to know whether $dest is a directory. + if test -d "$dest"; then + destdir=$dest + destfile=$dest/$file + else + destdir="`dirname $dest`" + destfile=$dest + fi + # We want to compare the source location and the output location, + # and if they are different, do the move. But if they are the + # same, we must preserve the source. Since we can't assume + # stat(1) or test -ef is available, resort to comparing the + # directory names, canonicalized with pwd. We can't use cmp -s + # since the output file might not actually change from run to run; + # e.g., TeX DVI output is timestamped to only the nearest minute. + destdir=`cd $destdir && pwd` + destbase=`basename $destfile` + # + sourcedir=`dirname $file` + sourcedir=`cd $sourcedir && pwd` + sourcebase=`basename $file` + # + if test "$sourcedir/$sourcebase" != "$destdir/$destbase"; then + verbose "Moving $file to $destfile" + rm -f "$destfile" + mv "$file" "$destfile" + fi + fi + done +} + + +## --------------------- ## +## Managing xref files. ## +## --------------------- ## + +# aux_file_p FILE +# --------------- +# Return with success with FILE is an aux file. +aux_file_p () +{ + test -f "$1" || return 1 + case $1 in + *.aux) return 0;; + *) return 1;; + esac +} + +# bibaux_file_p FILE +# ------------------ +# Return with success with FILE is an aux file containing citation +# requests. +bibaux_file_p () +{ + test -s "$1" || return 1 + if (grep '^\\bibstyle[{]' "$1" \ + && grep '^\\bibdata[{]' "$1" \ + ## The following line is suspicious: fails when there + ## are citations in sub aux files. We need to be + ## smarter in this case. + ## && grep '^\\citation[{]' "$f" + ) >&6 2>&1; + then + return 0 + fi + return 1 +} + +# index_file_p FILE +# ----------------- +# Return with success with FILE is an index file. +# When index.sty is used, there is a space before the brace. +index_file_p () +{ + test -f "$1" || return 1 + case `sed '1q' "$1"` in + "\\entry{"*|"\\indexentry{"*|"\\indexentry {"*) return 0;; + *) return 1;; + esac +} + +# xref_file_p FILE +# ---------------- +# Return with success if FILE is an xref file (indexes, tables and lists). +xref_file_p () +{ + test -f "$1" || return 1 + # If the file is not suitable to be an index or xref file, don't + # process it. It's suitable if the first character is a + # backslash or right quote or at, as long as the first line isn't + # \input texinfo. + case `sed '1q' "$1"` in + "\\input texinfo"*) return 1;; + [\\''@]*) return 0;; + *) return 1;; + esac +} + + +# generated_files_get FILENAME-NOEXT [PREDICATE-FILTER] +# ----------------------------------------------------- +# Return the list of files generated by the TeX compilation of FILENAME-NOEXT. +generated_files_get () +{ + local filter=true + if test -n "$2"; then + filter=$2 + fi + + # Gather the files created by TeX. + ( + if test -f "$1.log"; then + sed -n -e "s,^\\\\openout.* = \`\\(.*\\)'\\.,\\1,p" "$1.log" + fi + echo "$1.log" + ) | + # Depending on these files, infer outputs from other tools. + while read file; do + echo $file + case $in_lang in + texinfo) + # texindex: texinfo.cp -> texinfo.cps + if index_file_p $file; then + echo ${file}s + fi + ;; + latex) + # bibtex: *.aux -> *.bbl and *.blg. + if aux_file_p $file; then + echo $file | sed 's/^\(.*\)\.aux$/\1.bbl/' + echo $file | sed 's/^\(.*\)\.aux$/\1.blg/' + fi + ;; + esac + done | + # Filter existing files matching the criterion. + # + # With an input file name containing a space, this produces a + # "command not found" message (and filtering is ineffective). + # The situation with a newline is presumably even worse. + while read file; do + if $filter "$file"; then + echo $file + fi + done | + sort | + # Some files are opened several times, e.g., listings.sty's *.vrb. + uniq +} + + +# xref_files_save +# --------------- +# Save the xref files. +xref_files_save () +{ + # Save copies of auxiliary files for later comparison. + xref_files_orig=`generated_files_get "$in_noext" xref_file_p` + if test -n "$xref_files_orig"; then + verbose "Backing up xref files: $xref_files_orig" + # The following line improves `cp $xref_files_orig "$work_bak"' + # by preserving the directory parts. Think of + # cp chap1/main.aux chap2/main.aux $work_bak. + tar cf - $xref_files_orig | (cd "$work_bak" && tar xf -) + fi +} + + +# xref_files_changed +# ------------------ +# Whether the xref files were changed since the previous run. +xref_files_changed () +{ + # LaTeX (and the package changebar) report in the LOG file if it + # should be rerun. This is needed for files included from + # subdirs, since texi2dvi does not try to compare xref files in + # subdirs. Performing xref files test is still good since LaTeX + # does not report changes in xref files. + if grep "Rerun to get" "$in_noext.log" >&6 2>&1; then + return 0 + fi + + # If old and new lists don't at least have the same file list, + # then one file or another has definitely changed. + xref_files_new=`generated_files_get "$in_noext" xref_file_p` + verbose "Original xref files = $xref_files_orig" + verbose "New xref files = $xref_files_new" + if test "x$xref_files_orig" != "x$xref_files_new"; then + return 0 + fi + + # Compare each file until we find a difference. + for this_file in $xref_files_new; do + verbose "Comparing xref file `echo $this_file | sed 's|\./||g'` ..." + # cmp -s returns nonzero exit status if files differ. + if cmp -s "$this_file" "$work_bak/$this_file"; then :; else + verbose "xref file `echo $this_file | sed 's|\./||g'` differed ..." + if $debug; then + diff -u "$work_bak/$this_file" "$this_file" + fi + return 0 + fi + done + + # No change. + return 1 +} + + + +## ----------------------- ## +## Running the TeX suite. ## +## ----------------------- ## + + + +# run_tex () +# ---------- +# Run TeX as "$tex $in_input", taking care of errors and logs. +run_tex () +{ + case $in_lang:`out_lang_tex` in + latex:dvi) tex=${LATEX:-latex};; + latex:pdf) tex=${PDFLATEX:-pdflatex};; + texinfo:dvi) + # MetaPost also uses the TEX environment variable. If the user + # has set TEX=latex for that reason, don't bomb out. + case $TEX in + *latex) tex=tex;; # don't bother trying to find etex + *) tex=$TEX + esac;; + texinfo:pdf) tex=$PDFTEX;; + + *) error 1 "$0: $out_lang not supported for $in_lang";; + esac + + # Beware of aux files in subdirectories that require the + # subdirectory to exist. + case $in_lang:$tidy in + latex:true) + sed -n 's|^[ ]*\\include{\(.*\)/.*}.*|\1|p' "$in_input" | + sort -u | + while read d + do + ensure_dir "$work_build/$d" + done + ;; + esac + + # Note that this will be used via an eval: quote properly. + local cmd="$tex" + + # If possible, make TeX report error locations in GNU format. + if test "${tex_help:+set}" != set; then + # Go to a temporary directory to try --help, since old versions that + # don't accept --help will generate a texput.log. + tex_help_dir=$t2ddir/tex_help + ensure_dir "$tex_help_dir" + tex_help=`cd "$tex_help_dir" >&6 && $tex --help </dev/null 2>&1` + fi + if $no_line_error; then :; else + # The mk program and perhaps others want to parse TeX's + # original error messages. + case $line_error:$tex_help in + true:*file-line-error*) cmd="$cmd --file-line-error";; + esac + fi + + # Tell TeX about TCX file, if specified. + test -n "$translate_file" && cmd="$cmd --translate-file=$translate_file" + + # Tell TeX to make source specials (for backtracking from output to + # source, given a sufficiently smart editor), if specifed. + test -n "$src_specials" && cmd="$cmd $src_specials" + + # Tell TeX to be batch if requested. + if $batch; then + # \batchmode does not show terminal output at all, so we don't + # want that. And even in batch mode, TeX insists on having input + # from the user. Close its stdin to make it impossible. + cmd="$cmd </dev/null '${escape}nonstopmode' '${escape}input'" + fi + + # we'd like to handle arbitrary input file names, such as a~b.tex. + # This isn't a general way to do it :), though it does work, kind of. + # cmd="$cmd '${escape}catcode126=12 \input '" + + # TeX's \input does not (easily or reliably) support whitespace + # characters or other special characters in file names. Our intensive + # use of absolute file names makes this worse: the enclosing directory + # names may include white spaces. Improve the situation using a + # symbolic link to the filename in the current directory, in tidy mode + # only. Do not alter in_input. + # + # The filename is almost always tokenized using plain TeX conventions + # (the exception would be if the user made a texinfo.fmt file). Not + # all the plain TeX special characters cause trouble, but there's no + # harm in making the link. + # + case $tidy:`func_dirname "$in_input"` in + true:*["$space$tab$newline\"#\$%\\^_{}"]*) + _run_tex_file_name=`basename "$in_input"` + if test ! -f "$_run_tex_file_name"; then + verbose ln -s "$in_input" + rm -f "$_run_tex_file_name" + ln -s "$_run_tex_file_name" + fi + cmd="$cmd '$_run_tex_file_name'" + ;; + + *) + cmd="$cmd '$in_input'" + ;; + esac + + verbose "$0: Running $cmd ..." + if eval "$cmd" >&5; then + case $out_lang in + dvi | pdf ) move_to_dest "$in_noext.$out_lang";; + esac + else + error 1 "$tex exited with bad status, quitting." + fi +} + +# run_bibtex () +# ------------- +# Run bibtex on current file. +# - If its input (AUX) exists. +# - If some citations are missing (LOG contains `Citation'). +# or the LOG complains of a missing .bbl +# +# Don't try to be too smart: +# +# 1. Running bibtex only if the bbl file exists and is older than +# the LaTeX file is wrong, since the document might include files +# that have changed. +# +# 3. Because there can be several AUX (if there are \include's), +# but a single LOG, looking for missing citations in LOG is +# easier, though we take the risk to match false messages. +run_bibtex () +{ + case $in_lang in + latex) bibtex=${BIBTEX:-bibtex};; + texinfo) return;; + esac + + # "Citation undefined" is for LaTeX, "Undefined citation" for btxmac.tex. + # The no .aux && \bibdata test is also for btxmac, in case it was the + # first run of a bibtex-using document. Otherwise, it's possible that + # bibtex would never be run. + if test -r "$in_noext.aux" \ + && test -r "$in_noext.log" \ + && (grep 'Warning:.*Citation.*undefined' "$in_noext.log" \ + || grep '.*Undefined citation' "$in_noext.log" \ + || grep 'No file .*\.bbl\.' "$in_noext.log") \ + || (grep 'No \.aux file' "$in_noext.log" \ + && grep '^\\bibdata' "$in_noext.aux") \ + >&6 2>&1; \ + then + for f in `generated_files_get "$in_noext" bibaux_file_p` + do + run $bibtex "$f" + done + fi +} + +# run_index () +# ------------ +# Run texindex (or makeindex) on current index files. If they already +# exist, and after running TeX a first time the index files don't +# change, then there's no reason to run TeX again. But we won't know +# that if the index files are out of date or nonexistent. +run_index () +{ + case $in_lang in + latex) texindex=${MAKEINDEX:-makeindex};; + texinfo) texindex=${TEXINDEX:-texindex};; + esac + index_files=`generated_files_get $in_noext index_file_p` + if test -n "$texindex" && test -n "$index_files"; then + run $texindex $index_files + fi +} + + +# run_thumbpdf () +# --------------- +run_thumbpdf () +{ + if test `out_lang_tex` = pdf \ + && test -r "$in_noext.log" \ + && grep 'thumbpdf\.sty' "$in_noext.log" >&6 2>&1; \ + then + thumbpdf=${THUMBPDF:-thumbpdf} + verbose "Running $thumbpdf $in_noext ..." + if $thumbpdf "$in_noext" >&5; then + run_tex + else + report "$thumbpdf exited with bad status." \ + "Ignoring its output." + fi + fi +} + + +# run_dvipdf FILE.dvi +# ------------------- +# Convert FILE.dvi to FILE.pdf. +run_dvipdf () +{ + # Find which dvi->pdf program is available. + if test -z "$dvipdf"; then + for i in "$DVIPDF" dvipdfmx dvipdfm dvipdf dvi2pdf dvitopdf; + do + if findprog $i; then + dvipdf=$i + fi + done + fi + # These tools have varying interfaces, some 'input output', others + # 'input -o output'. They all seem to accept 'input' only, + # outputting using the expected file name. + run $dvipdf "$1" + if test ! -f `echo "$1" | sed -e 's/\.dvi$/.pdf/'`; then + error 1 "$0: cannot find output file" + fi +} + +# run_tex_suite () +# ---------------- +# Run the TeX tools until a fix point is reached. +run_tex_suite () +{ + # Move to the working directory. + if $tidy; then + verbose "cd $work_build" + cd "$work_build" || exit 1 + fi + + # Count the number of cycles. + local cycle=0 + + while :; do + cycle=`expr $cycle + 1` + verbose "Cycle $cycle for $command_line_filename" + + xref_files_save + + # We run bibtex first, because I can see reasons for the indexes + # to change after bibtex is run, but I see no reason for the + # converse. + run_bibtex + run_index + run_core_conversion + + xref_files_changed || break + done + + # If we were using thumbpdf and producing PDF, then run thumbpdf + # and TeX one last time. + run_thumbpdf + + # Install the result if we didn't already (i.e., if the output is + # dvipdf or ps). + case $out_lang in + dvipdf) + run_dvipdf "$in_noext.`out_lang_tex`" + move_to_dest "$in_noext.`out_lang_ext`" + ;; + ps) + dvips -o "$in_noext.`out_lang_ext`" "$in_noext.`out_lang_tex`" + move_to_dest "$in_noext.`out_lang_ext`" + ;; + esac + + cd_orig +} + +## -------------------------------- ## +## TeX processing auxiliary tools. ## +## -------------------------------- ## + + +# A sed script that preprocesses Texinfo sources in order to keep the +# iftex sections only. We want to remove non TeX sections, and comment +# (with `@c texi2dvi') TeX sections so that makeinfo does not try to +# parse them. Nevertheless, while commenting TeX sections, don't +# comment @macro/@end macro so that makeinfo does propagate them. +# Unfortunately makeinfo --iftex --no-ifinfo doesn't work well enough +# (yet), makeinfo can't parse the TeX commands, so work around with sed. +# +comment_iftex=\ +'/^@tex/,/^@end tex/{ + s/^/@c texi2dvi/ +} +/^@iftex/,/^@end iftex/{ + s/^/@c texi2dvi/ + /^@c texi2dvi@macro/,/^@c texi2dvi@end macro/{ + s/^@c texi2dvi// + } +} +/^@ifnottex/,/^@end ifnottex/{ + s/^/@c (texi2dvi)/ +} +/^@ifinfo/,/^@end ifinfo/{ + /^@node/p + /^@menu/,/^@end menu/p + t + s/^/@c (texi2dvi)/ +} +s/^@ifnotinfo/@c texi2dvi@ifnotinfo/ +s/^@end ifnotinfo/@c texi2dvi@end ifnotinfo/' + +# Uncommenting is simple: Remove any leading `@c texi2dvi'. +uncomment_iftex='s/^@c texi2dvi//' + + +# run_makeinfo () +# --------------- +# Expand macro commands in the original source file using Makeinfo. +# Always use `end' footnote style, since the `separate' style +# generates different output (arguably this is a bug in -E). Discard +# main info output, the user asked to run TeX, not makeinfo. +run_makeinfo () +{ + test $in_lang == texinfo || + return 0 + + # Unless required by the user, makeinfo expansion is wanted only + # if texinfo.tex is too old. + if test "$expand" = t; then + makeinfo=${MAKEINFO:-makeinfo} + else + # Check if texinfo.tex performs macro expansion by looking for + # its version. The version is a date of the form YEAR-MO-DA. + # We don't need to use [0-9] to match the digits since anyway + # the comparison with $txiprereq, a number, will fail with non + # digits. + # Run in a temporary directory to avoid leaving files. + version_test_dir=$t2ddir/version_test + ensure_dir "$version_test_dir" + ( + cd "$version_test_dir" + echo '\input texinfo.tex @bye' >txiversion.tex + # Be sure that if tex wants to fail, it is not interactive: + # close stdin. + $TEX txiversion.tex </dev/null >txiversion.out 2>txiversion.err + ) + if test $? != 0; then + cat "$version_test_dir/txiversion.out" + cat "$version_test_dir/txiversion.err" >&2 + error 1 "texinfo.tex appears to be broken, quitting." + fi + eval `sed -n 's/^.*\[\(.*\)version \(....\)-\(..\)-\(..\).*$/txiformat=\1 txiversion="\2\3\4"/p' "$version_test_dir/txiversion.out"` + verbose "texinfo.tex preloaded as \`$txiformat', version is \`$txiversion' ..." + if test "$txiprereq" -le "$txiversion" >&6 2>&1; then + makeinfo= + else + makeinfo=${MAKEINFO:-makeinfo} + fi + # As long as we had to run TeX, offer the user this convenience: + if test "$txiformat" = Texinfo; then + escape=@ + fi + fi + + if test -n "$makeinfo"; then + # in_src: the file with macros expanded. + # Use the same basename to generate the same aux file names. + work_src=$workdir/src + ensure_dir "$work_src" + in_src=$work_src/$in_base + local miincludes + miincludes=`list_prefix includes -I` + verbose "Macro-expanding $command_line_filename to $in_src ..." + # eval $makeinfo because it might be defined as something complex + # (running missing) and then we end up with things like '"-I"', + # and "-I" (including the quotes) is not an option name. This + # happens with gettext 0.14.5, at least. + sed "$comment_iftex" "$command_line_filename" \ + | eval $makeinfo --footnote-style=end -I "$in_dir" $miincludes \ + -o /dev/null --macro-expand=- \ + | sed "$uncomment_iftex" >"$in_src" + # Continue only if everything succeeded. + if test $? -ne 0 \ + || test ! -r "$in_src"; then + verbose "Expansion failed, ignored..."; + else + in_input=$in_src + fi + fi +} + +# insert_commands () +# ------------------ +# Used most commonly for @finalout, @smallbook, etc. +insert_commands () +{ + local textra_cmd + case $in_lang in + latex) textra_cmd=1i;; + texinfo) textra_cmd='/^@setfilename/a';; + *) error 1 "internal error, unknown language: $in_lang";; + esac + + if test -n "$textra"; then + # _xtr. The file with the user's extra commands. + work_xtr=$workdir/xtr + in_xtr=$work_xtr/$in_base + ensure_dir "$work_xtr" + verbose "Inserting extra commands: $textra" + sed "$textra_cmd\\ +$textra" "$in_input" >"$in_xtr" + in_input=$in_xtr + fi +} + +# run_recode () +# ------------- +# If this is a Texinfo file with a specified input encoding, and +# recode is available, then recode to plain 7 bit Texinfo. +run_recode () +{ + local from + local to + + if test $in_lang = texinfo; then + pgm='s/^ *@documentencoding *\([^ ][^ ]*\) *$/\1/ + t found + d + :found + q' + encoding=`sed -e "$pgm" "$in_input"` + if $recode && test -n "$encoding" && findprog recode; then + if test -n "$recode_from"; then + from=$recode_from + to=$encoding + else + from=$encoding + to=$texinfo + fi + verbose "Recoding from $from to $to." + # _rcd. The Texinfo file recoded in 7bit. + work_rcd=$workdir/recode + in_rcd=$work_rcd/$in_base + ensure_dir "$work_rcd" + if recode "$encoding..$to" <"$in_input" >"$in_rcd" \ + && test -s "$in_rcd"; then + in_input=$in_rcd + else + verbose "Recoding failed, using original input." + fi + fi + fi +} + +# compute_language FILENAME +# ------------------------- +# Return the short string describing the language in which FILENAME +# is written: `texinfo' or `latex'. +compute_language () +{ + # If the user explicitly specified the language, use that. + # Otherwise, if the first line is \input texinfo, assume it's texinfo. + # Otherwise, guess from the file extension. + if test -n "$set_language"; then + echo $set_language + elif sed 1q "$1" | grep 'input texinfo' >&6; then + echo texinfo + else + # Get the type of the file (latex or texinfo) from the given language + # we just guessed, or from the file extension if not set yet. + case $1 in + *.ltx | *.tex | *.drv | *.dtx) echo latex;; + *) echo texinfo;; + esac + fi +} + + +# run_hevea (MODE) +# ---------------- +# Convert to HTML/INFO/TEXT. +# +# Don't pass `-noiso' to hevea: it's useless in HTML since anyway the +# charset is set to latin1, and troublesome in other modes since +# accented characters loose their accents. +# +# Don't pass `-o DEST' to hevea because in that case it leaves all its +# auxiliary files there too... Too bad, because it means we will need +# to handle images some day. +run_hevea () +{ + local hevea="${HEVEA:-hevea}" + local run_hevea="$hevea" + + case $1 in + html) ;; + text|info) run_hevea="$run_hevea -$1";; + *) error 1 "run_hevea: invalid argument: $1";; + esac + + # Compiling to the tmp directory enables to preserve a previous + # successful compilation. + run_hevea="$run_hevea -fix -O -o '$out_base'" + run_hevea="$run_hevea `list_prefix includes -I` -I '$orig_pwd' " + run_hevea="$run_hevea '$in_input'" + + if $debug; then + run_hevea="$run_hevea -v -v" + fi + + verbose "running $run_hevea" + if eval "$run_hevea" >&5; then + # hevea leaves trailing white spaces, this is annoying. + case $1 in text|info) + perl -pi -e 's/[ \t]+$//g' "$out_base"*;; + esac + case $1 in + html|text) move_to_dest "$out_base";; + info) # There can be foo.info-1, foo.info-2 etc. + move_to_dest "$out_base"*;; + esac + else + error 1 "$hevea exited with bad status, quitting." + fi +} + + +# run_core_conversion () +# ---------------------- +# Run the TeX (or HeVeA). +run_core_conversion () +{ + case $in_lang:`out_lang_tex` in + *:dvi|*:pdf) + run_tex;; + latex:html|latex:text|latex:info) + run_hevea $out_lang;; + *) + error 1 "invalid input/output combination: $in_lang/$out_lang";; + esac +} + + +# compile () +# ---------- +# Run the full compilation chain, from pre-processing to installation +# of the output at its expected location. +compile () +{ + # Source file might include additional sources. + # We want `.:$orig_pwd' before anything else. (We'll add `.:' later + # after all other directories have been turned into absolute paths.) + # `.' goes first to ensure that any old .aux, .cps, + # etc. files in ${directory} don't get used in preference to fresher + # files in `.'. Include orig_pwd in case we are in clean build mode, where + # we've cd'd to a temp directory. + txincludes=`list_infix includes $path_sep` + common="$orig_pwd$path_sep$in_dir$path_sep$txincludes$path_sep" + for var in $tex_envvars; do + eval val="\$common\$${var}_orig" + # Convert relative paths to absolute paths, so we can run in another + # directory (e.g., in clean build mode, or during the macro-support + # detection). + val=`absolute_filenames "$val"` + eval $var="\"$val\"" + export $var + eval verbose \"$var=\'\$${var}\'\" + done + + # --expand + run_makeinfo + + # --command, --texinfo + insert_commands + + # --recode + run_recode + + # Run until a fix point is reached. + run_tex_suite +} + + +# remove FILES +# ------------ +remove () +{ + verbose "Removing" "$@" + rm -rf "$@" +} + + +# mostly_clean +# ------------ +# Remove auxiliary files and directories. Changes the current directory. +mostly_clean () +{ + cd_orig + set X "$t2ddir" + shift + $tidy || { + local log="$work_build/$in_noext.log" + set X ${1+"$@"} "$log" `generated_files_get "$work_build/$in_noext"` + shift + } + remove ${1+"$@"} +} + + +# cleanup () +# ---------- +# Remove what should be removed according to options. +# Called at the end of each compilation cycle, and at the end of +# the script. Changes the current directory. +cleanup () +{ + case $build_mode in + local) cd_orig; remove "$t2ddir";; + clean) mostly_clean;; + tidy) ;; + esac +} + + + +## ---------------------- ## +## Command line parsing. ## +## ---------------------- ## + +# Push a token among the arguments that will be used to notice when we +# ended options/arguments parsing. +# Use "set dummy ...; shift" rather than 'set - ..." because on +# Solaris set - turns off set -x (but keeps set -e). +# Use ${1+"$@"} rather than "$@" because Digital Unix and Ultrix 4.3 +# still expand "$@" to a single argument (the empty string) rather +# than nothing at all. +arg_sep="$$--$$" +set dummy ${1+"$@"} "$arg_sep"; shift + +# +# Parse command line arguments. +while test x"$1" != x"$arg_sep"; do + + # Handle --option=value by splitting apart and putting back on argv. + case "$1" in + --*=*) + opt=`echo "$1" | sed -e 's/=.*//'` + val=`echo "$1" | sed -e 's/[^=]*=//'` + shift + set dummy "$opt" "$val" ${1+"$@"}; shift + ;; + esac + + # This recognizes --quark as --quiet. So what. + case "$1" in + -@ ) escape=@;; + # Silently and without documentation accept -b and --b[atch] as synonyms. + -b | --batch) batch=true;; + --build) shift; build_mode=$1;; + --build-dir) shift; build_dir=$1; build_mode=tidy;; + -c | --clean) build_mode=clean;; + -D | --debug) debug=true;; + --dvi) out_lang=dvi;; + --dvipdf) out_lang=dvipdf;; + -e | -E | --expand) expand=t;; + -h | --help) echo "$usage"; exit 0;; + --html) out_lang=html;; + -I | --I*) + shift + # Use absolute dir names in the includes. + val=`absolute "$1"` + list_append includes "$val" + ;; + --info) out_lang=info;; + -l | --lang | --language) shift; set_language=$1;; + --mostly-clean) action=mostly-clean;; + --no-line-error) no_line_error=true;; + -o | --out | --output) + shift + # Make it absolute, just in case we also have --clean, or whatever. + oname=`absolute "$1"`;; + -p | --pdf) out_lang=pdf;; + --ps) out_lang=ps;; + -q | -s | --quiet | --silent) quiet=true; batch=true;; + -r | --recode) recode=true;; + --recode-from) shift; recode=true; recode_from="$1";; + --src-specials) src_specials=--src-specials;; + -t | --texinfo | --command ) shift; textra="$textra\\ +"`echo "$1" | sed 's/\\\\/\\\\\\\\/g'`;; + --text) out_lang=text;; + --translate-file ) shift; translate_file="$1";; + --tidy) build_mode=tidy;; + -v | --vers*) echo "$version"; exit 0;; + -V | --verb*) verb=true;; + --) # What remains are not options. + shift + while test x"$1" != x"$arg_sep"; do + set dummy ${1+"$@"} "$1"; shift + shift + done + break;; + -*) + error 1 "Unknown or ambiguous option \`$1'." \ + "Try \`--help' for more information." + ;; + *) set dummy ${1+"$@"} "$1"; shift;; + esac + shift +done +# Pop the token +shift + +# $tidy: compile in a t2d directory. +# $clean: remove all the aux files. +case $build_mode in + local) clean=false; tidy=false;; + tidy) clean=false; tidy=true;; + clean) clean=true; tidy=true;; + *) error 1 "invalid build mode: $build_mode";; +esac + +# Interpret remaining command line args as filenames. +case $# in + 0) + error 2 "Missing file arguments." "Try \`--help' for more information." + ;; + 1) ;; + *) + if test -n "$oname"; then + error 2 "Can't use option \`--output' with more than one argument." + fi + ;; +esac + + +# We can't do much without tex. +# +if findprog ${TEX:-tex}; then :; else cat <<EOM +You don't have a working TeX binary (${TEX:-tex}) installed anywhere in +your PATH, and texi2dvi cannot proceed without one. If you want to use +this script, you'll need to install TeX (if you don't have it) or change +your PATH or TEX environment variable (if you do). See the --help +output for more details. + +For information about obtaining TeX, please see http://www.tug.org. If +you happen to be using Debian, you can get it with this command: + apt-get install tetex-bin +EOM + exit 1 +fi + + +# We want to use etex (or pdftex) if they are available, and the user +# didn't explicitly specify. We don't check for elatex and pdfelatex +# because (as of 2003), the LaTeX team has asked that new distributions +# use etex by default anyway. +# +# End up with the TEX and PDFTEX variables set to what we are going to use. +if test -z "$TEX"; then + if findprog etex; then TEX=etex; else TEX=tex; fi +fi +# +if test -z "$PDFTEX"; then + if findprog pdfetex; then PDFTEX=pdfetex; else PDFTEX=pdftex; fi +fi + + +# File descriptor usage: +# 0 standard input +# 1 standard output (--verbose messages) +# 2 standard error +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 5 tools output (turned off by --quiet) +# 6 tracing/debugging (set -x output, etc.) + + +# Main tools' output (TeX, etc.) that TeX users are used to seeing. +# +# If quiet, discard, else redirect to the message flow. +if $quiet; then + exec 5>/dev/null +else + exec 5>&1 +fi + + +# Enable tracing, and auxiliary tools output. +# +# Should be used where you'd typically use /dev/null to throw output +# away. But sometimes it is convenient to see that output (e.g., from +# a grep) to aid debugging. Especially debugging at distance, via the +# user. +if $debug; then + exec 6>&1 + set -x +else + exec 6>/dev/null +fi + +# + +# input_file_name_decode +# ---------------------- +# Decode COMMAND_LINE_FILENAME, and compute: +# - COMMAND_LINE_FILENAME clean of TeX commands +# - IN_DIR +# The directory to the input file, possibly absolute if needed. +# - IN_DIR_ABS +# The absolute directory of the input file. +# - IN_BASE +# The input file base name (no directory part). +# - IN_NOEXT +# The input file name without extensions (nor directory part). +# - IN_INPUT +# Defaults to COMMAND_LINE_FILENAME, but might change if the +# input is preprocessed (recode etc.). With directory, possibly absolute. +input_file_name_decode () +{ + # See if we are run from within AUC-Tex, in which case we are + # passed `\input{FOO.tex}' or even `\nonstopmode\input{FOO.tex}'. + case $command_line_filename in + *\\nonstopmode*) + batch=true;; + esac + case $command_line_filename in + *\\input{*}*) + # Let AUC-TeX error parser deal with line numbers. + line_error=false + command_line_filename=`\ + expr X"$command_line_filename" : X'.*input{\([^}]*\)}'` + ;; + esac + + # If the COMMAND_LINE_FILENAME is not absolute (e.g., --debug.tex), + # prepend `./' in order to avoid that the tools take it as an option. + echo "$command_line_filename" | $EGREP '^(/|[A-z]:/)' >&6 \ + || command_line_filename="./$command_line_filename" + + # See if the file exists. If it doesn't we're in trouble since, even + # though the user may be able to reenter a valid filename at the tex + # prompt (assuming they're attending the terminal), this script won't + # be able to find the right xref files and so forth. + test -r "$command_line_filename" || + error 1 "cannot read $command_line_filename, skipping." + + # Get the name of the current directory. + in_dir=`func_dirname "$command_line_filename"` + in_dir_abs=`absolute "$in_dir"` + # In a clean build, we `cd', so get an absolute file name. + if $tidy; then + in_dir=$in_dir_abs + fi + + # Strip directory part but leave extension. + in_base=`basename "$command_line_filename"` + # Strip extension. + in_noext=`echo "$in_base" | sed 's/\.[^.]*$//'` + + # The normalized file name to compile. Must always point to the + # file to actually compile (in case of recoding, macro-expansion etc.). + in_input=$in_dir/$in_base + + + # Compute the output file name. + if test x"$oname" != x; then + out_name=$oname + else + out_name=$in_noext.`out_lang_ext` + fi + out_dir=`func_dirname "$out_name"` + out_dir_abs=`absolute "$out_dir"` + out_base=`basename "$out_name"` + out_noext=`echo "$out_base" | sed 's/\.[^.]*$//'` +} + + +## -------------- ## +## TeXify files. ## +## -------------- ## + +for command_line_filename +do + verbose "Processing $command_line_filename ..." + + input_file_name_decode + + # `texinfo' or `latex'? + in_lang=`compute_language "$command_line_filename"` + + # An auxiliary directory used for all the auxiliary tasks involved + # in compiling this document. + case $build_dir in + '' | . ) t2ddir=$out_noext.t2d ;; + *) # Avoid collisions between multiple occurrences of the same + # file. The sed expression is fragile if the cwd has + # active characters. + t2ddir=$build_dir/`echo "$out_dir_abs/$out_noext.t2d" | + sed "s,^$orig_pwd/,," | + sed 's,/,!,g'` + esac + # Remove it at exit if clean mode. + trap "cleanup" 0 1 2 15 + + ensure_dir "$build_dir" "$t2ddir" + + # We will change directory, better work with an absolute path... + t2ddir=`absolute "$t2ddir"` + # Sometimes there are incompatibilities between auxiliary files for + # DVI and PDF. The contents can also change whether we work on PDF + # and/or DVI. So keep separate spaces for each. + workdir=$t2ddir/`out_lang_tex` + ensure_dir "$workdir" + + # _build. In a tidy build, where the auxiliary files are output. + if $tidy; then + work_build=$workdir/build + else + work_build=. + fi + + # _bak. Copies of the previous auxiliary files (another round is + # run if they differ from the new ones). + work_bak=$workdir/bak + + # Make those directories. + ensure_dir "$work_build" "$work_bak" + + case $action in + compile) + # Compile the document. + compile + cleanup + ;; + + mostly-clean) + mostly_clean + ;; + esac +done + +verbose "done." +exit 0 # exit successfully, not however we ended the loop. diff --git a/Master/bin/i386-solaris/texi2pdf b/Master/bin/i386-solaris/texi2pdf new file mode 100755 index 00000000000..a030a74ed9f --- /dev/null +++ b/Master/bin/i386-solaris/texi2pdf @@ -0,0 +1,19 @@ +#!/bin/sh +# $Id: texi2pdf,v 1.2 2005/01/28 01:52:04 karl Exp $ +# Written by Thomas Esser. Public domain. +# Execute texi2dvi --pdf. + +test -f /bin/ksh && test -z "$RUNNING_KSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; } +unset RUNNING_KSH + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +# hack around a bug in zsh: +test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' + +texi2dvi --pdf ${1+"$@"} diff --git a/Master/bin/i386-solaris/texindex b/Master/bin/i386-solaris/texindex Binary files differnew file mode 100755 index 00000000000..4eff0ab555d --- /dev/null +++ b/Master/bin/i386-solaris/texindex diff --git a/Master/bin/i386-solaris/texlinks b/Master/bin/i386-solaris/texlinks new file mode 100755 index 00000000000..bfe1b75db16 --- /dev/null +++ b/Master/bin/i386-solaris/texlinks @@ -0,0 +1,322 @@ +#!/bin/sh + +# Thomas Esser, 1999, 2002, 2003. public domain. + +# texlinks: script to maintain symlinks from format to engine. Interprets +# the lines given in fmtutil.cnf. + +# History: +# Tue Oct 9 14:23:01 BST 2007 +# Added unlink option (-u) to aid OpenBSD package uninstall +# Edd Barrett <vext01@gmail.com> +# Sun Aug 28 21:41:06 CEST 2005 +# remove special cases for csplain,cslatex,pdfcslatex,pdfcsplain +# Fr Apr 8 19:15:05 CEST 2005 +# cleanup now has an argument for the return code +# So Mär 27 18:52:06 CEST 2005 +# honor $TMPDIR, $TEMP and $TMP, not just $TMP +# Mon May 10 20:52:48 CEST 2004 +# kpseaccess instead of access +# Thu Dec 25 22:11:53 CET 2003, te: +# add version string +# Tue Apr 9 22:46:34 CEST 2002, te: +# do not create symlinks for cont-??, metafun and mptopdf + +test -f /bin/sh5 && test -z "$RUNNING_SH5" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; } +unset RUNNING_SH5 + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +export PATH + +# hack around a bug in zsh: +test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' + +cnf=fmtutil.cnf # name of the config file +version=1192147136 # seconds since `00:00:00 1970-01-01 UTC' + # date '+%s' (with GNU date) +progname=texlinks + +usage='Usage: texlinks [OPTION]... [DIRECTORY]... + +Create symbolic links format -> engine according to fmtutil setup. + +Mandatory arguments to long options are mandatory for short options too. + -h, --help show this help text + --version show version string + -f, --cnffile FILE use FILE as config file (default: fmtutil.cnf) + -v, --verbose enable verbose messages (default: off) + -m, --multiplatform operate in all platform specific directories + (default: operate only in directory for this platform) + -s, --silent silently skip existing scripts / binaries + (default: issue warning) + -u, --unlink remove symlinks created by texlinks + +The DIRECTORY arguments are an optional list of directories in which to +operate. If no directories are specified the list of directories +depends on the --multiplatform option. + +Report bugs to tex-k@tug.org.' + +############################################################################### +# abort(errmsg) +# print `errmsg' to stderr and exit with error code 1 +############################################################################### +abort() { errmsg "texlinks: $1."; cleanup 1; } + +# error message to stderr: +errmsg() { echo "$@" >&2; } + +# give message to stderr only if "verbose" mode is on: +verbose_echo() { $verbose && errmsg "$@"; } + +# in verbose mode: show command that is executed: +verbose_do() { verbose_echo "$@"; "$@"; } + +############################################################################### +# cleanup() +# clean up the temp area and exit with proper exit status +############################################################################### +cleanup() +{ + rc=$1 + $needsCleanup && test -n "$tmpdir" && test -d "$tmpdir" \ + && { rm -f "$tmpdir"/*; cd /; rmdir "$tmpdir"; } + exit $rc +} + +############################################################################### +# setupTmpDir() +# set up a temp directory and a trap to remove it +############################################################################### +setupTmpDir() +{ + $needsCleanup && return + + trap 'cleanup 1' 1 2 3 7 13 15 + needsCleanup=true + (umask 077; mkdir "$tmpdir") \ + || abort "could not create directory \`$tmpdir'" +} + + +# search a binary along $PATH: +check_for_binary() +{ + testbin=$1 + set x `echo "$PATH" | sed 's/^:/.:/; s/:$/:./; s/::/:.:/g; s/:/ /g'`; shift + for i + do + if [ -x "$i/$testbin" ]; then + echo "$i/$testbin" + return 0 + fi + done + return 1 +} + + +############################################################################### +# install_link(dest src) +# create a symlink like ln -s dest src, but make sure that src is not +# an existing binary +############################################################################### +install_link() +{ + # make symlink src -> dest + dest=$1; src=$2 + + case $src in + */mf) + if test "$dest" = mf-nowin; then + if test -f $selfautoloc/mfw; then + dest=mfw # name for windows-enabled mf, once upon a time + verbose_echo "both mfw and mf-nowin exists, $src linked to $dest" + fi + if test -f $selfautoloc/mf && test -f $selfautoloc/mf-nowin; then + # have both mf and mf-nowin binaries. no link. + verbose_echo "skipped metafont symlink $src -> $dest (special case)" + return + fi + fi + ;; + esac + + case $src in + */cont-??|*/metafun|*/mptopdf) + verbose_echo "skipped ConTeXtish symlink $src -> $dest (special case)" + ;; + *) + test "x$src" != "x`(ls -ld $src | awk '{print $NF}') 2>/dev/null`" && + verbose_do rm -f "$src" + + if test -f "$src"; then + case $silent in + true) + ;; + *) + errmsg "install_link $src -> $dest failed: file already exists." + ;; + esac + else + verbose_do ln -s "$dest" "$src" + fi + ;; + esac +} + +############################################################################### +# search_symlinkdir() +# look if $PATH has only symlinks to the real binaries and find that +# directory. Also check if this directory is writable. +############################################################################### +search_symlinkdir() +{ + kpsewhich=`check_for_binary kpsewhich` + test -z "$kpsewhich" && return 1 + symlinkdir=`echo $kpsewhich | sed 's@/*kpsewhich$@@'` + kpseaccess -w "$symlinkdir" || return 1 + touch "$symlinkdir/tl$$" + if test -f "$selfautoloc/tl$$"; then + rm -f "$symlinkdir/tl$$" + return 1 + else + rm -f "$symlinkdir/tl$$" + return 0 + fi +} + +############################################################################### +# upd_symlinkdir() +# if $PATH has only symlinks to the real binaries, update that directory +# that holds the symlinks +############################################################################### +upd_symlinkdir() +{ + search_symlinkdir || return 0 + for i in `sed 's@ .*@@' cnf_file_ln.$$`; do + install_link "$selfautoloc/$i" "$symlinkdir/$i" + done +} + +############################################################################### +# rm_link() +# Delete a previously installed link +############################################################################### +rm_link() +{ + link=$1; + if test -e $link; then + if test -h $link; then + verbose_do rm -Rf $link + else + verbose_echo "kept $link, since not a symlink" + fi + else + verbose_echo "skipped $link, non-existent" + fi +} + +############################################################################### +# main() +# parse commandline arguments, initialize variables, +# switch into temp. direcrory, execute desired command +############################################################################### +main() +{ + cnf_file= # global variable: full name of the config file + dirs= + needsCleanup=false + + multiplatform=false + verbose=false + unlink=false + silent=false + thisdir=`pwd` + : ${KPSE_DOT=$thisdir}; export KPSE_DOT + selfautoloc=`kpsewhich --expand-var='$SELFAUTOLOC'` + while + case $1 in + --h*|-h) + echo "$usage"; exit 0;; + --version) + echo "$progname version $version."; exit 0;; + --cnffile|-f) + shift; cnf_file=$1;; + --v*|-v) verbose=true;; + --s*|-s) silent=true;; + --m*|-m) multiplatform=true;; + --u*|-u) unlink=true;; + -*) errmsg "fmtutil: unknown option \`$1' ignored.";; + *) break;; + esac + do test $# -gt 0 && shift; done + dirs="$*" + + # if no cnf_file from command-line, look it up with kpsewhich: + test -z "$cnf_file" && cnf_file=`kpsewhich --format='web2c files' $cnf` + test -f "$cnf_file" || abort "config file \`$cnf' not found" + + + tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/texlinks.$$ + setupTmpDir + cd "$tmpdir" || cleanup 1 + + sed '/^[ ]*#/d; /^[ ]*$/d' $cnf_file \ + | awk '{print $1, $2}' > cnf_file_ln.$$ + + if test -z "$dirs"; then + if test $multiplatform = true; then + case $selfautoloc in + */bin) dirs=$selfautoloc;; + *) parent=`kpsewhich --expand-var='$SELFAUTODIR'` + dirs=`find $parent -type f -name kpsewhich -print \ + | sed 's@/kpsewhich$@@'`;; + esac + else + dirs=$selfautoloc + fi + fi + + for d in $dirs; do + kpseaccess -w $d \ + || { errmsg "$d: no write permissions. Skipping..."; continue; } + # cnf_file_ln.$$ has lines with "format engine" pairs + set x `cat cnf_file_ln.$$`; shift + while test $# != 0; do + fmt=$1; engine=$2; shift; shift + + # Some broken shells destroy the positional arguments when calling a + # shellfunction. Therefore, we save and restore them "by hand" in the + # main_args_while variable. + main_args_while="$@" + + test "x$fmt" = "x$engine" && continue + if test -f "$d/$engine"; then + case $unlink in + true) + rm_link "$d/$fmt";; + *) + install_link "$engine" "$d/$fmt";; + esac + else + verbose_echo "skipped $d/$engine, engine does not exist" + fi + + # restore positional arguments: + set x $main_args_while; shift + + done + done + upd_symlinkdir +} + +main ${1+"$@"} + +# set successful return code +cleanup 0 diff --git a/Master/bin/i386-solaris/texmfstart b/Master/bin/i386-solaris/texmfstart new file mode 100755 index 00000000000..4d1e2976145 --- /dev/null +++ b/Master/bin/i386-solaris/texmfstart @@ -0,0 +1,2580 @@ +#!/usr/bin/env ruby + +# program : texmfstart +# copyright : PRAGMA Advanced Document Engineering +# version : 1.9.0 - 2003/2006 +# author : Hans Hagen +# +# project : ConTeXt / eXaMpLe +# info : j.hagen@xs4all.nl +# www : www.pragma-pod.com / www.pragma-ade.com + +# no special requirements, i.e. no exa modules/classes used + +# texmfstart [switches] filename [optional arguments] +# +# ruby2exe texmfstart --help -> avoids stub test +# +# Of couse I can make this into a nice class, which i'll undoubtely will +# do when I feel the need. In that case it will be part of a bigger game. + +# turning this into a service would be nice, so some day ... + +# --locate => provides location +# --exec => exec instead of system +# --iftouched=a,b => only if timestamp a<>b +# --ifchanged=a,b => only if checksum changed +# +# file: path: bin: + +# texmfstart --exec bin:scite *.tex + +# we don't depend on other libs + +$: << File.expand_path(File.dirname($0)) ; $: << File.join($:.last,'lib') ; $:.uniq! + +require "rbconfig" +require "md5" + +# kpse_merge_done: require 'base/kpseremote' +# kpse_merge_done: require 'base/kpsedirect' +# kpse_merge_done: require 'base/kpsefast' +# kpse_merge_done: require 'base/merge' + +# kpse_merge_start + +# kpse_merge_file: 'C:/data/develop/context/ruby/base/kpseremote.rb' + +# kpse_merge_done: require 'base/kpsefast' + +case ENV['KPSEMETHOD'] + when /soap/o then # kpse_merge_done: require 'base/kpse/soap' + when /drb/o then # kpse_merge_done: require 'base/kpse/drb' + else # kpse_merge_done: require 'base/kpse/drb' +end + +class KpseRemote + + @@port = ENV['KPSEPORT'] || 7000 + @@method = ENV['KPSEMETHOD'] || 'drb' + + def KpseRemote::available? + @@method && @@port + end + + def KpseRemote::start_server(port=nil) + kpse = KpseServer.new(port || @@port) + kpse.start + end + + def KpseRemote::start_client(port=nil) # keeps object in server + kpseclient = KpseClient.new(port || @@port) + kpseclient.start + kpse = kpseclient.object + tree = kpse.choose(KpseUtil::identify, KpseUtil::environment) + [kpse, tree] + end + + def KpseRemote::fetch(port=nil) # no need for defining methods but slower, send whole object + kpseclient = KpseClient.new(port || @@port) + kpseclient.start + kpseclient.object.fetch(KpseUtil::identify, KpseUtil::environment) rescue nil + end + + def initialize(port=nil) + if KpseRemote::available? then + begin + @kpse, @tree = KpseRemote::start_client(port) + rescue + @kpse, @tree = nil, nil + end + else + @kpse, @tree = nil, nil + end + end + + def progname=(value) + @kpse.set(@tree,'progname',value) + end + def format=(value) + @kpse.set(@tree,'format',value) + end + def engine=(value) + @kpse.set(@tree,'engine',value) + end + + def progname + @kpse.get(@tree,'progname') + end + def format + @kpse.get(@tree,'format') + end + def engine + @kpse.get(@tree,'engine') + end + + def load + @kpse.load(KpseUtil::identify, KpseUtil::environment) + end + def okay? + @kpse && @tree + end + def set(key,value) + @kpse.set(@tree,key,value) + end + def load_cnf + @kpse.load_cnf(@tree) + end + def load_lsr + @kpse.load_lsr(@tree) + end + def expand_variables + @kpse.expand_variables(@tree) + end + def expand_braces(str) + clean_name(@kpse.expand_braces(@tree,str)) + end + def expand_path(str) + clean_name(@kpse.expand_path(@tree,str)) + end + def expand_var(str) + clean_name(@kpse.expand_var(@tree,str)) + end + def show_path(str) + clean_name(@kpse.show_path(@tree,str)) + end + def var_value(str) + clean_name(@kpse.var_value(@tree,str)) + end + def find_file(filename) + clean_name(@kpse.find_file(@tree,filename)) + end + def find_files(filename,first=false) + # dodo: each filename + @kpse.find_files(@tree,filename,first) + end + + private + + def clean_name(str) + str.gsub(/\\/,'/') + end + +end + + +# kpse_merge_file: 'C:/data/develop/context/ruby/base/kpsefast.rb' + +# module : base/kpsefast +# copyright : PRAGMA Advanced Document Engineering +# version : 2005 +# author : Hans Hagen +# +# project : ConTeXt / eXaMpLe +# concept : Hans Hagen +# info : j.hagen@xs4all.nl + +# todo: multiple cnf files +# + +class String + + def split_path + if self =~ /\;/o || self =~ /^[a-z]\:/io then + self.split(";") + else + self.split(":") + end + end + +end + +class Array + + def join_path + self.join(File::PATH_SEPARATOR) + end + +end + +class File + + def File.locate_file(path,name) + begin + files = Dir.entries(path) + if files.include?(name) then + fullname = File.join(path,name) + return fullname if FileTest.file?(fullname) + end + files.each do |p| + fullname = File.join(path,p) + if p != '.' and p != '..' and FileTest.directory?(fullname) and result = locate_file(fullname,name) then + return result + end + end + rescue + # bad path + end + return nil + end + + def File.glob_file(pattern) + return Dir.glob(pattern).first + end + +end + +module KpseUtil + + # to be adapted, see loading cnf file + + @@texmftrees = ['texmf-local','texmf.local','../..','texmf'] # '../..' is for gwtex + @@texmfcnf = 'texmf.cnf' + + def KpseUtil::identify + # we mainly need to identify the local tex stuff and wse assume that + # the texmfcnf variable is set; otherwise we need to expand the + # TEXMF variable and that takes time since it may involve more + ownpath = File.expand_path($0) + if ownpath.gsub!(/texmf.*?$/o, '') then + ENV['SELFAUTOPARENT'] = ownpath + else + ENV['SELFAUTOPARENT'] = '.' # fall back + # may be too tricky: + # + # (ENV['PATH'] ||'').split_path.each do |p| + # if p.gsub!(/texmf.*?$/o, '') then + # ENV['SELFAUTOPARENT'] = p + # break + # end + # end + end + filenames = Array.new + if ENV['TEXMFCNF'] && ! ENV['TEXMFCNF'].empty? then + ENV['TEXMFCNF'].to_s.split_path.each do |path| + filenames << File.join(path,@@texmfcnf) + end + elsif ENV['SELFAUTOPARENT'] == '.' then + filenames << File.join('.',@@texmfcnf) + else + @@texmftrees.each do |tree| + filenames << File.join(ENV['SELFAUTOPARENT'],tree,'web2c',@@texmfcnf) + end + end + loop do + busy = false + filenames.collect! do |f| + f.gsub(/\$([a-zA-Z0-9\_\-]+)/o) do + if (! ENV[$1]) || (ENV[$1] == $1) then + "$#{$1}" + else + busy = true + ENV[$1] + end + end + end + break unless busy + end + filenames.delete_if do |f| + ! FileTest.file?(f) + end + return filenames + end + + def KpseUtil::environment + Hash.new.merge(ENV) + end + +end + +class KpseFast + + # formats are an incredible inconsistent mess + + @@suffixes = Hash.new + @@formats = Hash.new + @@suffixmap = Hash.new + + @@texmfcnf = 'texmf.cnf' + + @@suffixes['gf'] = ['.<resolution>gf'] # todo + @@suffixes['pk'] = ['.<resolution>pk'] # todo + @@suffixes['tfm'] = ['.tfm'] + @@suffixes['afm'] = ['.afm'] + @@suffixes['base'] = ['.base'] + @@suffixes['bib'] = ['.bib'] + @@suffixes['bst'] = ['.bst'] + @@suffixes['cnf'] = ['.cnf'] + @@suffixes['ls-R'] = ['ls-R', 'ls-r'] + @@suffixes['fmt'] = ['.fmt', '.efmt', '.efm', '.ofmt', '.ofm', '.oft', '.eofmt', '.eoft', '.eof', '.pfmt', '.pfm', '.epfmt', '.epf', '.xpfmt', '.xpf', '.afmt', '.afm'] + @@suffixes['map'] = ['.map'] + @@suffixes['mem'] = ['.mem'] + @@suffixes['mf'] = ['.mf'] + @@suffixes['mfpool'] = ['.pool'] + @@suffixes['mft'] = ['.mft'] + @@suffixes['mp'] = ['.mp'] + @@suffixes['mppool'] = ['.pool'] + @@suffixes['ocp'] = ['.ocp'] + @@suffixes['ofm'] = ['.ofm', '.tfm'] + @@suffixes['opl'] = ['.opl'] + @@suffixes['otp'] = ['.otp'] + @@suffixes['ovf'] = ['.ovf'] + @@suffixes['ovp'] = ['.ovp'] + @@suffixes['graphic/figure'] = ['.eps', '.epsi'] + @@suffixes['tex'] = ['.tex'] + @@suffixes['texpool'] = ['.pool'] + @@suffixes['PostScript header'] = ['.pro'] + @@suffixes['type1 fonts'] = ['.pfa', '.pfb'] + @@suffixes['vf'] = ['.vf'] + @@suffixes['ist'] = ['.ist'] + @@suffixes['truetype fonts'] = ['.ttf', '.ttc'] + @@suffixes['web'] = ['.web', '.ch'] + @@suffixes['cweb'] = ['.w', '.web', '.ch'] + @@suffixes['enc files'] = ['.enc'] + @@suffixes['cmap files'] = ['.cmap'] + @@suffixes['subfont definition files'] = ['.sfd'] + @@suffixes['lig files'] = ['.lig'] + @@suffixes['bitmap font'] = [] + @@suffixes['MetaPost support'] = [] + @@suffixes['TeX system documentation'] = [] + @@suffixes['TeX system sources'] = [] + @@suffixes['Troff fonts'] = [] + @@suffixes['dvips config'] = [] + @@suffixes['type42 fonts'] = [] + @@suffixes['web2c files'] = [] + @@suffixes['other text files'] = [] + @@suffixes['other binary files'] = [] + @@suffixes['misc fonts'] = [] + @@suffixes['opentype fonts'] = [] + @@suffixes['pdftex config'] = [] + @@suffixes['texmfscripts'] = [] + + # replacements + + @@suffixes['fmt'] = ['.fmt'] + @@suffixes['type1 fonts'] = ['.pfa', '.pfb', '.pfm'] + @@suffixes['tex'] = ['.tex', '.xml'] + @@suffixes['texmfscripts'] = ['rb','lua','py','pl'] + + @@suffixes.keys.each do |k| @@suffixes[k].each do |s| @@suffixmap[s] = k end end + + # TTF2TFMINPUTS + # MISCFONTS + # TEXCONFIG + # DVIPDFMINPUTS + # OTFFONTS + + @@formats['gf'] = '' + @@formats['pk'] = '' + @@formats['tfm'] = 'TFMFONTS' + @@formats['afm'] = 'AFMFONTS' + @@formats['base'] = 'MFBASES' + @@formats['bib'] = '' + @@formats['bst'] = '' + @@formats['cnf'] = '' + @@formats['ls-R'] = '' + @@formats['fmt'] = 'TEXFORMATS' + @@formats['map'] = 'TEXFONTMAPS' + @@formats['mem'] = 'MPMEMS' + @@formats['mf'] = 'MFINPUTS' + @@formats['mfpool'] = 'MFPOOL' + @@formats['mft'] = '' + @@formats['mp'] = 'MPINPUTS' + @@formats['mppool'] = 'MPPOOL' + @@formats['ocp'] = 'OCPINPUTS' + @@formats['ofm'] = 'OFMFONTS' + @@formats['opl'] = 'OPLFONTS' + @@formats['otp'] = 'OTPINPUTS' + @@formats['ovf'] = 'OVFFONTS' + @@formats['ovp'] = 'OVPFONTS' + @@formats['graphic/figure'] = '' + @@formats['tex'] = 'TEXINPUTS' + @@formats['texpool'] = 'TEXPOOL' + @@formats['PostScript header'] = 'TEXPSHEADERS' + @@formats['type1 fonts'] = 'T1FONTS' + @@formats['vf'] = 'VFFONTS' + @@formats['ist'] = '' + @@formats['truetype fonts'] = 'TTFONTS' + @@formats['web'] = '' + @@formats['cweb'] = '' + @@formats['enc files'] = 'ENCFONTS' + @@formats['cmap files'] = 'CMAPFONTS' + @@formats['subfont definition files'] = 'SFDFONTS' + @@formats['lig files'] = 'LIGFONTS' + @@formats['bitmap font'] = '' + @@formats['MetaPost support'] = '' + @@formats['TeX system documentation'] = '' + @@formats['TeX system sources'] = '' + @@formats['Troff fonts'] = '' + @@formats['dvips config'] = '' + @@formats['type42 fonts'] = 'T42FONTS' + @@formats['web2c files'] = 'WEB2C' + @@formats['other text files'] = '' + @@formats['other binary files'] = '' + @@formats['misc fonts'] = '' + @@formats['opentype fonts'] = 'OPENTYPEFONTS' + @@formats['pdftex config'] = 'PDFTEXCONFIG' + @@formats['texmfscripts'] = 'TEXMFSCRIPTS' + + attr_accessor :progname, :engine, :format, :rootpath, :treepath, + :verbose, :remember, :scandisk, :diskcache, :renewcache + + @@cacheversion = '1' + + def initialize + @rootpath = '' + @treepath = '' + @progname = 'kpsewhich' + @engine = 'pdftex' + @variables = Hash.new + @expansions = Hash.new + @files = Hash.new + @found = Hash.new + @kpsevars = Hash.new + @lsrfiles = Array.new + @cnffiles = Array.new + @verbose = true + @remember = true + @scandisk = true + @diskcache = true + @renewcache = false + @isolate = false + + @diskcache = false + @cachepath = nil + @cachefile = 'tmftools.log' + + @environment = ENV + end + + def set(key,value) + case key + when 'progname' then @progname = value + when 'engine' then @engine = value + when 'format' then @format = value + end + end + + def push_environment(env) + @environment = env + end + + # {$SELFAUTOLOC,$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c} + # + # $SELFAUTOLOC : /usr/tex/bin/platform + # $SELFAUTODIR : /usr/tex/bin + # $SELFAUTOPARENT : /usr/tex + # + # since we live in scriptpath we need a slightly different method + + def load_cnf(filenames=nil) + unless filenames then + ownpath = File.expand_path($0) + if ownpath.gsub!(/texmf.*?$/o, '') then + @environment['SELFAUTOPARENT'] = ownpath + else + @environment['SELFAUTOPARENT'] = '.' + end + unless @treepath.empty? then + unless @rootpath.empty? then + @treepath = @treepath.split(',').collect do |p| File.join(@rootpath,p) end.join(',') + end + @environment['TEXMF'] = @treepath + # only the first one + @environment['TEXMFCNF'] = File.join(@treepath.split(',').first,'texmf/web2c') + end + unless @rootpath.empty? then + @environment['TEXMFCNF'] = File.join(@rootpath,'texmf/web2c') + @environment['SELFAUTOPARENT'] = @rootpath + @isolate = true + end + filenames = Array.new + if @environment['TEXMFCNF'] and not @environment['TEXMFCNF'].empty? then + @environment['TEXMFCNF'].to_s.split_path.each do |path| + filenames << File.join(path,@@texmfcnf) + end + elsif @environment['SELFAUTOPARENT'] == '.' then + filenames << File.join('.',@@texmfcnf) + else + ['texmf-local','texmf'].each do |tree| + filenames << File.join(@environment['SELFAUTOPARENT'],tree,'web2c',@@texmfcnf) + end + end + end + # <root>/texmf/web2c/texmf.cnf + filenames = _expanded_path_(filenames) + @rootpath = filenames.first + 3.times do + @rootpath = File.dirname(@rootpath) + end + filenames.collect! do |f| + f.gsub("\\", '/') + end + filenames.each do |fname| + if FileTest.file?(fname) and f = File.open(fname) then + @cnffiles << fname + while line = f.gets do + loop do + # concatenate lines ending with \ + break unless line.sub!(/\\\s*$/o) do + f.gets || '' + end + end + case line + when /^[\%\#]/o then + # comment + when /^\s*(.*?)\s*\=\s*(.*?)\s*$/o then + key, value = $1, $2 + unless @variables.key?(key) then + value.sub!(/\%.*$/,'') + value.sub!(/\~/, "$HOME") + @variables[key] = value + end + @kpsevars[key] = true + end + end + f.close + end + end + end + + def load_lsr + @lsrfiles = [] + simplified_list(expansion('TEXMF')).each do |p| + ['ls-R','ls-r'].each do |f| + filename = File.join(p,f) + if FileTest.file?(filename) then + @lsrfiles << [filename,File.size(filename)] + break + end + end + end + @files = Hash.new + if @diskcache then + ['HOME','TEMP','TMP','TMPDIR'].each do |key| + if @environment[key] then + if FileTest.directory?(@environment[key]) then + @cachepath = @environment[key] + @cachefile = [@rootpath.gsub(/[^A-Z0-9]/io, '-').gsub(/\-+/,'-'),File.basename(@cachefile)].join('-') + break + end + end + end + if @cachepath and not @renewcache and FileTest.file?(File.join(@cachepath,@cachefile)) then + begin + if f = File.open(File.join(@cachepath,@cachefile)) then + cacheversion = Marshal.load(f) + if cacheversion == @@cacheversion then + lsrfiles = Marshal.load(f) + if lsrfiles == @lsrfiles then + @files = Marshal.load(f) + end + end + f.close + end + rescue + @files = Hash.new + end + end + end + return if @files.size > 0 + @lsrfiles.each do |filedata| + filename, filesize = filedata + filepath = File.dirname(filename) + begin + path = '.' + data = IO.readlines(filename) + if data[0].chomp =~ /% ls\-R \-\- filename database for kpathsea\; do not change this line\./io then + data.each do |line| + case line + when /^[a-zA-Z0-9]/o then + line.chomp! + if @files[line] then + @files[line] << path + else + @files[line] = [path] + end + when /^\.\/(.*?)\:$/o then + path = File.join(filepath,$1) + end + end + end + rescue + # sorry + end + end + if @diskcache and @cachepath and f = File.open(File.join(@cachepath,@cachefile),'wb') then + f << Marshal.dump(@@cacheversion) + f << Marshal.dump(@lsrfiles) + f << Marshal.dump(@files) + f.close + end + end + + def expand_variables + @expansions = Hash.new + if @isolate then + @variables['TEXMFCNF'] = @environment['TEXMFCNF'].dup + @variables['SELFAUTOPARENT'] = @environment['SELFAUTOPARENT'].dup + else + @environment.keys.each do |e| + if e =~ /^([a-zA-Z]+)\_(.*)\s*$/o then + @expansions["#{$1}.#{$2}"] = (@environment[e] ||'').dup + else + @expansions[e] = (@environment[e] ||'').dup + end + end + end + @variables.keys.each do |k| + @expansions[k] = @variables[k].dup unless @expansions[k] + end + loop do + busy = false + @expansions.keys.each do |k| + @expansions[k].gsub!(/\$([a-zA-Z0-9\_\-]*)/o) do + busy = true + @expansions[$1] || '' + end + @expansions[k].gsub!(/\$\{([a-zA-Z0-9\_\-]*)\}/o) do + busy = true + @expansions[$1] || '' + end + end + break unless busy + end + @expansions.keys.each do |k| + @expansions[k] = @expansions[k].gsub("\\", '/') + end + end + + def variable(name='') + (name and not name.empty? and @variables[name.sub('$','')]) or '' + end + + def expansion(name='') + (name and not name.empty? and @expansions[name.sub('$','')]) or '' + end + + def variable?(name='') + name and not name.empty? and @variables.key?(name.sub('$','')) + end + + def expansion?(name='') + name and not name.empty? and @expansions.key?(name.sub('$','')) + end + + def simplified_list(str) + lst = str.gsub(/^\{/o,'').gsub(/\}$/o,'').split(",") + lst.collect do |l| + l.sub(/^[\!]*/,'').sub(/[\/\\]*$/o,'') + end + end + + def original_variable(variable) + if variable?("#{@progname}.#{variable}") then + variable("#{@progname}.#{variable}") + elsif variable?(variable) then + variable(variable) + else + '' + end + end + + def expanded_variable(variable) + if expansion?("#{variable}.#{@progname}") then + expansion("#{variable}.#{@progname}") + elsif expansion?(variable) then + expansion(variable) + else + '' + end + end + + def original_path(filename='') + _expanded_path_(original_variable(var_of_format_or_suffix(filename)).split(";")) + end + + def expanded_path(filename='') + _expanded_path_(expanded_variable(var_of_format_or_suffix(filename)).split(";")) + end + + def _expanded_path_(pathlist) + i, n = 0, 0 + pathlist.collect! do |mainpath| + mainpath.gsub(/([\{\}])/o) do + if $1 == "{" then + i += 1 ; n = i if i > n ; "<#{i}>" + else + i -= 1 ; "</#{i+1}>" + end + end + end + n.times do |i| + loop do + more = false + newlist = [] + pathlist.each do |path| + unless path.sub!(/^(.*?)<(#{n-i})>(.*?)<\/\2>(.*?)$/) do + pre, mid, post = $1, $3, $4 + mid.gsub!(/\,$/,',.') + mid.split(',').each do |m| + more = true + if m == '.' then + newlist << "#{pre}#{post}" + else + newlist << "#{pre}#{m}#{post}" + end + end + end then + newlist << path + end + end + if more then + pathlist = [newlist].flatten # copy -) + else + break + end + end + end + pathlist = pathlist.uniq.collect do |path| + p = path + # p.gsub(/^\/+/o) do '' end + # p.gsub!(/(.)\/\/(.)/o) do "#{$1}/#{$2}" end + # p.gsub!(/\/\/+$/o) do '//' end + p.gsub!(/\/\/+/o) do '//' end + p + end + pathlist + end + + # todo: ignore case + + def var_of_format(str) + @@formats[str] || '' + end + + def var_of_suffix(str) # includes . + if @@suffixmap.key?(str) then @@formats[@@suffixmap[str]] else '' end + end + + def var_of_format_or_suffix(str) + if @@formats.key?(str) then + @@formats[str] + elsif @@suffixmap.key?(File.extname(str)) then # extname includes . + @@formats[@@suffixmap[File.extname(str)]] # extname includes . + else + '' + end + end + +end + +class KpseFast + + # test things + + def list_variables(kpseonly=true) + @variables.keys.sort.each do |k| + if kpseonly then + puts("#{k} = #{@variables[k]}") if @kpsevars[k] + else + puts("#{if @kpsevars[k] then 'K' else 'E' end} #{k} = #{@variables[k]}") + end + end + end + + def list_expansions(kpseonly=true) + @expansions.keys.sort.each do |k| + if kpseonly then + puts("#{k} = #{@expansions[k]}") if @kpsevars[k] + else + puts("#{if @kpsevars[k] then 'K' else 'E' end} #{k} = #{@expansions[k]}") + end + end + end + + def list_lsr + puts("files = #{@files.size}") + end + + def set_test_patterns + @variables["KPSE_TEST_PATTERN_A"] = "foo/{1,2}/bar//" + @variables["KPSE_TEST_PATTERN_B"] = "!!x{A,B{1,2}}y" + @variables["KPSE_TEST_PATTERN_C"] = "x{A,B//{1,2}}y" + @variables["KPSE_TEST_PATTERN_D"] = "x{A,B//{1,2,}}//y" + end + + def show_test_patterns + ['A','B','D'].each do |i| + puts "" + puts @variables ["KPSE_TEST_PATTERN_#{i}"] + puts "" + puts expand_path("KPSE_TEST_PATTERN_#{i}").split_path + puts "" + end + end + +end + +class KpseFast + + # kpse stuff + + def expand_braces(str) # output variable and brace expansion of STRING. + _expanded_path_(original_variable(str).split_path).join_path + end + + def expand_path(str) # output complete path expansion of STRING. + _expanded_path_(expanded_variable(str).split_path).join_path + end + + def expand_var(str) # output variable expansion of STRING. + expanded_variable(str) + end + + def show_path(str) # output search path for file type NAME + expanded_path(str).join_path + end + + def var_value(str) # output the value of variable $STRING. + original_variable(str) + end + +end + +class KpseFast + + def _is_cnf_?(filename) + filename == File.basename((@cnffiles.first rescue @@texmfcnf) || @@texmfcnf) + end + + def find_file(filename) + if _is_cnf_?(filename) then + @cnffiles.first rescue '' + else + [find_files(filename,true)].flatten.first || '' + end + end + + def find_files(filename,first=false) + if _is_cnf_?(filename) then + result = @cnffiles.dup + else + if @remember then + # stamp = "#{filename}--#{@format}--#{@engine}--#{@progname}" + stamp = "#{filename}--#{@engine}--#{@progname}" + return @found[stamp] if @found.key?(stamp) + end + pathlist = expanded_path(filename) + result = [] + filelist = if @files.key?(filename) then @files[filename].uniq else nil end + done = false + if pathlist.size == 0 then + if FileTest.file?(filename) then + done = true + result << '.' + end + else + pathlist.each do |path| + doscan = if path =~ /^\!\!/o then false else true end + recurse = if path =~ /\/\/$/o then true else false end + pathname = path.dup + pathname.gsub!(/^\!+/o, '') + done = false + if not done and filelist then + # checking for exact match + if filelist.include?(pathname) then + result << pathname + done = true + end + if not done and recurse then + # checking for fuzzy // + pathname.gsub!(/\/+$/o, '/.*') + # pathname.gsub!(/\/\//o,'/[\/]*/') + pathname.gsub!(/\/\//o,'/.*?/') + re = /^#{pathname}/ + filelist.each do |f| + if re =~ f then + result << f # duplicates will be filtered later + done = true + end + break if done + end + end + end + if not done and doscan then + # checking for path itself + pname = pathname.sub(/\.\*$/,'') + if not pname =~ /\*/o and FileTest.file?(File.join(pname,filename)) then + result << pname + done = true + end + end + break if done and first + end + end + if not done and @scandisk then + pathlist.each do |path| + pathname = path.dup + unless pathname.gsub!(/^\!+/o, '') then # !! prevents scan + recurse = pathname.gsub!(/\/+$/o, '') + complex = pathname.gsub!(/\/\//o,'/*/') + if recurse then + if complex then + if ok = File.glob_file("#{pathname}/**/#{filename}") then + result << File.dirname(ok) + done = true + end + elsif ok = File.locate_file(pathname,filename) then + result << File.dirname(ok) + done = true + end + elsif complex then + if ok = File.glob_file("#{pathname}/#{filename}") then + result << File.dirname(ok) + done = true + end + elsif FileTest.file?(File.join(pathname,filename)) then + result << pathname + done = true + end + break if done and first + end + end + end + result = result.uniq.collect do |pathname| + File.join(pathname,filename) + end + @found[stamp] = result if @remember + end + return result # redundant + end + +end + +class KpseFast + + class FileData + attr_accessor :tag, :name, :size, :date + def initialize(tag=0,name=nil,size=nil,date=nil) + @tag, @name, @size, @date = tag, name, size, date + end + def FileData.sizes(a) + a.collect do |aa| + aa.size + end + end + def report + case @tag + when 1 then "deleted | #{@size.to_s.rjust(8)} | #{@date.strftime('%m/%d/%Y %I:%M')} | #{@name}" + when 2 then "present | #{@size.to_s.rjust(8)} | #{@date.strftime('%m/%d/%Y %I:%M')} | #{@name}" + when 3 then "obsolete | #{' '*8} | #{' '*16} | #{@name}" + end + end + end + + def analyze_files(filter='',strict=false,sort='',delete=false) + puts("command line = #{ARGV.join(' ')}") + puts("number of files = #{@files.size}") + puts("filter pattern = #{filter}") + puts("loaded cnf files = #{@cnffiles.join(' ')}") + puts('') + if filter.gsub!(/^not:/,'') then + def the_same(filter,filename) + not filter or filter.empty? or /#{filter}/ !~ filename + end + else + def the_same(filter,filename) + not filter or filter.empty? or /#{filter}/ =~ filename + end + end + @files.keys.each do |name| + if @files[name].size > 1 then + data = Array.new + @files[name].each do |path| + filename = File.join(path,name) + # if not filter or filter.empty? or /#{filter}/ =~ filename then + if the_same(filter,filename) then + if FileTest.file?(filename) then + if delete then + data << FileData.new(1,filename,File.size(filename),File.mtime(filename)) + begin + File.delete(filename) if delete + rescue + end + else + data << FileData.new(2,filename,File.size(filename),File.mtime(filename)) + end + else + # data << FileData.new(3,filename) + end + end + end + if data.length > 1 then + if strict then + # if data.collect do |d| d.size end.uniq! then + # data.sort! do |a,b| b.size <=> a.size end + # data.each do |d| puts d.report end + # puts '' + # end + data.sort! do |a,b| + if a.size and b.size then + b.size <=> a.size + else + 0 + end + end + bunch = Array.new + done = false + data.each do |d| + if bunch.size == 0 then + bunch << d + elsif bunch[0].size == d.size then + bunch << d + else + if bunch.size > 1 then + bunch.each do |b| + puts b.report + end + done = true + end + bunch = [d] + end + end + puts '' if done + else + case sort + when 'size' then data.sort! do |a,b| a.size <=> b.size end + when 'revsize' then data.sort! do |a,b| b.size <=> a.size end + when 'date' then data.sort! do |a,b| a.date <=> b.date end + when 'revdate' then data.sort! do |a,b| b.date <=> a.date end + end + data.each do |d| puts d.report end + puts '' + end + end + end + end + end + +end + + + # k = KpseFast.new # (root) + # k.set_test_patterns + # k.load_cnf + # k.expand_variables + # k.load_lsr + + # k.show_test_patterns + + # puts k.list_variables + # puts k.list_expansions + # k.list_lsr + # puts k.expansion("$TEXMF") + # puts k.expanded_path("TEXINPUTS","context") + + # k.progname, k.engine, k.format = 'context', 'pdftex', 'tfm' + # k.scandisk = false # == must_exist + # k.expand_variables + + # 10.times do |i| puts k.find_file('texnansi-lmr10.tfm') end + + # puts "expand braces $TEXMF" + # puts k.expand_braces("$TEXMF") + # puts "expand path $TEXMF" + # puts k.expand_path("$TEXMF") + # puts "expand var $TEXMF" + # puts k.expand_var("$TEXMF") + # puts "expand path $TEXMF" + # puts k.show_path('tfm') + # puts "expand value $TEXINPUTS" + # puts k.var_value("$TEXINPUTS") + # puts "expand value $TEXINPUTS.context" + # puts k.var_value("$TEXINPUTS.context") + + # exit + + + +# kpse_merge_file: 'C:/data/develop/context/ruby/base/kpse/drb.rb' + +require 'drb' +# kpse_merge_done: require 'base/kpse/trees' + +class KpseServer + + attr_accessor :port + + def initialize(port=7000) + @port = port + end + + def start + puts "starting drb service at port #{@port}" + DRb.start_service("druby://localhost:#{@port}", KpseTrees.new) + trap(:INT) do + DRb.stop_service + end + DRb.thread.join + end + + def stop + # todo + end + +end + +class KpseClient + + attr_accessor :port + + def initialize(port=7000) + @port = port + @kpse = nil + end + + def start + # only needed when callbacks are used / slow, due to Socket::getaddrinfo + # DRb.start_service + end + + def object + @kpse = DRbObject.new(nil,"druby://localhost:#{@port}") + end + +end + + +# SERVER_URI="druby://localhost:8787" +# +# # Start a local DRbServer to handle callbacks. +# # +# # Not necessary for this small example, but will be required +# # as soon as we pass a non-marshallable object as an argument +# # to a dRuby call. +# DRb.start_service +# + + +# kpse_merge_file: 'C:/data/develop/context/ruby/base/kpse/trees.rb' + +require 'monitor' +# kpse_merge_done: require 'base/kpsefast' + +class KpseTrees < Monitor + + def initialize + @trees = Hash.new + end + + def pattern(filenames) + filenames.join('|').gsub(/\\+/o,'/').downcase + end + + def choose(filenames,environment) + current = pattern(filenames) + load(filenames,environment) unless @trees[current] + puts "enabling tree #{current}" + current + end + + def fetch(filenames,environment) # will send whole object ! + current = pattern(filenames) + load(filenames,environment) unless @trees[current] + puts "fetching tree #{current}" + @trees[current] + end + + def load(filenames,environment) + current = pattern(filenames) + puts "loading tree #{current}" + @trees[current] = KpseFast.new + @trees[current].push_environment(environment) + @trees[current].load_cnf(filenames) + @trees[current].expand_variables + @trees[current].load_lsr + end + + def set(tree,key,value) + case key + when 'progname' then @trees[tree].progname = value + when 'engine' then @trees[tree].engine = value + when 'format' then @trees[tree].format = value + end + end + def get(tree,key) + case key + when 'progname' then @trees[tree].progname + when 'engine' then @trees[tree].engine + when 'format' then @trees[tree].format + end + end + + def load_cnf(tree) + @trees[tree].load_cnf + end + def load_lsr(tree) + @trees[tree].load_lsr + end + def expand_variables(tree) + @trees[tree].expand_variables + end + def expand_braces(tree,str) + @trees[tree].expand_braces(str) + end + def expand_path(tree,str) + @trees[tree].expand_path(str) + end + def expand_var(tree,str) + @trees[tree].expand_var(str) + end + def show_path(tree,str) + @trees[tree].show_path(str) + end + def var_value(tree,str) + @trees[tree].var_value(str) + end + def find_file(tree,filename) + @trees[tree].find_file(filename) + end + def find_files(tree,filename,first) + @trees[tree].find_files(filename,first) + end + +end + + +# kpse_merge_file: 'C:/data/develop/context/ruby/base/kpsedirect.rb' + +class KpseDirect + + attr_accessor :progname, :format, :engine + + def initialize + @progname, @format, @engine = '', '', '' + end + + def expand_path(str) + clean_name(`kpsewhich -expand-path=#{str}`.chomp) + end + + def expand_var(str) + clean_name(`kpsewhich -expand-var=#{str}`.chomp) + end + + def find_file(str) + clean_name(`kpsewhich #{_progname_} #{_format_} #{str}`.chomp) + end + + def _progname_ + if @progname.empty? then '' else "-progname=#{@progname}" end + end + def _format_ + if @format.empty? then '' else "-format=\"#{@format}\"" end + end + + private + + def clean_name(str) + str.gsub(/\\/,'/') + end + +end + + +# kpse_merge_file: 'C:/data/develop/context/ruby/base/merge.rb' + +# module : base/merge +# copyright : PRAGMA Advanced Document Engineering +# version : 2006 +# author : Hans Hagen +# +# project : ConTeXt / eXaMpLe +# concept : Hans Hagen +# info : j.hagen@xs4all.nl + + +# this module will package all the used modules in the file itself +# so that we can relocate the file at wish, usage: +# +# merge: +# +# unless SelfMerge::ok? && SelfMerge::merge then +# puts("merging should happen on the path were the base inserts reside") +# end +# +# cleanup: +# +# unless SelfMerge::cleanup then +# puts("merging should happen on the path were the base inserts reside") + +module SelfMerge + + @@kpsemergestart = "\# kpse_merge_start" + @@kpsemergestop = "\# kpse_merge_stop" + @@kpsemergefile = "\# kpse_merge_file: " + @@kpsemergedone = "\# kpse_merge_done: " + + @@filename = File.basename($0) + @@ownpath = File.expand_path(File.dirname($0)) + @@modroot = '(base|graphics|rslb|www)' # needed in regex in order not to mess up SelfMerge + @@modules = $".collect do |file| File.expand_path(file) end + + @@modules.delete_if do |file| + file !~ /^#{@@ownpath}\/#{@@modroot}.*$/ + end + + def SelfMerge::ok? + begin + @@modules.each do |file| + return false unless FileTest.file?(file) + end + rescue + return false + else + return true + end + end + + def SelfMerge::merge + begin + if SelfMerge::ok? && rbfile = IO.read(@@filename) then + begin + inserts = "#{@@kpsemergestart}\n\n" + @@modules.each do |file| + inserts << "#{@@kpsemergefile}'#{file}'\n\n" + inserts << IO.read(file).gsub(/^#.*?\n$/,'') + inserts << "\n\n" + end + inserts << "#{@@kpsemergestop}\n\n" + # no gsub! else we end up in SelfMerge + rbfile.sub!(/#{@@kpsemergestart}\s*#{@@kpsemergestop}/mois) do + inserts + end + rbfile.gsub!(/^(.*)(require [\"\'].*?#{@@modroot}.*)$/) do + pre, post = $1, $2 + if pre =~ /#{@@kpsemergedone}/ then + "#{pre}#{post}" + else + "#{pre}#{@@kpsemergedone}#{post}" + end + end + rescue + return false + else + begin + File.open(@@filename,'w') do |f| + f << rbfile + end + rescue + return false + end + end + end + rescue + return false + else + return true + end + end + + def SelfMerge::cleanup + begin + if rbfile = IO.read(@@filename) then + begin + rbfile.sub!(/#{@@kpsemergestart}(.*)#{@@kpsemergestop}\s*/mois) do + "#{@@kpsemergestart}\n\n#{@@kpsemergestop}\n\n" + end + rbfile.gsub!(/^(.*#{@@kpsemergedone}.*)$/) do + str = $1 + if str =~ /require [\"\']/ then + str.gsub(/#{@@kpsemergedone}/, '') + else + str + end + end + rescue + return false + else + begin + File.open(@@filename,'w') do |f| + f << rbfile + end + rescue + return false + end + end + end + rescue + return false + else + return true + end + end + + def SelfMerge::replace + if SelfMerge::ok? then + SelfMerge::cleanup + SelfMerge::merge + end + end + +end + + +# kpse_merge_stop + + + +$mswindows = Config::CONFIG['host_os'] =~ /mswin/ +$separator = File::PATH_SEPARATOR +$version = "2.0.3" +$ownpath = File.dirname($0) + +if $mswindows then + require "win32ole" + require "Win32API" +end + +# exit if defined?(REQUIRE2LIB) + +$stdout.sync = true +$stderr.sync = true + +$applications = Hash.new +$suffixinputs = Hash.new +$predefined = Hash.new + +$suffixinputs['pl'] = 'PERLINPUTS' +$suffixinputs['rb'] = 'RUBYINPUTS' +$suffixinputs['py'] = 'PYTHONINPUTS' +$suffixinputs['lua'] = 'LUAINPUTS' +$suffixinputs['jar'] = 'JAVAINPUTS' +$suffixinputs['pdf'] = 'PDFINPUTS' + +$predefined['texexec'] = 'texexec.rb' +$predefined['texutil'] = 'texutil.rb' +$predefined['texfont'] = 'texfont.pl' +$predefined['texshow'] = 'texshow.pl' + +$predefined['makempy'] = 'makempy.pl' +$predefined['mptopdf'] = 'mptopdf.pl' +$predefined['pstopdf'] = 'pstopdf.rb' + +$predefined['examplex'] = 'examplex.rb' +$predefined['concheck'] = 'concheck.rb' + +$predefined['runtools'] = 'runtools.rb' +$predefined['textools'] = 'textools.rb' +$predefined['tmftools'] = 'tmftools.rb' +$predefined['ctxtools'] = 'ctxtools.rb' +$predefined['rlxtools'] = 'rlxtools.rb' +$predefined['pdftools'] = 'pdftools.rb' +$predefined['mpstools'] = 'mpstools.rb' +$predefined['exatools'] = 'exatools.rb' +$predefined['xmltools'] = 'xmltools.rb' +$predefined['luatools'] = 'luatools.lua' +$predefined['mtxtools'] = 'mtxtools.rb' + +$predefined['newpstopdf'] = 'pstopdf.rb' +$predefined['newtexexec'] = 'texexec.rb' +$predefined['pdftrimwhite'] = 'pdftrimwhite.pl' + +$makelist = [ + # context + 'texexec', + 'texutil', + 'texfont', + # mp/ps + 'pstopdf', + 'mptopdf', + 'makempy', + # misc + 'ctxtools', + 'pdftools', + 'xmltools', + 'textools', + 'mpstools', + 'tmftools', + 'exatools', + 'runtools', + 'rlxtools', + 'luatools', + 'mtxtools', + # + # no, 'texmfstart' +] + +$scriptlist = 'rb|pl|py|lua|jar' +$documentlist = 'pdf|ps|eps|htm|html' + +$editor = ENV['TEXMFSTART_EDITOR'] || ENV['EDITOR'] || ENV['editor'] || 'scite' + +$crossover = true # to other tex tools, else only local +$kpse = nil + +def set_applications(page=1) + + $applications['unknown'] = '' + $applications['perl'] = $applications['pl'] = 'perl' + $applications['ruby'] = $applications['rb'] = 'ruby' + $applications['python'] = $applications['py'] = 'python' + $applications['lua'] = $applications['lua'] = 'luatex --luaonly' + $applications['java'] = $applications['jar'] = 'java' + + if $mswindows then + $applications['pdf'] = ['',"pdfopen --page #{page} --file",'acroread'] + $applications['html'] = ['','netscape','mozilla','opera','iexplore'] + $applications['ps'] = ['','gview32','gv','gswin32','gs'] + else + $applications['pdf'] = ["pdfopen --page #{page} --file",'acroread'] + $applications['html'] = ['netscape','mozilla','opera'] + $applications['ps'] = ['gview','gv','gs'] + end + + $applications['htm'] = $applications['html'] + $applications['eps'] = $applications['ps'] + +end + +set_applications() + +def check_kpse + if $kpse then + # already done + else + begin + if KpseRemote::available? then + $kpse = KpseRemote.new + if $kpse.okay? then + puts("kpse : remote") if $verbose + else + $kpse = KpseDirect.new + puts("kpse : direct (forced)") if $verbose + end + else + $kpse = KpseDirect.new + puts("kpse : direct") if $verbose + end + rescue + puts("kpse : direct (fallback)") if $verbose + end + end +end + +if $mswindows then + + GetShortPathName = Win32API.new('kernel32', 'GetShortPathName', ['P','P','N'], 'N') + GetLongPathName = Win32API.new('kernel32', 'GetLongPathName', ['P','P','N'], 'N') + + def dowith_pathname (filename,filemethod) + filename = filename.gsub(/\\/o,'/') # no gsub! because filename can be frozen + case filename + when /\;/o then + # could be a path spec + return filename + when /\s+/o then + # danger lurking + buffer = ' ' * 260 + length = filemethod.call(filename,buffer,buffer.size) + if length>0 then + return buffer.slice(0..length-1) + else + # when the path or file does not exist, nothing is returned + # so we try to handle the path separately from the basename + basename = File.basename(filename) + pathname = File.dirname(filename) + length = filemethod.call(pathname,buffer,260) + if length>0 then + return buffer.slice(0..length-1) + '/' + basename + else + return filename + end + end + else + # no danger + return filename + end + end + + def longpathname (filename) + dowith_pathname(filename,GetLongPathName) + end + + def shortpathname (filename) + dowith_pathname(filename,GetShortPathName) + end + +else + + def longpathname (filename) + filename + end + + def shortpathname (filename) + filename + end + +end + +class File + + # def File.needsupdate(oldname,newname) + # begin + # if $mswindows then + # return File.stat(oldname).mtime > File.stat(newname).mtime + # else + # return File.stat(oldname).mtime != File.stat(newname).mtime + # end + # rescue + # return true + # end + # end + + @@update_eps = 1 + + def File.needsupdate(oldname,newname) + begin + oldtime = File.stat(oldname).mtime.to_i + newtime = File.stat(newname).mtime.to_i + if newtime >= oldtime then + return false + elsif oldtime-newtime < @@update_eps then + return false + else + return true + end + rescue + return true + end + end + + def File.syncmtimes(oldname,newname) + return + begin + if $mswindows then + # does not work (yet) / gives future timestamp + # t = File.mtime(oldname) # i'm not sure if the time is frozen, so we do it here + # File.utime(0,t,oldname,newname) + else + t = File.mtime(oldname) # i'm not sure if the time is frozen, so we do it here + File.utime(0,t,oldname,newname) + end + rescue + end + end + + def File.timestamp(name) + begin + "#{File.stat(name).mtime}" + rescue + return 'unknown' + end + end + +end + +def hashed (arr=[]) + arg = if arr.class == String then arr.split(' ') else arr.dup end + hsh = Hash.new + if arg.length > 0 + hsh['arguments'] = '' + done = false + arg.each do |s| + if done then + hsh['arguments'] += ' ' + s + else + kvl = s.split('=') + if kvl[0].sub!(/^\-+/,'') then + hsh[kvl[0]] = if kvl.length > 1 then kvl[1] else true end + else + hsh['file'] = s + done = true + end + end + end + end + return hsh +end + +def launch(filename) + if $browser && $mswindows then + filename = filename.gsub(/\.[\/\\]/) do + Dir.getwd + '/' + end + report("launching #{filename}") + ie = WIN32OLE.new("InternetExplorer.Application") + ie.visible = true + ie.navigate(filename) + return true + else + return false + end +end + +# env|environment +# rel|relative +# loc|locate|kpse|path|file + +def expanded(arg) # no "other text files", too restricted + arg.gsub(/(env|environment)\:([a-zA-Z\-\_\.0-9]+)/o) do + method, original, resolved = $1, $2, '' + if resolved = ENV[original] then + report("environment variable #{original} expands to #{resolved}") unless $report + resolved + else + report("environment variable #{original} cannot be resolved") unless $report + original + end + end . gsub(/(rel|relative)\:([a-zA-Z\-\_\.0-9]+)/o) do + method, original, resolved = $1, $2, '' + ['.','..','../..'].each do |r| + if FileTest.file?(File.join(r,original)) then + resolved = File.join(r,original) + break + end + end + if resolved.empty? then + original + else + resolved + end + end . gsub(/(kpse|loc|locate|file|path)\:([a-zA-Z\-\_\.0-9]+)/o) do + method, original, resolved = $1, $2, '' + if $program && ! $program.empty? then + # pstrings = ["-progname=#{$program}"] + pstrings = [$program] + else + # pstrings = ['','-progname=context'] + pstrings = ['','context'] + end + # auto suffix with texinputs as fall back + if ENV["_CTX_K_V_#{original}_"] then + resolved = ENV["_CTX_K_V_#{original}_"] + report("environment provides #{original} as #{resolved}") unless $report + resolved + else + check_kpse + pstrings.each do |pstr| + if resolved.empty? then + # command = "kpsewhich #{pstr} #{original}" + # report("running #{command}") + report("locating '#{original}' in program space '#{pstr}'") + begin + # resolved = `#{command}`.chomp + $kpse.progname = pstr + $kpse.format = '' + resolved = $kpse.find_file(original).gsub(/\\/,'/') + rescue + resolved = '' + end + end + # elsewhere in the tree + if resolved.empty? then + # command = "kpsewhich #{pstr} -format=\"other text files\" #{original}" + # report("running #{command}") + report("locating '#{original}' in program space '#{pstr}' using format 'other text files'") + begin + # resolved = `#{command}`.chomp + $kpse.progname = pstr + $kpse.format = 'other text files' + resolved = $kpse.find_file(original).gsub(/\\/,'/') + rescue + resolved = '' + end + end + end + if resolved.empty? then + original = File.dirname(original) if method =~ /path/ + report("#{original} is not resolved") unless $report + ENV["_CTX_K_V_#{original}_"] = original if $crossover + original + else + resolved = File.dirname(resolved) if method =~ /path/ + report("#{original} is resolved to #{resolved}") unless $report + ENV["_CTX_K_V_#{original}_"] = resolved if $crossover + resolved + end + end + end +end + +def changeddir?(path) + if path.empty? then + return true + else + oldpath = File.expand_path(path) + begin + Dir.chdir(path) if not path.empty? + rescue + report("unable to change to directory: #{path}") + else + report("changed to directory: #{path}") + end + newpath = File.expand_path(Dir.getwd) + return oldpath == newpath + end +end + +def runcommand(command) + if $locate then + command = command.split(' ').collect do |c| + if c =~ /\//o then + begin + cc = File.expand_path(c) + c = cc if FileTest.file?(cc) + rescue + end + end + c + end . join(' ') + print command # to stdout and no newline + elsif $execute then + report("using 'exec' instead of 'system' call: #{command}") + exec(command) if changeddir?($path) + else + report("using 'system' call: #{command}") + system(command) if changeddir?($path) + end +end + +def runoneof(application,fullname,browserpermitted) + if browserpermitted && launch(fullname) then + return true + else + report("starting #{$filename}") unless $report + output("\n") if $report && $verbose + applications = $applications[application.downcase] + if ! applications then + output("problems with determining application type") + return true + elsif applications.class == Array then + if $report then + output([fullname,expanded($arguments)].join(' ')) + return true + else + applications.each do |a| + return true if runcommand([a,fullname,expanded($arguments)].join(' ')) + end + end + elsif applications.empty? then + if $report then + output([fullname,expanded($arguments)].join(' ')) + return true + else + return runcommand([fullname,expanded($arguments)].join(' ')) + end + else + if $report then + output([applications,fullname,expanded($arguments)].join(' ')) + return true + else + return runcommand([applications,fullname,expanded($arguments)].join(' ')) + end + end + return false + end +end + +def report(str) + $stdout.puts(str) if $verbose +end + +def output(str) + $stdout.puts(str) +end + +def usage + print "version : #{$version} - 2003/2006 - www.pragma-ade.com\n" + print("\n") + print("usage : texmfstart [switches] filename [optional arguments]\n") + print("\n") + print("switches : --verbose --report --browser --direct --execute --locate --iftouched --ifchanged\n") + print(" --program --file --page --arguments --batch --edit --report --clear\n") + print(" --make --lmake --wmake --path --stubpath --indirect --before --after\n") + print(" --tree --autotree --environment --showenv\n") + print("\n") + print("example : texmfstart pstopdf.rb cow.eps\n") + print(" texmfstart --locate examplex.rb\n") + print(" texmfstart --execute examplex.rb\n") + print(" texmfstart --browser examplap.pdf\n") + print(" texmfstart showcase.pdf\n") + print(" texmfstart --page=2 --file=showcase.pdf\n") + print(" texmfstart --program=yourtex yourscript.rb arg-1 arg-2\n") + print(" texmfstart --direct xsltproc kpse:somefile.xsl somefile.xml\n") + print(" texmfstart --direct ruby rel:wn-cleanup-1.rb oldfile.xml newfile.xml\n") + print(" texmfstart bin:xsltproc env:somepreset path:somefile.xsl somefile.xml\n") + print(" texmfstart --iftouched=normal,lowres downsample.rb normal lowres\n") + print(" texmfstart --ifchanged=somefile.dat --direct processit somefile.dat\n") + print(" texmfstart bin:scite kpse:texmf.cnf\n") + print(" texmfstart --exec bin:scite *.tex\n") + print(" texmfstart --edit texmf.cnf\n") + print(" texmfstart --edit kpse:texmf.cnf\n") + print(" texmfstart --serve\n") + print("\n") + print(" texmfstart --stubpath=/usr/local/bin [--make --remove] --verbose all\n") + print(" texmfstart --stubpath=auto [--make --remove] all\n") + print("\n") + check_kpse +end + +# somehow registration does not work out (at least not under windows) + +def tag(name) + if $crossover then "_CTX_K_S_#{name}_" else "TEXMFSTART.#{name}" end +end + +def registered?(filename) + return ENV[tag(filename)] != nil +end + +def registered(filename) + return ENV[tag(filename)] || 'unknown' +end + +def register(filename,fullname) + if fullname && ! fullname.empty? then # && FileTest.file?(fullname) + ENV[tag(filename)] = fullname + report("registering '#{filename}' as '#{fullname}'") + return true + else + return false + end +end + +def find(filename,program) + begin + filename = filename.sub(/script:/o, '') # so we have bin: and script: and nothing + if $predefined.key?(filename) then + report("expanding '#{filename}' to '#{$predefined[filename]}'") + filename = $predefined[filename] + end + if registered?(filename) then + report("already located '#{filename}'") + return registered(filename) + end + # create suffix list + if filename =~ /^(.*)\.(.+)$/ then + filename = $1 + suffixlist = [$2] + else + suffixlist = [$scriptlist.split('|'),$documentlist.split('|')].flatten + end + # first we honor a given path + if filename =~ /[\\\/]/ then + report("trying to honor '#{filename}'") + suffixlist.each do |suffix| + fullname = filename+'.'+suffix + if FileTest.file?(fullname) && register(filename,fullname) + return shortpathname(fullname) + end + end + end + filename.sub!(/^.*[\\\/]/, '') + # next we look at the current path and the callerpath + pathlist = [ ] + progpath = $applications[suffixlist[0]] + threadok = registered("THREAD") !~ /unknown/ + pathlist << ['.','current'] + pathlist << [$ownpath,'caller'] if $ownpath != '.' + pathlist << ["#{$ownpath}/../#{progpath}",'caller'] if progpath + pathlist << [registered("THREAD"),'thread'] if threadok + pathlist << ["#{registered("THREAD")}/../#{progpath}",'thread'] if progpath && threadok + pathlist.each do |p| + if p && ! p.empty? && ! (p[0] == 'unknown') then + suffixlist.each do |suffix| + fname = "#{filename}.#{suffix}" + fullname = File.expand_path(File.join(p[0],fname)) + report("locating '#{fname}' in #{p[1]} path '#{p[0]}'") + if FileTest.file?(fullname) && register(filename,fullname) then + report("'#{fname}' located in #{p[1]} path") + return shortpathname(fullname) + end + end + end + end + # now we consult environment settings + fullname = nil + check_kpse + $kpse.progname = program + suffixlist.each do |suffix| + begin + break unless $suffixinputs[suffix] + environment = ENV[$suffixinputs[suffix]] || ENV[$suffixinputs[suffix]+".#{$program}"] + if ! environment || environment.empty? then + begin + # environment = `kpsewhich -expand-path=\$#{$suffixinputs[suffix]}`.chomp + environment = $kpse.expand_path("\$#{$suffixinputs[suffix]}") + rescue + environment = nil + else + if environment && ! environment.empty? then + report("using kpsewhich variable #{$suffixinputs[suffix]}") + end + end + elsif environment && ! environment.empty? then + report("using environment variable #{$suffixinputs[suffix]}") + end + if environment && ! environment.empty? then + environment.split($separator).each do |e| + e.strip! + e = '.' if e == '\.' # somehow . gets escaped + e += '/' unless e =~ /[\\\/]$/ + fullname = e + filename + '.' + suffix + report("testing '#{fullname}'") + if FileTest.file?(fullname) then + break + else + fullname = nil + end + end + end + rescue + report("environment string '#{$suffixinputs[suffix]}' cannot be used to locate '#{filename}'") + fullname = nil + else + return shortpathname(fullname) if register(filename,fullname) + end + end + return shortpathname(fullname) if register(filename,fullname) + # then we fall back on kpsewhich + suffixlist.each do |suffix| + # TDS script scripts location as per 2004 + if suffix =~ /(#{$scriptlist})/ then + begin + report("using 'kpsewhich' to locate '#{filename}' in suffix space '#{suffix}' (1)") + # fullname = `kpsewhich -progname=#{program} -format=texmfscripts #{filename}.#{suffix}`.chomp + $kpse.format = 'texmfscripts' + fullname = $kpse.find_file("#{filename}.#{suffix}").gsub(/\\/,'/') + rescue + report("kpsewhich cannot locate '#{filename}' in suffix space '#{suffix}' (1)") + fullname = nil + else + return shortpathname(fullname) if register(filename,fullname) + end + end + # old TDS location: .../texmf/context/... + begin + report("using 'kpsewhich' to locate '#{filename}' in suffix space '#{suffix}' (2)") + # fullname = `kpsewhich -progname=#{program} -format="other text files" #{filename}.#{suffix}`.chomp + $kpse.format = 'other text files' + fullname = $kpse.find_file("#{filename}.#{suffix}").gsub(/\\/,'/') + rescue + report("kpsewhich cannot locate '#{filename}' in suffix space '#{suffix}' (2)") + fullname = nil + else + return shortpathname(fullname) if register(filename,fullname) + end + end + return shortpathname(fullname) if register(filename,fullname) + # let's take a look at the path + paths = ENV['PATH'].split($separator) + suffixlist.each do |s| + paths.each do |p| + suffixedname = "#{filename}.#{s}" + report("checking #{p} for #{filename}") + if FileTest.file?(File.join(p,suffixedname)) then + fullname = File.join(p,suffixedname) + return shortpathname(fullname) if register(filename,fullname) + end + end + end + # bad luck, we need to search the tree ourselves + if (suffixlist.length == 1) && (suffixlist.first =~ /(#{$documentlist})/) then + report("aggressively locating '#{filename}' in document trees") + begin + # texroot = `kpsewhich -expand-var=$SELFAUTOPARENT`.chomp + texroot = $kpse.expand_var("$SELFAUTOPARENT") + rescue + texroot = '' + else + texroot.sub!(/[\\\/][^\\\/]*?$/, '') + end + if not texroot.empty? then + sffxlst = suffixlist.join(',') + begin + report("locating '#{filename}' in document tree '#{texroot}/doc*'") + if (result = Dir.glob("#{texroot}/doc*/**/#{filename}.{#{sffxlst}}")) && result && result[0] && FileTest.file?(result[0]) then + fullname = result[0] + end + rescue + report("locating '#{filename}.#{suffixlist.join('|')}' in tree '#{texroot}' aborted") + end + end + return shortpathname(fullname) if register(filename,fullname) + end + report("aggressively locating '#{filename}' in tex trees") + begin + # textrees = `kpsewhich -expand-var=$TEXMF`.chomp + textrees = $kpse.expand_var("$TEXMF") + rescue + textrees = '' + end + if not textrees.empty? then + textrees.gsub!(/[\{\}\!]/, '') + textrees = textrees.split(',') + if (suffixlist.length == 1) && (suffixlist.first =~ /(#{$documentlist})/) then + speedup = ['doc**','**'] + else + speedup = ['**'] + end + sffxlst = suffixlist.join(',') + speedup.each do |speed| + textrees.each do |tt| + tt.gsub!(/[\\\/]$/, '') + if FileTest.directory?(tt) then + begin + report("locating '#{filename}' in tree '#{tt}/#{speed}/#{filename}.{#{sffxlst}}'") + if (result = Dir.glob("#{tt}/#{speed}/#{filename}.{#{sffxlst}}")) && result && result[0] && FileTest.file?(result[0]) then + fullname = result[0] + break + end + rescue + report("locating '#{filename}' in tree '#{tt}' aborted") + next + end + end + end + break if fullname && ! fullname.empty? + end + end + if register(filename,fullname) then + return shortpathname(fullname) + else + return '' + end + rescue + error, trace = $!, $@.join("\n") + report("fatal error: #{error}\n#{trace}") + # report("fatal error") + end +end + +def run(fullname) + if ! fullname || fullname.empty? then + output("the file '#{$filename}' is not found") + elsif FileTest.file?(fullname) then + begin + case fullname + when /\.(#{$scriptlist})$/i then + return runoneof($1,fullname,false) + when /\.(#{$documentlist})$/i then + return runoneof($1,fullname,true) + else + return runoneof('unknown',fullname,false) + end + rescue + report("starting '#{$filename}' in program space '#{$program}' fails (#{$!})") + end + else + report("the file '#{$filename}' in program space '#{$program}' is not accessible") + end + return false +end + +def direct(fullname) + begin + return runcommand([fullname.sub(/^(bin|binary)\:/, ''),expanded($arguments)].join(' ')) + rescue + return false + end +end + +def edit(filename) + begin + return runcommand([$editor,expanded(filename),expanded($arguments)].join(' ')) + rescue + return false + end +end + +def make(filename,windows=false,linux=false,remove=false) + basename = File.basename(filename).gsub(/\.[^.]+?$/, '') + if $stubpath == 'auto' then + basename = File.dirname($0) + '/' + basename + else + basename = $stubpath + '/' + basename unless $stubpath.empty? + end + if filename == 'texmfstart' then + program = 'ruby' + command = 'kpsewhich --format=texmfscripts --progname=context texmfstart.rb' + filename = `#{command}`.chomp.gsub(/\\/, '/') + if filename.empty? then + report("failure: #{command}") + return + elsif not remove then + if windows then + ['bat','exe'].each do |suffix| + if FileTest.file?("#{basename}.#{suffix}") then + report("windows stub '#{basename}.#{suffix}' skipped (already present)") + return + end + end + elsif linux && FileTest.file?(basename) then + report("unix stub '#{basename}' skipped (already present)") + return + end + end + else + program = nil + if filename =~ /[\\\/]/ && filename =~ /\.(#{$scriptlist})$/ then + program = $applications[$1] + end + filename = "\"#{filename}\"" if filename =~ /\s/ + program = 'texmfstart' if $indirect || ! program || program.empty? + end + begin + callname = $predefined[filename.sub(/\.*?$/,'')] || filename + if remove then + if windows && (File.delete(basename+'.bat') rescue false) then + report("windows stub '#{basename}.bat' removed (calls #{callname})") + elsif linux && (File.delete(basename) rescue false) then + report("unix stub '#{basename}' removed (calls #{callname})") + end + else + if windows && f = open(basename+'.bat','w') then + f.binmode + f.write("@echo off\015\012") + f.write("#{program} #{callname} %*\015\012") + f.close + report("windows stub '#{basename}.bat' made (calls #{callname})") + elsif linux && f = open(basename,'w') then + f.binmode + f.write("#!/bin/sh\012") + f.write("#{program} #{callname} \"$@\"\012") + f.close + report("unix stub '#{basename}' made (calls #{callname})") + end + end + rescue + report("failed to make stub '#{basename}' #{$!}") + return false + else + return true + end +end + +def process(&block) + if $iftouched then + files = $directives['iftouched'].split(',') + oldname, newname = files[0], files[1] + if oldname && newname && File.needsupdate(oldname,newname) then + report("file #{oldname}: #{File.timestamp(oldname)}") + report("file #{newname}: #{File.timestamp(newname)}") + report("file is touched, processing started") + yield + File.syncmtimes(oldname,newname) + else + report("file #{oldname} is untouched") + end + elsif $ifchanged then + filename = $directives['ifchanged'] + checkname = filename + ".md5" + oldchecksum, newchecksum = "old", "new" + begin + newchecksum = MD5.new(IO.read(filename)).hexdigest.upcase + rescue + newchecksum = "new" + else + begin + oldchecksum = IO.read(checkname).chomp + rescue + oldchecksum = "old" + end + end + if $verbose then + report("old checksum #{filename}: #{oldchecksum}") + report("new checksum #{filename}: #{newchecksum}") + end + if oldchecksum != newchecksum then + report("file is changed, processing started") + begin + File.open(checkname,'w') do |f| + f << newchecksum + end + rescue + end + yield + else + report("file #{filename} is unchanged") + end + else + yield + end +end + +def checkenvironment(tree) + report('') + ENV['TMP'] = ENV['TMP'] || ENV['TEMP'] || ENV['TMPDIR'] || ENV['HOME'] + case RUBY_PLATFORM + when /(mswin|bccwin|mingw|cygwin)/i then ENV['TEXOS'] = ENV['TEXOS'] || 'texmf-mswin' + when /(linux)/i then ENV['TEXOS'] = ENV['TEXOS'] || 'texmf-linux' + when /(darwin|rhapsody|nextstep)/i then ENV['TEXOS'] = ENV['TEXOS'] || 'texmf-macosx' + # when /(netbsd|unix)/i then # todo + else # todo + end + ENV['TEXOS'] = "#{ENV['TEXOS'].sub(/^[\\\/]*/, '').sub(/[\\\/]*$/, '')}" + ENV['TEXPATH'] = tree.sub(/\/+$/,'') # + '/' + ENV['TEXMFOS'] = "#{ENV['TEXPATH']}/#{ENV['TEXOS']}" + report('') + report("preset : TEXPATH => #{ENV['TEXPATH']}") + report("preset : TEXOS => #{ENV['TEXOS']}") + report("preset : TEXMFOS => #{ENV['TEXMFOS']}") + report("preset : TMP => #{ENV['TMP']}") + report('') +end + +def loadfile(filename) + begin + IO.readlines(filename).each do |line| + case line.chomp + when /^[\#\%]/ then + # comment + when /^(.*?)\s*(\>|\=|\<)\s*(.*)\s*$/ then + # = assign | > prepend | < append + key, how, value = $1, $2, $3 + begin + # $SAFE = 0 + value.gsub!(/\%(.*?)\%/) do + ENV[$1] || '' + end + # value.gsub!(/\;/,$separator) if key =~ /PATH/i then + case how + when '=', '<<' then ENV[key] = value + when '?', '??' then ENV[key] = ENV[key] || value + when '<', '+=' then ENV[key] = (ENV[key] || '') + $separator + value + when '>', '=+' then ENV[key] = value + $separator + (ENV[key] ||'') + end + rescue + report("user set failed : #{key} (#{$!})") + else + report("user set : #{key} => #{ENV[key]}") + end + end + end + rescue + report("error in reading file '#{filename}'") + end +end + +def loadtree(tree) + begin + unless tree.empty? then + if File.directory?(tree) then + setuptex = File.join(tree,'setuptex.tmf') + else + setuptex = tree.dup + end + if FileTest.file?(setuptex) then + report("tex tree definition: #{setuptex}") + checkenvironment(File.dirname(setuptex)) + loadfile(setuptex) + else + report("no setup file '#{setuptex}'") + end + end + rescue + # maybe tree is empty or boolean (no arg given) + end +end + +def loadenvironment(environment) + begin + unless environment.empty? then + filename = if $path.empty? then environment else File.expand_path(File.join($path,environment)) end + if FileTest.file?(filename) then + report("environment : #{environment}") + loadfile(filename) + else + report("no environment file '#{environment}'") + end + end + rescue + report("problem while loading '#{environment}'") + end +end + +def show_environment + if $showenv then + keys = ENV.keys.sort + size = 0 + keys.each do |k| + size = k.size if k.size > size + end + report('') + keys.each do |k| + report("#{k.rjust(size)} => #{ENV[k]}") + end + report('') + end +end + +def execute(arguments) + + arguments = arguments.split(/\s+/) if arguments.class == String + + $directives = hashed(arguments) + + $help = $directives['help'] || false + $batch = $directives['batch'] || false + $filename = $directives['file'] || '' + $program = $directives['program'] || 'context' + $direct = $directives['direct'] || false + $edit = $directives['edit'] || false + $page = $directives['page'] || 1 + $browser = $directives['browser'] || false + $report = $directives['report'] || false + $verbose = $directives['verbose'] || false + $arguments = $directives['arguments'] || '' + $execute = $directives['execute'] || $directives['exec'] || false + $locate = $directives['locate'] || false + + $autotree = if $directives['autotree'] then (ENV['TEXMFSTART_TREE'] || ENV['TEXMFSTARTTREE'] || '') else '' end + + $path = $directives['path'] || '' + $tree = $directives['tree'] || $autotree || '' + $environment = $directives['environment'] || '' + + $make = $directives['make'] || false + $remove = $directives['remove'] || $directives['delete'] || false + $unix = $directives['unix'] || false + $windows = $directives['windows'] || $directives['mswin'] || false + $stubpath = $directives['stubpath'] || '' + $indirect = $directives['indirect'] || false + + $before = $directives['before'] || '' + $after = $directives['after'] || '' + + $iftouched = $directives['iftouched'] || false + $ifchanged = $directives['ifchanged'] || false + + $openoffice = $directives['oo'] || false + + $crossover = false if $directives['clear'] + + $showenv = $directives['showenv'] || false + $verbose = true if $showenv + + $serve = $directives['serve'] || false + + $verbose = true if (ENV['_CTX_VERBOSE_'] =~ /(y|yes|t|true|on)/io) && ! $locate && ! $report + + set_applications($page) + + # private: + + $selfmerge = $directives['selfmerge'] || false + $selfcleanup = $directives['selfclean'] || $directives['selfcleanup'] || false + + ENV['_CTX_VERBOSE_'] = 'yes' if $verbose + + if $openoffice then + if ENV['OOPATH'] then + if FileTest.directory?(ENV['OOPATH']) then + report("using open office python") + if $mswindows then + $applications['python'] = $applications['py'] = "\"#{File.join(ENV['OOPATH'],'program','python.bat')}\"" + else + $applications['python'] = $applications['py'] = File.join(ENV['OOPATH'],'python') + end + report("python path #{$applications['python']}") + else + report("environment variable 'OOPATH' does not exist") + end + else + report("environment variable 'OOPATH' is not set") + end + end + + if $selfmerge then + output("ruby libraries are cleaned up") if SelfMerge::cleanup + output("ruby libraries are merged") if SelfMerge::merge + return true + elsif $selfcleanup then + output("ruby libraries are cleaned up") if SelfMerge::cleanup + return true + elsif $serve then + if ENV['KPSEMETHOD'] && ENV['KPSEPORT'] then + # # kpse_merge_done: require 'base/kpseremote' + begin + KpseRemote::start_server + rescue + return false + else + return true + end + else + usage + puts("") + puts("message : set 'KPSEMETHOD' and 'KPSEPORT' variables") + return false + end + elsif $help || ! $filename || $filename.empty? then + usage + loadtree($tree) + loadenvironment($environment) + show_environment() + return true + elsif $batch && $filename && ! $filename.empty? then + # todo, take commands from file and avoid multiple starts and checks + return false + else + report("texmfstart version #{$version}") + loadtree($tree) + loadenvironment($environment) + show_environment() + if $make || $remove then + if $filename == 'all' then + makelist = $makelist + else + makelist = [$filename] + end + makelist.each do |filename| + if $windows then + make(filename,true,false,$remove) + elsif $unix then + make(filename,false,true,$remove) + else + make(filename,$mswindows,!$mswindows,$remove) + end + end + return true # guess + elsif $browser && $filename =~ /^http\:\/\// then + return launch($filename) + else + begin + process do + if $direct || $filename =~ /^bin\:/ then + return direct($filename) + elsif $edit && ! $editor.empty? then + return edit($filename) + else # script: or no prefix + command = find(shortpathname($filename),$program) + if command then + register("THREAD",File.dirname(File.expand_path(command))) + return run(command) + else + report('unable to locate program') + return false + end + end + end + rescue + report('fatal error in starting process') + return false + end + end + end + +end + +if execute(ARGV) then + report("\nexecution was successful") if $verbose + exit(0) +else + report("\nexecution failed") if $verbose + exit(1) +end + +# exit (if ($?.to_i rescue 0) > 0 then 1 else 0 end) diff --git a/Master/bin/i386-solaris/texsis b/Master/bin/i386-solaris/texsis new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/texsis @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/textools b/Master/bin/i386-solaris/textools new file mode 100755 index 00000000000..7445eac371c --- /dev/null +++ b/Master/bin/i386-solaris/textools @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart textools.rb "$@" diff --git a/Master/bin/i386-solaris/texutil b/Master/bin/i386-solaris/texutil new file mode 100755 index 00000000000..607154af059 --- /dev/null +++ b/Master/bin/i386-solaris/texutil @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart texutil.rb "$@" diff --git a/Master/bin/i386-solaris/tftopl b/Master/bin/i386-solaris/tftopl Binary files differnew file mode 100755 index 00000000000..a77611ca58f --- /dev/null +++ b/Master/bin/i386-solaris/tftopl diff --git a/Master/bin/i386-solaris/thumbpdf b/Master/bin/i386-solaris/thumbpdf new file mode 120000 index 00000000000..98a72428616 --- /dev/null +++ b/Master/bin/i386-solaris/thumbpdf @@ -0,0 +1 @@ +../../texmf-dist/scripts/thumbpdf/thumbpdf.pl
\ No newline at end of file diff --git a/Master/bin/i386-solaris/tie b/Master/bin/i386-solaris/tie Binary files differnew file mode 100755 index 00000000000..796b9e5fa5b --- /dev/null +++ b/Master/bin/i386-solaris/tie diff --git a/Master/bin/i386-solaris/tlmgr b/Master/bin/i386-solaris/tlmgr new file mode 120000 index 00000000000..dd7cddf2d67 --- /dev/null +++ b/Master/bin/i386-solaris/tlmgr @@ -0,0 +1 @@ +../../texmf/scripts/texlive/tlmgr.pl
\ No newline at end of file diff --git a/Master/bin/i386-solaris/tmftools b/Master/bin/i386-solaris/tmftools new file mode 100755 index 00000000000..7531a966390 --- /dev/null +++ b/Master/bin/i386-solaris/tmftools @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart tmftools.rb "$@" diff --git a/Master/bin/i386-solaris/tpic2pdftex b/Master/bin/i386-solaris/tpic2pdftex new file mode 100755 index 00000000000..70c1a33c7e8 --- /dev/null +++ b/Master/bin/i386-solaris/tpic2pdftex @@ -0,0 +1,407 @@ +#!/bin/sh - +# +# $Id: tpic2pdftex,v 1.94 2007/01/14 19:05:32 hahe Exp $ +# +# Experimental awk-script for conversion of tpic \specials as produced +# by (groff-)pic into pdfTeX \pdfliteral sections for further processing +# by pdftex. +# +# Usage: +# $ pic -t somefile.pic | tpic2pdftex > somefile.tex +# +# Process somefile.tex by pdftex/pdflatex. +# +# tpic \special desciption see e. g.: +# Goossens, Rahtz, Mittelbach: The LaTeX Graphics Companion, +# Addison-Wesley, 1997, pp. 464. +# +# Bugs: +# Spline curve shapes not fully authentic (unknown algorithm). +# Bounding box does not care for line thickness (groff pic feature). +# Splines might be outside bounding box. +# +# Copyright (C) 2002--2004 by Hartmut Henkel +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at +# your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# The author may be contacted via the e-mail address +# +# hartmut_henkel@gmx.de +# +# NEWS: +# 14 Jan. 2007 - make it executable shell script, calling awk +# 16 Dec. 2004 - Replaced // {print} by {print} (some AWKs did choke) +# 09 Apr. 2004 - Locale check: Decimal point in float numbers? +# 30 Oct. 2003 - Replaced print statements by printf to avoid +# underflow numbers like 1e-14 in \pdfliterals. Remove trailing +# zeroes of floating point numbers. +# 02 May 2003 - Lines starting with \ allow TeX insertions, +# e. g. of pdfTeX \pdfliteral{} +# 29 Apr. 2003 - Changed for pic of groff 1.19 +# 16 Mar. 2003 - Bug corrected: Dashed lines shorter than minimum +# dash-pause length now drawn solid. +# 11 Nov. 2002 - Spline drawing improved: First half of first and last +# half of last spline segments are drawn by straight lines. +# 28 Nov. 2002 - Arc and circle drawing cleaned up. Full circle is now +# drawn by 4 Bezier curves, as is common use. Arcs split evenly into +# Bezier curves, to minimize max. error. +# 02 Dec. 2002 - Experimental pic (groff > 1.18.1) with improved +# vertical picture positioning supported. +# 04 Dec. 2002 - Experiment with modified pic (\vtop -> \vbox), +# Formula for Bezier constant c reduced. +# +######################################################################## + +AWK=${AWK:-gawk} +export LANG="C" + +AWKPROG=' +# begin of awk input file + +function qprintf(a) { + gsub(/0* /," ", a); # trailing zeroes in %f + gsub(/\. /," ", a); # orphaned decimal dots + gsub(/0*]/,"]", a); # trailing zeroes in brackets + gsub(/0X/,"0", a); # guard integer zeroes + gsub(/-0 /,"0 ", a); # correct -0 to 0 + print a; +} + +function startpdfliteral() { + if (pdfliteral == 0) { + print "\\pdfliteral{"; + printf("q [] 0 d %d J %d j\n", linecap, linejoin); # no qprintf! + qprintf(sprintf("%f w", linethickness * wscale)); + } + pdfliteral = 1; +} + +function stoppdfliteral() { + if (pdfliteral == 1) { + print "Q"; + print "}%"; + } + pdfliteral = 0; +} + +######################################################################## + +BEGIN{ + wscale = 72.0 / 1000; + tpicmode = 0; + pdfliteral = 0; + pointbuf = 0; + filled = 0; + fillval = 0; + linecap = 1; + linejoin = 1; + defaultlinethickness = 8; + drawarc = 0; + pi = atan2(0, -1); + if (match(sprintf("%f", 0.5), /\./) == 0) { + print "ERROR: Floating point numbers miss decimal point. Do" + print " export LANG=\"C\"" + print "before calling awk." + print "ERROR: Floating point numbers miss decimal point. Do" > "/dev/stderr" + print " export LANG=\"C\"" > "/dev/stderr" + print "before calling awk." > "/dev/stderr" + exit 1; + } +} + +######################################################################## + +# the following expression triggers tpic processing for pic <= 1.18.1 + +/^\\setbox\\graph=\\vtop{/ { + pdfliteral = 0; + tpicmode = 1; + linethickness = defaultlinethickness; +} + +# the following expression triggers tpic processing for pic = 1.19 + +/^\\expandafter\\setbox\\csname graph\\endcsname/ { + pdfliteral = 0; + tpicmode = 1; + linethickness = defaultlinethickness; +} + +# TeX parts end \pdfliteral, and also TeX parts embedded in .PS ... .PE +# section end \pdfliteral + +/^ *\\graphtemp|^ *\\rlap|^ *\\advance|^\\|^ *\\hbox/ { + if(tpicmode == 1) + stoppdfliteral(); +} + +/^}%/ { + if(tpicmode == 1) + tpicmode = 0; +} + +######################################################################## + +# all specials handling + +/^ *\\special/ { + if(tpicmode == 1) + startpdfliteral(); +} + +# <pn> set pen size + +/^ *\\special{pn/ { + gsub(/[{}]/, " "); + linethickness = $3 + 0; + qprintf(sprintf("%f w", linethickness * wscale)); + next; +} + +# <pa> add point to path + +/^ *\\special{pa/ { + gsub(/[{}]/, " "); + x[pointbuf] = $3 + 0; + y[pointbuf] = $4 + 0; + pointbuf++; + next; +} + +# <fp> print path as straight lines + +/^ *\\special{fp/ { + if (filled == 1) + qprintf(sprintf("q %f g", 1 - fillval)); + qprintf(sprintf("%f %f m", x[0] * wscale, -y[0] * wscale)); + for (i = 1; i < pointbuf; i++) + qprintf(sprintf("%f %f l", x[i] * wscale, -y[i] * wscale)); + if (filled == 1) + print "B Q"; + else + print "S"; + pointbuf = 0; + filled = 0; + next; +} + +# <da> print path as straight dashed lines + +/^ *\\special{da/ { + gsub(/[{}]/, " "); + don = ($3 + 0) * 1000; + if (filled == 1) { + qprintf(sprintf("q %f g", 1 - fillval)); + qprintf(sprintf("%f %f m", x[0] * wscale, -y[0] * wscale)); + for (i = 1; i < pointbuf; i++) + qprintf(sprintf("%f %f l", x[i] * wscale, -y[i] * wscale)); + print "f Q"; + } + for (i = 1; i < pointbuf; i++) { + dx = x[i] - x[i - 1]; + dy = y[i] - y[i - 1]; + len = sqrt(dx * dx + dy * dy); + non = int(0.5 * len / don + 0.75); + noff = non - 1; + lon = don * non; + loff = len - lon; + if(noff > 0) { + doff = loff / noff; + qprintf(sprintf("q [%f %f] 0X d", don * wscale, doff * wscale)); + } else { + print "q [] 0 d"; + } + qprintf(sprintf("%f %f m", x[i - 1] * wscale, -y[i - 1] * wscale)); + qprintf(sprintf("%f %f l", x[i] * wscale, -y[i] * wscale)); + print "S Q"; + } + pointbuf = 0; + filled = 0; + next; +} + +# <dt> print path as straight dotted lines + +/^ *\\special{dt/ { + gsub(/[{}]/, " "); + dt = ($3 + 0) * 1000; + if (filled == 1) { + qprintf(sprintf("q %f g", 1 - fillval)); + qprintf(sprintf("%f %f m", x[0] * wscale, -y[0] * wscale)); + for (i = 1; i < pointbuf; i++) + qprintf(sprintf("%f %f l", x[i] * wscale, -y[i] * wscale)); + print "f Q"; + } + for (i = 1; i < pointbuf; i++) { + dx = x[i] - x[i - 1]; + dy = y[i] - y[i - 1]; + len = sqrt(dx * dx + dy * dy); + dl = int (len / dt + 0.5); + if (!dl) + dtl = len; + else + dtl = len / dl; + qprintf(sprintf("q [0X %f] 0X d", dtl * wscale)); + qprintf(sprintf("%f %f m", x[i - 1] * wscale, -y[i - 1] * wscale)); + qprintf(sprintf("%f %f l", x[i] * wscale, -y[i] * wscale)); + print "S Q"; + } + pointbuf = 0; + filled = 0; + next; +} + +# <ip> like <fp>, but path actually not drawn + +/^ *\\special{ip/ { + if (filled == 1) + qprintf(sprintf("q %f g", 1 - fillval)); + qprintf(sprintf("%f %f m", x[0] * wscale, -y[0] * wscale)); + for (i = 1; i < pointbuf; i++) + qprintf(sprintf("%f %f l", x[i] * wscale, -y[i] * wscale)); + if (filled == 1) + print "f Q"; + else + print "f"; + pointbuf = 0; + filled = 0; + next; +} + +# <sp> like <fp>, but path printed as splines + +/^ *\\special{sp/ { + gsub(/[{}]/, " "); + don = ($3 + 0) * 1000; + a = 0.68; # fudge, visually optimized + x[pointbuf] = x[pointbuf - 1]; + y[pointbuf] = y[pointbuf - 1]; + + if (don > 0) + qprintf(sprintf("q [%f] 0X d", don * wscale)); + if (don < 0) + qprintf(sprintf("q [0X %f] 0X d", -don * wscale)); + + qprintf(sprintf("%f %f m", x[0] * wscale, -y[0] * wscale)); + + if(pointbuf < 3) + qprintf(sprintf("%f %f l", x[pointbuf - 1] * wscale, -y[pointbuf - 1] * wscale)); + else { + qprintf(sprintf("%f %f l", 0.5 * (x[0] + x[1]) * wscale, \ + -0.5 * (y[0] + y[1]) * wscale)); # start straight, see cstr116.ps + for (i = 1; i < pointbuf - 1; i++) + qprintf(sprintf("%f %f %f %f %f %f c", \ + (a * x[i] + (1 - a) * 0.5 * (x[i] + x[i - 1])) * wscale, \ + -(a * y[i] + (1 - a) * 0.5 * (y[i] + y[i - 1])) * wscale, \ + (a * x[i] + (1 - a) * 0.5 * (x[i] + x[i + 1])) * wscale, \ + -(a * y[i] + (1 - a) * 0.5 * (y[i] + y[i + 1])) * wscale, \ + 0.5 * (x[i] + x[i + 1]) * wscale, -0.5 * (y[i] + y[i + 1]) * wscale)); + qprintf(sprintf("%f %f l", x[pointbuf - 1] * wscale, -y[pointbuf - 1] * wscale)); + } + if (filled == 1) { + qprintf(sprintf("q %f g", 1 - fillval)); + print "B Q"; + } + else + print "S"; + if (don != 0) + print "Q"; + pointbuf = 0; + filled = 0; + next; +} + +# <sh> prepare shading of object interior + +/^ *\\special{sh/ { + gsub(/[{}]/, " "); + fillval = $3 + 0; + filled = 1; + next; +} + +# <ar> draw arc +# <ia> like <ar>, but arc actually not drawn + +/^ *\\special{ar/ { + drawarc = 1; +} + +/^ *\\special{ar|^ *\\special{ia/ { + gsub(/[{}]/, " "); + xc = $3 + 0; + yc = $4 + 0; + rx = $5 + 0; + ry = $6 + 0; + s = $7 + 0; + e = $8 + 0; + if (e - s > 2 * pi) e = s + 2 * pi; + if (s - e > 2 * pi) e = s - 2 * pi; + curvespercircle = 4; # max. number Bezier curves per circle + phi_max = 1.001 * 2 * pi / curvespercircle; + if (e > s) + imax = int ((e - s) / phi_max) + 1; + else + imax = int ((s - e) / phi_max) + 1; + phi = (e - s) / imax; + + # parameter for Bezier control vectors, c(90 deg.) = 0.55228...: + c = 4 * (1 - cos(0.5 * phi)) / (3 * sin(0.5 * phi)); + + x0 = rx * cos(s) + xc; + y0 = ry * sin(s) + yc; + qprintf(sprintf("%f %f m", x0 * wscale, -y0 * wscale)); + for (i = 0; i < imax; i++) { + x1 = x0 - rx * c * sin(s + i * phi); + y1 = y0 + ry * c * cos(s + i * phi); + x3 = rx * cos(s + (i + 1) * phi) + xc; + y3 = ry * sin(s + (i + 1) * phi) + yc; + x2 = x3 + rx * c * sin(s + (i + 1) * phi); + y2 = y3 - ry * c * cos(s + (i + 1) * phi); + qprintf(sprintf("%f %f %f %f %f %f c", x1 * wscale, -y1 * wscale, \ + x2 * wscale, -y2 * wscale, x3 * wscale, -y3 * wscale)); + x0 = x3; + y0 = y3; + } + if(drawarc == 1) { + if (filled == 1) { + qprintf(sprintf("h q %f g", 1 - fillval)); + print "B Q"; + } + else + print "S"; + } else { + if (filled == 1) { + qprintf(sprintf("h q %f g", 1 - fillval)); + print "f Q"; + } + else + print "f"; + } + filled = 0; + drawarc = 0; + next; +} + +######################################################################## + +{print} + +######################################################################## +' +# end of awk input file + +$AWK "$AWKPROG" "$@" diff --git a/Master/bin/i386-solaris/ttf2afm b/Master/bin/i386-solaris/ttf2afm Binary files differnew file mode 100755 index 00000000000..ee7fa1c1c47 --- /dev/null +++ b/Master/bin/i386-solaris/ttf2afm diff --git a/Master/bin/i386-solaris/ttf2pk b/Master/bin/i386-solaris/ttf2pk Binary files differnew file mode 100755 index 00000000000..8b6c143ca3f --- /dev/null +++ b/Master/bin/i386-solaris/ttf2pk diff --git a/Master/bin/i386-solaris/ttf2tfm b/Master/bin/i386-solaris/ttf2tfm Binary files differnew file mode 100755 index 00000000000..35d185a7be3 --- /dev/null +++ b/Master/bin/i386-solaris/ttf2tfm diff --git a/Master/bin/i386-solaris/ttftotype42 b/Master/bin/i386-solaris/ttftotype42 Binary files differnew file mode 100755 index 00000000000..582ea0d6b80 --- /dev/null +++ b/Master/bin/i386-solaris/ttftotype42 diff --git a/Master/bin/i386-solaris/updmap b/Master/bin/i386-solaris/updmap new file mode 100755 index 00000000000..f55fd95a84c --- /dev/null +++ b/Master/bin/i386-solaris/updmap @@ -0,0 +1,1402 @@ +#!/bin/sh +# updmap: utility to maintain map files for outline fonts. +# Thomas Esser. Public domain. +# Run with --help for usage. + +############################################################################### +# program history: +# Post-te retirement, now maintained in TeX Live; see +# Build/texk/tetex/ChangeLog for further changes. +# Fr Jul 22 07:22:38 CEST 2005 +# write hint about log file into output files +# Fr Apr 8 19:15:05 CEST 2005 +# cleanup now has an argument for the return code +# So Mär 27 18:52:06 CEST 2005 +# honor $TMPDIR, $TEMP and $TMP, not just $TMP +# Do Mär 10 19:31:39 CET 2005 +# add a few quotes for $cnfFile with whitespace +# Sa Jan 15 18:13:46 CET 2005 +# avoid multiple variable assignments in one statement +# Sa Dez 25 12:44:23 CET 2004 +# implementaion adopted for teTeX-3.0 (tcfmgr) +# Mi Nov 3 16:33:22 CET 2004 +# add "--setoption option=value" syntax +# Fr Okt 29 21:05:53 CEST 2004 +# add --enable Map=... / --enable MixedMap=... +# Mi Okt 20 19:17:19 CEST 2004 +# transcript added; even better warnings / error messages +# So Okt 17 19:07:17 CEST 2004 +# improved warnings / error messages +# added --syncwithtrees +# added --listavailablemaps +# Mi Okt 6 16:37:49 CEST 2004 +# commenty may start with any of *#;% +# Sun Aug 1 11:42:14 CEST 2004, te +# remove pdftex related hacks; pdftex no longer needs them! +# Thu May 13 22:04:23 CEST 2004, te +# support user with new map file locations +# Fri Mar 19 15:22:55 CET 2004, te +# output "xxx yyy" instead of " xxx yyy " (less blanks) +# Fri Jan 2 22:41:11 CET 2004, te: +# add version string +# Wed Aug 20 18:51:47 CEST 2003 +# store map files to fonts/map, add options for dvipsoutputdir, +# pdftexoutputdir, dvipdfmoutputdir +# Mon Mar 24 13:40:55 CET 2003 +# fix fmex[789] for dvipdfm (no -r option) +# Sun Mar 23 18:58:00 CET 2003 +# make the script robust against whitespace in filenames +# Mon Jan 27 22:38:44 CET 2003 +# don't call a function before processOptions; we may loose our +# argument list with some broken shells +# Mon Jan 27 06:55:28 CET 2003 +# fix unportable egrep / sed +# Sat Jan 18 10:10:26 CET 2003 +# use $tmp8 in dvips2dvipdfm() +# Thu Jan 2 23:14:34 CET 2003 +# add umask 022, so generated files are always world-readable +# Sun Oct 27 11:33:04 CET 2002 +# write output in normalized format +# add support for dvipdfm +# Mon Sep 22 19:18:57 CEST 2002 +# fix typo: buildin -> builtin +# Mon Sep 2 19:18:57 CEST 2002 +# fix condensed <-> narrow mapping +# Sun Sep 1 15:02:28 CEST 2002 +# add dvipsDownloadBase35 / pdftexDownloadBase14 options +# Wed May 22 20:00:13 CEST 2002 +# listmaps option added by Gerben Wierda +# Tue May 21 05:27:37 CEST 2002 +# now removing map files before rewriting them; fixes permission problems +# Tue May 21 05:05:34 CEST 2002: +# cli options added: showoptions, setoption, enable, disable, nomkmap +# now even more verbose; now reporting non-existing map files +# fixing trap for MAC OS/X compatibility +# Fri May 17 22:38:37 CEST 2002: +# rewritten from teTeX-1.0 version; Completely new designed. +############################################################################### + +test -f /bin/ksh && test -z "$RUNNING_KSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; } +unset RUNNING_KSH + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +export PATH + +# hack around a bug in zsh: +test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' + +# the version string +version=1210234762 # seconds since `00:00:00 1970-01-01 UTC' + # date '+%s' (with GNU date) + +# +############################################################################### +# help() +# display help message and exit +############################################################################### +help() +{ + cat <<eof +Usage: updmap [OPTION]... [COMMAND]... + +Update the default font map files used by pdftex, dvips, and dvipdfm, as +determined by updmap.cfg. Among other things, these font map files are +used to determine which fonts should be found as bitmaps and which as +outlines, and to determine which fonts are included in the output. + +By default, the filename database is also rebuilt (with mktexlsr). + +Valid options: + --cnffile FILE read FILE for the updmap configuration + --pdftexoutputdir DIR specify output directory (pdftex syntax) + --dvipsoutputdir DIR specify output directory (dvips syntax) + --dvipdfmoutputdir DIR specify output directory (dvipdfm syntax) + --outputdir DIR specify output directory (for all files) + --copy cp generic files rather than using symlinks + --nomkmap do not recreate map files + --nohash do not run texhash + -n, --dry-run only show the configuration, no output + --quiet reduce verbosity + +Valid commands: + --help show this message + --edit edit $cnfFileShort file + --showoptions ITEM show alternatives for options + --setoption OPTION VALUE set option, where OPTION is one of: + dvipsPreferOutline LW35 dvipsDownloadBase35 + pdftexDownloadBase14 dvipdfmDownloadBase14 + --setoption OPTION=VALUE see above, just different syntax + --enable MAPTYPE MAPFILE add MAPFILE as a MAPTYPE, one of: Map MixedMap + --enable Map=MAPFILE add MAPFILE as a Map + --enable MixedMap=MAPFILE add or enable MAPFILE as a MixedMap + --disable MAPFILE disable MAPFILE, whether Map or MixedMap + --syncwithtrees entries with unavailable map files will be + disabled in the config file + --listmaps list all active and inactive maps + --listavailablemaps same as --listmaps, but without + unavailable map files + +Explanation of the map types: the (only) difference between Map and +MixedMap is that MixedMap entries are not added to psfonts_pk.map. The +purpose is to help users with printers that render Type 1 outline fonts +worse than mode-tuned Type 1 bitmap fonts. So MixedMap is used for +fonts that are available as both Type 1 and Metafont. + +To see the precise locations of the various files that will be read and +written, run updmap -n. + +Report bugs to <tex-k@tug.org>. +eof + (exit 0); exit +} + +############################################################################### +# verboseMsg(msg) +# print `msg' to stderr is $verbose is true +############################################################################### +verboseMsg() { + test -n "$log" && echo ${1+"$@"} >> "$log" + $verbose && echo ${1+"$@"} >&2 +} + +############################################################################### +# verboseCat() +# cat to stderr is $verbose is true +############################################################################### +verboseCat() { + if $verbose; then + if test -n "$log"; then + cat ${1+"$@"} | tee -a "$log" >&2 + else + cat ${1+"$@"} >&2 + fi + else + test -n "$log" && cat ${1+"$@"} >> "$log" + fi +} + +############################################################################### +# warn(msg) +# print `msg' to stderr +############################################################################### +warn() +{ + test -n "$log" && echo ${1+"$@"} >> "$log" + echo ${1+"$@"} >&2 +} + +############################################################################### +# abort(errmsg) +# print `errmsg' to stderr and exit with error code 1 +############################################################################### +abort() +{ + warn "$progname: $1." + cleanup 1 +} + +############################################################################### +# cfgval(variable) +# read variable ($1) from config file, first match wins +############################################################################### +cfgval() +{ + cat "$cnfFile" | sed -n 's/^'"$1"'[ =][ =]*//p' | sed q +} + +############################################################################### +# setupSymlinks() +# set symlink (or copy) +# for psfonts.map according to dvipsPreferOutline variable, +# and for pdftex.map and dvipdfm.map according to pdftexDownloadBase14. +############################################################################### +setupSymlinks() +{ + ( + cd "$dvipsoutputdir" || exit 1 + rm -f psfonts.map + if test "x$dvipsPreferOutline" = xtrue; then + $link_cmd psfonts_t1.map psfonts.map + else + $link_cmd psfonts_pk.map psfonts.map + fi + + cd "$pdftexoutputdir" || exit 1 + rm -f pdftex.map + if test "x$pdftexDownloadBase14" = xtrue; then + $link_cmd pdftex_dl14.map pdftex.map + else + $link_cmd pdftex_ndl14.map pdftex.map + fi + + cd "$dvipdfmoutputdir" || exit 1 + rm -f dvipdfm.map + if test "x$dvipdfmDownloadBase14" = xtrue; then + $link_cmd dvipdfm_dl14.map dvipdfm.map + else + $link_cmd dvipdfm_ndl14.map dvipdfm.map + fi + ) +} + +############################################################################### +# transLW35(args ...) +# transform fontname and filenames according to transformation specified +# by mode +############################################################################### +transLW35() +{ + case $mode in + ""|URWkb) + cat ${1+"$@"} + ;; + URW) + fileURW ${1+"$@"} + ;; + ADOBE|ADOBEkb) + psADOBE ${1+"$@"} | file$mode + ;; + esac +} + +############################################################################### +# catMaps(regex) +# filter config file by regex for map lines and extract the map filenames. +# These are then looked up (by kpsewhich in locateMap) and the content of +# all map files is send to stdout. +############################################################################### +catMaps() +{ + rm -f $catMapsFailed + egrep "$1" "$cnfFile" \ + | sed 's@#.*@@' \ + | awk '{print $2}' \ + | sort \ + | uniq \ + | grep . > $tmp4 + + while read map; do + file=`locateMap "$map"` || { touch $catMapsFailed; break; } + + # output the file; also output a newline, because the final newline + # might be missing in the map file; Empty lines are filtered out later, + # so it does not really hurt do do this here. + test -n "$file" && { cat "$file"; echo; } + done < $tmp4 + if test -f $catMapsFailed; then + false; return 1 + else + true; return 0 + fi +} + +############################################################################### +# configReplace(file, pattern, line) +# The first line in file that matches pattern gets replaced by line. +# line will be added at the end of the file if pattern does not match. +############################################################################### +configReplace() +{ + file=$1; pat=$2; line=$3 + + if grep "$pat" "$file" >/dev/null; then + ed "$file" >/dev/null 2>&1 <<-eof + /$pat/ + c + $line + . + w + q +eof + else + echo "$line" >> "$file" + fi +} + +############################################################################### +# setOption (option, value) +# sets option to value in the config file (replacing the existing setting +# or by adding a new line to the config file). +############################################################################### +setOption() +{ + opt=$1 + val=$2 + case "$opt" in + LW35) + case "$val" in + URWkb|URW|ADOBE|ADOBEkb) + ;; + *) + abort "invalid value $val for option $opt" + ;; + esac + ;; + dvipsPreferOutline|dvipsDownloadBase35|pdftexDownloadBase14|dvipdfmDownloadBase14) + case "$val" in + true|false) + ;; + *) + abort "invalid value $val for option $opt" + esac + ;; + *) + abort "unsupported option $opt" + ;; + esac + + configReplace "$cnfFile" "^$opt[ ]" "$opt $val" +} + +############################################################################### +# enableMap (type, map) +# enables an entry in the config file for map with a given type. +############################################################################### +enableMap() +{ + case $1 in + Map|MixedMap) + ;; + *) + abort "invalid mapType $1" + ;; + esac + + # a map can only have one type, so we carefully disable everything + # about map here: + disableMap "$2" + + # now enable with the right type: + configReplace "$cnfFile" "^#![ ]*$1[ ]*$2" "$1 $2" +} + +############################################################################### +# disableMap (map) +# disables map in config file (any type) +############################################################################### +disableMap() +{ + #mapType=`awk '($1 == "MixedMap" || $1 == "Map") && $2 == map { print $1 }' \ + # map=$1 <"$cnfFile" | sort | uniq` + map=$1 + mapType=`egrep "^(MixedMap|Map)[ ]*$map( | |$)" "$cnfFile" | awk '{print $1}' | sort | uniq` + for type in $mapType; do + configReplace "$cnfFile" "^$type[ ]*$1" "#! $type $1" + done +} + +############################################################################### +# psADOBE() +# transform fontnames from URW to Adobe +############################################################################### +psADOBE() +{ + sed \ + -e 's/ URWGothicL-Demi / AvantGarde-Demi /' \ + -e 's/ URWGothicL-DemiObli / AvantGarde-DemiOblique /' \ + -e 's/ URWGothicL-Book / AvantGarde-Book /' \ + -e 's/ URWGothicL-BookObli / AvantGarde-BookOblique /' \ + -e 's/ URWBookmanL-DemiBold / Bookman-Demi /' \ + -e 's/ URWBookmanL-DemiBoldItal / Bookman-DemiItalic /' \ + -e 's/ URWBookmanL-Ligh / Bookman-Light /' \ + -e 's/ URWBookmanL-LighItal / Bookman-LightItalic /' \ + -e 's/ NimbusMonL-Bold / Courier-Bold /' \ + -e 's/ NimbusMonL-BoldObli / Courier-BoldOblique /' \ + -e 's/ NimbusMonL-Regu / Courier /' \ + -e 's/ NimbusMonL-ReguObli / Courier-Oblique /' \ + -e 's/ NimbusSanL-Bold / Helvetica-Bold /' \ + -e 's/ NimbusSanL-BoldCond / Helvetica-Narrow-Bold /' \ + -e 's/ NimbusSanL-BoldItal / Helvetica-BoldOblique /' \ + -e 's/ NimbusSanL-BoldCondItal / Helvetica-Narrow-BoldOblique /' \ + -e 's/ NimbusSanL-Regu / Helvetica /' \ + -e 's/ NimbusSanL-ReguCond / Helvetica-Narrow /' \ + -e 's/ NimbusSanL-ReguItal / Helvetica-Oblique /' \ + -e 's/ NimbusSanL-ReguCondItal / Helvetica-Narrow-Oblique /' \ + -e 's/ CenturySchL-Bold / NewCenturySchlbk-Bold /' \ + -e 's/ CenturySchL-BoldItal / NewCenturySchlbk-BoldItalic /' \ + -e 's/ CenturySchL-Roma / NewCenturySchlbk-Roman /' \ + -e 's/ CenturySchL-Ital / NewCenturySchlbk-Italic /' \ + -e 's/ URWPalladioL-Bold / Palatino-Bold /' \ + -e 's/ URWPalladioL-BoldItal / Palatino-BoldItalic /' \ + -e 's/ URWPalladioL-Roma / Palatino-Roman /' \ + -e 's/ URWPalladioL-Ital / Palatino-Italic /' \ + -e 's/ StandardSymL / Symbol /' \ + -e 's/ NimbusRomNo9L-Medi / Times-Bold /' \ + -e 's/ NimbusRomNo9L-MediItal / Times-BoldItalic /' \ + -e 's/ NimbusRomNo9L-Regu / Times-Roman /' \ + -e 's/ NimbusRomNo9L-ReguItal / Times-Italic /' \ + -e 's/ URWChanceryL-MediItal / ZapfChancery-MediumItalic /' \ + -e 's/ Dingbats / ZapfDingbats /' \ + ${1+"$@"} +} + +############################################################################### +# fileADOBEkb() +# transform filenames from URW to ADOBE (both berry names) +############################################################################### +fileADOBEkb() +{ + sed \ + -e 's/\([^A-Za-z]\)uagd8a.pfb/\1pagd8a.pfb/' \ + -e 's/\([^A-Za-z]\)uagdo8a.pfb/\1pagdo8a.pfb/' \ + -e 's/\([^A-Za-z]\)uagk8a.pfb/\1pagk8a.pfb/' \ + -e 's/\([^A-Za-z]\)uagko8a.pfb/\1pagko8a.pfb/' \ + -e 's/\([^A-Za-z]\)ubkd8a.pfb/\1pbkd8a.pfb/' \ + -e 's/\([^A-Za-z]\)ubkdi8a.pfb/\1pbkdi8a.pfb/' \ + -e 's/\([^A-Za-z]\)ubkl8a.pfb/\1pbkl8a.pfb/' \ + -e 's/\([^A-Za-z]\)ubkli8a.pfb/\1pbkli8a.pfb/' \ + -e 's/\([^A-Za-z]\)ucrb8a.pfb/\1pcrb8a.pfb/' \ + -e 's/\([^A-Za-z]\)ucrbo8a.pfb/\1pcrbo8a.pfb/' \ + -e 's/\([^A-Za-z]\)ucrr8a.pfb/\1pcrr8a.pfb/' \ + -e 's/\([^A-Za-z]\)ucrro8a.pfb/\1pcrro8a.pfb/' \ + -e 's/\([^A-Za-z]\)uhvb8a.pfb/\1phvb8a.pfb/' \ + -e 's/\([^A-Za-z]\)uhvb8ac.pfb/\1phvb8an.pfb/' \ + -e 's/\([^A-Za-z]\)uhvbo8a.pfb/\1phvbo8a.pfb/' \ + -e 's/\([^A-Za-z]\)uhvbo8ac.pfb/\1phvbo8an.pfb/' \ + -e 's/\([^A-Za-z]\)uhvr8a.pfb/\1phvr8a.pfb/' \ + -e 's/\([^A-Za-z]\)uhvr8ac.pfb/\1phvr8an.pfb/' \ + -e 's/\([^A-Za-z]\)uhvro8a.pfb/\1phvro8a.pfb/' \ + -e 's/\([^A-Za-z]\)uhvro8ac.pfb/\1phvro8an.pfb/' \ + -e 's/\([^A-Za-z]\)uncb8a.pfb/\1pncb8a.pfb/' \ + -e 's/\([^A-Za-z]\)uncbi8a.pfb/\1pncbi8a.pfb/' \ + -e 's/\([^A-Za-z]\)uncr8a.pfb/\1pncr8a.pfb/' \ + -e 's/\([^A-Za-z]\)uncri8a.pfb/\1pncri8a.pfb/' \ + -e 's/\([^A-Za-z]\)uplb8a.pfb/\1pplb8a.pfb/' \ + -e 's/\([^A-Za-z]\)uplbi8a.pfb/\1pplbi8a.pfb/' \ + -e 's/\([^A-Za-z]\)uplr8a.pfb/\1pplr8a.pfb/' \ + -e 's/\([^A-Za-z]\)uplri8a.pfb/\1pplri8a.pfb/' \ + -e 's/\([^A-Za-z]\)usyr.pfb/\1psyr.pfb/' \ + -e 's/\([^A-Za-z]\)utmb8a.pfb/\1ptmb8a.pfb/' \ + -e 's/\([^A-Za-z]\)utmbi8a.pfb/\1ptmbi8a.pfb/' \ + -e 's/\([^A-Za-z]\)utmr8a.pfb/\1ptmr8a.pfb/' \ + -e 's/\([^A-Za-z]\)utmri8a.pfb/\1ptmri8a.pfb/' \ + -e 's/\([^A-Za-z]\)uzcmi8a.pfb/\1pzcmi8a.pfb/' \ + -e 's/\([^A-Za-z]\)uzdr.pfb/\1pzdr.pfb/' \ + ${1+"$@"} +} + +############################################################################### +# fileURW() +# transform filenames from URWkb (berry names) to URW (vendor names) +############################################################################### +fileURW() +{ + sed \ + -e 's/\([^A-Za-z]\)uagd8a.pfb/\1a010015l.pfb/' \ + -e 's/\([^A-Za-z]\)uagdo8a.pfb/\1a010035l.pfb/' \ + -e 's/\([^A-Za-z]\)uagk8a.pfb/\1a010013l.pfb/' \ + -e 's/\([^A-Za-z]\)uagko8a.pfb/\1a010033l.pfb/' \ + -e 's/\([^A-Za-z]\)ubkd8a.pfb/\1b018015l.pfb/' \ + -e 's/\([^A-Za-z]\)ubkdi8a.pfb/\1b018035l.pfb/' \ + -e 's/\([^A-Za-z]\)ubkl8a.pfb/\1b018012l.pfb/' \ + -e 's/\([^A-Za-z]\)ubkli8a.pfb/\1b018032l.pfb/' \ + -e 's/\([^A-Za-z]\)ucrb8a.pfb/\1n022004l.pfb/' \ + -e 's/\([^A-Za-z]\)ucrbo8a.pfb/\1n022024l.pfb/' \ + -e 's/\([^A-Za-z]\)ucrr8a.pfb/\1n022003l.pfb/' \ + -e 's/\([^A-Za-z]\)ucrro8a.pfb/\1n022023l.pfb/' \ + -e 's/\([^A-Za-z]\)uhvb8a.pfb/\1n019004l.pfb/' \ + -e 's/\([^A-Za-z]\)uhvb8ac.pfb/\1n019044l.pfb/' \ + -e 's/\([^A-Za-z]\)uhvbo8a.pfb/\1n019024l.pfb/' \ + -e 's/\([^A-Za-z]\)uhvbo8ac.pfb/\1n019064l.pfb/' \ + -e 's/\([^A-Za-z]\)uhvr8a.pfb/\1n019003l.pfb/' \ + -e 's/\([^A-Za-z]\)uhvr8ac.pfb/\1n019043l.pfb/' \ + -e 's/\([^A-Za-z]\)uhvro8a.pfb/\1n019023l.pfb/' \ + -e 's/\([^A-Za-z]\)uhvro8ac.pfb/\1n019063l.pfb/' \ + -e 's/\([^A-Za-z]\)uncb8a.pfb/\1c059016l.pfb/' \ + -e 's/\([^A-Za-z]\)uncbi8a.pfb/\1c059036l.pfb/' \ + -e 's/\([^A-Za-z]\)uncr8a.pfb/\1c059013l.pfb/' \ + -e 's/\([^A-Za-z]\)uncri8a.pfb/\1c059033l.pfb/' \ + -e 's/\([^A-Za-z]\)uplb8a.pfb/\1p052004l.pfb/' \ + -e 's/\([^A-Za-z]\)uplbi8a.pfb/\1p052024l.pfb/' \ + -e 's/\([^A-Za-z]\)uplr8a.pfb/\1p052003l.pfb/' \ + -e 's/\([^A-Za-z]\)uplri8a.pfb/\1p052023l.pfb/' \ + -e 's/\([^A-Za-z]\)usyr.pfb/\1s050000l.pfb/' \ + -e 's/\([^A-Za-z]\)utmb8a.pfb/\1n021004l.pfb/' \ + -e 's/\([^A-Za-z]\)utmbi8a.pfb/\1n021024l.pfb/' \ + -e 's/\([^A-Za-z]\)utmr8a.pfb/\1n021003l.pfb/' \ + -e 's/\([^A-Za-z]\)utmri8a.pfb/\1n021023l.pfb/' \ + -e 's/\([^A-Za-z]\)uzcmi8a.pfb/\1z003034l.pfb/' \ + -e 's/\([^A-Za-z]\)uzdr.pfb/\1d050000l.pfb/' \ + ${1+"$@"} +} + +############################################################################### +# fileADOBE() +# transform filenames from URWkb (berry names) to ADOBE (vendor names) +############################################################################### +fileADOBE() +{ + sed \ + -e 's/\([^A-Za-z]\)uagd8a.pfb/\1agd_____.pfb/' \ + -e 's/\([^A-Za-z]\)uagdo8a.pfb/\1agdo____.pfb/' \ + -e 's/\([^A-Za-z]\)uagk8a.pfb/\1agw_____.pfb/' \ + -e 's/\([^A-Za-z]\)uagko8a.pfb/\1agwo____.pfb/' \ + -e 's/\([^A-Za-z]\)ubkd8a.pfb/\1bkd_____.pfb/' \ + -e 's/\([^A-Za-z]\)ubkdi8a.pfb/\1bkdi____.pfb/' \ + -e 's/\([^A-Za-z]\)ubkl8a.pfb/\1bkl_____.pfb/' \ + -e 's/\([^A-Za-z]\)ubkli8a.pfb/\1bkli____.pfb/' \ + -e 's/\([^A-Za-z]\)ucrb8a.pfb/\1cob_____.pfb/' \ + -e 's/\([^A-Za-z]\)ucrbo8a.pfb/\1cobo____.pfb/' \ + -e 's/\([^A-Za-z]\)ucrr8a.pfb/\1com_____.pfb/' \ + -e 's/\([^A-Za-z]\)ucrro8a.pfb/\1coo_____.pfb/' \ + -e 's/\([^A-Za-z]\)uhvb8a.pfb/\1hvb_____.pfb/' \ + -e 's/\([^A-Za-z]\)uhvb8ac.pfb/\1hvnb____.pfb/' \ + -e 's/\([^A-Za-z]\)uhvbo8a.pfb/\1hvbo____.pfb/' \ + -e 's/\([^A-Za-z]\)uhvbo8ac.pfb/\1hvnbo___.pfb/' \ + -e 's/\([^A-Za-z]\)uhvr8a.pfb/\1hv______.pfb/' \ + -e 's/\([^A-Za-z]\)uhvr8ac.pfb/\1hvn_____.pfb/' \ + -e 's/\([^A-Za-z]\)uhvro8a.pfb/\1hvo_____.pfb/' \ + -e 's/\([^A-Za-z]\)uhvro8ac.pfb/\1hvno____.pfb/' \ + -e 's/\([^A-Za-z]\)uncb8a.pfb/\1ncb_____.pfb/' \ + -e 's/\([^A-Za-z]\)uncbi8a.pfb/\1ncbi____.pfb/' \ + -e 's/\([^A-Za-z]\)uncr8a.pfb/\1ncr_____.pfb/' \ + -e 's/\([^A-Za-z]\)uncri8a.pfb/\1nci_____.pfb/' \ + -e 's/\([^A-Za-z]\)uplb8a.pfb/\1pob_____.pfb/' \ + -e 's/\([^A-Za-z]\)uplbi8a.pfb/\1pobi____.pfb/' \ + -e 's/\([^A-Za-z]\)uplr8a.pfb/\1por_____.pfb/' \ + -e 's/\([^A-Za-z]\)uplri8a.pfb/\1poi_____.pfb/' \ + -e 's/\([^A-Za-z]\)usyr.pfb/\1sy______.pfb/' \ + -e 's/\([^A-Za-z]\)utmb8a.pfb/\1tib_____.pfb/' \ + -e 's/\([^A-Za-z]\)utmbi8a.pfb/\1tibi____.pfb/' \ + -e 's/\([^A-Za-z]\)utmr8a.pfb/\1tir_____.pfb/' \ + -e 's/\([^A-Za-z]\)utmri8a.pfb/\1tii_____.pfb/' \ + -e 's/\([^A-Za-z]\)uzcmi8a.pfb/\1zcmi____.pfb/' \ + -e 's/\([^A-Za-z]\)uzdr.pfb/\1zd______.pfb/' \ + ${1+"$@"} +} + +############################################################################### +# locateWeb2c (file ...) +# apply kpsewhich with format 'web2c files' +############################################################################### +locateWeb2c() +{ + kpsewhich --format='web2c files' ${1+"$@"} +} + +############################################################################### +# locateMap (file ...) +# apply kpsewhich with format 'map' +############################################################################### +locateMap() +{ + + # Always use the "migration checking version". This might become + # consigurable, but for now, we always want to check. + if :; then + locateMapMigrate "$@" + return $? + fi + + # The old version of the code; not used at the moment. + for map + do + file=`kpsewhich --format=map "$map"` + if test -f "$file"; then + verboseMsg "$progname: using map file \`$file'" + echo "$file" + else + warn "map file \`$map' not found." + fi + done +} + +############################################################################### +# locateMapMigrate (file ...) +# look for map file; assist user with possibly files in wrong locations; +# also watch out for possibly hidden conflicts +############################################################################### +locateMapMigrate() +{ + for map + do + # look up using the new search path + file=`kpsewhich --format=map "$map"` + + # look up using the old search path + file2=`kpsewhich --format='dvips config' "$map"` + + # Well, the search paths should not overlap. If they do, and if + # file1 = file2, we don't want to complain about file2, so: + test "x$file" = "x$file2" && file2= + + if test -f "$file"; then + + verboseMsg "$progname: using map file \`$file'" + echo "$file" + + # we have found the file where we should. If we have additional + # ones: complain! + if test -f "$file2"; then + mapCmp "$file" "$file2" \ + && mapWarn obsoleteCopy "$map" "$file2" \ + || mapWarn manualResolve "$map" "$file" "$file2" + fi + + else + if test -f "$file2"; then + # bad: map file exists in the wrong location only + mapWarn badLocation "$map" "$file2" + else + # bad: map file does not exist at all + mapWarn notFound "$map" + fi + false; return 1 + fi + done + true; return 0 +} + +############################################################################### +# mapCmp(file, file2) +# compare two map files like cmp; but less strict, so changes regarding +# whitespaces, comments etc. are tolerated. Important is only the +# return value here. +############################################################################### +mapCmp() +{ + file=$1; file2=$2 + + # For reasons of speed only. Avoid normalizeLines if files are 100% + # the same. + cmp "$file" "$file2" >/dev/null 2>&1 && return 0 + + normalizeLines <"$file" >"$tmpdir/mapCmp-1" + normalizeLines <"$file2" >"$tmpdir/mapCmp-2" + cmp "$tmpdir/mapCmp-1" "$tmpdir/mapCmp-2" >/dev/null 2>&1 +} + +############################################################################### +# mapWarn() +############################################################################### +mapWarn() +{ + + case $1 in + obsoleteCopy) + warn " +!!! WARNING: Identical copy of used file for \`$2' + exists in obsolete location + $3 + Please, consider removing this file. +" + touch $mapWarnCalled + ;; + manualResolve) + warn " +!!! WARNING: While searching for the right map file for \`$2', we have + found the file + $3 + in the right location and we are using this + file. However, a map file with different content has been found in + the obsolete location + $4 + Please, see which version you want to use and eventually update the + content of the used map file. Additionally, consider removing the + obsolete file. +" + touch $mapWarnCalled + ;; + badLocation) + map=$2 + location=$3 + + m=" +!!! ERROR: The right location for map files has been + changed for this release and the map file \`$map' has + not been found in the right location, but in the obsolete + location + $location + instead. + + To fix this, please move this file into an appropriate + subdirectory of fonts/map in one of your texmf trees. + + For more information about the changed search paths, see + the release notes section in the teTeX manual. You probably + can read this document by executing the command + texdoc TETEXDOC + else visit the web page + http://tug.org/texlive/mapenc.html +" + warn "$m" + false; return 1 + ;; + notFound) + warn " +!!! ERROR! The map file \`$2' has not been found at all. + + Either put this file into the right place or remove the + reference from the configuration file. An automatic way + to disable unavailable map files is to call + $progname --syncwithtrees + + For manual editing, call + $progname --edit +" + + false; return 1 + ;; + esac +} + +############################################################################### +# cleanup() +# clean up the temp area and exit with proper exit status +############################################################################### +cleanup() +{ + rc=$1 + $needsCleanup && test -n "$tmpdir" && test -d "$tmpdir" \ + && { cd / && rm -rf "$tmpdir"; } + (exit $rc); exit $rc +} + +############################################################################### +# setupTmpDir() +# set up a temp directory and a trap to remove it +############################################################################### +setupTmpDir() +{ + $needsCleanup && return + + trap 'cleanup 1' 1 2 3 7 13 15 + needsCleanup=true + mkdir "$tmpdir" || abort "could not create directory \`$tmpdir'" +} + +############################################################################### +# showOptions(item) +# show Options for an item +############################################################################### +showOptions() +{ + item=$1 + + case "$item" in + LW35) + echo "URWkb URW ADOBE ADOBEkb" + ;; + dvipsPreferOutline|pdftexDownloadBase14|dvipdfmDownloadBase14|dvipsDownloadBase35) + echo "true false" + ;; + *) + abort "Unknown item \"$item\". Choose one of LW35, dvipsPreferOutline, dvipsDownloadBase35, pdftexDownloadBase14 or dvipdfmDownloadBase14" + ;; + esac + + (exit 0); exit 0 +} + +############################################################################### +# mktexdir(args) +# call mktexdir script, disable all features (to prevent sticky directories) +############################################################################### +mktexdir() +{ + MT_FEATURES=none "$TEXMFMAIN/web2c/mktexdir" "$@" >&2 +} + +############################################################################### +# setupDestDir() +# Assign output directories which are not yet assigned. Always use +# the TEXMFVAR for this. +############################################################################### +setupDestDir() +{ + vartexmf=`kpsewhich -var-value=TEXMFVAR` + + # dvips + if test -z "$dvipsoutputdir"; then + dvipsoutputdir=$vartexmf/fonts/map/dvips/updmap + fi + + # pdftex + if test -z "$pdftexoutputdir"; then + pdftexoutputdir=$vartexmf/fonts/map/pdftex/updmap + fi + + # dvipdfm + if test -z "$dvipdfmoutputdir"; then + dvipdfmoutputdir=$vartexmf/fonts/map/dvipdfm/updmap + fi + + mktexdir "$dvipsoutputdir" "$pdftexoutputdir" "$dvipdfmoutputdir" >/dev/null 2>&1 + for d in "$dvipsoutputdir" "$pdftexoutputdir" "$dvipdfmoutputdir"; do + test -d "$d" || abort "output directory \`$d' does not exist" + test -w "$d" || abort "output directory \`$d' is not writable" + done + +} + +############################################################################### +# setupLog(cfgFile) +# try to set up a log file in $TEXMFVAR/web2c +############################################################################### +setupLog() +{ + vartexmf=`kpsewhich -var-value=TEXMFVAR` + dir=$vartexmf/web2c + mktexdir "$dir" >/dev/null 2>&1 + log="$dir/$progname.log" + if test -d "$dir" && test -w "$dir"; then + rm -f "$log" + > "$log" + fi + if test -w "$log"; then + if $chicken_mode; then + log= + else + date > "$log" + verboseMsg "$progname: This is $progname, version $version" + verboseMsg "$progname: using transcript file \`$log'" + fi + else + log= + verboseMsg "$progname: This is $progname, version $version" + verboseMsg "$progname: no permissions for writing $dir/$progname.log', so no transcript" + fi +} + +############################################################################### +# setupCfgFile() +# find config file if none specified on cmd line. +############################################################################### +setupCfgFile() +{ + case "$cnfFile" in + "") cnfFile=`locateWeb2c $cnfFileShort` + case "$cnfFile" in + "") abort "config file $cnfFileShort not found" + esac;; + esac + setupLog +} + +############################################################################### +# processOptions() +# process cmd line options +############################################################################### +processOptions() +{ + while + case $1 in + --quiet|-q) + verbose=false;; + --cnffile) + cfgparam=1; cnfFile=$2; shift;; + --cnffile=*) + cfgparam=1; cnfFile=`echo "$1" | sed 's/--cnffile=//'`;; + --copy) + link_cmd="cp";; + --dry-run|-n) + chicken_mode=true;; + --dvipsoutputdir) + dvipsoutputdirparam=1; dvipsoutputdir=$2; shift;; + --dvipsoutputdir=*) + dvipsoutputdirparam=1; dvipsoutputdir=`echo "$1" | sed 's/--dvipsoutputdir=//'`;; + --pdftexoutputdir) + pdftexoutputdirparam=1; pdftexoutputdir=$2; shift;; + --pdftexoutputdir=*) + pdftexoutputdirparam=1; pdftexoutputdir=`echo "$1" | sed 's/--pdftexoutputdir=//'`;; + --dvipdfmoutputdir) + dvipdfmoutputdirparam=1; dvipdfmoutputdir=$2; shift;; + --dvipdfmoutputdir=*) + dvipdfmoutputdirparam=1; dvipdfmoutputdir=`echo "$1" | sed 's/--dvipdfmoutputdir=//'`;; + --outputdir) + dvipsoutputdirparam=1; dvipsoutputdir=$2 + pdftexoutputdirparam=1; pdftexoutputdir=$2 + dvipdfmoutputdirparam=1; dvipdfmoutputdir=$2 + shift + ;; + --outputdir=*) + outputdir=`echo "$1" | sed 's/--outputdir=//'` + dvipsoutputdirparam=1; dvipsoutputdir=$outputdir + pdftexoutputdirparam=1; pdftexoutputdir=$outputdir + dvipdfmoutputdirparam=1; dvipdfmoutputdir=$outputdir + ;; + --setoption) + cfgmaint=1 + cmd=setoption + case $2 in + *=*) + setoptionOpt=`echo $2 | sed 's@=.*@@'` + setoptionVal=`echo $2 | sed 's@[^=]*=@@'` + shift + ;; + *) + test $# -ge 3 || { abort "--setoption needs two parameters: option value"; } + setoptionOpt=$2; setoptionVal=$3; shift; shift + ;; + esac + ;; + --enable) + cfgmaint=1 + cmd=enable + case $2 in + Map=*) + enableMapType=Map; enableMapFile=`echo "$2" | sed 's/Map=//'`; shift;; + MixedMap=*) + enableMapType=MixedMap; enableMapFile=`echo "$2" | sed 's/MixedMap=//'`; shift;; + Map|MixedMap) + test $# -ge 3 || { abort "--enable needs two parameters: mapType mapFile"; } + enableMapType=$2; enableMapFile=$3; shift; shift;; + *) + abort "--enable needs two parameters mapType mapFile";; + esac + ;; + --syncwithtrees) + cfgmaint=1 + cmd=syncwithtrees;; + --disable) + cfgmaint=1 + cmd=disable; disableMapFile=$2; shift + ;; + --disable=*) + cfgmaint=1 + disableMapFile=`echo "$1" | sed 's/--disable=//'` + cmd=disable + ;; + --edit|-e) + cfgmaint=1 + cmd=edit;; + --listmaps|-l) + cmd=listmaps;; + --listavailablemaps) + cmd=listavailablemaps;; + --showoptions) + cmd=showoptions; showoptionsItem=$2; shift;; + --showoptions=*) + cmd=showoptions; showoptionsItem=`echo "$1" | sed 's/--showoptions=//'`;; + + --nohash) + texhashEnabled=false;; + --nomkmap) + mkmapEnabled=false;; + --help|-help|-h) + help;; + --version) + echo "$progname version $version."; (exit 0); exit 0;; + "") break;; + *) abort "$progname: unknown option \`$1'. Try $progname --help for help";; + esac + do test $# -gt 0 && shift; done + + if test -n "$cfgparam"; then + if test -z "$cnfFile" || test ! -f "$cnfFile"; then + abort "config file \`$cnfFileShort' not found" + fi + fi + + if test -n "$dvipdoutputdirparam"; then + if test -z "$dvipdoutputdir" || test ! -d "$dvipdoutputdir"; then + abort "dvips output directory \`$1' not found" + fi + fi + if test -n "$pdftexoutputdirparam"; then + if test -z "$pdftexoutputdir" || test ! -d "$pdftexoutputdir"; then + abort "pdftex output directory \`$1' not found" + fi + fi + if test -n "$dvipdfmoutputdirparam"; then + if test -z "$dvipdfmoutputdir" || test ! -d "$dvipdfmoutputdir"; then + abort "dvipdfm output directory \`$1' not found" + fi + fi + +} + +############################################################################### +# listMaps() +# list all maps mentioned in the config file +############################################################################### +listMaps() +{ + egrep '^(#! *)?(Mixed)?Map' "$cnfFile" +} + +############################################################################### +# listAvailableMaps() +# list maps mentioned in the config file if they are available +############################################################################### +listAvailableMaps() +{ + # loop over each possible line in the config file (-> $line) + # extract the name of the map file (-> $m) + # check if the map file exists and in that case echo the line + OLDIFS=$IFS + IFS=' +' + for line in `egrep '^(#! *)?(Mixed)?Map' "$cnfFile"`; do + m=`echo "$line" | sed 's@[ ]*$@@; s@.*[ ]@@'` + kpsewhich --format=map "$m" >/dev/null && echo "$line" + done + IFS=$OLDIFS +} + +############################################################################### +# syncWithTrees() +# update the config file: uncomment all lines which refer to map files that +# are unavailabe in the texmf trees +############################################################################### +syncWithTrees() +{ + for i in `egrep '^(Mixed)?Map' "$cnfFile" | sed 's@.* @@'`; do + kpsewhich --format=map "$i" >/dev/null || echo "$i" + done > $tmp1 + { + sed 's@/@\\/@g; s@^@/^MixedMap[ ]*@; s@$@$/s/^/#! /@' <$tmp1 + sed 's@/@\\/@g; s@^@/^Map[ ]*@; s@$@$/s/^/#! /@' <$tmp1 + } > $tmp2 + sed -f $tmp2 "$cnfFile" > $tmp3 && cat $tmp3 > "$cnfFile" +} + +############################################################################### +# normalizeLines() +# remove comments, whitespace is exactly one space, no empty lines, +# no whitespace at end of line, one space before and after ", +# no CR's (as in skaknew). +############################################################################### +normalizeLines() +{ + sed \ + -e '/^[*#;%]/d' \ + -e 's@[ ][ ]*@ @g' \ + -e '/^ *$/d' \ + -e 's@ $@@' \ + -e 's@ *" *@ " @g' \ + -e 's@" \([^"]*\) "@"\1"@g' \ + | tr -d '\r' \ + | sort | uniq +} + +############################################################################### +# dvips2dvipdfm() +# reads from stdin, writes to stdout. It transforms "dvips"-like syntax into +# "dvipdfm"-like syntax. It is a very ugly hack. +############################################################################### +dvips2dvipdfm() +{ + sed -e 's@$@ %@' \ + -e 's@^\(\([^ ]*\).*\)@\1\2@' \ + -e 's@\(.*<\[* *\([^ ]*\)\.enc\(.*\)\)@\1 \2@' \ + -e '/%[^ ]*$/s@$@ default@' \ + -e 's@\(.*<<* *\([^ ]*\)\.pf[ab].*\)@\1 \2@' \ + -e '/%[^ ]* [^ ]*$/s@\( \([^ ]*\).*\)$@\1 \2@' \ + -e 's@\(.*[" ]\([.0-9-][.0-9-]*\) *ExtendFont.*\)@\1 -e \2@' \ + -e 's@\(.*[" ]\([.0-9-][.0-9-]*\) *SlantFont.*\)@\1 -s \2@' \ + -e 's@.*%@@' | + awk '$1 == $3 && $2 == "default" {$2=""; $3=""} {print}' > $tmp8 + + egrep '^(cm|eu|la|lc|line|msam|xy)' $tmp8 \ + | sed 's@$@ -r@; s@\(fmex[789]\) -r$@\1@' + egrep -v '^(cm|eu|la|lc|line|msam|xy)' $tmp8 +} + + +############################################################################### +# mkMaps() +# the main task of this script: create the output files +############################################################################### +mkMaps() +{ + newline=' +' + mode=`cfgval LW35` + dvipsPreferOutline=`cfgval dvipsPreferOutline` + dvipsDownloadBase35=`cfgval dvipsDownloadBase35` + pdftexDownloadBase14=`cfgval pdftexDownloadBase14` + dvipdfmDownloadBase14=`cfgval dvipdfmDownloadBase14` + + # defaults + test -z "$mode" && mode=URWkb + test -z "$dvipsPreferOutline" && dvipsPreferOutline=true + test -z "$dvipsDownloadBase35" && dvipsDownloadBase35=false + test -z "$pdftexDownloadBase14" && pdftexDownloadBase14=false + test -z "$dvipdfmDownloadBase14" && dvipdfmDownloadBase14=false + + outputFiles="$dvipsoutputdir/download35.map +$dvipsoutputdir/builtin35.map +$dvipsoutputdir/psfonts_t1.map +$dvipsoutputdir/psfonts_pk.map +$pdftexoutputdir/pdftex_dl14.map +$pdftexoutputdir/pdftex_ndl14.map +$dvipdfmoutputdir/dvipdfm_dl14.map +$dvipdfmoutputdir/dvipdfm_ndl14.map +$dvipsoutputdir/ps2pk.map" + + outputLinks="$dvipsoutputdir/psfonts.map +$pdftexoutputdir/pdftex.map +$dvipdfmoutputdir/dvipdfm.map" + + allOutput="$outputFiles +$outputLinks" + + notfound=false + OLDIFS=$IFS; IFS=$newline + for o in $allOutput; do + test -f "$o" || notfound=true + done + IFS=$OLDIFS + $notfound || texhashEnabled=false + + verboseCat <<-eof + updmap is creating new map files using the following configuration: + + config file: \`$cnfFile' + dvips output directory: \`$dvipsoutputdir' + pdftex output directory: \`$pdftexoutputdir' + dvipdfm output directory: \`$dvipdfmoutputdir' + + prefer outlines: \`$dvipsPreferOutline' + texhash enabled: \`$texhashEnabled' + download standard fonts (dvips): \`$dvipsDownloadBase35' + download standard fonts (pdftex): \`$pdftexDownloadBase14' + download standard fonts (dvipdfm): \`$dvipdfmDownloadBase14' +eof + + verboseMsg + verboseMsg "$progname: scanning for LW35 support files" + dvips35=`locateMap dvips35.map` || cleanup 1 + pdftex35=`locateMap pdftex35.map` || cleanup 1 + dvipdfm35=`locateMap dvipdfm35.map` || cleanup 1 + ps2pk35=`locateMap ps2pk35.map` || cleanup 1 + + if $chicken_mode; then + echo + echo "$progname: chicken mode, skipping all output generation, goodbye." + exit 0 + fi + + verboseMsg + verboseMsg "$progname: Scanning for MixedMap entries:" + catMaps '^MixedMap' > $tmp1 || cleanup 1 + + verboseMsg + verboseMsg "$progname: Scanning for Map entries:" + catMaps '^Map' > $tmp2 || cleanup 1 + verboseMsg + + # files should be world-readable + umask 022 + + OLDIFS=$IFS; IFS=$newline + for file in $allOutput; do + rm -f "$file" + cat > "$file" <<-eof + % $file: maintained by the script updmap. + % Don't change this file directly. Edit texmf/web2c/$cnfFileShort + % and run updmap to recreate this file. +eof + if test -n "$log"; then + cat >> "$file" <<-eof + % A log of the updmap run that has created this file is available here: + % $log +eof + fi + done + IFS=$OLDIFS + + verboseMsg "$progname: Generating output for ps2pk..." + { transLW35 "$ps2pk35"; cat $tmp1 $tmp2; } \ + | normalizeLines >> "$dvipsoutputdir/ps2pk.map" + + verboseMsg "$progname: Generating output for dvips..." + { transLW35 "$ps2pk35"; } \ + | normalizeLines >> "$dvipsoutputdir/download35.map" + { transLW35 "$dvips35"; } \ + | normalizeLines >> "$dvipsoutputdir/builtin35.map" + + if test "x$dvipsDownloadBase35" = xtrue; then + dftdvips=$ps2pk35 + else + dftdvips=$dvips35 + fi + { transLW35 "$dftdvips"; cat $tmp1 $tmp2; } \ + | normalizeLines >> "$dvipsoutputdir/psfonts_t1.map" + { transLW35 "$dftdvips"; cat $tmp2; } \ + | normalizeLines >> "$dvipsoutputdir/psfonts_pk.map" + + verboseMsg "$progname: Generating output for pdftex..." + # remove PaintType due to Sebastian's request + { transLW35 "$pdftex35"; cat $tmp1 $tmp2; } \ + | grep -v PaintType | grep . > $tmp3 + { transLW35 "$dvipdfm35"; cat $tmp1 $tmp2; } \ + | grep -v PaintType | grep . > $tmp6 + { transLW35 "$ps2pk35"; cat $tmp1 $tmp2; } \ + | grep -v PaintType | grep . > $tmp7 + + <$tmp3 normalizeLines >> "$pdftexoutputdir/pdftex_ndl14.map" + <$tmp7 normalizeLines >> "$pdftexoutputdir/pdftex_dl14.map" + + verboseMsg "$progname: Generating output for dvipdfm..." + <$tmp7 normalizeLines | dvips2dvipdfm | normalizeLines >> "$dvipdfmoutputdir/dvipdfm_dl14.map" + <$tmp6 normalizeLines | dvips2dvipdfm | normalizeLines >> "$dvipdfmoutputdir/dvipdfm_ndl14.map" + verboseMsg "$progname: All output generated." + verboseMsg + + setupSymlinks + $texhashEnabled && { $verbose && texhash || texhash >/dev/null 2>&1; } + + verboseMsg + verboseMsg "$progname: Files generated:" + OLDIFS=$IFS; IFS=$newline + ls -l $outputFiles | verboseCat + IFS=$OLDIFS + verboseMsg + + verboseMsg "$progname: Map file links or copies:" + ls -l "$dvipsoutputdir"/psfonts.map \ + "$pdftexoutputdir"/pdftex.map \ + "$dvipdfmoutputdir"/dvipdfm.map | verboseCat + + if test -f $mapWarnCalled; then + m=" + +!!! NOTICE: + + With this release, the search paths for map files have been changed + and we have found that some files exist in the new path as well as + in the obsolete path. + + This is not an error per se, but please consider removing duplicates + from the old location and search the above output" + + test -n "$log" && m="$m or the transcript file + $log + " + + m="$m for warnings. + + For more information about the changed search paths, see + the release notes section in the teTeX manual. You probably + can read this document by executing the command + texdoc TETEXDOC + else visit the web page + http://tug.org/texlive/mapenc.html +" + warn "$m" + fi + + verboseMsg + verboseMsg "$progname: Done." + return 0 +} + +############################################################################### +# main() +# execution starts here +############################################################################### +main() +{ + # initialize global variables + progname=updmap + cmd= + log= + chicken_mode=false + link_cmd="ln -s" + + cfgparam= + outputdirparam= + cfgmaint= + texhashEnabled=true + mkmapEnabled=true + verbose=true + needsCleanup=false + + cnfFileShort=updmap.cfg + cnfFile= + dvipsoutputdir=; pdftexoutputdir=; dvipdfmoutputdir= + : ${TEXMFMAIN=`kpsewhich -var-value=TEXMFMAIN`} + + tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$ + tmp1=$tmpdir/a + tmp2=$tmpdir/b + tmp3=$tmpdir/c + tmp4=$tmpdir/d + tmp5=$tmpdir/e + tmp6=$tmpdir/f + tmp7=$tmpdir/g + tmp8=$tmpdir/h + mapWarnCalled=$tmpdir/mapWarnCalled + catMapsFailed=$tmpdir/catMapsFailed + + processOptions ${1+"$@"} + + case "$cmd" in + showoptions) showOptions "$showoptionsItem"; (exit 0); exit;; + help) help; (exit 0); exit;; + esac + + setupCfgFile + case "$cmd" in + listmaps) listMaps; (exit 0); exit;; + listavailablemaps) listAvailableMaps; (exit 0); exit;; + esac + + # keep a copy of config file, so that we can see if the file was modified + setupTmpDir + + if test -n "$cfgmaint"; then + if test -z "$cfgparam"; then + co=`"$TEXMFMAIN/texconfig/tcfmgr" --tmp $tmpdir --cmd co --file $cnfFileShort` + test $? = 0 || cleanup 1 + set x $co; shift + id=$1; cnfFile=$3; orig=$4 + verboseMsg "$progname: initial config file is \`$orig'" + else + verboseMsg "$progname: config file is \`$cnfFile'" + cp "$cnfFile" $tmp5 + fi + + case "$cmd" in + edit) + ${VISUAL-${EDITOR-vi}} "$cnfFile";; + setoption) + setOption "$setoptionOpt" "$setoptionVal";; + enable) + enableMap "$enableMapType" "$enableMapFile";; + disable) + disableMap "$disableMapFile";; + syncwithtrees) + syncWithTrees;; + esac + + unchanged=true + if test -z "$cfgparam"; then + ci=`"$TEXMFMAIN/texconfig/tcfmgr" --tmp $tmpdir --cmd ci --id $id` + test $? = 0 || cleanup 1 + case "$ci" in + "") : ;; + *) unchanged=false + cnfFile=$ci + ;; + esac + else + cmp "$cnfFile" $tmp5 >/dev/null 2>&1 || unchanged=false + fi + case $unchanged in + true) if $mkmapEnabled; then + verboseMsg "$progname: configuration (updmap.cfg) unchanged. Map files will not be recreated." + mkmapEnabled=false + else + verboseMsg "$progname: configuration (updmap.cfg) unchanged." + fi;; + *) + verboseMsg "$progname: configuration file updated: \`$cnfFile'";; + esac + fi + + $mkmapEnabled || return + setupDestDir + mkMaps +} + +main ${1+"$@"} +cleanup 0 diff --git a/Master/bin/i386-solaris/updmap-sys b/Master/bin/i386-solaris/updmap-sys new file mode 100755 index 00000000000..6f3c8365658 --- /dev/null +++ b/Master/bin/i386-solaris/updmap-sys @@ -0,0 +1,30 @@ +#!/bin/sh + +# updmap-sys: Thomas Esser, public domain. + +# wrapper script for updmap with TEXMFVAR and TEXMFCONFIG set to +# TEXMFSYSVAR / TEXMFSYSCONFIG + +test -f /bin/ksh && test -z "$RUNNING_KSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; } +unset RUNNING_KSH + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +export PATH + +# hack around a bug in zsh: +test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' + +v=`kpsewhich -var-value TEXMFSYSVAR` +c=`kpsewhich -var-value TEXMFSYSCONFIG` + +TEXMFVAR="$v" +TEXMFCONFIG="$c" +export TEXMFVAR TEXMFCONFIG + +exec updmap ${1+"$@"} diff --git a/Master/bin/i386-solaris/utf8mex b/Master/bin/i386-solaris/utf8mex new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/utf8mex @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/vftovp b/Master/bin/i386-solaris/vftovp Binary files differnew file mode 100755 index 00000000000..e5904856df4 --- /dev/null +++ b/Master/bin/i386-solaris/vftovp diff --git a/Master/bin/i386-solaris/vpe b/Master/bin/i386-solaris/vpe new file mode 120000 index 00000000000..ed1727b6ff8 --- /dev/null +++ b/Master/bin/i386-solaris/vpe @@ -0,0 +1 @@ +../../texmf-dist/scripts/vpe/vpe.pl
\ No newline at end of file diff --git a/Master/bin/i386-solaris/vptovf b/Master/bin/i386-solaris/vptovf Binary files differnew file mode 100755 index 00000000000..f905beefed0 --- /dev/null +++ b/Master/bin/i386-solaris/vptovf diff --git a/Master/bin/i386-solaris/weave b/Master/bin/i386-solaris/weave Binary files differnew file mode 100755 index 00000000000..35bd7fe2744 --- /dev/null +++ b/Master/bin/i386-solaris/weave diff --git a/Master/bin/i386-solaris/wordcount.sh b/Master/bin/i386-solaris/wordcount.sh new file mode 100755 index 00000000000..91252791a53 --- /dev/null +++ b/Master/bin/i386-solaris/wordcount.sh @@ -0,0 +1,72 @@ +#!/bin/sh +# wordcount.sh 1.2 Copyright 2000/02/21 Michael John Downes +# This script has no restrictions on its use, distribution, or sale. +# +# This is a Unix Bourne shell script that counts the characters and +# spaces in a LaTeX document by running it through LaTeX using +# wordcount.tex, and then counting the lines in the resulting +# wordcount.log file that match a special pattern. It assumes that you +# have a program "grep" with a -c option meaning "Report the number of +# matching lines". To use perl or some other tool instead of grep, +# redefine $COUNT in some suitable way, below. +# +# The characters that are counted with this method are actual font +# characters in the page body (excluding running heads): in math, each +# subscript and superscript character is counted separately, even when +# they appear one over the other; and so are the separate combining +# pieces used to make large delimiters. Interword spaces are counted as +# separate characters, and so are the spaces around mathrel symbols in +# math formulas (equal signs and the like)---but not the spaces around +# mathbin symbols (plus, minus, and the like). +# +# You can count words by dividing the character count by 5 (or +# whatever), or by counting the occurrences of interword spaces. The +# latter method (illustrated here) is highly accurate at counting the +# actual number of words---until tables or math formulas enter the +# picture. In the case of tables, the number of words will tend to be +# overestimated because tabskip glue, counted as an interword space, +# appears on both sides of each table cell. (Not counting the tabskip +# glue at all would result in an underestimate, and the underestimate +# would tend to be slightly less accurate than the overestimate that we +# have chosen to do.) +# +# And of course, in the case of math formulas, how do you define what is +# a "word"? + +SCRIPT=`basename $0` +LOGFILE=wordcount.log +COUNT="grep -c" +LATEX=latex + +die () { + echo "$@ was apparently unsuccessful." + exit 1 +} + +no_files_msg () { + echo "$SCRIPT: At least one file name must be supplied" \ + "on the command line." + exit 1 +} + +case X$1 in + X) no_files_msg ;; + *) : ;; +esac + +for f in "$@" +do + # Since \? is not defined by LaTeX itself, this use via \csname causes + # it to be defined as \relax, and it then serves as a filename + # terminator. And within wordcount.tex if \? is found to be no longer + # undefined, certain messages are suppressed. + echo "$f" | $LATEX 'wordcount.tex\csname ?\endcsname' || die "LaTeX run" + # Count interword spaces and end-of-paragraph spaces + words=`$COUNT '3[.]0863[35]' $LOGFILE` || die "Log search" + # Count nonspace characters and interword spaces + chars=`$COUNT '3[.]0863[23]' $LOGFILE` || die "Log search" + # If you want to see what the log file looks like, comment out the + # following line: + rm $LOGFILE + echo "$f contains $chars characters and $words words." +done diff --git a/Master/bin/i386-solaris/xbb b/Master/bin/i386-solaris/xbb Binary files differnew file mode 100755 index 00000000000..42d9de1510b --- /dev/null +++ b/Master/bin/i386-solaris/xbb diff --git a/Master/bin/i386-solaris/xdvi b/Master/bin/i386-solaris/xdvi new file mode 100755 index 00000000000..679b3f05aa7 --- /dev/null +++ b/Master/bin/i386-solaris/xdvi @@ -0,0 +1,46 @@ +#!/bin/sh + +# This is the xdvi wrapper script for teTeX, version 0.2. +# Copyright Thomas Esser, 1998. Permission to distribute under the terms +# of the GNU general public license version 2 or later. + +# This script sets some environment variables to make sure that xdvi's +# resource file in $XDVIINPUTS/xdvi is read by xdvi.bin. + +test -f /bin/sh5 && test -z "$RUNNING_SH5" \ + && test x"`(uname -s) 2>&1`" = xULTRIX \ + && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; } +RUNNING_SH5= + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && test x"`(uname -s) 2>&1`" = xAIX \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +RUNNING_BSH= + +# -help and -version only work if they are the only options. Therefore, +# we cannot give the "-name xdvi" parameter in that case. +# SU: Actually, with current xdvik, they should work in any position; but +# we may keep this for compatibility with older versions and non-k xdvi. +case "$#:$1" in + 1:-help|1:-version) + NAMEOPT=;; + *) + NAMEOPT='-name xdvi';; +esac + +xdviappfile=`kpsewhich -progname=xdvi --format='other text files' XDvi` +if test -n "$xdviappfile"; then + xdviappdir=`dirname "$xdviappfile"` + xdviapppath="${xdviappdir}/%l_%t/%N:${xdviappdir}/%N" + + # For R3, we have to set XAPPLRESDIR. + ### SU: removed, xdvik won't work with R3 anyway, and XAPPLRESDIR is + ### for user customizations in current X + ### XAPPLRESDIR="$xdviappdir"; export XAPPLRESDIR + + # For R4 or later, we have to set XFILESEARCHPATH, since XAPPLRESDIR might + # be ignored (if XUSERFILESEARCHPATH is set) + XFILESEARCHPATH="$xdviapppath:${XFILESEARCHPATH-%D}"; export XFILESEARCHPATH +fi + +exec xdvi-xaw.bin $NAMEOPT ${1+"$@"} diff --git a/Master/bin/i386-solaris/xdvi-xaw.bin b/Master/bin/i386-solaris/xdvi-xaw.bin Binary files differnew file mode 100755 index 00000000000..6dffee88e77 --- /dev/null +++ b/Master/bin/i386-solaris/xdvi-xaw.bin diff --git a/Master/bin/i386-solaris/xdvipdfmx b/Master/bin/i386-solaris/xdvipdfmx Binary files differnew file mode 100755 index 00000000000..d1d5325b4c0 --- /dev/null +++ b/Master/bin/i386-solaris/xdvipdfmx diff --git a/Master/bin/i386-solaris/xelatex b/Master/bin/i386-solaris/xelatex new file mode 120000 index 00000000000..ef9fe406fd6 --- /dev/null +++ b/Master/bin/i386-solaris/xelatex @@ -0,0 +1 @@ +xetex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/xetex b/Master/bin/i386-solaris/xetex Binary files differnew file mode 100755 index 00000000000..d1e274ce213 --- /dev/null +++ b/Master/bin/i386-solaris/xetex diff --git a/Master/bin/i386-solaris/xmltex b/Master/bin/i386-solaris/xmltex new file mode 120000 index 00000000000..f68cc91498e --- /dev/null +++ b/Master/bin/i386-solaris/xmltex @@ -0,0 +1 @@ +pdftex
\ No newline at end of file diff --git a/Master/bin/i386-solaris/xmltools b/Master/bin/i386-solaris/xmltools new file mode 100755 index 00000000000..03086d0436b --- /dev/null +++ b/Master/bin/i386-solaris/xmltools @@ -0,0 +1,2 @@ +#!/bin/sh +texmfstart xmltools.rb "$@" |