[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Could you merge Ruby SWIG-based bindings?

From: Kouhei Sutou <kou_at_cozmixng.org>
Date: 2005-01-17 16:58:03 CET

Hi,

New version for current trunk:
  http://pub.cozmixng.org/~kou/diff/svn-add-ruby-20050118.diff

In <41EAA043.9030808@electricjellyfish.net>
  "Re: [PATCH] Could you merge Ruby SWIG-based bindings?" on Sun, 16 Jan 2005 12:11:31 -0500,
  Garrett Rooney <rooneg@electricjellyfish.net> wrote:

> > I'm still writing Ruby SWIG-based bindings.
> > http://pub.cozmixng.org/~kou/diff/svn-add-ruby-20050117.diff
> >
> > Could you merge this to the svn repository?
>
> Could you please include some instructions on how these bindings are
> supposed to be built and used?

This supposes the following:

  * ruby 1.8.2
  * SWIG >= 1.3.24

And I'm using the followings:

  * ruby 1.8.2 (2005-01-10) [i386-linux] : ruby -v
  * SWIG Version 1.3.25 : swig -version |& grep Version
    * CVS HEAD
  * 2.6.8-2-k7 i686 GNU/Linux : uname -rmo
    * Debian GNU/Linux sid

and

  * ruby 1.8.2 (2004-12-25) [i386-freebsd5] : ruby -v
  * SWIG Version 1.3.25 : swig -version |& grep Version
    * CVS HEAD
  * FreeBSD 5.3-STABLE i386 : uname -prs

> Step by step instructions as to what make targets are supposed to be
> used and what commands used to run the tests would be quite useful.

To configure the bindings:

  % ./configure ... --with-swig-ruby-sitedir=$HOME/local/lib/site_ruby

--with-swig-ruby-sitedir option are explained at below. If
you don't specify the option, the bindings are installed to
ruby's default sitedir.

To make the bindings:

  % make swig-rb

To install the bindings:

  % make install-swig-rb

To run test: (don't need install)

  % cd subversion/bindings/swig/ruby && ruby test/run-test.rb

To run without installing:

  % mkdir -p subversion/bindings/swig/ruby/ext/svn
  % ln -fs ../../.libs subversion/bindings/swig/ruby/ext/svn/ext
  % ruby -I subversion/bindings/swig/ruby \
         -I subversion/bindings/swig/ruby/ext \
         ... (script name, `which irb` and so on)

> So far, when trying to run the tests without installing things I can't
> get them to work at all, and when trying to run them after 'make
> install' I get relocation errors complaining about not being able to
> find the symbol rb_hash_foreach.

I think you are using ruby 1.6.x. rb_hash_foreach is not
available on ruby 1.6.x.

> Also, when I run 'make install-swig-rb' it installs all the bindings
> into $PREFIX/lib/site_ruby, is this what's desired? It doesn't seem to
> be what the perl bindings do, for example.

I wanted to customize installed directory. So I used $PREFIX
to do this. But it wasn't good idea.

I added a new configure option,
--with-swig-ruby-sitedir. Users can customize installed base
directory. If users don't set this, the bindings are
installed system default directory which can be got by the
following:

  % ruby -r rbconfig -e 'puts Config::CONFIG["sitedir"]'

--
kou
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jan 17 17:00:07 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.