homebrew-core/Formula/cimg.rb

33 lines
908 B
Ruby

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