Files
chromebrew/lib/buildsystems/perl.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

38 lines
1015 B
Ruby

require 'package'
require 'require_gem'
class PERL < Package
property :pre_perl_options, :perl_build_extras, :perl_install_extras
def self.prebuild
puts "Additional #{superclass.to_s.capitalize} options being used:".orange
method_list = methods.grep(/perl_/).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 "#{@pre_perl_options} perl Makefile.PL"
system "sed -i 's,/usr/local,#{CREW_PREFIX},g' Makefile"
end
def self.build
system "#{@pre_perl_options} make"
@perl_build_extras&.call
end
def self.install
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
@perl_install_extras&.call
end
end