ruby.bbclass: introduce a class to assist in building gems
authorMark Asselstine <mark.asselstine@windriver.com>
Fri, 5 Sep 2014 15:07:13 +0000 (11:07 -0400)
committerPatrick Ohly <patrick.ohly@intel.com>
Fri, 9 Jan 2015 16:42:25 +0000 (08:42 -0800)
commit8faf94b2f4b0023d3029021f62440689099a30d3
tree85a48aa505f2edccf370dc631cb4af45a99226e2
parent84c8659daa18341ebb637ee624e263d8757bd9d9
ruby.bbclass: introduce a class to assist in building gems

In order to allow the building of gems we have created a
ruby.bbclass. The building of gems is much like the building of python
packages in that we rely on building up -native gems in order to
facilitate the cross compiling of the gems that will be built for the
target. When dependencies exist between gems they must be satisfied by
the -native gems installed in the host sysroot. This approach is
feasible since the build process is able to query installed gems
without being affected by the ARCH they were built for. At this point
I have yet to come across a situation where the assumption associated
with this approach have failed but so far focus has only been on x86
and x86-64 builds.

The recipes which inherit the ruby.bbclass can optionally define a BPV
in the case where the gemspec version doesn't always map 1:1 to the
PV. This situation has only been encountered on a few occasions so
the class has been made to default BPV to PV.

To demonstrate the ruby.bbclass in use we have included a recipe to
build the bundler gem. Bundler can be used on a running target to
install gems from rubygems.org, which can be useful in itself when you
don't have recipes available for gems but want to try installing and
running pre-built gems.

(From meta-openembedded rev: 8c2e27e68642224df084eed14c2ad1de4f1bb0a5)

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
meta-openembedded/meta-ruby/classes/ruby.bbclass [new file with mode: 0644]
meta-openembedded/meta-ruby/recipes-devtools/ruby/bundler_git.bb [new file with mode: 0644]