texlive[50582] trunk: texdoctk warn if no tk, avoid tdcolors warning
commits+karl at tug.org
commits+karl at tug.org
Mon Mar 25 18:26:20 CET 2019
Revision: 50582
http://tug.org/svn/texlive?view=revision&revision=50582
Author: karl
Date: 2019-03-25 18:26:20 +0100 (Mon, 25 Mar 2019)
Log Message:
-----------
texdoctk warn if no tk, avoid tdcolors warning
Modified Paths:
--------------
trunk/Build/source/utils/texdoctk/ChangeLog
trunk/Build/source/utils/texdoctk/texdoctk.pl
trunk/Master/texmf-dist/scripts/texdoctk/texdoctk.pl
trunk/Master/texmf-dist/texdoctk/texdocrc-win32.defaults
trunk/Master/texmf-dist/texdoctk/texdocrc.defaults
Modified: trunk/Build/source/utils/texdoctk/ChangeLog
===================================================================
--- trunk/Build/source/utils/texdoctk/ChangeLog 2019-03-25 17:26:13 UTC (rev 50581)
+++ trunk/Build/source/utils/texdoctk/ChangeLog 2019-03-25 17:26:20 UTC (rev 50582)
@@ -1,3 +1,9 @@
+2019-03-25 Karl Berry <karl at 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 at mppmu.mpg.de>
* Makefile.am: Drop the obsolete ACLOCAL_AMFLAGS.
Modified: trunk/Build/source/utils/texdoctk/texdoctk.pl
===================================================================
--- trunk/Build/source/utils/texdoctk/texdoctk.pl 2019-03-25 17:26:13 UTC (rev 50581)
+++ trunk/Build/source/utils/texdoctk/texdoctk.pl 2019-03-25 17:26:20 UTC (rev 50582)
@@ -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 at 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 @@
# ));
}
+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 @@
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 @@
-width=>$msgwidth)->pack(-side=>'top');
$message->insert('end',$msg);
$message->configure(-state=>'disabled');
- MainLoop;
+ MainLoop();
}
if ($IsWin32) {
Modified: trunk/Master/texmf-dist/scripts/texdoctk/texdoctk.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texdoctk/texdoctk.pl 2019-03-25 17:26:13 UTC (rev 50581)
+++ trunk/Master/texmf-dist/scripts/texdoctk/texdoctk.pl 2019-03-25 17:26:20 UTC (rev 50582)
@@ -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 at 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 @@
# ));
}
+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 @@
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 @@
-width=>$msgwidth)->pack(-side=>'top');
$message->insert('end',$msg);
$message->configure(-state=>'disabled');
- MainLoop;
+ MainLoop();
}
if ($IsWin32) {
Modified: trunk/Master/texmf-dist/texdoctk/texdocrc-win32.defaults
===================================================================
--- trunk/Master/texmf-dist/texdoctk/texdocrc-win32.defaults 2019-03-25 17:26:13 UTC (rev 50581)
+++ trunk/Master/texmf-dist/texdoctk/texdocrc-win32.defaults 2019-03-25 17:26:20 UTC (rev 50582)
@@ -51,4 +51,8 @@
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
Modified: trunk/Master/texmf-dist/texdoctk/texdocrc.defaults
===================================================================
--- trunk/Master/texmf-dist/texdoctk/texdocrc.defaults 2019-03-25 17:26:13 UTC (rev 50581)
+++ trunk/Master/texmf-dist/texdoctk/texdocrc.defaults 2019-03-25 17:26:20 UTC (rev 50582)
@@ -51,4 +51,8 @@
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
More information about the tex-live-commits
mailing list