[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Compile ruby with oniguruma on OS X

Ashley Moran

11/22/2006 11:10:00 PM

Hi

I've just got my hands on the latest Mastering Regular Expressions.
I want to play with some of the clever stuff (eg lookbehinds) in
ruby. I'm running OS X on my desktop, and my ruby is compiled from
MacPorts. There's an oniguruma port, but does anyone know how to
recompile ruby to use it? Is there a command line switch I can pass
to the port command?

Thanks
Ashley

2 Answers

brabuhr

11/23/2006 12:51:00 AM

0

> I've just got my hands on the latest Mastering Regular Expressions.
> I want to play with some of the clever stuff (eg lookbehinds) in
> ruby. I'm running OS X on my desktop, and my ruby is compiled from
> MacPorts. There's an oniguruma port, but does anyone know how to
> recompile ruby to use it? Is there a command line switch I can pass
> to the port command?

I've not used MacPorts, but, it is pretty straight forward to build it by
hand:

~/Desktop $ tar xzf ruby-1.8.5.tar.gz
~/Desktop $ tar xzf onigd2_5_8.tar.gz

~/Desktop $ cd oniguruma/
~/Desktop/oniguruma $ ./configure --with-rubydir=~/Desktop/ruby-1.8.5
~/Desktop/oniguruma $ make 185
~/Desktop/oniguruma $ cd ..

~/Desktop $ cd ruby-1.8.5
~/Desktop/ruby-1.8.5 $ ./configure --prefix=/opt/ruby/v1.8.5-oniguruma
~/Desktop/ruby-1.8.5 $ make
~/Desktop/ruby-1.8.5 $ sudo make install

~/Desktop/ruby-1.8.5 $ /opt/ruby/v1.8.5-oniguruma/bin/ruby -v
ruby 1.8.5 (2006-08-25) [powerpc-darwin8.8.0]
~/Desktop/ruby-1.8.5 $ /opt/ruby/v1.8.5-oniguruma/bin/ruby -e "put s
Regexp::ENGINE"
Oniguruma

Ashley Moran

11/24/2006 9:50:00 AM

0


On 23 Nov 2006, at 00:51, brabuhr@gmail.com wrote:

> I've not used MacPorts, but, it is pretty straight forward to build
> it by
> hand:
>
> ~/Desktop $ tar xzf ruby-1.8.5.tar.gz
> ~/Desktop $ tar xzf onigd2_5_8.tar.gz
>
> ~/Desktop $ cd oniguruma/
> ~/Desktop/oniguruma $ ./configure --with-rubydir=~/Desktop/ruby-1.8.5
> ~/Desktop/oniguruma $ make 185
> ~/Desktop/oniguruma $ cd ..
>
> ~/Desktop $ cd ruby-1.8.5
> ~/Desktop/ruby-1.8.5 $ ./configure --prefix=/opt/ruby/v1.8.5-oniguruma
> ~/Desktop/ruby-1.8.5 $ make
> ~/Desktop/ruby-1.8.5 $ sudo make install
>
> ~/Desktop/ruby-1.8.5 $ /opt/ruby/v1.8.5-oniguruma/bin/ruby -v
> ruby 1.8.5 (2006-08-25) [powerpc-darwin8.8.0]
> ~/Desktop/ruby-1.8.5 $ /opt/ruby/v1.8.5-oniguruma/bin/ruby -e "put s
> Regexp::ENGINE"
> Oniguruma


Ok cheers I'll try that instead