summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-03-25 17:26:20 +0000
committerKarl Berry <karl@freefriends.org>2019-03-25 17:26:20 +0000
commitd1d0786e8db8a79f6f6f7ef0e8e3bb9e7ee81486 (patch)
tree8003b5e664649a98771136842c2c182077f1c868 /Build
parentb9247c163236be845cd95e06e122d2761686a59d (diff)
texdoctk warn if no tk, avoid tdcolors warning
git-svn-id: svn://tug.org/texlive/trunk@50582 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/utils/texdoctk/ChangeLog6
-rwxr-xr-xBuild/source/utils/texdoctk/texdoctk.pl21
2 files changed, 24 insertions, 3 deletions
diff --git a/Build/source/utils/texdoctk/ChangeLog b/Build/source/utils/texdoctk/ChangeLog
index 6feac3fa494..66511bc5f73 100644
--- a/Build/source/utils/texdoctk/ChangeLog
+++ b/Build/source/utils/texdoctk/ChangeLog
@@ -1,3 +1,9 @@
+2019-03-25 Karl Berry <karl@tug.org>
+
+ * texdoctk.pl: warn if perltk not installed. From Debian.
+ * texdocrc.defaults,
+ * texdocrc-win32.defaults (TDCOLORS): define, Debian#835153.
+
2014-06-16 Peter Breitenlohner <peb@mppmu.mpg.de>
* Makefile.am: Drop the obsolete ACLOCAL_AMFLAGS.
diff --git a/Build/source/utils/texdoctk/texdoctk.pl b/Build/source/utils/texdoctk/texdoctk.pl
index ac8430b358f..45a0cf7e640 100755
--- a/Build/source/utils/texdoctk/texdoctk.pl
+++ b/Build/source/utils/texdoctk/texdoctk.pl
@@ -4,6 +4,8 @@
# Copyright (C) 2000-2004 Thomas Ruedas
# Updated in 2010 by Manuel Pegourie-Gonnard
# Trivial non-code updates in 2012 by Karl Berry
+# Patch from Debian for "texdoctk-warn-missing-perltk" installed in 2019
+# by Karl Berry.
# (This program is looking for a maintainer, email tex-live@tug.org.)
#
# This program is provided under the GNU Public License; see the texdoctk
@@ -12,7 +14,6 @@
###############################################################################
my ($version, $date) = ("0.6.1", "2012-12-23");
use strict;
-use Tk;
use Getopt::Long;
Getopt::Long::config('bundling');
use File::Basename;
@@ -30,6 +31,20 @@ if ($IsWin32) {
# ));
}
+eval { require Tk; };
+if ($@) {
+ if (-x "/usr/bin/xmessage") {
+ `xmessage -center -buttons Quit "The program texdoctk needs the package perl-tk, please install it!"`;
+ } else {
+ printf STDERR "The program texdoctk needs the package perl-tk, please install it!\n";
+ }
+ exit(1);
+ # that didn't work out, so warn the user and continue with text mode
+} else {
+ Tk->import;
+}
+
+
# initialization of some internal variables
$|=1;
my $quiet=1;
@@ -255,7 +270,7 @@ if ($special == 0) {
for ($i=0,$j=5; $i<@catg; ++$i,++$j) {
$tlwins{'mainwindow'}{'buttons'}[$j]=$catg[$i];
}
-MainLoop;
+MainLoop();
########## SUBROUTINES ########################################################
# toplevel for selecting a topic of a category for viewing or printing
@@ -1754,7 +1769,7 @@ sub fatalmsg {
-width=>$msgwidth)->pack(-side=>'top');
$message->insert('end',$msg);
$message->configure(-state=>'disabled');
- MainLoop;
+ MainLoop();
}
if ($IsWin32) {