homebrew-core/Formula/gmic.rb
2017-11-07 08:37:33 -08:00

44 lines
1.6 KiB
Ruby

class Gmic < Formula
desc "Full-Featured Open-Source Framework for Image Processing"
homepage "https://gmic.eu/"
url "https://gmic.eu/files/source/gmic_2.1.5.tar.gz"
sha256 "6a5d8aaf3ffe22ef63dcee36da34fa448b70a3453f8cae30fd8e05c59751f8b4"
head "https://github.com/dtschump/gmic.git"
bottle do
cellar :any
sha256 "253f5a283b997b9a7918c692ceb7cacd85ef688fa9e28281b504eb5272e7f316" => :high_sierra
sha256 "7fb01fb8c2ca4455140238fdaee745d5b1e2a9f4d269f669e8083d61fdf2e33b" => :sierra
sha256 "dadfee9111b50543e3aa387588024c775adb480d7856bb28844cb00848e8e5b5" => :el_capitan
end
depends_on "cmake" => :build
depends_on "jpeg" => :recommended
depends_on "libpng" => :recommended
depends_on "fftw" => :recommended
depends_on "opencv@2" => :optional
depends_on "ffmpeg" => :optional
depends_on "libtiff" => :optional
depends_on "openexr" => :optional
def install
cp "resources/CMakeLists.txt", buildpath
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