From owner-freebsd-hackers Sun Jun 29 02:58:50 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id CAA26122 for hackers-outgoing; Sun, 29 Jun 1997 02:58:50 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id CAA26108 for ; Sun, 29 Jun 1997 02:58:47 -0700 (PDT) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.5/8.7.3) id TAA19062; Sun, 29 Jun 1997 19:28:13 +0930 (CST) From: Michael Smith Message-Id: <199706290958.TAA19062@genesis.atrad.adelaide.edu.au> Subject: Re: Tcl loadable packages In-Reply-To: from Narvi at "Jun 23, 97 01:30:47 pm" To: narvi@haldjas.folklore.ee (Narvi) Date: Sun, 29 Jun 1997 19:28:13 +0930 (CST) Cc: msmith@atrad.adelaide.edu.au, hackers@FreeBSD.ORG, hasty@rah.star-gate.com X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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// 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 [[