summaryrefslogtreecommitdiff
path: root/print/teTeX-bin/patches/patch-ap
blob: c558ffa708ffcea7b7d85626e26d1fa165e687e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
$NetBSD: patch-ap,v 1.5 2003/12/24 12:51:31 jmmv Exp $

--- texk/tetex/texconfig.orig	2003-03-01 10:13:18.000000000 +0100
+++ texk/tetex/texconfig
@@ -7,8 +7,6 @@
 # Thomas Esser, te@dbs.uni-hannover.de
 # Copyright: Thomas Esser, 1994, 1995, 1996, 1997, 1999, 2002. Public domain.
 
-# You may override DIALOG_TERMINFO and DIALOG_TERM in your environment.
-
 version=teTeX
 #version='TeX Live'
 
@@ -192,29 +190,11 @@ abort()
   cleanup
   exit 1
 }
-
-# Some systems have their own dialog. Use it then and do not use
-# faked TERM and TERMINFO variables when calling that dialog.
-find_dialogtype()
-{
-  { u=`uname -s`; } 2>/dev/null
-  case "$u" in
-    FreeBSD|Linux)
-      test -f /usr/bin/whiptail && DIALOG_PROG=/usr/bin/whiptail
-      test -f /usr/bin/dialog && DIALOG_PROG=/usr/bin/dialog
-      test -f /bin/dialog && DIALOG_PROG=/bin/dialog
-      ;;
-  esac
-}
  
 run_dialog()
 {
   test -z "$NO_CLEAR" && tty >/dev/null 2>&1 && clear;
-  if test -n "$DIALOG_PROG"; then
-    $DIALOG_PROG --title "$version setup utility" ${1+"$@"}
-  else
-    TERM=$DIALOG_TERM TERMINFO=$DIALOG_TERMINFO tcdialog --title "$version setup utility" ${1+"$@"}
-  fi
+  dialog --title "$version setup utility" "$@"
 }
 
 check_environ()
@@ -293,22 +273,6 @@ fonts_rw()
   echo "Done." >&2
 }
 
-check_terminal()
-{
-  terminfo=${DIALOG_TERMINFO-/usr/lib/terminfo}
-
-  test -f $terminfo/`echo $DIALOG_TERM | sed 's/\(.\).*/\1/'`/$DIALOG_TERM \
-    && return
-
-  cat >&2 <<eof
-TERM=$DIALOG_TERM is not supported by your terminfo system.
-See terminfo(5), tic(1m) and term(5) for help.
-
-$progname failed. Program aborted.
-eof
-  exit_return 1
-}
-
 fix_pager_more()
 {
   case "$PAGER" in
@@ -1454,7 +1418,7 @@ echo_file_location()
 do_print_setup()
 {
   echo '==================== binaries found by searching $PATH ==================='
-  echo_locate_binary tex etex dvipdfm pdftex omega mf mpost tcdialog dvips xdvi kpsewhich mktexpk mktextfm
+  echo_locate_binary tex etex dvipdfm pdftex omega mf mpost dialog dvips xdvi kpsewhich mktexpk mktextfm
   echo
   echo '=========================== Kpathsea variables ==========================='
   echo_show_variable TEXMF TEXMFMAIN VARTEXMF
@@ -1737,7 +1701,6 @@ esac
 needsCleanup=false
 find_echo
 find_fmt
-find_dialogtype
 check_environ
 require_binary kpsewhich pwd
 
@@ -1813,8 +1776,6 @@ test -z "$TC_DFT_UPDMAP_CFG" && TC_DFT_U
 
 # The fallback directory for private scripts and config files.
 : ${TEXMF=`kpsewhich -expand-var '$TEXMF'`}
-: ${DIALOG_TERMINFO=$TC_TEXMFMAIN/texconfig}
-: ${DIALOG_TERM=generic}
 
 formats=$TC_VARTEXMF/web2c
 xdvi_app_dir=$TC_VARTEXMF/xdvi
@@ -1955,7 +1916,7 @@ cd "$tmpdir" || exit_return 1
 EDIT=${VISUAL-${EDITOR-$std_editor}}
 PAGER=${PAGER-$std_pager}
 
-check_for_binary tcdialog >/dev/null || test -n "$DIALOG_PROG"
+check_for_binary dialog >/dev/null || test -n "$DIALOG_PROG"
 dialogok=$?
 
 # we have called some shellfunctions, so for HP-UX's shell, we need
@@ -1975,7 +1936,6 @@ fi
 # fmtutil --missing
 # texlinks --multiplatform
 
-check_terminal
 cat <<eof
 
 The interactive texconfig utility will be started now. Make sure your