homebrew-core/Formula/cimg.rb

28 lines
729 B
Ruby

class Cimg < Formula
desc "C++ toolkit for image processing"
homepage "https://cimg.eu/"
url "https://cimg.eu/files/CImg_2.9.1.zip"
sha256 "5b5b9e57e8920c3291c80d6a604c1a40d2e0e4a038ec04a6c07b39f176c13200"
livecheck do
url "https://cimg.eu/files/"
regex(/href=.*?CImg[._-]v?(\d+(?:\.\d+)+)\.zip/i)
end
bottle :unneeded
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