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

Bert Freudenberg bert at freudenbergs.de
Thu Jul 10 13:06:11 UTC 2014


On 09.07.2014, at 21:27, Douglas McPherson <djm1329 at san.rr.com> wrote:

> 
> 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.
> 
> Thanks,
> Doug


If you're writing C code anyway, why not just make it into a proper Squeak plugin, so you don't even need FFI? 

- Bert -



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4142 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140710/9002d30c/smime.bin


More information about the Squeak-dev mailing list