[tex-live] late fixes, I guess everyone will kill me ...

Norbert Preining preining at logic.at
Mon Jan 22 10:32:51 CET 2007


Hi all!

I found 2 patches in the debian dirs which might be of interest:

The first one is for mktexmf from Werner Lemberg, I found it here on the
list I guess

--- ./build/TeX/texk/kpathsea/mktexmf	2005-08-05 09:38:13.000000000 +0200
+++ ./build/TeX/texk/kpathsea/mktexmf	2005-12-27 11:08:23.767340672 +0100
@@ -36,17 +36,20 @@
   rootfile=$sauterroot
   rootname=b-$rootname
 else
-  case $rootname in
+  case $name in
     # csso12[0-5][0-9] from CJK package; unsupported by mktexmf
     csso12[0-5][0-9])
-       rootfile=;;
-    cs*|lcsss*|icscsc*|icstt*|ilcsss*)
-       rootfile=`kpsewhich cscode.mf`;;
-    wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*)
-       lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'`
-       rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;;
+      rootfile=;;
     *)
-       rootfile=`kpsewhich $rootname.mf 2>/dev/null`;;
+      case $rootname in
+        cs*|lcsss*|icscsc*|icstt*|ilcsss*)
+          rootfile=`kpsewhich cscode.mf`;;
+        wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*)
+          lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'`
+          rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;;
+        *)
+          rootfile=`kpsewhich $rootname.mf 2>/dev/null`;;
+      esac;;
   esac
 fi
 { test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1


The second one is a bit a bitter one: dvipdfm crashes in half-hour time
zones. The following patch was included upstream ...
## 61_dvipdfm_timezone.dpatch by "Mark A. Wicks" <mwicks at kettering.edu>
## DP: fix crash of dvipdfm with 0.5 timezones
--- ./build/TeX/texk/dvipdfm/pdfdoc.c.orig	2003-01-28 00:18:05.000000000 +0100
+++ ./build/TeX/texk/dvipdfm/pdfdoc.c	2007-01-04 00:43:19.000000000 +0100
@@ -232,13 +232,7 @@
 
 static char *asn_date (void)
 {
-#ifndef HAVE_TIMEZONE
-  #ifdef TM_GM_TOFF
-     #define timezone (bdtime->gm_toff)
-  #else
-     #define timezone 0l
-#endif /* TM_GM_TOFF */
-#endif /* HAVE_TIMEZONE */
+  long tz_offset;
   static char date_string[24];
   time_t current_time;
   struct tm *bd_time;
@@ -247,10 +241,28 @@
   }
   time(&current_time);
   bd_time = localtime(&current_time);
-  sprintf (date_string, "D:%04d%02d%02d%02d%02d%02d%+03ld'%02ld'",
-	   bd_time -> tm_year+1900, bd_time -> tm_mon+1, bd_time -> tm_mday,
-	   bd_time -> tm_hour, bd_time -> tm_min, bd_time -> tm_sec,
-	   -timezone/3600, timezone%3600);
+
+#ifdef HAVE_TM_GMTOFF  /* Preferred way to get time zone offset */
+  tz_offset = bd_time->tm_gmtoff;
+#else
+#ifdef HAVE_TIMEZONE   /* Plan B --- use external variable 'timezone'
+                       /* (may not provide correct offset for daylight savings time) */
+  tz_offset = - timezone;
+#else                  /* Last resort --- without more information, set offset to zero */
+  tz_offset = 0l;
+#endif /* HAVE_TIMEZONE */
+#endif /* HAVE_TM_GMTOFF */
+
+  if (tz_offset == 0l) {
+    sprintf (date_string, "D:%04d%02d%02d%02d%02d%02dZ00'00'",
+	     bd_time -> tm_year+1900, bd_time -> tm_mon+1, bd_time -> tm_mday,
+	     bd_time -> tm_hour, bd_time -> tm_min, bd_time -> tm_sec);
+  } else {
+    sprintf (date_string, "D:%04d%02d%02d%02d%02d%02d%c%02ld'%02ld'",
+             bd_time -> tm_year+1900, bd_time -> tm_mon+1, bd_time -> tm_mday,
+             bd_time -> tm_hour, bd_time -> tm_min, bd_time -> tm_sec,
+	     (tz_offset>0)? '+':'-', abs(tz_offset)/3600, (abs(tz_offset)/60)%60);
+  }
   return date_string;
 }
 

I checked, both of them do still apply to the svn repository.

But I guess at least the second has to wait for next year.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining at logic.at>                    Università di Siena
Debian Developer <preining at debian.org>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
SADBERGE (n.)
A violent green shrub which is ground up, mixed with twigs and
gelatine and served with clonmult (q.v.) and buldoo (q.v.) in a
container referred to for no known reason as a 'relish tray'.
			--- Douglas Adams, The Meaning of Liff


More information about the tex-live mailing list