homebrew-core/Formula/gmic.rb
2018-08-23 16:48:45 +02:00

46 lines
1.7 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 "2f3de90a09bba6d24c89258be016fd6992886bda13dbbcaf03de58c765774845"
revision 1
head "https://github.com/dtschump/gmic.git"
bottle do
cellar :any
sha256 "09322413b52ce5865967d68dc2f5a6153a147b83a69f20a3f5b5ac9498676b6b" => :mojave
sha256 "13ccaf356dc8be85d6d60078c5c10ad3ae6fd515169c396b6cb1c28b2a348c15" => :high_sierra
sha256 "7ed192f9ad04036d236cbe9b854ea54325bb366ec392d4cb977e227167ce1ebf" => :sierra
sha256 "db45390cb89c9a1d1280f05543555917d161be399223e79d99f6fcacae6532bf" => :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