Files
chromebrew/lib/buildsystems/meson.rb
Satadru Pramanik, DO, MPH, MEng 386f42ff6e Fix for require issues with highline and glibc 2.37 refactor (#10363)
* Adjust highline requires.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Refactor glibc_build237.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Adjust cmake logic for cmake_build_relative_dir.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Update buildsystems...

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Rebuild glibc 2.37 packages.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Adjust fixup for case of loading from much older crew.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Try to handle loading fixup on older crew update.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Handle older crew setups.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Use rubocop exclusion for only const.rb and fixup.rb.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Remove attr_accessor from buildsystems.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Force update compatible if coming from an older crew.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* remove require_gem from package.rb

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Add fallback for remove.rb

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* const tweaks...

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Adjust const.rb & fixup.rb to remove error messages on load after require.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Make remove run crew update compatible if being run on a newer underlying chromebrew.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* lint

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Adjust fixup to be more resilient to being loaded in an older crew.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Switch from symbolized json import.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* fixup

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* fixup

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* fixup

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* fixup

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Revert most changes.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Adjust essential deps handling in fixup.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Cleanup save_json in fixup.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* update highline

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* save json more.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* save json more.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* test remove changes

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Add more remove debug code.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Add more remove debug code.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* add debug to fixup

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* add debug to fixup

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* add debug to fixup

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* fixup

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Refresh crew json when calling crew functions or exiting fixup.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Refresh crew json when calling crew functions or exiting fixup.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* fixup

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* fix json string usage in remove

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* essential package debugging

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* fixup

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* fixup

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Adjust remove debugging...

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* more remove debugging

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Remove debugging code from commands/remove.rb

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Remove more debugging code from lib/fixup.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Adjust remove test to test both remove with and without debug argument.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Update const.rb to not set x86 constants when not on x86.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Set x86 constants to nil when not on x86.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Bump crew version.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

---------

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
2024-08-31 14:06:18 -05:00

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