homebrew-core/Formula/cimg.rb

37 lines
950 B
Ruby

class Cimg < Formula
desc "C++ toolkit for image processing"
homepage "https://cimg.eu/"
url "https://cimg.eu/files/CImg_3.0.2.zip"
sha256 "ee55a37c33d503a64ff264b53952e502ba7c2887b59ded47c47c86ea52ac5c31"
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: "b7283b2ee43a8e2c3b54937e4592f26a934c7c7d64336af9d25ed1fc6ec51743"
end
on_linux do
depends_on "gcc" # C++ 17 is required
end
fails_with gcc: "5"
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