pngquant 2.10.2

- depend on rust at build time for a Cargo-based build
- remove the openmp option
- make little-cms2 non-optional since the Cargo-based build always uses
  lcms2 and will link a static version without the dependency

Closes #16543.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
ilovezfs 2017-08-08 12:05:38 -07:00
parent c433112e52
commit 9c3970bf98

View file

@ -2,8 +2,8 @@ class Pngquant < Formula
desc "PNG image optimizing utility"
homepage "https://pngquant.org/"
url "https://github.com/pornel/pngquant.git",
:tag => "2.10.1",
:revision => "b526af94ca3c116239739b8e2ec194bad54926f8"
:tag => "2.10.2",
:revision => "f10f5d217c170d7aff4d80b88bdc563bd56babef"
head "https://github.com/pornel/pngquant.git"
bottle do
@ -13,31 +13,15 @@ class Pngquant < Formula
sha256 "495dac84bfe458915bba4c7d89fb9db0ff47baa485d03f4e8c2f97c5a73f3a51" => :yosemite
end
option "with-openmp", "Enable OpenMP"
depends_on "pkg-config" => :build
depends_on "rust" => :build
depends_on "libpng"
depends_on "little-cms2" => :optional
needs :openmp if build.with? "openmp"
depends_on "little-cms2"
def install
ENV.append_to_cflags "-DNDEBUG" # Turn off debug
args = ["--prefix=#{prefix}"]
args << "--with-lcms2" if build.with? "little-cms2"
if build.with? "openmp"
args << "--with-openmp"
args << "--without-cocoa"
end
system "./configure", *args
system "make", "install", "CC=#{ENV.cc}"
system "cargo", "build", "--release"
bin.install "target/release/pngquant"
man1.install "pngquant.1"
lib.install "lib/libimagequant.a"
include.install "lib/libimagequant.h"
end
test do