|
| 1 | +##### |
| 2 | +# Component release information: |
| 3 | +# https://github.com/apalmblad/ruby-shadow/tags |
| 4 | +# https://rubygems.org/gems/ruby-shadow |
| 5 | +# contains https://github.com/apalmblad/ruby-shadow/pull/29 |
| 6 | +# We are building https://github.com/voxpupuli/ruby-shadow/compare/patch-extconf |
| 7 | +# * contains https://github.com/apalmblad/ruby-shadow/pull/29 |
| 8 | +# * diff https://github.com/apalmblad/ruby-shadow/compare/master...bastelfreak:ruby-shadow:patch-extconf |
| 9 | +##### |
| 10 | +component 'ruby-shadow-patched' do |pkg, settings, platform| |
| 11 | + pkg.load_from_json('configs/components/ruby-shadow.json') |
| 12 | + |
| 13 | + pkg.build_requires "ruby-#{settings[:ruby_version]}" |
| 14 | + if !platform.is_cross_compiled? && platform.architecture == 'sparc' |
| 15 | + pkg.environment 'PATH', '$(PATH):/opt/pl-build-tools/bin:/usr/ccs/bin:/usr/sfw/bin' |
| 16 | + else |
| 17 | + pkg.environment 'PATH', '$(PATH):/usr/ccs/bin:/usr/sfw/bin' |
| 18 | + end |
| 19 | + |
| 20 | + pkg.environment 'CONFIGURE_ARGS', '--vendor' |
| 21 | + |
| 22 | + if platform.is_solaris? |
| 23 | + pkg.environment 'RUBY', settings[:host_ruby] if platform.is_cross_compiled? |
| 24 | + |
| 25 | + ruby = if !platform.is_cross_compiled? && platform.architecture == 'sparc' |
| 26 | + File.join(settings[:ruby_bindir], 'ruby') |
| 27 | + else |
| 28 | + # This should really only be done when cross compiling but |
| 29 | + # to avoid breaking solaris x86_64 in 7.x continue preloading |
| 30 | + # our hook. |
| 31 | + "#{settings[:host_ruby]} -r#{settings[:datadir]}/doc/rbconfig-#{settings[:ruby_version]}-orig.rb" |
| 32 | + end |
| 33 | + elsif platform.is_cross_compiled? |
| 34 | + pkg.environment 'RUBY', settings[:host_ruby] |
| 35 | + ruby = "#{settings[:host_ruby]} -r#{settings[:datadir]}/doc/rbconfig-#{settings[:ruby_version]}-orig.rb" |
| 36 | + else |
| 37 | + ruby = File.join(settings[:ruby_bindir], 'ruby') |
| 38 | + end |
| 39 | + |
| 40 | + pkg.build do |
| 41 | + [ |
| 42 | + "#{ruby} extconf.rb", |
| 43 | + "#{platform[:make]} -e -j$(shell expr $(shell #{platform[:num_cores]}) + 1)" |
| 44 | + ] |
| 45 | + end |
| 46 | + |
| 47 | + pkg.install do |
| 48 | + ["#{platform[:make]} -e -j$(shell expr $(shell #{platform[:num_cores]}) + 1) DESTDIR=/ install"] |
| 49 | + end |
| 50 | +end |
0 commit comments