[Pkg-tcltk-devel] Debian tcl/tk policy: where to put shared libs?
Steve M. Robbins
steve at sumost.ca
Sun May 11 20:34:40 UTC 2008
Hi,
I need some help packaging Tcl language bindings for ITK [1]. I've
read the policy (in package tcl-doc) but I'm not sure whether
I'm doing the right thing.
I am essentially tcl illiterate, so please explain things in full.
Examples help.
ITK generates about 9 shared libs and 4 .tcl files, including a
pkgIndex.tcl. I'm only building for the default version of tcl right
now, so I created a package tcl8.4-insighttoolkit3 and installed the
tcl files into /usr/share/tcltk/tcl8.4/insighttoolkit3. Does that
sound right?
Now: where do the shared libs go? If this is covered in the policy, I
have missed it. I decided to put them into /usr/lib.
The pkgIndex.tcl file contains the following
proc ConfigureTclPackage {libName version} {
set libPrefix "lib"
set libPath "[file dirname [file dirname [info script]]]"
set libExt [info sharedlibextension]
set libFile [file join $libPath "$libPrefix$libName$libExt"]
set package [string tolower $libName]
package ifneeded $package $version "
namespace eval ::itk::loader {
set curDir \[pwd\]
cd {$libPath}
if {\[catch { load \"$libFile\" } errorMessage \]} { puts \$errorMessage }
cd \$curDir
}
"
}
With some puts-style debugging (as mentioned, I'm tcl illiterate), I
concluded that this snippet is expecting the shared libs in the parent
directory of that containing pkgIndex.tcl; i.e. libPath is set to
/usr/share/tcltk/tcl8.4. Is this common practice or is it an upstream
quirk? It doesn't strike me as a good idea to put shared objects into
/usr/share/...
My current plan is simply to patch this to read
set libPath "/usr/lib"
But that just as well could be "/usr/lib/tcltk/...." or somesuch.
Hence my question about where to put shared libs.
Any additional insights or pointers are most welcome. This is
my first attempt at packaging Tcl bindings.
Thanks,
-Steve
[1] http://packages.qa.debian.org/i/insighttoolkit.html
The Tcl bindings are not yet present; it will be a new package
appearing with version 3.6.0.
P.S. I searched in vain for a debian-tcl mailing list, so I'm sending
this to debian-devel as well as the two names listed in the Tcl/Tk
policy package and the pkg-tcltk-devel list. If this is not the right
place, please advise and do feel free to forward this email to the
right place.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-tcltk-devel/attachments/20080511/4e03f91f/attachment.pgp
More information about the Pkg-tcltk-devel
mailing list