Files
chromebrew/packages/highway.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

45 lines
1.4 KiB
Ruby

# Adapted from Arch Linux highway PKGBUILD at:
# https://github.com/archlinux/svntogit-community/raw/packages/highway/trunk/PKGBUILD
require 'package'
class Highway < Package
description 'A C++ library for SIMD Single Instruction, Multiple Data'
homepage 'https://github.com/google/highway/'
version '1.0.1'
license 'Apache'
compatibility 'all'
source_url 'https://github.com/google/highway/archive/1.0.1/highway-1.0.1.tar.gz'
source_sha256 '7ca6af7dc2e3e054de9e17b9dfd88609a7fd202812b1c216f43cc41647c97311'
binary_compression 'tar.zst'
binary_sha256({
aarch64: 'ce08cdaa2edb56d438ddadd439dad0aad7cc81b75e79507970355a00d1299d08',
armv7l: 'ce08cdaa2edb56d438ddadd439dad0aad7cc81b75e79507970355a00d1299d08',
i686: '5e1a6569a998947c2c93729e27ca62524719ff82e2c37038f589c260d073034b',
x86_64: 'aa0488630c6ddfbdbecdd43870568767f4bb99075f188285d4fb9d5af2caa6dd'
})
depends_on 'gcc_lib' # R
depends_on 'glibc' # R
def self.build
Dir.mkdir 'builddir'
Dir.chdir 'builddir' do
system "mold -run cmake \
#{CREW_CMAKE_OPTIONS} \
-DBUILD_SHARED_LIBS:BOOL='ON' \
-DHWY_ENABLE_TESTS:BOOL='OFF' \
-DHWY_SYSTEM_GTEST:BOOL='OFF' \
-Wdev \
-G Ninja \
.."
system 'mold -run samu'
end
end
def self.install
system "DESTDIR=#{CREW_DEST_DIR} samu -C builddir install"
end
end