31 lines
864 B
Ruby
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.7.zip"
|
|
sha256 "595dda9718431a123b418fa0db88e248c44590d47d9b1646970fa0503e27fa5c"
|
|
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: "1390d1b910034084ad8fb125fe83bdedc0373d05805102f5f9f89c348b2b3433"
|
|
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
|