Files
chromebrew/packages/gcc_lib.rb
Maximilian Downey Twiss f6dc1d8d4e Derive binary_url in package.rb (#7082)
* Add binary_compression value to each package

* Remove binary_url values and arrays

* Handle packages with empty binary_sha256 arrays (either missing binaries or not compiled by us)
2024-01-25 11:03:31 -05:00

43 lines
1.6 KiB
Ruby

require 'package'
require_relative 'gcc_build'
class Gcc_lib < Package
description 'GCC shared libs except libgccjit'
homepage Gcc_build.homepage
version '13.2.0' # Do not use @_ver here, it will break the installer.
license Gcc_build.license
# When upgrading gcc_build, be sure to upgrade gcc_lib, gcc_dev, and libssp in tandem.
puts "#{self} version differs from gcc version #{Gcc_build.version}".orange if version.to_s.gsub(/-.*/,
'') != Gcc_build.version
compatibility 'all'
source_url 'SKIP'
binary_compression 'tar.zst'
binary_sha256({
aarch64: '04c6f1af5d8b005dcea7d0050f7ea52d8c4a37def289287e590000056d707e67',
armv7l: '04c6f1af5d8b005dcea7d0050f7ea52d8c4a37def289287e590000056d707e67',
i686: 'b0aeb79cfc7df8b46b41f36902350ac94e9a7e0f04678f85c0fbb01a24f86235',
x86_64: '386695ced2bc2aeb93fc96b2176f3638a3ac0271667bdd9b058ff14bf0e97256'
})
depends_on 'gcc_build' => :build
depends_on 'glibc' # R
no_shrink
no_strip
def self.install
puts 'Installing Gcc_build to pull files for build...'.lightblue
@filelist_path = File.join(CREW_META_PATH, 'gcc_build.filelist')
abort 'File list for Gcc_build does not exist!'.lightred unless File.file?(@filelist_path)
@filelist = File.readlines(@filelist_path, chomp: true).sort
@filelist.each do |filename|
next unless filename.include?('.so') && !filename.include?('libgccjit')
@destpath = File.join(CREW_DEST_DIR, filename)
@filename_target = File.realpath(filename)
FileUtils.install @filename_target, @destpath
end
end
end