Description: Patch fixes loading the libBLT library from [package require BLT]. Specifically, it provides correct version BLT_PATCH_LEVEL and prevents loading the library twice (once by its real name and onr more time by a symlink if the blt-dev package is installed). Also, it skips initializing widget bindings if Tk isn't present. Author: Sergei Golovan Author: Steve Langasek Last-Modified: Mon, 31 Aug 2015 12:09:00 -0700 Index: blt-2.5.3+dfsg/library/Makefile.in =================================================================== --- blt-2.5.3+dfsg.orig/library/Makefile.in +++ blt-2.5.3+dfsg/library/Makefile.in @@ -5,6 +5,7 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ version = @BLT_VERSION@ +patchlevel = @BLT_PATCH_LEVEL@ lib_prefix = @BLT_LIB_PREFIX@ srcdir = @srcdir@ libdir = @libdir@ @@ -49,6 +50,7 @@ pkgIndex: rm -f pkgIndex.tcl sed -e 's/%VERSION%/$(version)/' $(srcdir)/pkgIndex.tcl.in | \ + sed -e 's/%PATCHLEVEL%/$(patchlevel)/' | \ sed -e 's/%LIB_PREFIX%/$(lib_prefix)/' | \ sed -e 's;%LIB_DIR%;$(libdir);' > pkgIndex.tcl Index: blt-2.5.3+dfsg/library/pkgIndex.tcl.in =================================================================== --- blt-2.5.3+dfsg.orig/library/pkgIndex.tcl.in +++ blt-2.5.3+dfsg/library/pkgIndex.tcl.in @@ -49,11 +49,13 @@ } if { ![file exists $library] } continue load $library BLT + break } } set version "%VERSION%" +set patchlevel %PATCHLEVEL% -package ifneeded BLT $version [list LoadBLT25 $version $dir] +package ifneeded BLT $patchlevel [list LoadBLT25 $version $dir] # End of package index file Index: blt-2.5.3+dfsg/library/init.tcl =================================================================== --- blt-2.5.3+dfsg.orig/library/init.tcl +++ blt-2.5.3+dfsg/library/init.tcl @@ -8,7 +8,9 @@ } } - initializeLibrary + if {[info commands tk] == "tk"} { + initializeLibrary + } } Index: blt-2.5.3+dfsg/configure.in =================================================================== --- blt-2.5.3+dfsg.orig/configure.in +++ blt-2.5.3+dfsg/configure.in @@ -977,6 +977,13 @@ BLT_VERSION=${BLT_MAJOR_VERSION}.${BLT_MINOR_VERSION} +AC_MSG_CHECKING([BLT_PATCH_LEVEL]) +AC_CACHE_VAL(blt_cv_patch_level, +AC_GREP_SYMBOL(blt_cv_patch_level, BLT_PATCH_LEVEL, ${srcdir}/generic/blt.h) +) +AC_MSG_RESULT([$blt_cv_patch_level]) +BLT_PATCH_LEVEL=${blt_cv_patch_level} + # Add BLT to the run path libdir=${exec_prefix}/lib @@ -1386,6 +1393,7 @@ AC_SUBST(DEFINES) AC_SUBST(BLT_MAJOR_VERSION) AC_SUBST(BLT_MINOR_VERSION) +AC_SUBST(BLT_PATCH_LEVEL) AC_SUBST(BLT_VERSION) AC_SUBST(AUX_LIBS) AC_SUBST(TCL_LIB_DIR)