summaryrefslogtreecommitdiff
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
parentb9247c163236be845cd95e06e122d2761686a59d (diff)
texdoctk warn if no tk, avoid tdcolors warning
git-svn-id: svn://tug.org/texlive/trunk@50582 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/utils/texdoctk/ChangeLog6
-rwxr-xr-xBuild/source/utils/texdoctk/texdoctk.pl21
-rwxr-xr-xMaster/texmf-dist/scripts/texdoctk/texdoctk.pl21
-rw-r--r--Master/texmf-dist/texdoctk/texdocrc-win32.defaults4
-rw-r--r--Master/texmf-dist/texdoctk/texdocrc.defaults4
5 files changed, 50 insertions, 6 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) {
diff --git a/Master/texmf-dist/scripts/texdoctk/texdoctk.pl b/Master/texmf-dist/scripts/texdoctk/texdoctk.pl
index ac8430b358f..45a0cf7e640 100755
--- a/Master/texmf-dist/scripts/texdoctk/texdoctk.pl
+++ b/Master/texmf-dist/scripts/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) {
diff --git a/Master/texmf-dist/texdoctk/texdocrc-win32.defaults b/Master/texmf-dist/texdoctk/texdocrc-win32.defaults
index d524ae99791..3f1aabb8349 100644
--- a/Master/texmf-dist/texdoctk/texdocrc-win32.defaults
+++ b/Master/texmf-dist/texdoctk/texdocrc-win32.defaults
@@ -51,4 +51,8 @@ TXTPS_REDIR=yes
PRINT_CMD=lpr
PRINT_OPTS=-h -Plp
+# button colours: default and active back-/foreground
+# names and RGB values are both allowed; use the form #xxxxxx for RGB
+TDCOLORS=#d9d9d9 Black #ececec red
+
# end of config
diff --git a/Master/texmf-dist/texdoctk/texdocrc.defaults b/Master/texmf-dist/texdoctk/texdocrc.defaults
index d524ae99791..3f1aabb8349 100644
--- a/Master/texmf-dist/texdoctk/texdocrc.defaults
+++ b/Master/texmf-dist/texdoctk/texdocrc.defaults
@@ -51,4 +51,8 @@ TXTPS_REDIR=yes
PRINT_CMD=lpr
PRINT_OPTS=-h -Plp
+# button colours: default and active back-/foreground
+# names and RGB values are both allowed; use the form #xxxxxx for RGB
+TDCOLORS=#d9d9d9 Black #ececec red
+
# end of config