diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2014-09-05 11:07:13 -0400 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-09-26 05:42:52 +0200 |
commit | 8c2e27e68642224df084eed14c2ad1de4f1bb0a5 (patch) | |
tree | 4a8d1aaceac36d1cfb6f93242eae6826ab0a809d /meta-ruby/recipes-devtools | |
parent | ed698c4dba606b9d0c36c68023004046417db251 (diff) | |
download | meta-openembedded-8c2e27e68642224df084eed14c2ad1de4f1bb0a5.tar.gz |
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.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-ruby/recipes-devtools')
-rw-r--r-- | meta-ruby/recipes-devtools/ruby/bundler_git.bb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta-ruby/recipes-devtools/ruby/bundler_git.bb b/meta-ruby/recipes-devtools/ruby/bundler_git.bb new file mode 100644 index 000000000..2adde4d21 --- /dev/null +++ b/meta-ruby/recipes-devtools/ruby/bundler_git.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | SUMMARY = "Makes sure Ruby applications run the same code on every machine." | ||
2 | DESCRIPTION = "Bundler makes sure Ruby applications run the same code \ | ||
3 | on every machine. It does this by managing the gems that the \ | ||
4 | application depends on. Given a list of gems, it can automatically \ | ||
5 | download and install those gems, as well as any other gems needed by \ | ||
6 | the gems that are listed. Before installing gems, it checks the \ | ||
7 | versions of every gem to make sure that they are compatible, and can \ | ||
8 | all be loaded at the same time. After the gems have been installed, \ | ||
9 | Bundler can help you update some or all of them when new versions \ | ||
10 | become available. Finally, it records the exact versions that have \ | ||
11 | been installed, so that others can install the exact same gems." | ||
12 | |||
13 | LICENSE = "MIT" | ||
14 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=196bb963e601609817d7e9ac9a64a867" | ||
15 | |||
16 | PR = "r0" | ||
17 | |||
18 | PV = "1.6.2" | ||
19 | SRCREV = "06e3647c117da210ffd15a174624497830addd7b" | ||
20 | |||
21 | S = "${WORKDIR}/git" | ||
22 | |||
23 | SRC_URI = " \ | ||
24 | git://github.com/bundler/bundler.git \ | ||
25 | " | ||
26 | |||
27 | inherit ruby | ||
28 | |||
29 | BBCLASSEXTEND = "native" | ||