-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathruby.rb
28 lines (25 loc) · 1.01 KB
/
ruby.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
dep 'ruby trunk.src' do
requires 'bison.managed', 'readline headers.managed'
source 'git://github.com/ruby/ruby.git'
provides 'ruby == 1.9.3.dev', 'gem', 'irb'
configure_args '--disable-install-doc', '--with-readline-dir=/usr'
end
dep 'ruby.src', :version, :patchlevel do
requires 'testpilot:ruby dependencies'
def version_group
version.to_s.scan(/^\d\.\d/).first
end
version.default!('2.0.0')
patchlevel.default!('p0')
requires 'readline headers.managed', 'yaml headers.managed'
source "ftp://ftp.ruby-lang.org/pub/ruby/#{version_group}/ruby-#{version}-#{patchlevel}.tar.gz"
provides "ruby == #{version}#{patchlevel}", 'gem', 'irb'
configure_args '--disable-install-doc',
"--with-readline-dir=#{Babushka.host.pkg_helper.prefix}",
"--with-libyaml-dir=#{Babushka.host.pkg_helper.prefix}"
postinstall {
# TODO: hack for ruby bug where bin/* aren't installed when the build path
# contains a dot-dir.
shell "cp bin/* #{prefix / 'bin'}", :sudo => Babushka::SrcHelper.should_sudo?
}
end