2016-07-16 02:10:35 +00:00
|
|
|
class Cmark < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Strongly specified, highly compatible implementation of Markdown"
|
2015-01-10 22:58:41 +00:00
|
|
|
homepage "http://commonmark.org"
|
2016-11-19 12:51:05 +00:00
|
|
|
url "https://github.com/jgm/cmark/archive/0.27.1.tar.gz"
|
|
|
|
sha256 "669b4c19355e8cb90139fdd03b02283b97130e92ea99a104552a2976751446b5"
|
2015-01-10 22:58:41 +00:00
|
|
|
|
2015-01-11 17:49:45 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2016-11-19 13:46:02 +00:00
|
|
|
sha256 "a6e19a07d842962cf8b5a4ac891d1145e3bff3b28307badca63ad581fbcfc0dd" => :sierra
|
|
|
|
sha256 "daccc233aa1367aadeefe40922375dfdf6a05c0a3f5ef5d667e8468137b9b9a3" => :el_capitan
|
|
|
|
sha256 "0ce1dc7e2b53e07d798a6106cb4aabe5ee762832367413bacfba581cd2157aea" => :yosemite
|
2015-01-11 17:49:45 +00:00
|
|
|
end
|
|
|
|
|
2015-01-10 22:58:41 +00:00
|
|
|
depends_on "cmake" => :build
|
2016-09-24 15:45:48 +00:00
|
|
|
depends_on :python3 => :build
|
2015-01-10 22:58:41 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
mkdir "build" do
|
|
|
|
system "cmake", "..", *std_cmake_args
|
|
|
|
system "make"
|
2016-07-16 20:06:16 +00:00
|
|
|
system "make", "test"
|
2015-01-10 22:58:41 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2016-07-16 20:06:16 +00:00
|
|
|
output = pipe_output("#{bin}/cmark", "*hello, world*")
|
|
|
|
assert_equal "<p><em>hello, world</em></p>", output.chomp
|
2015-01-10 22:58:41 +00:00
|
|
|
end
|
|
|
|
end
|