aurelian/ruby-stemmer — comment on commit 82911f19fa510e5d3277c1c4bbabca6af27a372c
File:  line 0
By luislavena:

Hello Aurelian!

The approach you're taking is similar to what ffi gem does: it bundles
libffi and builds it if is missing in your system:

https://github.com/ffi/ffi/blob/master/ext/ffi_c/extconf.rb

But, another approach would be like one therubyracer is doing: they
pre-compile libv8 for specific platforms and link against it:

https://github.com/fractaloop/libv8
https://github.com/cowboyd/therubyracer/blob/master/ext/v8/extconf.rb
https://github.com/fractaloop/libv8/blob/master/lib/libv8.rb

Just sharing some ideas :-)

Thank you for caring about cross-platform support!

On Fri, Nov 4, 2011 at 6:12 AM, Aurelian Oancea

wrote:
> Hi Luis,
>
> First thanks for the great work that you've put into rake compile :)
>
> I'll check mini_portile but at a glance - it looks like it could work.
>
> Main problem that I'm facing with ruby-stemmer is that libstemmer_c is
> bundled with the gem and basically, in extconf.rb I'm running some
> system commands to build it. Fact is... at least on MacOS there are
> various environment flags that can screw the build process. I took the
> decision to bundle libstemmer_c source code and to build it when the
> gem is installed because it's mainly an obscure library and I'm not
> expecting anyone to spend 5 minutes to install it before installing
> the gem.
>
> On 4 November 2011 03:38, Luis Lavena
>
> wrote:
>> Thought about using MiniPortile to compile libstemmer_c statically?
>>
>> https://github.com/luislavena/mini_portile
>>
>> Projects like sqlite3-ruby and TinyTDS are using it to build the static dependency before compiling the extension (either for native or cross compilation).
>>
>
> Cool, thanks again, I'll check it out how they are doing it :)
>
> Best,
>
> --
> Aurelian
>
>> Cheers!
>>
>> ---
>> Reply to this email directly or view it on GitHub:
>> https://github.com/aurelian/ruby-stemmer/commit/82911f19fa510e5d3277c1c4bbabca6af27a372c#commitcomment-694617
>>
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/aurelian/ruby-stemmer/commit/82911f19fa510e5d3277c1c4bbabca6af27a372c#commitcomment-695032
>

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry