leptonica: optionally support gif, webp, openjpeg.

openjpeg was added in 1.71; webp in 1.67; giflib in 1.54

Closes Homebrew/homebrew#31534.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Jim Regan 2014-08-12 15:24:36 +01:00 committed by Mike McQuaid
parent 7afdc6e1b2
commit f51edd32ba

View file

@ -16,6 +16,9 @@ class Leptonica < Formula
depends_on 'libpng' => :recommended
depends_on 'jpeg' => :recommended
depends_on 'libtiff' => :optional
depends_on 'giflib' => :optional
depends_on 'openjpeg' => :optional
depends_on 'webp' => :optional
depends_on 'pkg-config' => :build
conflicts_with 'osxutils',
@ -27,9 +30,13 @@ class Leptonica < Formula
--prefix=#{prefix}
]
%w[libpng jpeg libtiff].each do |dep|
%w[libpng jpeg libtiff giflib].each do |dep|
args << "--without-#{dep}" if build.without?(dep)
end
%w[openjpeg webp].each do |dep|
args << "--with-lib#{dep}" if build.with?(dep)
args << "--without-lib#{dep}" if build.without?(dep)
end
system "./configure", *args
system "make install"