Skip to content

Commit

Permalink
lz4: update 1.10.0 bottle.
Browse files Browse the repository at this point in the history
  • Loading branch information
gromgit committed Sep 4, 2024
1 parent a9bc5ff commit be651d2
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Formula/l/lz4.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
class Lz4 < Formula
desc "Extremely Fast Compression algorithm"
homepage "https://lz4.github.io/lz4/"
url "https://github.com/lz4/lz4/archive/refs/tags/v1.10.0.tar.gz"
mirror "http://fresh-center.net/linux/misc/lz4-1.10.0.tar.gz"
mirror "http://fresh-center.net/linux/misc/legacy/lz4-1.10.0.tar.gz"
sha256 "537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b"
license "BSD-2-Clause"
head "https://github.com/lz4/lz4.git", branch: "dev"

livecheck do
url :stable
strategy :github_latest
end

bottle do
root_url "https://github.com/gromgit/homebrew-core-aarch64_linux/releases/download/lz4-1.10.0"
sha256 cellar: :any_skip_relocation, aarch64_linux: "fa354479718dd907fb13a2f8a47d7ad6d3ba669891f953948e50585adebca6c8"
end

def install
system "make", "install", "PREFIX=#{prefix}"
# Prevent dependents from hardcoding Cellar paths.
inreplace lib/"pkgconfig/liblz4.pc", prefix, opt_prefix
end

test do
input = "testing compression and decompression"
input_file = testpath/"in"
input_file.write input
output_file = testpath/"out"
system "sh", "-c", "cat #{input_file} | #{bin}/lz4 | #{bin}/lz4 -d > #{output_file}"
assert_equal output_file.read, input
end
end

0 comments on commit be651d2

Please sign in to comment.