Compile ruby with oniguruma on OS X

Discussion in 'Ruby' started by Ashley Moran, Nov 22, 2006.

  1. Ashley Moran

    Ashley Moran Guest

    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
     
    Ashley Moran, Nov 22, 2006
    #1
    1. Advertising

  2. Ashley Moran

    Guest

    > 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
     
    , Nov 23, 2006
    #2
    1. Advertising

  3. Ashley Moran

    Ashley Moran Guest

    On 23 Nov 2006, at 00:51, 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
     
    Ashley Moran, Nov 24, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Simon Strandgaard

    regexp unlimited: Ruby's vs Oniguruma

    Simon Strandgaard, Nov 13, 2003, in forum: Ruby
    Replies:
    2
    Views:
    82
    Mark Wilson
    Nov 17, 2003
  2. Wolfgang Nádasi-Donner
    Replies:
    8
    Views:
    168
    Wolfgang Nádasi-Donner
    Jul 31, 2005
  3. Dizan Vasquez
    Replies:
    1
    Views:
    119
    Wolfgang Nádasi-Donner
    Mar 27, 2007
  4. Steve Riley

    Oniguruma and Ruby-1.8.6

    Steve Riley, Apr 1, 2007, in forum: Ruby
    Replies:
    0
    Views:
    100
    Steve Riley
    Apr 1, 2007
  5. rretzbach
    Replies:
    2
    Views:
    126
    rretzbach
    Apr 13, 2007
Loading...

Share This Page