File source-texdoc.dif of Package texlive

--- texk/tetex/texdoc
+++ texk/tetex/texdoc	2007-11-23 14:28:27.263062770 +0100
@@ -32,7 +32,7 @@ export PATH
 
 needsCleanup=false
 progname=texdoc
-tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$
+tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.XXXXXXXXXX
 
 ###############################################################################
 # setupTmpDir()
@@ -44,7 +44,8 @@ setupTmpDir()
 
   trap 'cleanup --force' 1 2 3 7 13 15
   needsCleanup=true
-  mkdir "$tmpdir" || abort "could not create directory \`$tmpdir'"
+  tmpdir=$(mkdir "$tmpdir") || abort "could not create directory \`$tmpdir'"
+  TMPDIR=$tmpdir; export TMPDIR
 }
 
 ###############################################################################
@@ -94,14 +95,29 @@ case `(uname -s) 2>/dev/null` in
 	: ${TEXDOCVIEW_dvi='(xdvi %s) &'}
 	: ${TEXDOCVIEW_pdf='(acroread %s) &'}
 	: ${TEXDOCVIEW_ps='(gv %s) &'}
-	: ${TEXDOCVIEW_html='mozilla -remote openURL'"'(%s)'"' 2>/dev/null || mozilla %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'
+	if test -z ${TEXDOCVIEW_html} ; then
+	    for prog in firefox mozilla konqueror opera amaya netscape mosaic; do
+		if html=$(type -p ${prog}) ; then
+		    case "${html##*/}" in
+		    mozilla|firefox|netscape)
+			TEXDOCVIEW_html='(exec '${html}' -remote '"'openURL(%s)'"' 2>/dev/null || exec '${html}' %s) &' ;;
+		    *)
+			TEXDOCVIEW_html='exec '${html}' %s &' ;;
+		    esac
+		    break
+		fi
+	    done
+	fi
+	: ${TEXDOCVIEW_html='exec lynx %s &'}
+	: ${TEXDOCVIEW_txt="${PAGER-less} %s"}
+	: ${TEXDOCVIEW_="${PAGER-less} %s"} # no extension, default to pager
+        extlist="`kpsewhich --expand-brace='$TEXDOCEXT' 2>/dev/null | tr : ' '`"
 
         # Commands run to uncompress files, according to filename extension.
-        : ${TEXDOCUNZIP_gz='gzip -d -c'}
-        : ${TEXDOCUNZIP_bz2='bzip2 -d -c'}
+	: ${TEXDOCUNZIP_gz='gzip -d -c'}
+	: ${TEXDOCUNZIP_bz2='bzip2 -d -c'}
+	: ${TEXDOCUNZIP_zip='unzip -p'}
+	: ${TEXDOCUNZIP_Z='uncompress -d -c'}
 	;;
 esac
 
@@ -201,6 +217,7 @@ do
   $found || echo "Can't find documentation for \`$name'" 1>&2
 done
 
+sleep 2
 cleanup
 (exit 0)
 exit 0
--- texk/tetex/texdoctk
+++ texk/tetex/texdoctk	2007-11-23 14:23:03.969899108 +0100
@@ -1396,7 +1396,7 @@ sub writerc {
     mv $myrc,"$myrc.save" if (-e $myrc);
     open(MYRC,">$myrc");
     print MYRC "# user's .texdocrc, generated by program\n
-# root of user's doc directory (from \$HOMETEXMF)
+# root of user's doc directory (from \$TEXMFHOME)
 # can be left empty if \$TEXMFHOME is undefined
 HOMEDOCPATH=$homedocpath_tmp
 # general viewer behaviour (y or yes to make active)
@@ -1559,9 +1559,9 @@ sub readrc {
 	  $localdocpath="$texmflocal/$localdocpath";
 	}
     }
-#   find user's $HOMETEXMF/doc, if there is one
+#   find user's $TEXMFHOME/doc, if there is one
     if ($icall == 2 || $pathflagh == 1) {
-        $texmfhome=`kpsewhich --expand-path=${qq}\$HOMETEXMF${qq}`;
+        $texmfhome=`kpsewhich --expand-path=${qq}\$TEXMFHOME${qq}`;
 	chomp $texmfhome;
 	if (length $texmfhome) {
 	  # if HOMEDOCPATH is not explicitly defined, it equals TEXDOCPATH
openSUSE Build Service is sponsored by