Commit d0bae68e authored by satmandu's avatar satmandu Committed by GitHub

zstd -> 1.4.9 (#5327)

parent a10b398e
......@@ -3,35 +3,56 @@ require 'package'
class Zstd < Package
description 'Zstandard - Fast real-time compression algorithm'
homepage 'http://www.zstd.net'
version '1.4.7'
@_ver = '1.4.9'
version @_ver
compatibility 'all'
source_url 'https://github.com/facebook/zstd/archive/v1.4.7.tar.gz'
source_sha256 '085500c8d0b9c83afbc1dc0d8b4889336ad019eba930c5d6a9c6c86c20c769c8'
source_url "https://github.com/facebook/zstd/archive/v#{@_ver}.tar.gz"
source_sha256 'acf714d98e3db7b876e5b540cbf6dee298f60eb3c0723104f6d3f065cd60d6a8'
binary_url ({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/zstd-1.4.7-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/zstd-1.4.7-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/zstd-1.4.7-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/zstd-1.4.7-chromeos-x86_64.tar.xz',
binary_url({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/zstd-1.4.9-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/zstd-1.4.9-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/zstd-1.4.9-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/zstd-1.4.9-chromeos-x86_64.tar.xz'
})
binary_sha256 ({
aarch64: '4a917969893ff2d985aa498d989219b2c569dd01ff1b198d3e6bd2a770b7d34c',
armv7l: '4a917969893ff2d985aa498d989219b2c569dd01ff1b198d3e6bd2a770b7d34c',
i686: '192b17e599990e94d2d8343095c90be85e0013fe92c8933c6795c51f8ba39d89',
x86_64: '017e2d9e5fa613bb50385f6b49bb9642f7b3e6f10453e46b89ea3e4701a39ae7',
binary_sha256({
aarch64: 'c94ef7aecad9675d4fdcfc444cfd74c1560f6f8090c851bffe2be2a5250fc4f9',
armv7l: 'c94ef7aecad9675d4fdcfc444cfd74c1560f6f8090c851bffe2be2a5250fc4f9',
i686: 'd59795e6cc367cfb9120e4a7b60df706cfd1746c5b41485767cf2ff75eddb2cb',
x86_64: '055c10b86abdb5268f90c28f73ccb7cc1db155ef7d7e14fba97a977ed3886832'
})
depends_on 'lz4' => ':build'
def self.patch
# Patch from https://github.com/facebook/zstd/issues/2519#issuecomment-790092538
@meson_patch = <<~'MESON_PATCH_EOF'
--- a/build/meson/lib/meson.build~ 2021-03-02 22:20:57.000000000 +0000
+++ b/build/meson/lib/meson.build 2021-03-03 21:56:00.058700361 +0000
@@ -22,6 +22,7 @@
join_paths(zstd_rootdir, 'lib/common/threading.c'),
join_paths(zstd_rootdir, 'lib/common/pool.c'),
join_paths(zstd_rootdir, 'lib/common/zstd_common.c'),
+ join_paths(zstd_rootdir, 'lib/common/zstd_trace.c'),
join_paths(zstd_rootdir, 'lib/common/error_private.c'),
join_paths(zstd_rootdir, 'lib/common/xxhash.c'),
join_paths(zstd_rootdir, 'lib/compress/hist.c'),
MESON_PATCH_EOF
IO.write('meson.patch', @meson_patch)
system 'patch -p1 -i meson.patch'
end
def self.build
system 'make'
Dir.chdir 'build/meson' do
system "meson \
#{CREW_MESON_LTO_OPTIONS} \
builddir"
system 'meson configure builddir'
system 'ninja -C builddir'
end
end
def self.install
system 'make',
"DESTDIR=#{CREW_DEST_DIR}",
"PREFIX=#{CREW_PREFIX}",
"LIBDIR=#{CREW_LIB_PREFIX}",
'install'
Dir.chdir 'build/meson' do
system "DESTDIR=#{CREW_DEST_DIR} ninja -C builddir install"
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment