[Pkg-tcltk-devel] Good way to (not) express TCL version dep in d/control ?

Sergei Golovan sgolovan at nes.ru
Mon Jul 25 09:13:51 UTC 2016


Hi Antti,

On Thu, Jul 21, 2016 at 11:29 PM, Antti Järvinen
<antti.jarvinen at katiska.org> wrote:
> Dear Debian TCL Sirs,
>
> suppose there is program depending on tcl/tk but it is not very picky about
> its version - say, any 8.x release should do and hopefully future
> versions too -> is there any preferred method of writing d/control?

In this case one should just use dependency on tcl, tk or tcl-dev, tk-dev.
They are created just for pulling in the default Tcl/Tk version and setup the
relevant build environment.

>
> I see there are (pseudo)packages tcl-dev and tk-dev (I need both) so
> to-day I'm getting tcl8.6-dev+tk8.6-dev. What worries me is situation where
> someone builds and has tcl8.6 and then tk development files from some
> very old tk versions, say, it seems it is possible
> to install both 8.5 and 8.6 development packages in parallel -> is
> there way or need to force specific tk version to be used together
> with tcl version. If I only say "tcl-dev,tk-dev" in dependencies of
> the source package and don't specify any version numbers, this is not
> going to happen?

tcl-dev and tk-dev are not metapackages, they in fact contain a few symbolic
links which allow one to pick up the default Tcl/Tk (8.6 currently). So, to use
the default tclsh just depend on tcl and call /usr/bin/tclsh (the same
for wish).

>
> Another related question is that in configure script (or in my case, a
> Qt .pro file) it seems like I need to figure out tcl version and add
> -I/usr/include/tcl8.6 into CFLAGS or otherwise #include <tk.h> will fail in
> finding <tcl.h> -> is there any well-mannered example about how to
> detect the "best" tcl version? /usr/bin/tclsh might be symlinked to
> some outrageously different version but naturally asking tclsh for
> $tcl_version is my best bet also regarding development files
> version. Or is it?

For the development headers or libraries you'd want to build-depend on
tcl-dev/tk-dev and use /usr/include/tcl which is a symlink to the default
Tcl/Tk headers.  Also, you may want to link to libtcl.so instead of the
versioned library. Or you could source /usr/lib/tclConfig.sh
(/usr/lib/tkConfig.sh)
and get a whole bunch of environment variables defined (including the headers
directory, the library string for linking and some more).

Hope, this helped. If you have more questions, I'll be glad to answer.

Cheers!
-- 
Sergei Golovan



More information about the Pkg-tcltk-devel mailing list