mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-10 16:08:08 -05:00
* 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)
37 lines
1.0 KiB
Ruby
37 lines
1.0 KiB
Ruby
require 'package'
|
|
|
|
class Gn < Package
|
|
description 'GN is a meta-build system that generates build files for Ninja.'
|
|
homepage 'https://gn.googlesource.com/gn/'
|
|
version 'dca877f'
|
|
license 'BSD'
|
|
compatibility 'all'
|
|
source_url 'SKIP'
|
|
binary_compression 'tar.xz'
|
|
|
|
binary_sha256({
|
|
aarch64: '7ecb46dc020a7f2ef83c9f299b93e33b7d7907915a580eae29fba4038d348572',
|
|
armv7l: '7ecb46dc020a7f2ef83c9f299b93e33b7d7907915a580eae29fba4038d348572',
|
|
i686: '24f08672a3063c1fb151239d347a8126d204f0b9ef81114512acd8a70772b4d8',
|
|
x86_64: '385d47846ff117275793dc43d9ef004d4aa1075b29af3d9283f289cfc757d59f'
|
|
})
|
|
|
|
depends_on 'python2' => :build
|
|
|
|
def self.build
|
|
system 'git clone https://gn.googlesource.com/gn'
|
|
ENV['C_INCLUDE_PATH'] = "#{CREW_PREFIX}/include/"
|
|
ENV['CXX'] = 'g++'
|
|
Dir.chdir('gn') do
|
|
system 'python build/gen.py'
|
|
system 'ninja -C out'
|
|
end
|
|
end
|
|
|
|
def self.install
|
|
system "install -Dm755 gn/out/gn #{CREW_DEST_PREFIX}/bin/gn"
|
|
end
|
|
|
|
def self.postinstall; end
|
|
end
|