mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
* Add initial plumbing for ruby gem-compiler use. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add binary gem building to ruby buildsystem. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Refactor upload to avoid sed. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add gem binary build plumbing to crew. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add binary_compression to gems. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add ruby gem binaries. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Move ruby_ruby_libversion to core. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Ruby gem update check should account for local versions. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Remove unused update_sha256 function. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add no_compile_needed to ruby_rubocop.rb Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Remove ruby_gem_compiler from buildessential. Signed-off-by: Satadru Pramanik <satadru@gmail.com> --------- Signed-off-by: Satadru Pramanik <satadru@gmail.com>
30 lines
1.1 KiB
Ruby
30 lines
1.1 KiB
Ruby
require 'package'
|
|
|
|
class Meson < Package
|
|
property :meson_options, :pre_meson_options, :meson_build_extras, :meson_install_extras
|
|
|
|
def self.build
|
|
@crew_meson_options = @no_lto ? CREW_MESON_OPTIONS.sub('-Db_lto=true', '-Db_lto=false') : CREW_MESON_OPTIONS
|
|
@mold_linker_prefix_cmd = CREW_LINKER == 'mold' ? 'mold -run' : ''
|
|
puts 'Additional meson options being used:'.orange
|
|
method_list = methods.grep(/meson_/).delete_if { |i| send(i).blank? }
|
|
method_list.each do |method|
|
|
puts "#{method}: #{send method}".orange
|
|
end
|
|
system "#{@pre_meson_options} #{@mold_linker_prefix_cmd} meson setup #{@crew_meson_options} #{@meson_options} builddir"
|
|
system 'meson configure --no-pager builddir'
|
|
system "#{CREW_NINJA} -C builddir"
|
|
@meson_build_extras&.call
|
|
end
|
|
|
|
def self.install
|
|
system "DESTDIR=#{CREW_DEST_DIR} #{CREW_NINJA} -C builddir install"
|
|
@meson_install_extras&.call
|
|
end
|
|
|
|
def self.check
|
|
puts "Testing with #{CREW_NINJA} test.".orange if @run_tests
|
|
system "#{CREW_NINJA} -C builddir test" if @run_tests
|
|
end
|
|
end
|