Files
chromebrew/lib/buildsystems/qmake.rb
github-actions[bot] 8796d687f5 Fix method reporting in buildsystems, Fix Rust buildsystem, Rebuild uutils_coreutils. (#11930)
* Revamp rust buildsystem.

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

* Rebuild uutils_coreutils correctly.

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

* Add better method printing to buildsystems.

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

* Unify gem_name and gem_version variables.

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

* cleanup

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

* Add variable for packages to skip during install testing portion of unit tests.

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

* Avoid system override in python3 postinstall.

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

* Remove old pip 23.2.1 workaround.

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

---------

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
Co-authored-by: Satadru Pramanik <satadru@gmail.com>
2025-05-22 15:52:26 +00:00

34 lines
1015 B
Ruby

require 'package'
require 'require_gem'
class Qmake < Package
property :qmake_build_extras, :qmake_install_extras
def self.build
puts "Additional #{superclass.to_s.capitalize} options being used:".orange
method_list = methods.grep(/qmake_/).delete_if { |i| send(i).blank? }
require_gem 'method_source'
method_blocks = []
method_strings = []
method_list.sort.each do |method|
@method_info = send method
if @method_info.is_a? String
method_strings << "#{method}: #{@method_info}".orange
else
method_blocks << @method_info.source.to_s.orange
end
end
puts method_strings
puts method_blocks
system "QMAKE_CXX='g++ #{ARCH == 'x86_64' && Gem::Version.new(LIBC_VERSION.to_s) >= Gem::Version.new('2.35') ? File.join(CREW_LIB_PREFIX, 'libC.so.6').to_s : ''}' qmake"
system 'make'
@qmake_build_extras&.call
end
def self.install
system "make INSTALL_ROOT=#{CREW_DEST_DIR} install"
@qmake_install_extras&.call
end
end