[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[texlive-nonbin] 01/03: texdoctk: warn on missing perl-tk (Closes: #622403)



This is an automated email from the git hooks/post-receive script.

preining pushed a commit to branch master
in repository texlive-nonbin.

commit 2f27d0602bca298687db6b00a42be02374e0bcb9
Author: Norbert Preining <preining@debian.org>
Date:   Tue Jul 25 10:00:42 2017 +0900

    texdoctk: warn on missing perl-tk (Closes: #622403)
---
 texlive-base/debian/changelog                      |  6 +++
 texlive-base/debian/patches/series                 |  1 +
 .../debian/patches/texdoctk-warn-missing-perltk    | 53 ++++++++++++++++++++++
 3 files changed, 60 insertions(+)

diff --git a/texlive-base/debian/changelog b/texlive-base/debian/changelog
index a6aa33b..ccb10db 100644
--- a/texlive-base/debian/changelog
+++ b/texlive-base/debian/changelog
@@ -1,3 +1,9 @@
+texlive-base (2017.20170724-2) UNRELEASED; urgency=medium
+
+  * texdoctk: warn on missing perl-tk (Closes: #622403)
+
+ -- Norbert Preining <preining@debian.org>  Tue, 25 Jul 2017 10:00:04 +0900
+
 texlive-base (2017.20170724-1) unstable; urgency=medium
 
   * new upstream checkout
diff --git a/texlive-base/debian/patches/series b/texlive-base/debian/patches/series
index 18ca4be..316e60d 100644
--- a/texlive-base/debian/patches/series
+++ b/texlive-base/debian/patches/series
@@ -28,3 +28,4 @@ mptopdf-manpage-fixes
 pgf-tex4ht-fix
 texdoctk-colors
 oberdiek-fix-boxdraw
+texdoctk-warn-missing-perltk
diff --git a/texlive-base/debian/patches/texdoctk-warn-missing-perltk b/texlive-base/debian/patches/texdoctk-warn-missing-perltk
new file mode 100644
index 0000000..8dd9d82
--- /dev/null
+++ b/texlive-base/debian/patches/texdoctk-warn-missing-perltk
@@ -0,0 +1,53 @@
+---
+ texmf-dist/scripts/texdoctk/texdoctk.pl |   19 ++++++++++++++++---
+ 1 file changed, 16 insertions(+), 3 deletions(-)
+
+--- texlive-base-2017.20170724.orig/texmf-dist/scripts/texdoctk/texdoctk.pl
++++ texlive-base-2017.20170724/texmf-dist/scripts/texdoctk/texdoctk.pl
+@@ -12,7 +12,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 +29,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 +268,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 +1767,7 @@
+ 				-width=>$msgwidth)->pack(-side=>'top');
+     $message->insert('end',$msg);
+     $message->configure(-state=>'disabled');
+-    MainLoop;
++    MainLoop();
+ }
+ 
+ if ($IsWin32) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-tex/texlive-nonbin.git


Reply to: