libbpg: make x265 the default encoder.

Closes Homebrew/homebrew#46596.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
master
Jérôme Billiras 2015-12-02 20:47:05 +01:00 committed by Mike McQuaid
parent 19d90495d9
commit 661f408f4e
1 changed files with 7 additions and 6 deletions

View File

@ -11,20 +11,21 @@ class Libbpg < Formula
sha256 "7b8d1585ee9e2de010abfab1aaab419d052cf35d82704587c2f75947d4fc8ee5" => :mavericks
end
option "with-x265", "Enable x265 encoder"
option "without-jctvc", "Disable built-in JCTVC encoder"
option "with-jctvc", "Enable built-in JCTVC encoder - Mono threaded, slower but produce smaller file"
option "without-x265", "Disable built-in x265 encoder - Multi threaded, faster but produce bigger file"
depends_on "cmake" => :build
depends_on "yasm" => :build
depends_on "yasm" => :build if build.with? "x265"
depends_on "libpng"
depends_on "jpeg"
depends_on "x265" => :optional
def install
bin.mkpath
args = []
args << "USE_X265=y" if build.with? "x265"
args << "USE_JCTVC=" if build.without? "jctvc"
args << "USE_JCTVC=y" if build.with? "jctvc"
args << "USE_X265=" if build.without? "x265"
system "make", "install", "prefix=#{prefix}", "CONFIG_APPLE=y", *args
end