[squeak-dev] how to publish a package requiring an external library

Douglas McPherson djm1329 at san.rr.com
Wed Jul 9 19:27:11 UTC 2014

On Jul 9, 2014, at 11:00 , tim Rowledge wrote:

> On 09-07-2014, at 10:01 AM, Douglas McPherson <djm1329 at san.rr.com> wrote:
>> Is there a preferred/best practice way to publish a package together with its required external libraries? I've developed a package for accessing hardware peripherals such as GPIO and I2C from single board linux platforms such as Raspberry Pi. It uses FFI to access external libraries which I've assembled for use with Squeak. I would like to make binaries as well as source available. 
> Are these libraries ones you wrote and have all the source for? If so, we should most likely simply add them to the squeakvm.org world. Binaries could be put there too, perhaps on a separate pseudo-platform page?

Well it's a bit complicated and I'll appreciate help sorting out the best course of action. At this point there are two external libraries. I did some work to compile them into usable libraries for squeak, but most of the code was re-used from other non-squeak projects. 

One was made by using the .c and .h files from a project that provides python access to RPi peripherals by simply compiling them into a shared library. The python project does not create the shared library but rather bundles them up with some additional python goo.

The other library provides access to the so-called smbus on linux  which is essentially a way to access i2c from linux userspace. The necessary c functions are defined (somewhat bizarrely) in a linux .h file and all declared as static inline. I wrapped this in a .c file with a couple of helper functions and necessary hackage to get the functions exported when compiled as shared library. 

So there is a small amount of code and compile scripts written by me, and some code gladly borrowed from other open-source projects.


> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> A sad tale that brings a lump to the eye and a tear to the throat.

More information about the Squeak-dev mailing list