8000 termcolor 1.0.1 (new formula) · ArduinoBot/homebrew-core@3ec25c0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3ec25c0

Browse files
cxwxchenrui333
authored andcommitted
termcolor 1.0.1 (new formula)
Closes Homebrew#57597. Signed-off-by: chenrui <chenrui333@gmail.com>
1 parent 0d535ef commit 3ec25c0

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Formula/termcolor.rb

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
class Termcolor < Formula
2+
desc "Header-only C++ library for printing colored messages"
3+
homepage "https://termcolor.readthedocs.io/"
4+
url "https://github.com/ikalnytskyi/termcolor/archive/v1.0.1.tar.gz"
5+
sha256 "612f9ff785c74dcbe081bb82e8c915858572cf97dcf396ea7bd6a7d21cf6026a"
6+
license "BSD-3-Clause"
7+
8+
depends_on "cmake" => :build
9+
10+
def install
11+
system "cmake", ".", *std_cmake_args
12+
system "make", "install"
13+
end
14+
15+
test do
16+
(testpath/"test.cpp").write <<~EOS
17+
#include <iostream>
18+
#include <termcolor/termcolor.hpp>
19+
int main(int /*argc*/, char** /*argv*/)
20+
{
21+
std::cout << termcolor::red << "Hello Colorful World";
22+
std::cout << std::endl;
23+
return 0;
24+
}
25+
EOS
26+
system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-I#{include}"
27+
assert_match /Hello Colorful World/, shell_output("./test")
28+
end
29+
end

0 commit comments

Comments
 (0)
0