File: blt3.patch

package info (click to toggle)
tkdesk 2.0-13
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 6,732 kB
  • sloc: tcl: 20,764; ansic: 16,266; sh: 359; makefile: 233
file content (87 lines) | stat: -rw-r--r-- 2,727 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
From: Sergei Golovan <sgolovan@debian.org>
Subject: Patch makes TkDesk buildable and runnable with BLT 3.0.
Date: Sat, 07 Jun 2025 15:06:03 +0300

--- a/configure.in
+++ b/configure.in
@@ -231,17 +231,17 @@
    NEED_BLT_LIB=lib_blt
    AC_MSG_RESULT(./blt)
 else
-   BLT_LIB_SPEC="-L$BLT_LIB_PATH -lBLT"
-   BLT_LIB_STATIC=$BLT_LIB_PATH/libBLT.a
+   BLT_LIB_SPEC="-L$BLT_LIB_PATH -lBlt30"
+   BLT_LIB_STATIC=$BLT_LIB_PATH/libBlt30.a
    NEED_BLT_LIB=
-   if test   ! -f $BLT_LIB_PATH/libBLT.a \
-          -a ! -f $BLT_LIB_PATH/libBLT.so
+   if test   ! -f $BLT_LIB_PATH/libBlt30.a \
+          -a ! -f $BLT_LIB_PATH/libBlt30.so
    then
-      if test   ! -f $BLT_LIB_PATH/lib/libBLT.a \
-	     -a ! -f $BLT_LIB_PATH/lib/libBLT.so
+      if test   ! -f $BLT_LIB_PATH/lib/libBlt30.a \
+	     -a ! -f $BLT_LIB_PATH/lib/libBlt30.so
       then
 	 echo
-	 AC_MSG_ERROR([could not find libBLT.a or libBLT.so in $BLT_LIB_PATH or in $BLT_LIB_PATH/lib.])
+	 AC_MSG_ERROR([could not find libBlt30.a or libBlt30.so in $BLT_LIB_PATH or in $BLT_LIB_PATH/lib.])
       else
 	 BLT_LIB_PATH=$BLT_LIB_PATH/lib
       fi
--- a/tkAppInit.c
+++ b/tkAppInit.c
@@ -110,7 +110,8 @@
 {
     Tk_Window main;
     extern int Itcl_Init _ANSI_ARGS_((Tcl_Interp *));
-    extern int Blt_Init _ANSI_ARGS_((Tcl_Interp *));
+    extern int Blt_TclInit _ANSI_ARGS_((Tcl_Interp *));
+    extern int Blt_TkInit _ANSI_ARGS_((Tcl_Interp *));
     extern int Netscape_remote_Init _ANSI_ARGS_((Tcl_Interp *));
     extern int Dsk_Init _ANSI_ARGS_((Tcl_Interp *));
     extern Tk_ImageType tixPixmapImageType;
@@ -140,7 +141,10 @@
     if (Itcl_Init(interp) == TCL_ERROR) {
             return TCL_ERROR;
     }
-    if (Blt_Init(interp) == TCL_ERROR) {
+    if (Blt_TclInit(interp) == TCL_ERROR) {
+        return TCL_ERROR;
+    }
+    if (Blt_TkInit(interp) == TCL_ERROR) {
         return TCL_ERROR;
     }
     if (Ot_Init(interp) == TCL_ERROR) {
--- a/tkdesk.main
+++ b/tkdesk.main
@@ -534,15 +534,7 @@
 
 # "Uglify" ;-) namespaced BLT:
 if {$tkdesk(tcl_version) >= 8.0} {
-    namespace import blt::*
-}
-
-# Update BLT lib path
-# (Fix this: depending on certain BLT lib files is a bit unreliable...)
-if {![file exists $blt_library/bltDragdrop.tcl] &&
-    ![file exists $blt_library/dragdrop.tcl]} {
-    set blt_library $tkdesk(library)
-    #puts "blt_library: $blt_library"
+    namespace import -force blt::*
 }
 
 if {[info command bgexec] != ""} {
@@ -682,12 +674,6 @@
     set auto_path "$tkdesk(library) $auto_path"
 }
     
-if $tkdesk(in_development) {
-    blt_drag&drop errors tkerror
-} else {
-    blt_drag&drop errors ""
-}
-
 # Disable BLT's built-in d&d bindings (except for motion):
 catch {
     bind BltDrag&DropButton2 <Button-2> {}