libheif 1.2.0 (new formula)

Closes #26960.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
master
Dominyk Tiller 2018-04-23 05:09:21 +01:00 committed by ilovezfs
parent c3852e8b07
commit 359e103ff5
1 changed files with 30 additions and 0 deletions

30
Formula/libheif.rb Normal file
View File

@ -0,0 +1,30 @@
class Libheif < Formula
desc "ISO/IEC 23008-12:2017 HEIF file format decoder and encoder"
homepage "http://www.libheif.org"
url "https://github.com/strukturag/libheif/releases/download/v1.2.0/libheif-1.2.0.tar.gz"
sha256 "2e7d40f81d1bbe6089b1e0f27800b97cf6a195e093ef86199edfb6e59e2fa8fa"
depends_on "pkg-config" => :build
depends_on "jpeg"
depends_on "libde265"
depends_on "libpng"
depends_on "x265"
def install
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}"
system "make", "install"
pkgshare.install "examples/example.heic"
end
test do
output = "File contains 2 images"
example = pkgshare/"example.heic"
exout = testpath/"example.jpg"
assert_match output, shell_output("#{bin}/heif-convert #{example} #{exout}")
assert_predicate testpath/"example-1.jpg", :exist?
assert_predicate testpath/"example-2.jpg", :exist?
end
end