Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jun 1997 19:28:13 +0930 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        narvi@haldjas.folklore.ee (Narvi)
Cc:        msmith@atrad.adelaide.edu.au, hackers@FreeBSD.ORG, hasty@rah.star-gate.com
Subject:   Re: Tcl loadable packages
Message-ID:  <199706290958.TAA19062@genesis.atrad.adelaide.edu.au>
In-Reply-To: <Pine.BSF.3.96.970623130943.17008B-100000@haldjas.folklore.ee> from Narvi at "Jun 23, 97 01:30:47 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Narvi stands accused of saying:
> > > 
> > > 	If one was to make a port of tcl loadable package, how would one
> > > 	go about it?
> > > 
> > > 	Well, I know I have to make a shared library. How am I to name it
> > > 	- the original makefile, that does not work on FreeBSD tries to
> > > 	just make a xxxx.so file.
> > 
> > There are a couple of approaches.  You can hack the Makefile to build
> > shared libraries the BSD way, or you can write a replacement Makefile that
> > uses bsd.lib.mk.  Looking at the latter will at least make it clear how
> > shared libraries are made, and let you name it appropriately.
> 
> I find it easier to write a new Makefile.

OK; have a look at how the tcl76 port achieves it.  Basically it
throws in another Makefile which contains the appropriate data for
building the shared library.

> > scripts, I'd suggest putting them in /usr/local/libdata/...
> 
> Hm... I don't have libdata here... Is it an official directory?

It's used in /usr for the Tcl stuff.

> Or perhaps there should be a separate hierachie for installation and easy
> finding of tcl packages? 

Perhaps.  The Perl stuff (of which there is _lots_) uses
lib/perl5/site_perl.  Is this a Perl-ism, or something we should
emulate for Tcl?  It's less clear with so many Tcl versions to choose
from 8(

> I take it that there really should be a standard place to hold the "loader
> files" for loadable (that is - in the form of shared libraries) tcl
> packages - if a given packages exists, just call /usr/local/.../load_$pkg  
> and it gets loaded. It will avoid a lot of compatibilty problems and the
> need to re-write the scripts every time we move to a newer tcl version and
> newer versions of the packages.

Hmm.  lib/tcl/site_tcl/<package>/ sounds pretty good to me.

> 	Sander

-- 
]] Mike Smith, Software Engineer        msmith@gsoft.com.au             [[
]] Genesis Software                     genesis@gsoft.com.au            [[
]] High-speed data acquisition and      (GSM mobile)     0411-222-496   [[
]] realtime instrument control.         (ph)          +61-8-8267-3493   [[
]] Unix hardware collector.             "Where are your PEZ?" The Tick  [[



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706290958.TAA19062>