| 1 |
Description: Patch fixes loading the libBLT library from |
| 2 |
[package require BLT]. Specifically, it provides correct version |
| 3 |
BLT_PATCH_LEVEL and prevents loading the library twice (once |
| 4 |
by its real name and onr more time by a symlink if the blt-dev |
| 5 |
package is installed). Also, it skips initializing widget bindings |
| 6 |
if Tk isn't present. |
| 7 |
Author: Sergei Golovan |
| 8 |
Author: Steve Langasek <[email protected]> |
| 9 |
Last-Modified: Mon, 31 Aug 2015 12:09:00 -0700 |
| 10 |
|
| 11 |
Index: blt-2.5.3+dfsg/library/Makefile.in |
| 12 |
=================================================================== |
| 13 |
--- blt-2.5.3+dfsg.orig/library/Makefile.in |
| 14 |
+++ blt-2.5.3+dfsg/library/Makefile.in |
| 15 |
@@ -5,6 +5,7 @@ |
| 16 |
prefix = @prefix@ |
| 17 |
exec_prefix = @exec_prefix@ |
| 18 |
version = @BLT_VERSION@ |
| 19 |
+patchlevel = @BLT_PATCH_LEVEL@ |
| 20 |
lib_prefix = @BLT_LIB_PREFIX@ |
| 21 |
srcdir = @srcdir@ |
| 22 |
libdir = @libdir@ |
| 23 |
@@ -49,6 +50,7 @@ |
| 24 |
pkgIndex: |
| 25 |
rm -f pkgIndex.tcl |
| 26 |
sed -e 's/%VERSION%/$(version)/' $(srcdir)/pkgIndex.tcl.in | \ |
| 27 |
+ sed -e 's/%PATCHLEVEL%/$(patchlevel)/' | \ |
| 28 |
sed -e 's/%LIB_PREFIX%/$(lib_prefix)/' | \ |
| 29 |
sed -e 's;%LIB_DIR%;$(libdir);' > pkgIndex.tcl |
| 30 |
|
| 31 |
Index: blt-2.5.3+dfsg/library/pkgIndex.tcl.in |
| 32 |
=================================================================== |
| 33 |
--- blt-2.5.3+dfsg.orig/library/pkgIndex.tcl.in |
| 34 |
+++ blt-2.5.3+dfsg/library/pkgIndex.tcl.in |
| 35 |
@@ -49,11 +49,13 @@ |
| 36 |
} |
| 37 |
if { ![file exists $library] } continue |
| 38 |
load $library BLT |
| 39 |
+ break |
| 40 |
} |
| 41 |
} |
| 42 |
|
| 43 |
set version "%VERSION%" |
| 44 |
+set patchlevel %PATCHLEVEL% |
| 45 |
|
| 46 |
|
| 47 |
+package ifneeded BLT $patchlevel [list LoadBLT25 $version $dir] |
| 48 |
|
| 49 |
# End of package index file |
| 50 |
Index: blt-2.5.3+dfsg/library/init.tcl |
| 51 |
=================================================================== |
| 52 |
--- blt-2.5.3+dfsg.orig/library/init.tcl |
| 53 |
+++ blt-2.5.3+dfsg/library/init.tcl |
| 54 |
@@ -8,7 +8,9 @@ |
| 55 |
} |
| 56 |
} |
| 57 |
|
| 58 |
|
| 59 |
+ if {[info commands tk] == "tk"} { |
| 60 |
+ initializeLibrary |
| 61 |
+ } |
| 62 |
|
| 63 |
} |
| 64 |
|
| 65 |
Index: blt-2.5.3+dfsg/configure.in |
| 66 |
=================================================================== |
| 67 |
--- blt-2.5.3+dfsg.orig/configure.in |
| 68 |
+++ blt-2.5.3+dfsg/configure.in |
| 69 |
@@ -977,6 +977,13 @@ |
| 70 |
|
| 71 |
BLT_VERSION=${BLT_MAJOR_VERSION}.${BLT_MINOR_VERSION} |
| 72 |
|
| 73 |
+AC_MSG_CHECKING([BLT_PATCH_LEVEL]) |
| 74 |
+AC_CACHE_VAL(blt_cv_patch_level, |
| 75 |
+AC_GREP_SYMBOL(blt_cv_patch_level, BLT_PATCH_LEVEL, ${srcdir}/generic/blt.h) |
| 76 |
+) |
| 77 |
+AC_MSG_RESULT([$blt_cv_patch_level]) |
| 78 |
+BLT_PATCH_LEVEL=${blt_cv_patch_level} |
| 79 |
+ |
| 80 |
# Add BLT to the run path |
| 81 |
libdir=${exec_prefix}/lib |
| 82 |
|
| 83 |
@@ -1386,6 +1393,7 @@ |
| 84 |
AC_SUBST(DEFINES) |
| 85 |
AC_SUBST(BLT_MAJOR_VERSION) |
| 86 |
AC_SUBST(BLT_MINOR_VERSION) |
| 87 |
+AC_SUBST(BLT_PATCH_LEVEL) |
| 88 |
AC_SUBST(BLT_VERSION) |
| 89 |
AC_SUBST(AUX_LIBS) |
| 90 |
AC_SUBST(TCL_LIB_DIR) |