29 lines
752 B
Ruby
29 lines
752 B
Ruby
class Cimg < Formula
|
|
desc "C++ toolkit for image processing"
|
|
homepage "https://cimg.eu/"
|
|
url "https://cimg.eu/files/CImg_2.9.6.zip"
|
|
sha256 "1645894956d858c1cab0458451a3bf2f8b7b8d48004d7dd9446ac8fd3ceadcce"
|
|
license "CECILL-2.0"
|
|
|
|
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
|