mruby/mruby — pull request #1229 by bovi (2013-05-02 06:01:03+00:00)
Title: First strik on GEM Dependencies

Hi,

I would like to start to integrate dependencies between GEMs. This first pull request only contains an addition to the MRuby::Gem::Specification. I didn't implement yet any check or resolving of these dependencies due to the reason that I would like to try to keep the dependency resolution outside of the core for now. The only thing what I need is this add-on to the Specification so that I can work on mrbgem.rake to resolve conflicts.

At the same time I also added the property `spec.requirements` which only contains information to the user about external dependencies (i.e. like libpcap).

The dependencies could looks like this:

```
MRuby::Gem::Specification.new('mruby-gtk') do |spec|
spec.license = 'MIT'
spec.authors = 'mruby developers'

# user information that this GEM depends on GTK
spec.requirements << "GTK+ >= 3.8.0"
end

MRuby::Gem::Specification.new('mruby-gui') do |spec|
spec.license = 'MIT'
spec.authors = 'mruby developers'

# add GEM dependency mruby-parser.
# Version has to be between 1.0.0 and 1.5.2
spec.add_dependency('mruby-gtk', '> 1.0.0', '< 1.5.2')
end
```