librelist archives

« back to archive

shoes and gems with native dependencies

shoes and gems with native dependencies

From:
J. Kaiden
Date:
2011-05-09 @ 22:32
...and they said it couldn't be done...

...or, well, sort of...

 i googled the be-jaysus out of ways to install gems with native
dependencies in shoes, and came up with nothing. ...but thanks to a lot of
help from Steve Klabnik i was able to do just that, and i thought i'd post
how i worked it out here in case other folks are trying to do the same.

  i installed gstreamer and its dependencies - but i imagine the process
would be the same for other gems.  this was done in ubuntu 10.04 lucid - not
sure if the same will work in other systems...

  gstreamer is dependent on glib2 and pkg-config - as it turned out i didn't
have to install pkg-config as it is included with shoes (or so it would
seem....)

  so here's what i did -

 first, i made a copy of my working shoes directory in case i screwed things
up to the point of no return.

  Steve pointed me to the shoes/req directory, and the shoes/make/make.rb
file.  these are the keys...

  i have gstreamer installed already on my system-wide ruby, so i had the
gem directories for gstreamer and glib2, and i copied them into shoes/req.
 the next step (though i didn't know it at the time) is to find the gemspec
files, which in my case were located in
/usr/local/lib/ruby/gems/1.9.1/specifications.  the two i was looking for
were glib2-0.90.8.gemspec, and gstreamer-0.90.8.gemspec.  i copied each one
into it's new home in shoes/req/glib2 and shoes/req/gstreamer respectively,
and renamed each "gemspec"  -  (took a couple of failed rakes and more help
from Steve to figure that one out!)

  then it was a matter of editing two lines of the shoes/make/make.rb file.
 to the array in line 63, i added this:

req/glib2/ext/glib2 req/gstreamer/ext/gstreamer

  and to the hash in line 67, this:

'glib2' => 'lib/glib2/ext', 'gstreamer' => 'lib/gstreamer/ext',

  then it was time to rebuild shoes, running rake from the /shoes directory.

  AND SO, after much hacking, whacking, sweating, and cursing (which
hopefully this post will spare you,) the rake ran smoothly - and i'm now
happily gstreaming with shoes.

  thanks again to Steve for his patience and knowhow...

  now... to figure out how to package the thing!  ;)

  rock and roll buddy...

  - jk

Re: [shoes] shoes and gems with native dependencies

From:
Zachary Scott
Date:
2011-05-10 @ 00:53
You might wanna check out Satoshi's green_shoes (
http://github.com/ashbb/green_shoes ) which is an implementation of shoes
with gtk bindings. It should also cover your gstreamer deps.
On May 9, 2011 6:32 PM, "J. Kaiden" <jakekaiden@gmail.com> wrote:
> ...and they said it couldn't be done...
>
> ...or, well, sort of...
>
> i googled the be-jaysus out of ways to install gems with native
> dependencies in shoes, and came up with nothing. ...but thanks to a lot of
> help from Steve Klabnik i was able to do just that, and i thought i'd post
> how i worked it out here in case other folks are trying to do the same.
>
> i installed gstreamer and its dependencies - but i imagine the process
> would be the same for other gems. this was done in ubuntu 10.04 lucid -
not
> sure if the same will work in other systems...
>
> gstreamer is dependent on glib2 and pkg-config - as it turned out i didn't
> have to install pkg-config as it is included with shoes (or so it would
> seem....)
>
> so here's what i did -
>
> first, i made a copy of my working shoes directory in case i screwed
things
> up to the point of no return.
>
> Steve pointed me to the shoes/req directory, and the shoes/make/make.rb
> file. these are the keys...
>
> i have gstreamer installed already on my system-wide ruby, so i had the
> gem directories for gstreamer and glib2, and i copied them into shoes/req.
> the next step (though i didn't know it at the time) is to find the gemspec
> files, which in my case were located in
> /usr/local/lib/ruby/gems/1.9.1/specifications. the two i was looking for
> were glib2-0.90.8.gemspec, and gstreamer-0.90.8.gemspec. i copied each one
> into it's new home in shoes/req/glib2 and shoes/req/gstreamer
respectively,
> and renamed each "gemspec" - (took a couple of failed rakes and more help
> from Steve to figure that one out!)
>
> then it was a matter of editing two lines of the shoes/make/make.rb file.
> to the array in line 63, i added this:
>
> req/glib2/ext/glib2 req/gstreamer/ext/gstreamer
>
> and to the hash in line 67, this:
>
> 'glib2' => 'lib/glib2/ext', 'gstreamer' => 'lib/gstreamer/ext',
>
> then it was time to rebuild shoes, running rake from the /shoes directory.
>
> AND SO, after much hacking, whacking, sweating, and cursing (which
> hopefully this post will spare you,) the rake ran smoothly - and i'm now
> happily gstreaming with shoes.
>
> thanks again to Steve for his patience and knowhow...
>
> now... to figure out how to package the thing! ;)
>
> rock and roll buddy...
>
> - jk

Re: [shoes] shoes and gems with native dependencies

From:
ashbb
Date:
2011-05-10 @ 14:29
Hi Zak,

> It should also cover your gstreamer deps.
Yeah, if gstreamer runs on Windows and OSX, I'd like to implement video
methods (http://ashbb.github.com/green_shoes/Video.html) with gstreamer.
Does it work on Windows?

ashbb

Re: [shoes] shoes and gems with native dependencies

From:
ashbb
Date:
2011-05-10 @ 14:28
Hi Jake,

> i'm now happily gstreaming with shoes.
Wow, great work!! Awesome!

ashbb