[Debian-astro-maintainers] Bug#1108621: skycat: Prospective upgrade of blt to 3.0 affects skycat

Sergei Golovan sgolovan at debian.org
Tue Jul 1 17:37:20 BST 2025


Package: skycat
Version: 3.1.2+starlink1~b+dfsg-9
Severity: normal
Tags: patch

Dear Maintainer,

I'm planning to upgrade the blt package to 3.0 shortly after the release
of trixie, and this will affect skycat.

The modifications for adapting skycat to the upgrade of blt are fairly
small though:

1) the library name will change from libBLT to libBlt30
2) the initialization function Blt_Init() will become two: Blt_TclInit()
   and Blt_TkInit()
3) importing all commands from blt::* will not work as blt::scale will
   owerwrite scale from Tk and they are not compatible, so some trick
   will have to be used to prevent this.

The attached patch fixes these problems. Other than that, I've stumbled
on bug [1] in the skycat window, I'll try to find a fix for it before
the upgrade.

You can do additional tests using the blt packages from experimental.

[1] https://sourceforge.net/p/blt/bugs/157/

Cheers!
-- 
Sergei Golovan
-------------- next part --------------
--- a/tclutil/aclocal.m4
+++ b/tclutil/aclocal.m4
@@ -26,8 +26,8 @@
        [AC_HELP_STRING([--with-blt=DIR],[link with BLT library installed in DIR])],
        BLT_LIB_DIR=$withval)
 
-    BLT_LIBNAME=libBLT${SHLIB_SUFFIX}
-    BLT_LIBFLAG="-lBLT"
+    BLT_LIBNAME=libBlt30${SHLIB_SUFFIX}
+    BLT_LIBFLAG="-lBlt30"
 
     if test -z "$BLT_LIB_DIR" ; then
 	# If --with-blt=dir was not specified, try the Tcl lib dir and the exec-prefix/lib dir
--- a/tclutil/generic/Tclutil.C
+++ b/tclutil/generic/Tclutil.C
@@ -33,7 +33,8 @@
 
 // Since we have to link the BLT library anyway (because we're using the BLT C interface) 
 // call the init routine directly
-extern "C" int Blt_Init(Tcl_Interp *interp);
+extern "C" int Blt_TclInit(Tcl_Interp *interp);
+extern "C" int Blt_TkInit(Tcl_Interp *interp);
 
 // generated code for bitmaps used in tcl scripts
 void defineTclutilBitmaps(Tcl_Interp*);
@@ -78,7 +79,10 @@
       return TCL_ERROR;
 
     // initialize the required BLT package 
-    if (Blt_Init(interp) == TCL_ERROR) {
+    if (Blt_TclInit(interp) == TCL_ERROR) {
+	return TCL_ERROR; 
+    }
+    if (Blt_TkInit(interp) == TCL_ERROR) {
 	return TCL_ERROR; 
     }
 
--- a/tclutil/library/TclutilInit.tcl
+++ b/tclutil/library/TclutilInit.tcl
@@ -22,7 +22,12 @@
 }
 
 # set up the namespaces used by the itcl/itk classes
+# save the scale widget
+rename scale scale:orig
 namespace import -force blt::*
+# restore the original scale widget in place of the imported blt::scale
+rename scale ""
+rename scale:orig scale
 namespace import -force itcl::*
 namespace import -force itk::*
 namespace eval util {namespace export *}


More information about the Debian-astro-maintainers mailing list