homebrew-core/Formula/gmic.rb

44 lines
1.5 KiB
Ruby
Raw Normal View History

class Gmic < Formula
desc "Full-Featured Open-Source Framework for Image Processing"
homepage "https://gmic.eu/"
url "https://gmic.eu/files/source/gmic_1.7.9.tar.gz"
sha256 "93d8eb70780328fa207cef8555c77f7e9e5399ff7d204dfcab145809c51e34e4"
head "https://github.com/dtschump/gmic.git"
2016-11-08 17:42:41 +00:00
bottle do
cellar :any
2016-11-18 12:53:51 +00:00
sha256 "bd8dd557d4d4e0ab3cbe08738b9ea618e6a25c2ff0510798c92b613df7f9e67b" => :sierra
sha256 "ce8ef788b94cb32daceb0d5cbd30670b1969812523d5c2532333885fed8d3c27" => :el_capitan
sha256 "8e8b64e4ac2ab1c1a48d9037ff2a44f85582f68472631d67118a4e6d4f3532d2" => :yosemite
2016-11-08 17:42:41 +00:00
end
depends_on "cmake" => :build
depends_on "jpeg" => :recommended
depends_on "libpng" => :recommended
depends_on "fftw" => :recommended
depends_on "homebrew/science/opencv" => :optional
depends_on "ffmpeg" => :optional
depends_on "libtiff" => :optional
depends_on "openexr" => :optional
def install
args = std_cmake_args
args << "-DENABLE_X=OFF"
args << "-DENABLE_JPEG=OFF" if build.without? "jpeg"
args << "-DENABLE_PNG=OFF" if build.without? "libpng"
args << "-DENABLE_FFTW=OFF" if build.without? "fftw"
args << "-DENABLE_OPENCV=OFF" if build.without? "opencv"
args << "-DENABLE_FFMPEG=OFF" if build.without? "ffmpeg"
args << "-DENABLE_TIFF=OFF" if build.without? "libtiff"
args << "-DENABLE_OPENEXR=OFF" if build.without? "openexr"
system "cmake", *args
system "make", "install"
end
test do
%w[test.jpg test.png].each do |file|
system bin/"gmic", test_fixtures(file)
end
end
end