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>
23 lines
688 B
Ruby
23 lines
688 B
Ruby
require 'package'
|
|
|
|
class PERL < Package
|
|
property :pre_perl_options, :perl_build_extras, :perl_install_extras
|
|
|
|
def self.prebuild
|
|
puts "Additional pre_perl_options being used: #{@pre_perl_options.nil? ? '<no pre_perl_options>' : @pre_perl_options}".orange
|
|
system "#{@pre_perl_options} perl Makefile.PL"
|
|
system "sed -i 's,/usr/local,#{CREW_PREFIX},g' Makefile"
|
|
end
|
|
|
|
def self.build
|
|
@mold_linker_prefix_cmd = CREW_LINKER == 'mold' ? 'mold -run' : ''
|
|
system "#{@pre_perl_options} #{@mold_linker_prefix_cmd} make"
|
|
@perl_build_extras&.call
|
|
end
|
|
|
|
def self.install
|
|
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
|
|
@perl_install_extras&.call
|
|
end
|
|
end
|