homebrew-core/Formula/cimg.rb

31 lines
864 B
Ruby

class Cimg < Formula
desc "C++ toolkit for image processing"
homepage "https://cimg.eu/"
url "https://cimg.eu/files/CImg_2.9.8.zip"
sha256 "1bbb2091498a46cff0e8aa75cb77be80fef0d6b9b386eb021c9515895f13b171"
license "CECILL-2.0"
livecheck do
url "https://cimg.eu/files/"
regex(/href=.*?CImg[._-]v?(\d+(?:\.\d+)+)\.zip/i)
end
bottle do
sha256 cellar: :any_skip_relocation, all: "7ec65e1947ef5957bd830e111d3dd0a2ee6f7dc7c2543cb74cc268e25a23ac6c"
end
def install
include.install "CImg.h"
prefix.install "Licence_CeCILL-C_V1-en.txt", "Licence_CeCILL_V2-en.txt"
pkgshare.install "examples", "plugins"
end
test do
cp_r pkgshare/"examples", testpath
cp_r pkgshare/"plugins", testpath
cp include/"CImg.h", testpath
system "make", "-C", "examples", "image2ascii"
system "examples/image2ascii"
end
end