Package: libsqlite3-tcl Version: 3.7.5-1 Tags: patch Hi Laszlo,
I ran across the following problem with libsqlite3-tcl: torsten@pulsar:~$ tclsh tclsh8.5 [~]package require sqlite3 can't find package sqlite3 while evaluating {package require sqlite3} This is even though the package is installed. It turns out that no pkgIndex.tcl is installed with the package: torsten@pulsar:~$ dpkg -L libsqlite3-tcl|grep pkgIndex torsten@pulsar:~$ The attached patch fixes this problem and adjusts the installation path of the Tcl module from /usr/lib/sqlite3 (where nobody will look for it) to /usr/lib/tcltk/sqlite3. It applies cleanly to the sqlite3 package source of 3.7.5-1 via torsten@pulsar:~/debian/sqlite3-3.7.5$ patch -p1 < ../tcl_module_load.patch Please include this patch in the next release of the package. Thanks, Torsten
commit bbf55df139920030cc9599d2d2fc632d6d6fabd8 Author: Torsten Landschoff <tors...@landschoff.net> Date: Wed Mar 9 00:20:39 2011 +0100 This patch fixes the problem that package require sqlite3 did not work with libsqlite3-tcl 3.7.5-1. It fixes the installation location to /usr/lib/tcltk/sqlite3 as suggested in the Tcl policy (and used by other packages). diff --git a/debian/changelog b/debian/changelog index b8fc974..74ec7bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +sqlite3 (3.7.5-2) unstable; urgency=low + + * Fix installation of the Tcl module so that is is usable via + package require sqlite3 + again. + + -- Torsten Landschoff <tors...@debian.org> Wed, 09 Mar 2011 00:19:42 +0100 + sqlite3 (3.7.5-1) unstable; urgency=low * New upstream release. diff --git a/debian/libsqlite3-tcl.dirs b/debian/libsqlite3-tcl.dirs index 90645f0..6845771 100644 --- a/debian/libsqlite3-tcl.dirs +++ b/debian/libsqlite3-tcl.dirs @@ -1,2 +1 @@ usr/lib -usr/lib/sqlite3 diff --git a/debian/libsqlite3-tcl.install b/debian/libsqlite3-tcl.install index 1ede98d..d14e713 100644 --- a/debian/libsqlite3-tcl.install +++ b/debian/libsqlite3-tcl.install @@ -1 +1 @@ -usr/share/tcltk/tcl8.5/sqlite3/libtclsqlite3.so usr/lib/sqlite3/ +usr/lib/tcltk/sqlite3 usr/lib/tcltk/ diff --git a/debian/rules b/debian/rules index 55d349b..c510692 100755 --- a/debian/rules +++ b/debian/rules @@ -29,6 +29,7 @@ configure-stamp: ./configure --prefix=/usr --mandir="/usr/share/man" \ --with-tcl=/usr/lib/tcl8.5 --enable-threadsafe \ --enable-load-extension \ + TCLLIBDIR=/usr/lib/tcltk/sqlite3 \ $(DDEBUG) touch $@ @@ -55,9 +56,8 @@ install: build $(MAKE) install DESTDIR=$(DESTDIR) chrpath -d $(DESTDIR)/usr/bin/sqlite3 - chrpath -d $(DESTDIR)/usr/share/tcltk/tcl8.5/sqlite3/libtclsqlite3.so - install -d $(DESTDIR)/usr/lib/sqlite3 - install -m 0664 libtclsqlite3.la $(DESTDIR)/usr/lib/sqlite3/ + chrpath -d $(DESTDIR)/usr/lib/tcltk/sqlite3/libtclsqlite3.so + install -m 0664 libtclsqlite3.la $(DESTDIR)/usr/lib/tcltk/sqlite3/ install -d $(DESTDIR)/usr/share/lemon install -m 0664 tool/lempar.c $(DESTDIR)/usr/share/lemon/ install -m 0775 lemon $(DESTDIR)/usr/bin @@ -65,9 +65,9 @@ install: build # Remove *.la files per policy 3.9.1.0 # find $(DESTDIR) -name \*.la | xargs rm -f - sed -e 's/share/lib/' -e 's/tcl[^/]*\///g' \ - $(DESTDIR)/usr/share/tcltk/tcl8.5/sqlite3/pkgIndex.tcl \ - >$(DESTDIR)/usr/lib/sqlite3/pkgIndex.tcl + # Create the pkgIndex.tcl file for the Tcl module. This generated file + # actually turns out to be relocatable. + echo "pkg_mkIndex -verbose $(DESTDIR)/usr/lib/tcltk/sqlite3" | tclsh8.5 binary-indep: build install