homebrew-core/Formula/gmic.rb

39 lines
1.3 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.8.4.tar.gz"
sha256 "b2a279bdf981595b30d8d7828fabf9a620cde06eae8db345a8cddf2160c25379"
head "https://github.com/dtschump/gmic.git"
bottle do
cellar :any
sha256 "678d3b2bb8b2856fd9d5fee27a1c3215ee91a725265629bc1cfd398865d0ef75" => :catalina
sha256 "953591c5716c663fccb97bbd10b0c2367ff4b790d5f3d721288489913ecf5ef2" => :mojave
sha256 "34ecec0346606ac9048ebbc8315e1f8c72325782512c29bf1c10464a5d3e906b" => :high_sierra
end
depends_on "cmake" => :build
depends_on "fftw"
depends_on "jpeg"
depends_on "libpng"
depends_on "libtiff"
def install
system "cmake", *std_cmake_args,
"-DENABLE_FFMPEG=OFF",
"-DENABLE_OPENCV=OFF",
"-DENABLE_OPENEXR=OFF",
"-DENABLE_X=OFF"
system "make", "install"
end
test do
%w[test.jpg test.png].each do |file|
system bin/"gmic", test_fixtures(file)
end
system bin/"gmic", "-input", test_fixtures("test.jpg"), "rodilius", "10,4,400,16",
"smooth", "60,0,1,1,4", "normalize_local", "10,16", "-output", testpath/"test_rodilius.jpg"
assert_predicate testpath/"test_rodilius.jpg", :exist?
end
end